24960-25758

24875-26245 subjects 25268-26442

To the Editor
24960 [artem@fr it ] ...

FXGLViewer - rotate a primitive?
24966 [phlip_cpp@ya] Regarding this example code...
+ 24975 [billk@ct .c ] My OpenGL's going on about 3+ years rusty, but, I can imagine
| 24978 [billk@ct .c ] (rats, meant Ch. 3, "Viewing")
+ 24976 [chrismo@ho e] IIRC, you have to use the matrix stack. Start, push state onto the stack, do

memory debugging
24972 [ps@ra ia .m ] Are there any good tools for debugging c library bindings for ruby? To me it
24996 [decoux@mo lo] dmalloc is not the right solution, if you really want to debug it like

Re: Linux Magazine article(thoughts on Generic Programming)
24973 [ptkwt@sh ll ] I recently attended a talk at a local a grad school  entitled "Generic

without eval?
24974 [ralph.mason@] This is a multi-part message in MIME format.

request for public review: uri.rb
24981 [matz@ru y- a] I'd like to merge Akira Yamada's uri.rb in the standard distribution.

Mapping sequential strings to random strings: How would you do this?
24991 [hal9000@hy e] Question for you.
+ 24995 [niklasf@cs u] [Hal E. Fulton]
| 25001 [hal9000@hy e] How would you do this?
| 25003 [niklasf@cs u] [Niklas Frykholm]
| + 25004 [hal9000@hy e] How would you do this?
| | 25305 [raja@cs in i] Yours truly.
| + 25005 [    s@xs .d ] and to simplify things further, if you can use a document id, you can
+ 25000 [ralph.mason@] Could you just use MD5 on the original name to get the mangled name and then

changing the shell used by 'system'
24998 [vjoel@PA H. ] Is it possible to determine what shell Ruby is going to use for spawned
25017 [pbrannan@at ] Ruby tries to do the best it can to determine whether it is possible to do

attr_accessor question
25022 [mps@di co sy] I was wondering if when one has defined "attr_accessor" for their
+ 25025 [rich@in oe h] Do you need to know when a specific variable changes, or if an object
| + 25026 [mps@di co sy] Well, in answer to your first question, I guess both would be nice.
| + 25028 [feldt@ce ch ] They all call rb_attr but none of them uses the other. See object.c around
|   25031 [feldt@ce ch ] I meant this as: bad design on my behalf... ;-)
+ 25234 [avi@be a4 co] We really need a more generic attr framework, so that I can write something like
  25241 [mps@di co sy] Avi,
  25242 [dblack@ca dl] You need module_eval, rather than eval.  With module_eval, the string
  25245 [mps@di co sy] David,

Set class in Ruby
25029 [YuriLeikind@] Using Ruby for various tasks at work I
25036 [jason@jv eg ] Paul Brannan and I are working on implementing a library of data structures
+ 25046 [feldt@ce ch ] Could you be specific as to what DS and Algs you're working on. I know
| 25193 [jason@jv eg ] Anything we can think of :)
| 25195 [feldt@ce ch ] Ok, great. My GraphR package is being merged with Horst stuff. Its
+ 25050 [YuriLeikind@] Yes, cool, this one's pretty similar to what I have.
| + 25052 [feldt@ce ch ] From experience with Ruby and the community I've learned that a good
| + 25053 [YuriLeikind@] def hash
| + 25055 [hal9000@hy e] Yuri,
|   25056 [pbrannan@at ] Is a "bag" the same as C++'s "multiset"?
|   25057 [hal9000@hy e] I don't know. Never had a use for either.
|   25089 [c.hintze@gm ] C++ "multiset" is not exactly the same as Smalltalk's "Bag",
+ 25207 [rcena@ep or ] While you're at it: I seem to remember that OCaml has tree as a

Creating simple but nice logos?
25030 [feldt@ce ch ] I need a nice-looking logo for a Ruby project. Anyone know a good, free
+ 25038 [hgs@dm .a .u] which may be of some use.
+ 25049 [Dave@Pr gm t] The Gimp has a set of Script-Fu extensions for logos. Just type
+ 25154 [bdelmee@ad a] HTH,

REXML behavior change RFC
25042 [ ser@ef .o g] This is a general request for comments to all of you who are using REXML.
+ 25064 [info@mj is d] I think this is a good idea. It looks much better und more comfortable
+ 25065 [john.carter@] In one way I like it, its slightly more orthogonal.
| + 25106 [ser@ge ma e-] Well, REXML *does* parse the entire document before giving you the first
| + 25135 [james@ru yx ] In such cases, a SAX parser is a better choice; trap data as it goes by, rather than waiting until the entire document is read.
+ 25066 [sean@ch tt n] Why not overload to_s so that it returns the first element, then
| 25107 [ser@ge ma e-] Thanks, Sean.
| 25123 [sean@ch tt n] a.xpath("/foo/bar") ->  XPath object w/ search loaded
+ 25131 [james@ru yx ] I think this is a good thing; when using XPath I've gotten accustomed to getting back a nodeList, which the code then iterates over.
| 25155 [nat.pryce@b1] I have two comments.
| 25184 [ ser@ef .o g] This is what Element.elements.each() does now.
+ 25145 [julian-ml@be] I definitely approve.

