26141-27839

25918-29264 subjects 26284-27115

Passing class names to constructors.
26141 [hgs@dm .a .u] If I want to create a variable number of objects, all of
+ 26143 [decoux@mo lo] Object.const_get knotclass
+ 26144 [Dave@Pr gm t] If instead of passing in the symbol, you passed the class itself, you
| 26154 [hgs@dm .a .u] Can I do this if I have already defined class Knotclass?
| + 26157 [decoux@mo lo] Well there is a confusion here.
| | 26158 [hgs@dm .a .u] Oh! Thank you for pointing that out. :-)
| + 26167 [Dave@Pr gm t] I thought you wanted to generate subclasses of KnotClass. If all you
+ 26146 [kentda@st d.] something = Module.const_get( knotclass )
| 26155 [hgs@dm .a .u] Ah, yes, I think that is more what I want.  Thank you.
+ 26148 [kevinbsmith@] Here's my attempt.
| 26156 [hgs@dm .a .u] Oh, pass the actual constant itself. That is even more readable.
+ 26151 [nat.pryce@b1] Don't pass in a symbol, pass in a reference to the class object you want to
| 26159 [hgs@dm .a .u] Thank you. That's helped clarify my ideas about Abstract Factory as well.
+ 26175 [phlip_cpp@ya] When I applied the first big Refactor (yippee!) to my Flea project,

Non-perlish regular expressions (was: Linux Magazine article)
26160 [kevinbsmith@] Sorry for jumping in late, and for my ignorance of regular
26161 [decoux@mo lo] if this regexp fail (i.e. you don't have `-'), ruby return nil

Establishing Ruby's Popularity
26166 [ruby@ja es r] I have a potential employer who would like some estimation of Ruby's popularity.  I know of seven books out (or almost out), and
26168 [tobiasreif@p] Robert has a barchart for ruby talk activity.
+ 26169 [feldt@ce ch ] Yes, its really not much but you can check out
| 26171 [james@ru yx ] Wow.   Thanks!
+ 26170 [james@ru yx ] Thanks for the info; which Robert, and where is the chart?

Sharp Linux with Ruby?
26172 [hubert@cs ny] I know that Sharp has come up with a Linux PDA a few months back,
+ 26183 [erik@ba fo s] It runs on the IPAQ running linux and the two devices are pretty simular
| 26185 [phlip_cpp@ya] Nice, but...
+ 26184 [kero@d4 50 u] Actually, I gave my iPAQ binaries to someone owning a Sharp. Don't

More advanced Ruby - any english ?
26176 [ralph.mason@] This is a multi-part message in MIME format.
26180 [Dave@Pr gm t] I believe all these are in the PickAxe: http://www.rubycentral.com/book/

NQXML Conformance (was Re: Conformance Test of XML Parsers in Ruby(20011122))
26178 [ jimm@io co ] I've looked at what kind of errors these are. For XML, they fall into two
26181 [martin@v. oe] I would suggest to follow the same strategy that Expat uses: Export
+ 26198 [maki@op n- e] In addition, in UTF-8, Ruby can handle it :-)
+ 26224 [hutch@xa pl ] I mentioned what the Eiffel XML parsers did in a previous message, buried in
  + 26228 [hutch@xa pl ] What I meant by 'extend' is 'subclass' or 'derrive' (NOT adding
  + 26316 [martin@v. oe] So are you saying "until Ruby 'properly' supports Unicode, Ruby XML
    26327 [hutch@xa pl ] No, I'm saying they should convert everything to UTF-8 and hand it to the
    26346 [martin@v. oe] There is no error in this document. It is well-formed. The encoding
    26396 [hutch@xa pl ] "It is a fatal error when an XML processor encounters an entity with an
    26856 [martin@v. oe] This doesn't apply. 4.3.3 is about external parsed entities, as

Re: regex/split/scan question (was: Re: Linux Magazine article)
26188 [dblack@ca dl] Isn't your #split version shorter than the Perl version?
26190 [josb@cn ds .] Yes, but it does not do the same thing. I do like the Ruby version better than
+ 26193 [Dave@Pr gm t] How about
| 26195 [josb@cn ds .] Yes, but it but it breaks on things like
| 26196 [Dave@Pr gm t] I must be missing something, then. Given these four strings, what do
| 26200 [josb@cn ds .] a-b          b
| + 26204 [niklas@ka i.] [Jos Backus]
| + 26281 [kevinbsmith@] Seems to me that from a clarity standpoint, I would create
+ 26199 [billk@ct .c ] ext = mbox.scan(/-(.+)/).flatten[0]    ?
  26201 [josb@cn ds .] Yes, this one looks really good. Let me see if I can break it :-) Thank you!

