23179-24518

23044-24253 subjects 23367-26701

enscript files for Ruby?
23179 [feldt@ce ch ] Anyone knows a place to get them? The link in the RAA entry is no more.

Finalisers (was Re:  Re: Bruce Eckel's opinion of Ruby)
23180 [nat.pryce@b1] The finaliser block is a *closure* and so can hold references to any

Re: obj.__dict__
23181 [matju@sy pa ] ago. I finally checked-in this nice sample of M?taRuby usage this morning.

class variables and inheritance
23183 [fritz.heinri] For my purpose @@variables where useless as the version defined in the
+ 23188 [decoux@mo lo] Well, not really more elegant but self.class is the same than type
+ 23194 [pbrannan@at ] Is this what you are looking for?
  + 23265 [fritz.heinri] ahh, thank you, that is not ugly.
  + 23275 [fritz.heinri] Unfortunately i need at least type::A (but i can live with this) for

Ruby book(s)
23197 [tobiasreif@p] anyone know when the next Ruby book(s) come(s) out?

Re: Bruce Eckel's opinion of C#
23199 [brucedickey@] Obviously, this is a pure Ruby forum. Bruce Eckel said that C# is a bad
23222 [pdcawley@bo ] Originality is all well and good, but creative theft is even better.

C++ Access to script
23204 [jglueck@vo .] Making progress on my game engine and starting to implement
23282 [decoux@mo lo] The best here is, perhaps, to define a method Rs::GObject::inherited and

rb_protect_inspect
23208 [pbrannan@at ] return rb_ensure(inspect_call, (VALUE)&iarg, inspect_ensure, obj);
23209 [pbrannan@at ] Oops, I misread.  Disregard my last post.
23210 [ned@bi e- om] This is why Matz should consider moving to ANSI C function definitions and
23213 [matz@ru y- a] Can we now ignore Sun's old cc?  Maybe.
23215 [ned@bi e- om] sparc-sun-solaris2.4
23241 [matz@ru y- a] Don't take it too serious.  That was my "excuse".
23251 [ned@bi e- om] Who knows Matz, you might find that coding in ANSI C gives you something

SmallScript/AOS Selector Namespaces (Re:  Re: Bruce Eckel's opinion of Ruby)
23212 [matz@ru y- a] This is too heavy topic for my dead-by-fever brain.

() vs (...) in header files
23214 [pbrannan@at ] There is a serious problem with including ruby.h and intern.h in C++
23283 [decoux@mo lo] Look at 1.7.*
23292 [pbrannan@at ] I thought I had looked at 1.7 in CVS before I started anything, but I just
+ 23296 [decoux@mo lo] parse.y is OK for you ?
| 23299 [pbrannan@at ] I'm sorry, I do not understand the question.
| 23301 [decoux@mo lo] pigeon% more parse.y
| 23305 [pbrannan@at ] Correct prototypes are always nice.  In those cases, however, I never call
| 23309 [decoux@mo lo] Well, it was never defined which functions can be called from an
| 23325 [pbrannan@at ] Hmm.
+ 23319 [nobu.nokada@] The correct prototypes for rb_thread_select() and
| 23326 [pbrannan@at ] Ah, but if I am to call these functions, then I will need to include the
| + 23341 [nobu.nokada@] Maybe.  It seems better.
| + 24518 [nobu.nokada@] I forgot ruby.h had `extern "C"'.  So, you may need
+ 23356 [matz@ru y- a] First of all, I hate too strict prototypes. ;-)

Erroneous warning: block for Proc#call is useless
23225 [balexander@r] sig.rb:10: warning: block for Proc#call is useless
23244 [nobu.nokada@] Please try following patch.
23335 [balexander@r] It works beautifully. Thanks for the very quick reply!

Ruby's Opinion of Bruce Eckel
23235 [ljohnson@re ] I keep trying to like Bruce. This question arrived for the nth time on a day
+ 23246 [bobhicks@no ] You shouldn't...
+ 23279 [tobiasreif@p] L.O.VeryL. ;)
+ 23379 [mdemello@ve ] ROTFLMAO!!!! That was absolutely priceless :)

Re: SmallScript website [Was: Creating blocks at runtime]
23236 [pulsar@qk .c] Hmmm.
+ 23247 [bobhicks@no ] Works fine on OSX 10.1 using the latest Mozilla...
| + 23249 [ned@bi e- om] I haven't bothered to get Java working in my Mozilla. Have you?
| + 23266 [reinout@so p] Netscape 4.7x on RedHat Linux on Intel worked correctly for me, both
|   23338 [pulsar@qk .c] Thanks for checking this out...
+ 23525 [kero@d4 50 u] Galeon couldn't handle the site, either. Opera can. Links and Lynx

Parsing Ruby's interpolated strings/regexps
23237 [feldt@ce ch ] What would you expect a Ruby parser to return after parsing an
23240 [matz@ru y- a] For the first time only. Evstr stores its parse tree.
23242 [feldt@ce ch ] Aha, so its a workaround. I thought you decided to do it that way for some
23268 [matz@ru y- a] Too many backslashes in strings often irritate me.  Plus some use them
23269 [feldt@ce ch ] Oh yes, these are useful. I mean the ones not using any of the braces or

[ANN] RubyInRubyParser 0.1-pre-alpha
23248 [markus.lado@] I would like to release a pre-alpha version of my RubyInRubyParser. It's a
+ 23250 [ptkwt@sh ll ] Is the intent for this to eventually lead to a Ruby VM written in Ruby?
| 23263 [markus.lado@] Yes, sooner or later. The last few weeks I passed in learning Lisp and
| 23322 [ptkwt@sh ll ] How might this be done?
| 23376 [markus.lado@] ... technically interesting discussion
+ 23271 [feldt@ce ch ] Great news! Ironically, myself and Rich Kilmer (who kindly teamed up to
+ 23286 [jjthrash@po ] I'd personally like to see projects like this flourish.  Whenever sRuby
| 23323 [ptkwt@sh ll ] What is sRuby?
| 23336 [jjthrash@po ] sRuby is Robert Feldt's idea of a subset of Ruby that can be compiled to C,
| 23339 [eli.green@co] I would suggest that the easiest way to see this happen is to leverage off the
| 23382 [mchahn@fa el] I started to build a gui toolkit on top of SDL and ran into several
+ 23429 [matju@sy pa ] Yep, and despite rumours of the contrary, I only have one head.
  + 23434 [feldt@ce ch ] I'm also converting to RubySchema so...
  + 23434 [feldt@ce ch ] I'm also converting to RubySchema so...
    23682 [matju@sy pa ] Well, Tuple is outside of the AST system, so adding to it will also add to

Rite code available?
23252 [ptkwt@sh ll ] As I recall, Rite is the VM that will be used in Ruby 2.0 (in place of the
23267 [matz@ru y- a] There's no code by myself yet.  Masato Kiyama and his friend told me

Kate editor in KDE2 -- Ruby syntax highlighting
23255 [alwagner@tc ] Has anyone here attempted to use the Kate editor?  Specifically, set the
23260 [nigelb@en sb] I use Kate all the time and have made my "better" syntax highlighter
+ 23288 [alwagner@ua ] Thank you, Nigel.  I'll try that tonight when I get home.
+ 23384 [alwagner@tc ] cannot change colors on selected items, most importantly "definitions".

Ruby macros
23261 [lraz@ea th i] I think that some sort of macro system similar to one found in Lisp or Scheme
+ 23262 [avi@be a4 co] I'm also a big fan of macros, although I tend towards somewhat more
| + 23274 [feldt@ce ch ] I'm not very familiar with Lisp's macro system but the idea seems very
| | 23276 [avi@be a4 co] A preprocessor wouldn't make sense for Ruby; it would definitely want to
| | 23277 [feldt@ce ch ] Ok, I was a bit afraid there... I shouldn't have worried since you are
| | 23281 [decoux@mo lo] fl (think to the french pronunciation :-)) and it's a toy. For macros,
| + 23357 [matz@ru y- a] It was interesting.  But I couldn't think of "exact" behavior of "is".
+ 23285 [aleksei.guze] Parameterized classes are "object-oriented macros" ;)
| 23287 [Dave@Pr gm t] The original discussion about macros at RubyConf started with some
+ 23654 [pcs3@nj t. d] I make no such claim, but I'm going to respond anyways.
  + 23656 [avi@be a4 co] I disagree.  It would be far, far easier to write a simple S-expression
  | + 23669 [decoux@mo lo] Not a good idea, for me
  | + 23678 [raja@cs in i] A Ruby macro system would indeed be interesting.  When I used to code in
  | + 23690 [pcs3@nj t. d] Well, when you throw in the middle two I certainly agree with you, but
  + 23670 [feldt@ce ch ] Could you give some short examples showing the power of the CL macro
    + 23671 [decoux@mo lo] If you want it at experimental feature, I think that it's best that you
    | 23672 [feldt@ce ch ] Of course.
    + 23691 [pcs3@nj t. d] Well, there is really no situation where a problem absolutely requires a

Unsubscribe
23272 [david.muren@] Can anyone tell me how to unsubscribe this e-mail list? I have been to
+ 23273 [feldt@ce ch ] To unsubscribe ML <ruby-talk@netlab.co.jp>, send "unsubscribe" in the mail
+ 23315 [ser@ge ma e-] Do you have, or have you had, multiple email accounts forwarding to one

RegExp question
23289 [chris.morris] I need to scan text and treat some punctuation (brackets, slashes) as if
+ 23291 [jjthrash@po ] The [] construct makes this possible.  If you do
+ 23294 [Dave@Pr gm t] You could do something like
  23297 [chris.morris] <g> Yeah, dang it. Seems obvious now.

[RegEx] What dose _.tr!
23290 [t.rademacher] frist of all I'm new to Ruby, but I think Ruby is high on my time-table to
+ 23293 [decoux@mo lo] ROT13, try it twice and see the result
+ 23295 [jjthrash@po ] String#tr! does an in-place replacing of characters.  In this case, it's


23300 [ntalbott@ro ] I think I found a bug... if not, can someone please explain?
23408 [matz@ru y- a] Yes.  I fixed.  I will commit the fix soon.

RE: The headless message [was: zilch]
23302 [ntalbott@ro ] Who's the idiot who posted a message without a subject?!?

why the @ s ?
23303 [tobiasreif@p] on my journey from Rubynewbie to Whoknowswhat, I'm having difficulties
+ 23304 [decoux@mo lo] You have always a class in ruby, for example when you write (at the
| 23308 [kentda@st d.] I thought it only was defined in the instance object, and not the Object
| 23310 [decoux@mo lo] pigeon% ruby -e 'def initialize; end'
| 23353 [kentda@st d.] Of course, you're right, and I messed up in that code snippet too. :-P
+ 23306 [Dave@Pr gm t] Because you're sharing the variables between the top level scope and
| 23311 [tobiasreif@p] Dave,
| + 23314 [dblack@ca dl] Did you try calling fred? :-)
| + 23316 [Dave@Pr gm t] you have to call 'fred' to get the error...
+ 23307 [kentda@st d.] You are mistaken, I believe.

class Foo does not call Class.new?
23318 [marick@te ti] class Foo
23358 [matz@ru y- a] Right.
+ 23360 [dblack@ca dl] Is this going to apply to [] not using Array.new, and "" not using
| 23395 [matz@ru y- a] They now use Array.allocate and String.allocate respectively.
| 23578 [dblack@ca dl] I can't find any #allocate methods in the latest CVS files.  Can you point
| 23597 [matz@ru y- a] % ruby -ve 'p String.allocate'
| 23657 [dblack@ca dl] No, I found it -- my cvs area was way out of sync.
+ 23392 [marick@vi ib] I'm afraid I don't understand. Will I be able to do metaclass tricks? For
  23549 [matz@ru y- a] First of all, I should have put "FYI" before the note.  You can't do

Newbie seeks %x{...} help
23324 [brian_e_bake] I am trying to dynamically generate commands as strings
+ 23330 [neumann@s- i] You can substitute any expression in back tick strings as you can
+ 23443 [ ser@ef .o g] Which, indirectly, leads to a question I had.  I know this has been asked
  23551 [matz@ru y- a] Check out "open3", and if you find something interesting (or proposal
  23564 [ser@ge ma e-] Crap.  Double crap.  I *knew* this was it; in the back of my mind, a
  23599 [matz@ru y- a] I'm open for opinions.  But you don't have to work on it.

[OT] half below average
23340 [avi@be a4 co] To nitpick the nitpick - things in nature often have a gaussian (normal)
+ 23344 [ryo_saeba_00] Well, a lot of statistics are good for general presentation, which
| 23363 [dblack@ca dl] Hmmmm... does computer programming occur in nature? :-)
| 23409 [Stephan.Kaem] Depends on how 'nature' is defined.... If you consider programmers as human
+ 23352 [joel.neely@f] Well, to nitpick**3 ... ;-)
| 23568 [erne@po er a] You know how dumb the average person is.  Well half the population is even
+ 23707 [schneiker@ju] OK, to add another level of nitpick: Thins in nature _sometimes_ have an

Issues with white space [was Re: Bruce Eckel's opinion of Ruby]
23342 [raja@cs in i] My latest episode wtih white space messing up semantics was along the
23439 [ ser@ef .o g] This is really, really bizarre.  Can anyone explain to me why this is true?
+ 23447 [decoux@mo lo] pigeon% ruby -e 'puts((8 ; + 20) / 2)'
| + 23448 [pbrannan@at ] Where do I get this ii module?  Does it come with 1.7?
| | + 23449 [feldt@ce ch ] Guy has probably given the link. There are also two alternatives NodeDump
| | + 23451 [decoux@mo lo] ii is not interesting, iis is better :-)
| + 23477 [ser@ge ma e-] No, I understand this, and it makes sense... why isn't it a parse error?
| | + 23495 [vjoel@PA H. ] main()
| | + 23497 [raja@cs in i] You are right that parens have the highest precedence, but no parens are
| |   + 23516 [ser@ge ma e-] <sigh>  I must be stupid.  I just don't get this.  I mean, I see what is
| |   | + 23520 [mrcode@po pa] irb(main):016:0> s = (puts "creating a string"; "a string")
| |   | | 23559 [ser@ge ma e-] Ok.  I get it.  I don't like it, but I get it.
| |   | + 23677 [raja@cs in i] def foo
| |   + 23543 [dblack@ca dl] % 9 ); p a'
| |     23545 [feldt@ce ch ] I've been telling you the %XstrX constructs when X not a paren of brace
| + 23489 [pixel@ma dr ] I think the easiest way to catch this is to warn for unused constants alike
| | + 23493 [pbrannan@at ] 1 + 1                  # statement has no effect
| | | 23494 [pixel@ma dr ] well, starting with constants could catch some errors...
| | + 23542 [dblack@ca dl] -e:1: warning: useless use of a literal in void context
| | + 23603 [decoux@mo lo] Why ? this is usefull (this is 1.7)
| + 23651 [larsch@cs au] I am a bit surprised by this, because my attempt to do this did not work.
|   23686 [raja@cs in i] It seems like for Ruby
+ 23453 [raja@cs in i] Ah.  Bizarreness is in the eye of the beholder ;-)
  23484 [paul@pr sc d] Well, since you mentioned Python...
  + 23487 [mrcode@po pa] Lexer and parser idiosyncrasies is one of the last reasons I would ever
  | 23550 [matz@ru y- a] I've never noticed that he "insulted" Ruby.  Only I know is that he
  | 23642 [paulp@Ac iv ] Whatever the virtues of Ruby, you're an excellent leader for the
  | 23644 [armin@ap ro ] I like that mail :-).
  + 23491 [pixel@ma dr ] i = (
  + 23505 [raja@cs in i] You are correct.  Shortly after posting my earlier note I checked my Python

Where can I place new scripts/classes?
23343 [robert_linde] Where can I place new scripts/classes?
23347 [Dave@Pr gm t] How about www.rubycookbook.org?

Will Ruby 1.7.1 will be able to package a script?
23345 [robert_linde] Will Ruby 1.7.1 will be able to package a script?
23598 [matz@ru y- a] RubyGems?

Re: GUI / was [ANN] RubyInRubyParser 0.1-pre-alpha
23350 [markus.lado@] matju, and experiences with Java Swing will tell you that this solution is
+ 23355 [rich@in oe h] -Rich
| + 23362 [nat.pryce@b1] This is how Tcl/Tk is designed, and it works very well.  For a long time it
| + 23369 [eli.green@co] I never understood why Swing was so slow. I do know, however, that Swing is
|   + 23371 [avi@be a4 co] An alternative model I played around with involved linking widgets to
|   | + 23380 [eli.green@co] Hmm. MVC, eh? :)
|   | + 23389 [nat.pryce@b1] I would prefer widgets to maintain lists of closures that are called when
|   |   23390 [ralph.mason@] This code would work just at well without any complex builtin support for
|   + 23373 [markus.lado@] I've never seen X11 server for MS windows, but there are some.
|   | + 23374 [avi@be a4 co] It means, "I'll try it but I don't necessarily expect to succeed".
|   | + 23377 [eli.green@co] Well, it adds to the requirements a fair bit ... people have to install an X
|   |   23663 [matju@sy pa ] an issue with SDL is that it does not provide you with anything for
|   + 23383 [mchahn@fa el] My preliminary experiments with a GUI on top of SDL lead me to believe it
|   + 23385 [j.travnik@sh] How to deal with multiple windows and positioning with this model?
|   + 23407 [feldt@ce ch ] This is beginning to sound cooler and cooler. Even though I'm not willing
|   + 23432 [jjthrash@po ] While I agree with you, I'm still on a Squeak-is-really-cool high, and I
|     + 23435 [feldt@ce ch ] Yes, that would be nice, especially if its very portable. I'm unsure how
|     + 23435 [feldt@ce ch ] Yes, that would be nice, especially if its very portable. I'm unsure how
|     + 23438 [jjthrash@po ] SDL provides a Blitting routine which would do what we want.  It's also
|     + 23454 [ ser@ef .o g] Yes and no.  You could go a long way towards this by having all of the GUI
+ 23405 [feldt@ce ch ] Well, there are X clients for windows (even free ones).
+ 23593 [matju@sy pa ] To be precise: Bypassing what the X11 server has to offer you is not

Unexpected results using File::SEPARATOR
23351 [pbrannan@at ] foo = File::SEPARATOR
+ 23378 [mike@st k. o] foo and bar refer to the same thing, maybe you want to make a copy of the
+ 23391 [matz@ru y- a] Point taken.  It would be done soon.

[ANN] Simple Inference Engine in Ruby
23354 [peterhi@sh k] I have written a simple inference engine as a class for Ruby, it's in the

prog help
23361 [sthomas@de t] How can I get a float to round to the hundredth 0.009 -> 0.01?
+ 23365 [dblack@ca dl] Pending an answer from someone who knows what they're doing with
| 23366 [sthomas@de t] Thanks, that works.  Can't believe I didn't think of that.
+ 23452 [ ser@ef .o g] (val * 100).round / 100.0
threads.html
top