RE:  REXML Question (Re: XML libraries (Re:  Re: ruby and webser vices))
25045 [BSchumacher@] Alright, I started playing with REXML last night and so far it looks pretty
25061 [ser@ge ma e-] How have you seen this done in other XML toolkits?
+ 25067 [tobiasreif@p] REXML is building a tree from an XML doc, then one can manipulate the
| 25086 [BSchumacher@] I'm not suggesting that you add it to REXML, as I think it doesn't really
+ 25146 [julian-ml@be] Well, as you probably know I've been working off and on on a Jabber library as well.  I've had similar problems with every parser I've tried but each one just needs a workaround.  My solution has been to write an XML stream class that handles a lot of this stuff.

Re: Set class in Ruby (Bag in Smalltalk)
25068 [Horst.Duchen] "Hal E. Fulton" <hal9000@hypermetrics.com> schrieb im Newsbeitrag

Re: Teach your kid math w/ruby (algebra package)
25069 [Horst.Duchen] Preface
25073 [phlip_cpp@ya] Can I have that with a side of BLT?
25083 [duchene@ma n] "Phlip" <phlip_cpp@yahoo.com> schrieb im Newsbeitrag
25152 [phlip_cpp@ya] Tk comes with a narrow but polished chart display system called BLT.

REXML inserting an element
25072 [benoit.cerri] I looked up the doc for REXML and couldn't find how one can insert an
25119 [BSchumacher@] Benoit-
25124 [ser@ge ma e-] BTW, I've always thought the way REXML does inserts now was rather tedious.
+ 25125 [james@ru yx ] Er, can we have both?
+ 25167 [tobiasreif@p] perhaps
+ 25758 [benoit.cerri] Thanks for the answer,

What happened to getopts.rb?
25079 [DDouthitt@cu] I was looking at Dave's online book - where's the description of getopts.rb?

exiting blox
25081 [niko.schwarz] is there a way to exit a block before time?

exiting blox
25082 [niko.schwarz] is there a way to exit a block before time?
+ 25085 [    s@xs .d ] you could try throw and catch
| 25171 [niko.schwarz] =) Thanks for the idea, but im afraid that wont do what i wont: i have now
+ 25088 [alan@di ik t] I'd like to know this one also.  I find that I keep trying to write
| 25093 [alwagner@ua ] Unless I am missing something obvious, break should work.
+ 25090 [dblack@ca dl] Doesn't break do what you want?  Or am I confused about what
| 25092 [alan@di ik t] break also stops any subsequent yields to the block.  I think Niko
| + 25094 [feldt@ce ch ] irb(main):003:0> [1,2,3].each {|e| e==2 ? break : p(e)}
| | + 25096 [feldt@ce ch ] irb(main):008:0> [1,2,3].each {|e| next if e == 2; p(e)}
| | | 25104 [alan@di ik t] Thanks!
| | + 25098 [ralph.mason@] This has god me thinking about how, break, next and redo work in the scope
| + 25095 [dblack@ca dl] [1,2,3,4].each { |e|
+ 25097 [Dave@Pr gm t] Doesn't 'break' work?
| 25168 [niko.schwarz] ,----[ eval.rb ]
| 25169 [decoux@mo lo] #divmod don't return what you think
| 25188 [niko.schwarz] erg, yea, youre right, thanks a lot =)
+ 25099 [mental@ry ia] As someone else already pointed out, you can use throw/catch.  I believe

FW:  RE:  REXML Question (Re: XML libraries (Re: Re: ruby and webser vices))
25087 [BSchumacher@] FYI- Quick follow up. NQXML allowed you to do this since elements weren't
25117 [ser@ge ma e-] Well, we may see this in REXML, if I understand what Bob is suggesting with
25134 [dblack@ca dl] I hope that if REXML becomes widely used, you'll consider including a
25149 [ ser@ef .o g] Hey, I'll start adding contribs to the distribution now.  I'd be happy if
25159 [tobiasreif@p] [...] I don't want the API to fluctuate wildly,

Any COM Package for Ruby?
25100 [rcena@ep or ] Is there a COM package for Ruby? Where can I download it from?
25105 [ned@bi e- om] What are you trying to do?
25206 [rcena@ep or ] Client/reader, for now. Thanks for the lead.