bitmap in ruby-fltk?
26194 [mchahn@fa el] Is there any way to draw bitmaps in ruby-fltk?  FLTK itelf has the objects
+ 26202 [ttate@kt ja ] There is no way now.
| 26203 [mchahn@fa el] I've never worked on a ruby extension before, but I'd be happy to help if I
| 26208 [ttate@kt ja ] No, I've never heard.
| 26268 [loriend@bi p] You certainly can build ruby extension a dll with cygwin. You do it just the
+ 26241 [kevinbsmith@] Do you know which of these would be most important to you?
  26250 [mchahn@fa el] But only in 256 colors, not rgb.  It is rgb painting that I am totally stuck
  + 26269 [loriend@bi p] If you link Fltk 1.1.0b5 you will get 32-bit colour support, an improved
  | 26282 [mchahn@fa el] you read 'readme.win32'?
  | 26475 [loriend@bi p] I'm afraid that if you want to build extensions with MSVC you will have to
  + 26297 [ttate@kt ja ] Have you already added them? I've successfully added Pixmap and
    26372 [mchahn@fa el] Great!  Thanks.  Even thought I will not be adding anything, I might still

[ANN] Ruby-Gnome 0.26 released
26197 [nconway@kl m] I released version 0.26 of Ruby-GNOME (including the Ruby-GTK binding) a