ANN: REXML 1.1a3
25101 [ser@ge ma e-] While I don't want to make it a habit of announcing minor revisions, I've
25246 [maki@in c. o] In XML 1.0 Rec., there are 5 predefined general entities: "&", "<", ">",
+ 25247 [james@ru yx ] Worse, it's not XML.  I would vote for automatic encoding of the quote characters to help avoid this type of error.
| + 25318 [ser@ge ma e-] Ach.  I responded too quickly.  This is a bug.  It'll be fixed in the 1.1a4
| + 25320 [ser@ge ma e-] I didn't realize that " and ' were required by the XML spec to be converted
|   25319 [kentda@st d.] I always thought that they only needed to be converted to entities when
|   25367 [james@ru yx ] Quote characters are fine, so long as there is no ambiguity when used inside an attribute value.
|   25373 [maki@in c. o] In addition, when we use them as text, it's no problem.
|   25375 [dblack@ca dl] Is there really that much flexibility?  I'm looking at
|   + 25378 [james@ru yx ] I was refering to the narrow case of what REXML should currently do with quote characters when they are contained in text destined
|   + 25457 [maki@op n- e] Hmm, I've been focus on REXML API to set attribute's value
+ 25253 [tobiasreif@p] write
  + 25259 [maki@in c. o] uuuum...Do you really want to write Ruby scripts in such a style?
  | 25261 [tobiasreif@p] OK.
  | 25322 [ser@ge ma e-] Ok, I just want to clarify this.
  + 25263 [james@ru yx ] REXML does not behave like a standard XML parser.
    + 25266 [tobiasreif@p] Any XML parser (and document) has to conform to the XML spec, otherwise
    + 25272 [dblack@ca dl] That will change, hopefully.  Otherwise we've just wasted a lot of
      25275 [tobiasreif@p] Hmmm... I have to go read. I thought it's OK for a parser+writer to
      25277 [dblack@ca dl] Funny, I never received my own mail.  Anyway...
      25281 [tobiasreif@p] What would be the point then? Then the output of an XML writer can't be
      25284 [dblack@ca dl] (Do you mean entities *not* resolved?  So that &gt; in the input is
      + 25288 [BSchumacher@] Personally, I think that conversion when adding to a string would be a good
      + 25289 [tobiasreif@p] No. Entities should get resolved. :)
        25291 [BSchumacher@] I would agree with this, for the 'write' output. However, I would argue that
        + 25292 [tobiasreif@p] Please don't get me wrong, I don't want to stop any discussion. I just
        | 25293 [julian-ml@be] It seems to me that we're getting ourselves a little confused here.
        | 25294 [tobiasreif@p] sounds good.
        + 25296 [hutch@xa pl ] This conversation is starting to loose me.
        | 25297 [dblack@ca dl] XML document --> XML parser
        | 25330 [tobiasreif@p] You mean using the XML writer to produce '...'?
        | 25339 [dblack@ca dl] No, I mean, for example, creating LaTeX output from XML input.
        | 25340 [tobiasreif@p] Using '...'? An XML writer?
        | + 25341 [dblack@ca dl] <chapter><title>History of AT&amp;T</title></chapter>
        | | 25345 [tobiasreif@p] ... so you are using REXMLs' parser, not its' serializer/writer. I see.
        | + 25421 [hutch@xa pl ] XML document --> XML parser --> application --> XML writer --> XML document
        |   25423 [tobiasreif@p] I even work with the concepts involved ;)
        |   25424 [dblack@ca dl] In "The XML Companion", Neil Bradley emphasizes the distinction
        |   + 25426 [hutch@xa pl ] If you take a strict interpretation of 'transformation'. It is not great if
        |   + 25427 [tobiasreif@p] XSLT is by far neither a general XML to XML transformation technology,
        |     25435 [volkmann2@ho] "many" is too strong. In my experience, XSLT is appropriate for most XML to
        + 25317 [ser@ge ma e-] The source document must be well formed.  If an '&', '<', or '>' are
          + 25325 [julian-ml@be] Hmm... what if I want to actually include the text &#100; ? I admit it's not very common unless you are talking about XML itself... but again this requires the user to know something about the encoding, otherwise they may be surprised when that part is not encoded... I wonder if it would be better to use a different method if you want text not to be escaped?  I'm not sure myself so I'm just throwing the idea out there.
          + 25332 [tobiasreif@p] which entity? do you mean the NCR?
          | 25333 [BSchumacher@] Tobi-
          + 25361 [dblack@ca dl] Don't take all the credit :-)
            + 25376 [maki@in c. o] IMHO, we need EntityReference class to hold unparsed entity
            + 25399 [tobiasreif@p] As you

parsedate: NameError when calling sub!
25162 [anieden@we .] Warning ... this might be a newbie question ...
25166 [decoux@mo lo] call Time#to_s
25304 [anieden@we .] Thank you, Guy! The crucial part is that File::Stat#mtime returns a

Is there something similar to the CPAN module for Ruby?
25173 [donotspam-je] Just wondering if there's a way to easily find, download, and install
+ 25180 [Dave@Pr gm t] Right now, there's the Ruby Application Archive (RAA) at
| 25182 [jim@fr ez .o] SMOP - Simple Matter of Programming
+ 25190 [ ser@ef .o g] I've been thinking about writing something like this for Ruby, but I'd like

Parallel array iteration
25178 [jim@fr ez .o] I've got a block here...It seems that I have seen that
+ 25187 [pbrannan@at ] One option is, of course, using an index to iterate over the array.
+ 25189 [kentda@st d.] esp. "diagonal"

Alternate readline implementations
25199 [pbrannan@at ] Since the license of GNU readline is GPL, there are a number of legal

Re: Ruby servlet container?
25205 [aaron.barnet] ...

Hash clone
25208 [niko.schwarz] maybe you can help me out: what do I do when I want a copy of a Hash, which
+ 25209 [gotoken@no w] Array#dup or Hash#dup does `shallow copy'.  If you would `deep copy',
| 25212 [niko.schwarz] Right.ok, after i thought a few times about this sentence of yours, i
+ 25210 [feldt@ce ch ] class Object

Is TCPSocket thread safe?
25211 [j.travnik@sh] Does anybody know if TCPServer is thread safe?
+ 25225 [BSchumacher@] Jakub-
+ 25248 [matz@ru y- a] Socket classes are Ruby-thread safe, with exception of gethostbyname()
  25274 [geniusj@bl e] I have a fairly large TCPServer implementation that I have created.
  25386 [matz@ru y- a] Thread.do_not_reverse_lookup = true
  25388 [hal9000@hy e] I guess you mean TCPSocket, not Thread.
  25389 [matz@ru y- a] Oops.

OT: Berkeley DB on windows
25213 [alwagner@ua ] I have successfully installed Guy Decoux's Ruby/bdb and the
25214 [rich@in oe h] they extract into /usr/...
25217 [alwagner@ua ] That looks good, Rich. But, but that's just ruby and the db
25219 [rich@in oe h] That IS the database and the interface (all in one nice little package) ;-)
25222 [alwagner@ua ] Sorry. Don't mean to be contentious, but I think you must have
25223 [rich@in oe h] Albert,

Compiling Ruby with VC++ - Makefile problems
25216 [ralph.mason@] When compiling ruby with vc++ as per the instructions I get a complaition
+ 25235 [james@ru yx ] Offhand, I've seen similar errors when the make file has spaces where there should be tabs, or where there is a : where WIndows
+ 25309 [ianrae88@ya ] Hmmm, I downloaded 1.6.5 yesterday and it built using VC++ 6 right out of the
  25324 [rich@in oe h] I did the same last night.  The README.win32 file within the ruby/win32

Ruby is becoming mainstream
25220 [Dave@Pr gm t] In this month's IEEE Software magazine's design column, Martin Fowler
25224 [harryo@zi wo] I take it you mean the Nov/Dec issue.  I just looked on their web site
25226 [Dave@Pr gm t] Yup - that's the one
25228 [matt@yo el .] Does anyone have a link? Thanks!
25229 [harryo@zi wo] Unless it's available somewhere else, the only place you'll find it is at

ruby/Tk
25221 [Jean-Francoi] I'm trying to use ruby/tk, and my program has a socket opened r/w.
25238 [nagai@ai ky ] I'm sorry but 'fileevent' command is not implemented on Ruby/Tk.
25244 [Jean-Francoi] Thx very much I will try that
+ 25249 [kero@d4 50 u] Too slow? Is that because of the if-statements in the
| 25379 [nagai@ai ky ] I'm sorry, but I don't know the reason.
+ 25301 [harryo@zi wo] Could you maybe set up three threads?  One to accept the file events and one to
  25380 [nagai@ai ky ] I think so too. :-)

An opinion please...
25237 [Dave@Pr gm t] Wandering through the triple-r reports last night, I noticed that
25240 [dblack@ca dl] I'd be inclined to remove the whole run, just to keep things

E-Mail order processors needed now!
25239 [sxbipb@ne sy] Net Systems USA is currently seeking people to run a home based business for work at home. Good income and flexible hours. Great for stay-at-home moms, students, and those who need the extra money. No experience necessary, we will train. Start next day! Computer and internet required. Visit us online: www.netsystemsusa.cjb.net   for more info.

[ANN] Ruby/DBI 0.0.11
25255 [neumann@s- i] I just released Ruby/DBI 0.0.11.

NOEX_CFUNC: feature or bug?
25257 [riley@co ec ] Perhaps one of the astute readers of this list can explain the
25258 [decoux@mo lo] Yes, this is considered as useless. A better explanation at
threads.html
top