Book "Rub in 21 days" Table of contents online
26205 [mjais@we .d ] in case anyone is interested.
+ 26206 [niko.schwarz] regards,
| + 26207 [tobiasreif@p] why not?
| + 26210 [mjais@we .d ] I have some of these "in 21 days" or "in 24 hours" books
| | + 26248 [niko.schwarz] I have to admit I didnt read any of those, but I know that the java-book of
| | | + 26251 [mchahn@fa el] Is anyone else getting these bounces on every post?
| | | | 26255 [james@ru yx ] Yes, and good suggestion.
| | | + 26254 [j.travnik@sh] Yes, learning to program in 21 days is really an illusion,
| | | | 26260 [niko.schwarz] wow =) it took me actually 3 days to reed it fully (which did not hold me
| | | + 26259 [chadfowler@y] In my experience, learning to be productive in Ruby in
| | + 26402 [rcena@ep or ] I used to sneer at these books until I picked up "Golf for Dummies"
| + 26232 [Dave@Pr gm t] And lo! Moses missed out on a good book.
| | 26240 [   ml@sp .d ] Also las ich bei Dave Thomas [mailto:Dave@PragmaticProgrammer.com]
| + 26246 [mchahn@fa el] I'm coming out with a "learn Ruby in 20 days"!. (tip of the hat to
| + 26272 [ rik@kd .o g] #if Niko Schwarz
|   26350 [gkdata@cs co] I own and use about a dozen 21 days/ 24 hours books and love them!
|   26448 [matz@ru y- a] If you have experience of other programming languages, I believe you
+ 26419 [alwagner@tc ] about Ruby?
  26446 [ms@ia ta e. ] Well, that would be me, with some help from David Alan Black and others,
  26459 [alwagner@tc ] this genre, hence my question about the author.  The author, not the format,

[OT] Re: KDE or GNOME curiosity question...
26209 [guillaume.la] Any mildly complex C++ program will bend of break this rule in one way or
+ 26236 [eldiener@ea ] Using std::auto_ptr<> or other smart pointers (Boost) in C++ gets rid of
| + 26263 [billk@ct .c ] Personally I'd agree that non-deterministic finalization is kind of a
| + 26276 [matz@ru y- a] ??
|   + 26283 [mchahn@fa el] In java, finalization is not even guaranteed to occur.  If the GC never
|   + 26285 [eldiener@ea ] I am aware of that but unfortunately, like Java, one can't force the
|     + 26287 [Dave@Pr gm t] Perhaps you could post one of your current Ruby applications that
|     | 26300 [eldiener@ea ] I am discussing a language issue that is easy to understand. Any OO
|     | + 26301 [schuerig@ac ] IMHO, you're trying to apply RIAA in languages where it does not apply.
|     | + 26313 [chadfowler@y] I think you've done everything but respond to Dave's
|     | + 26318 [Dave@Pr gm t] I certainly see a problem relying on garbage collection to free
|     + 26320 [matz@ru y- a] I don't get the point.  First of all, what does RAAI stand for?
|       + 26342 [ser@ge ma e-] Here's an illustrative point.  The designers of Java recognized the
|       + 26357 [eldiener@ea ] Sorry, it should be RAII. It stands for "Resource Acquisition Is
|       + 26360 [billk@ct .c ] I've been interpreting it as (a typo for) RAII, the idiom of
|         26374 [mchahn@fa el] How hard would it be to have an option to use reference counting in a
|         + 26455 [matz@ru y- a] It must be pretty hard under the current implementation.  The garbage
|         | + 26457 [pixel@ma dr ] replace most (in some programs, all) of the need of GC by stack-based memory
|         | | 26491 [matz@ru y- a] Hmm, unfortunately it's too hard for me to read.  sigh.
|         | | 26493 [pixel@ma dr ] - the Introduction in http://www.diku.dk/research-groups/topps/activities/kit2/summerschool/toc.html
|         | + 26463 [mchahn@fa el] Excuse my ignorance, but how does partial reference counting work?
|         |   26484 [matz@ru y- a] What I had in mind was a combination of reference counting (of limited
|         + 26518 [pbrannan@at ] I've been wondering the same thing.  A few of problems with reference
|           26544 [mchahn@fa el] I was thinking of the reference counting as being totally seperate from gc.
|           + 26554 [pbrannan@at ] Consider the situation in which object A holds a reference to object B,
|           + 26746 [matz@ru y- a] Hmm, I'm not sure how it works and how much useful.  At least implicit
+ 26247 [kentda@st d.] Now, this might become somewhat rant-and-rave-ish, highly off-topic and
| 26286 [eldiener@ea ] I e-mailed Al Stevens about this issue. I think that if the Qt framework,
| 26299 [ rik@kd .o g] #if Edward Diener
| 26353 [eldiener@ea ] That is very similar to C++ Builder, which uses the nomenclature of
+ 26273 [ rik@kd .o g] #if Guillaume Laurent

SV:  Re: Book "Rub in 21 days" Table of contents online
26211 [mikkel.bruun] or....as a wise man said...

generating and serving SVG
26214 [tobiasreif@p] here's my howto
+ 26215 [feldt@ce ch ] Extremely cool; I didn't know what SVG was really about but your examples
| + 26216 [feldt@ce ch ] Sorry, I missed its already started at: yuya.4th.to/ruby/library/#svg.
| | 26217 [tobiasreif@p] Robert
| + 26218 [tobiasreif@p] Robert,
| + 26264 [mikkelj-anti] Ruby and SVG are independtly two of the coolest technologies I've been
|   + 26265 [tobiasreif@p] SVGUIs?
|   | + 26266 [armin@ap ro ] can you describe a scenario in a GUI where you
|   | | + 26267 [tobiasreif@p] no doubt; this stuff is highly controversial. I don't want to convince
|   | | + 26302 [    s@xs .d ] yep. Imagine you forgot your glasses and instead of squinting
|   | | + 26387 [mikkelj-anti] The point is not the ability to create fancy scalable or non-square buttons.
|   | |   + 26393 [feldt@ce ch ] So maybe Ruby really can be a player here? What kind of language bindings
|   | |   | + 26399 [mikkelj-anti] Primarily I would like a foreign function interface for SVG. Today there are
|   | |   | | 26401 [feldt@ce ch ] Please enlighten me as to what FFI means in this context?
|   | |   | | + 26411 [mikkelj-anti] are
|   | |   | | | 26435 [feldt@ce ch ] Ok, now I see.
|   | |   | | | + 26436 [decoux@mo lo] For an introduction to the system implementation
|   | |   | | | + 26479 [mikkelj-anti] Forgot to comment on this last time: yes this is an important contribution
|   | |   | | |   26488 [feldt@ce ch ] I'd also really like to see a Ruby-to-native compiler and I'm doing some
|   | |   | | |   26564 [mikkelj-anti] I did some research - I don't know much about the gnu backend, but like you,
|   | |   | | + 26441 [tobiasreif@p] (client-, and as far as possible serverside) SVG DOM or SVG DOM like API
|   | |   | + 26440 [tobiasreif@p] absolutely. There is great potential for this as a popular future
|   | |   + 26439 [tobiasreif@p] I also had that idea; but unless many platforms work this way, you would
|   | |     26451 [mikkelj-anti] It is relatively simple to a have a small http server driving the GUI,
|   | + 26275 [neumann@s- i] Have a look at www.berlin-consortium.org.
|   + 26305 [decoux@mo lo] See also
|     26388 [mikkelj-anti] I also cannot comment on the details of the patent statements - but I can
|     26390 [    s@xs .d ] oops. IIRC, TrueType is an Apple technology,
+ 26219 [henning@ik o] WOW!! beautiful!
+ 26220 [tobiasreif@p] the URL is
  26222 [    s@xs .d ] and if you're running linux, you might want to give
  + 26223 [tobiasreif@p] display SVGs by themselves (not embedded in (X)HTML).
  | 26226 [feldt@ce ch ] Do you know a simple way (prefereably a single exe) that can
  | + 26229 [armin@ap ro ] I played a bit with gcj (with gcc3.0.1 and 3.0.2) and it depends
  | + 26234 [tobiasreif@p] sorry, but other than Batik, no.
  + 26227 [neumann@s- i] Or the pure Java "SVG Toolkit". A viewer is included, but it's slow.

SV:  Re: generating and serving SVG
26221 [mikkel.bruun] this is so cool...

XML Stream Parser
26231 [hutch@xa pl ] This XMLStreamParser has come up a couple of times recently (the conformance
26242 [neumann@s- i] No, XMLStreamParser is expat (respectively the XMLParser package).
26256 [hutch@xa pl ] Thank you :-)

Info on upcoming Ruby books?
26235 [schuerig@ac ] I've looked around a bit to find some more detailed information on

Re: iPAQ Linux with Ruby?
26243 [kero@d4 50 u] (no, keyboard not written in Ruby.)

adding instance variables to an existing class.
26252 [hgs@dm .a .u] How might I add some instance variables to an existing class, such
+ 26253 [kentda@st d.] irb(main):001:0> class String
+ 26257 [dblack@ca dl] As Kent says, the "" string constructor bypasses String.new.  So you
+ 26258 [mental@ry ia] class String
| 26682 [hgs@dm .a .u] This didn't work, it still gives me nil, as does David Alan Black's
| 26688 [dblack@ca dl] Hmmm....  I must be writing/testing the wrong thing.  Here's
| 26691 [hgs@dm .a .u] I got a warning I missed last time! -- I had test_any and test_many --
+ 26367 [chr_rippel@g] If you are working in cvs you can do this easily be redefining allocate.

REXML: question on indentation
26261 [info@mj is d] require "rexml/document"

help with Ruby / Ant Problem
26262 [ronjeffries@] As part of my app for building the HTML for my web site (which is
26292 [Dave@Pr gm t] My only experience doing that sort of thing with Ant involved writing
26347 [ronjeffries@] Makefiles?

Table: Ruby versus Smalltalk, Objective-C,  C++,  Java;
26270 [armin@ap ro ] I tried to compiled an objective table to compare these OO languages.
+ 26271 [alwagner@tc ] 1) Smalltalk is dynamically typed
| 26274 [armin@ap ro ] Thanks a lot for the fast reply. I corrected 2) already;
| 26556 [dew_dropper@] No.  Smalltalk is most definitely purely DYNAMICALLY typed, just like
+ 26277 [james@ru yx ] What?  No Python?!!  Oh, the natives will be restless ...
| 26278 [armin@ap ro ] Email me the entries for Python and I add it at once :-)
| 26279 [paul@pr sc d] Access to super method (Python 2.1 syntax): super(MyClass,
| 26280 [armin@ap ro ] Excellent; I updated the table;
| 26310 [feldt@ce ch ] Armin,
| 26312 [neumann@s- i] It covers the languages BETA, C#, C++, C-Talk, Eiffel, Java, ObjPascal,
+ 26315 [lucsky@ma .c] You can replace the question marks by a 'yes' for the Java column on the
| 26317 [armin@ap ro ] thank you very much. Page is updated.
| + 26337 [johnknight.c] Is CLOS (common lisp object system) an actor in this world still? Or is there some other scheme or lisp or guile version that deserves to be included? I am just asking I don't have the knowledge to contribute.
| | + 26348 [    s@xs .d ] you might want to consult with Paul Graham on this topic :-)
| | | 26371 [john@jo nk i] Thank you. That is the best article I have read in a very long time. I hope to be able to substitute ruby for lisp throughout the article. Do you think that is possible?
| | | + 26373 [    s@xs .d ] hopefully, it will be.
| | | + 26375 [j.travnik@sh] I have read that some time ago.
| | |   26376 [john@jo nk i] After I sent my comment out, I started to think about the lack of macros in ruby.
| | |   + 26383 [j.travnik@sh] "One way we used macros was to generate Html.  There is a very
| | |   + 26385 [    s@xs .d ] blocks and closures go along fine.
| | |   + 26428 [avi@be a4 co] One common use of macros in Lisp and Dylan is to hide the use of
| | |     26481 [vjoel@PA H. ] There is also
| | + 26689 [matju@sy pa ] CLOS is still relevant. It's still used. It's the most known object system
| |   + 26711 [avi@be a4 co] Not surprising, given that the author of The Art of the Metaobject
| |   | 26716 [Dave@Pr gm t] That is a .sig to cherish!
| |   + 26965 [pixel@ma dr ] in which category would you have ruby? between class and object centric,
| |     27362 [matju@sy pa ] Exactly that.
| + 26361 [david.simmon] As previously posted, you inspired me blatantly build on your idea and write
|   + 26363 [pixel@ma dr ] - what do you mean with "multi-methods". AFAIK it's multiple dispatch, aka
|   | 26379 [david.simmon] write
|   | 26382 [pixel@ma dr ] beurk, i don't like this.
|   | 26403 [david.simmon] Yes, but if you follow this principle it leads to much clearer understanding
|   | + 26405 [feldt@ce ch ] I get a link up in the right corner to a cached PDF. The link is long so
|   | + 26445 [pixel@ma dr ] same in statical typing: http://www.eptacom.net/pubblicazioni/pub_eng/mdisp.html
|   | | 26473 [david.simmon] In reading your reply I am frustrated by the sense that you are drilling [as
|   | + 27839 [schneiker@ju] [Lots of stuff snipped.]
|   + 26516 [tgagne@am ri] David, your table seems to mix language features with library features.
|     + 26526 [ned@bi e- om] MT uses native threads, but only works on Win32 systems, which have their own
|     | 26542 [david.simmon] MT
|     | 26663 [tgagne@am ri] David, thanks for clearing that up.  Your table makes better sense now, but I
|     + 26538 [david.simmon] use
|     + 26543 [david.simmon] As to library features, as I have been so recently told (of late) in
+ 26469 [matju@sy pa ] You write that Ruby is single-inheritance and CLOS is
threads.html
top