130336-132476

130117-131141 subjects 130574-131191

rb_callcc from c extension: musing
130336 [eule@sp ce c] In a sharing mood: Am I the only one who did not see how this can be done ?

OT -RE: Ruby users in India?
130338 [botp@de mo t] //Sounds good to me. How about the Brigade Road Coffee Day as a
130401 [martindemell] martin

nontinuations and throw / catch
130347 [stephen.hill] I've been playing around with continuations a bit. What I'd like to be
130394 [pit@ca it in] you can find examples for continuations and coroutines in the archives of

Subclassing Immutable objects (Time)
130353 [tone_hole@ya] I've been trying for a while to subclass Time, but i'm hitting some
130362 [sroberts@un ] How about not sub-classing, and have Time be an implmentation detail
130363 [gavin@re in ] In my MutableTime class [1], I wrapped Time, rather than inheriting
130370 [tone_hole@ya] Gavin,

[Q] RubyGems dependencies.
130355 [george.mosch] I have a small question regarding RubyGems. In my GemSpec
+ 130360 [ruby-lists@l] gem install mygem.gem
+ 130366 [chadfowler@g] It's a limitation of RubyGems that was originally by intention.  Now

[SUMMARY] Solving Tactics (#18)
130356 [james@gr yp ] Tactics is a strange game to us chess players.  I'm so use to considering going

Re: RubyGems dependencies.
130367 [george.mosch] Could not find RubyGem postgres (>= 0.7.1)
130369 [george.mosch] Ok, nice to hear, thank you.

Class of the Instance [was Re: Building a Better Functor]
130368 [gavin@re in ] Coming from Javascript (where every instance is trivially extensible
+ 130371 [gavin@re in ] class Object
+ 130372 [transfire@gm] require 'facet/object/special_class'
| 130375 [gavin@re in ] Heh, right before I got your email, I had just added "instance_class"
+ 130373 [martindemell] It's been discussed several times, but no one  has come up with a good
| 130376 [bob.news@gm ] "Martin DeMello" <martindemello@yahoo.com> schrieb im Newsbeitrag
| 130660 [matju@sy pa ] The Module class already has an instance-method called
+ 130378 [bob.news@gm ] "Gavin Kistner" <gavin@refinery.com> schrieb im Newsbeitrag
| 130382 [a.r.ferreira] Indeed JavaScript supports object orientation based on prototypes
| + 130389 [gavin@re in ] and
| | 130402 [flgr@cc n. e] And for an example of how powerful JavaScript really is you might want
| + 130392 [bob.news@gm ] "Adriano Ferreira" <a.r.ferreira@gmail.com> schrieb im Newsbeitrag
+ 130379 [ptkwt@ar cn ] f = Foo.new
| 130385 [gavin@re in ] While I admit that I was (shockingly, to me) unaware of that simple
+ 130387 [dblack@wo bl] Aw, come from Ruby already! :-)

ruby-dev summary 25481-25641
130380 [ksaito@ur nu] This is a summary of ruby-dev mailing list.

Composing mail messages to send via Net::SMTP
130384 [ay1204@qa i.] I want to make a mail message with attachments and send it.  However,
130390 [stevetuckner] Here is some code I stole from somewhere (I don't remember where now)
130653 [ay1204@qa i.] Sorry for the late reply, thanks for the code.

Numeric Integration Library (calculus, analysis)
130396 [b@gi pe t. o] -=-
130397 [b@gi pe t. o] A new library -- please let me know if anyone uses it.
130611 [gdprasad@gm ] Looked at it and tested it. Will report if I use it.
130951 [b@gi pe t. o] Thanks Prasad.

A Ruby-relevant quote from Alan Kay
130399 [curt@hi bs c] ACM Queue just published an interview with Alan Kay (the creator of
+ 130400 [petite.abeil] Cheers
| 130408 [rampant@gm i] Replace Smalltalk with Java, and Java with Ruby :-)
| 130463 [a.r.ferreira] Argh! Going from Smalltalk to Java is not an improvement at all.
| 130466 [lists@ha ff ] I think you may have misunderstood the message - he wasn't advocating that
| 130469 [rampant@gm i] Thanks Tom, that's the meaning I was after :)
| 130527 [a.r.ferreira] Sorry, Douglas, for misinterpreting what you have said. It just didn't
| + 130533 [curt@hi bs c] I think this is part of the reason, but I think there is another reason for
| + 131526 [cjs@cy ic ne] If if by "making it right" you mean going back to imperative languages
|   + 131533 [joaopedrosa@] Nice post. Maybe Smalltalk is more like the old Unixes and Ruby is
|   + 131538 [martindemell] I'm just waiting for the day when no one will take a language without
|   | 131581 [michael.walt] Those were the days! :-)
|   + 131546 [csaba@ph ny ] That one block thing is just what needed in the 92% of cases. So I think it was
|   | 131548 [curt@hi bs c] That's a limitation of the Ruby syntax. I think Curt's point was that at
|   + 131589 [wmorgan-ruby] I don't know Smalltalk, so perhaps I'm misrepresenting your claims. But
|   | 131619 [ruby.talk.li] Aaah!
|   | 131624 [agorilla@gm ] +1
|   + 131601 [billk@ct .c ] I love elegant syntax.  That Smalltalk didn't need an "if"
|     131643 [csaba@ph ny ] What do you mean by "needing" if? Ruby neither needs if, it just has it.
|     131670 [billk@ct .c ] Ah, sorry - I wasn't intending to compare Smalltalk directly
|     131705 [csaba@ph ny ] [ :) ]
|     132414 [steven_shaw@] <snipped code>
|     + 132471 [steven_shaw@] I came across what looked like a keyword argument calling syntax via
|     + 132476 [csaba@ph ny ] In TrueModule #ifthen stores the block passed to it. #else is
+ 130411 [brianm@ap ch] curl http://hoho.dyndns.org/~holger/smalltalk.html \
  130467 [dave@bu t. d] ruby -ropen-uri -e "puts open(
  130482 [phasis@bc in] You can put a caret ^ character at the end of the line to continue it.

Cross Platform GUI Toolkits
130405 [tkelly-ruby-] My apologies if this is a silly question. I have never written a game
+ 130406 [ruby-lists@l] gtk's canvas is not only slow but also supposedly quite
| 130407 [mark@oc we .] I believe Tk's canvas is both fast and stable.  I've had good success with it.
| 130412 [chneukirchen] I found it rather slow, as you need to create an object per line and
+ 130648 [timsuth@ih g] I haven't used it, but RUDL (http://rudl.sf.net/) sits on top of SDL and

Really confused about exceptions now
130409 [probertm@ac ] On top of the memory leak issue, I have been trying to track down unhandled
130410 [jim@fr ez .o] # returns a String, which is true.
130413 [probertm@ac ] 12:43 (kant)$ cat test2.rb
130419 [gfb@to es ft] When you do not have explicit "return" statement in your rescue, the
130425 [probertm@ac ] def alive?
130437 [eero.saynatk] Just for clarity, you could restructure that one more time :)
130446 [bob.news@gm ] "E S" <eero.saynatkari@kolumbus.fi> schrieb im Newsbeitrag
130494 [probertm@ac ] Thank you.
130498 [bob.news@gm ] "Mark Probert" <probertm@acm.org> schrieb im Newsbeitrag
130519 [probertm@ac ] Yes, I did.  No change in behaviour.

Rails: Queriyng entries with conditions
130422 [malte@ha de ] I'm writing a rails application where I query entries from a table which
130424 [demetriusnun] object

(none)
130431 [dwollmann@pu] unsubscribe

Gtk - Image via HTTP in TreeView
130434 [mail@mi et c] I'm just writing my first ruby-gtk application. But already there are the
130444 [mutoh@hi hw ] Use Gtk::CellRendererPixbuf to render pixbuf.
130483 [mail@mi et c] ok, I'll try, thanks.

"stack level too deep"... because Threads keep their "starting" stack
130439 [sroberts@un ] It appears threads keep their callers stack. Reasonable. But they do
130440 [matz@ru y- a] No way to strip.  It's a limitation of the current thread
+ 130558 [discordantus] This might work. This is only lightly tested, so there might be hidden
+ 130562 [nobu.nokada@] [ruby-dev:21556]
  130579 [matz@ru y- a] I think only concern left is whether exporting block_pass().  Can you

network program
130442 [jdavis-list@] I am writing an application and my design is for a non blocking tcp
+ 130443 [billk@ct .c ] I use, for ex.
+ 130451 [bob.news@gm ] "Jeff Davis" <jdavis-list@empires.org> schrieb im Newsbeitrag
| 130480 [james@gr yp ] I believe Ruby's internal Thread system use Multicasting, but not
| 130689 [james@gr yp ] I meant MultiPLEXing here, not multicasting.  Sorry.
+ 130481 [james@gr yp ] I would say the simplest way would be to download a library that
  130690 [james@gr yp ] I finally remembered what it was called and used that to find it.

fxruby + threads + ctrl-c != stacktrace
130447 [martin.anker] somewhere there has to be an infinite loop. (CPU 100%, taking more and
130448 [ruby@br an s] You probably already now this and it is not exactly an answer to you question, but one thing that helps a lot when debugging threads is to put
130449 [martin.anker] I know this, and this should definitely be the default setting for any

[Newbie] Efficient method lookup from integer
130450 [az@de pa me ] I've done much OO coding in perl 5 and I'm
+ 130452 [bob.news@gm ] "James" <az@despammed.com> schrieb im Newsbeitrag
| 130453 [botp@de mo t] //What would be a good ruby idiom to move efficiently from
+ 130454 [ptkwt@ar cn ] You could essentially do the same thing with some modifications.  First,
+ 130459 [rff_rff@re o] people already gave you good answers, so I am her with a question :)
  + 130470 [mikewoodhous] How different are the methods likely to be? Are there really going to
  | 130568 [botp@de mo t] //people already gave you good answers, so I am her with a
  + 130588 [az@de pa me ] The simple answer is, I am still learning ruby and did not know

Samizdat RDF Storage 0.1
130455 [angdraug@gm ] Due to numerous requests from the public, Samizdat RDF Storage module
130492 [aredridel@gm] Looking at it now -- Very impressive so far. Simple and looks solit.
131150 [angdraug@gm ] Thanks! Care to port it to Sqlite3?

HELP! irb doesn't work in Windows XP :(
130456 [pjmlp@pr gt ] I started playing with Ruby after the famous
+ 130457 [p_bossi_AGAI] I don't know about  Scintilla, but I have managed to let irb work on my
| 130468 [pjmlp@pr gt ] Thanks for the information.
+ 130472 [itsme213@ho ] I wonder if this is related to the problems with using IRB from within
  130488 [pjmlp@pr gt ] I guess that the fact that you are able to use it
  + 130491 [halostatue@g] The real problem here is that the Windows package is not put together
  + 130644 [sellberg@go ] Still? It worked fine before 1.8.2 prerelease 3 or something like that.

Amazon + 43Things
130458 [martin.anker] I have just read that Amazon invests in 43Things, the news is all over
130489 [tobias.luetk] The future of Ruby on Rails is indeed bright on so many levels its not

RDoc::usage and RubyGems application
130465 [johan.nilsso] I noticed a problem when using RDoc comments to display program usage (as

RDoc of C extensions that extend classes
130475 [ruby@br an s] I'm having a problem documenting my C extensions. The extension actually
130490 [cmills@fr es] actually
130496 [ruby@br an s] Thanks for the pointer,

[QUIZ] Yahtzee (#19)
130476 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until

Gdk::Pixbuf from an URL
130485 [mail@mi et c] I wanna display a image from the internet in a Gdk::Pixbuf. Pixbuf.new
130508 [mutoh@hi hw ] Interesting Quiz ;).
130517 [mail@mi et c] Great.. really great!

new to this language
130493 [vidhi.ghelan] ...
+ 130495 [ jimm@io co ] Vidhi,
| + 130500 [joaopedrosa@] Else, you can use
| | + 130501 [vidhi.ghelan] Thanx a lot ! This makes a lot of sense now.
| | + 130511 [fkchang2000@] You mentioned being only somewhat familiar with
| + 130502 [ruby@br an s] one thing I want to add, is that you need not create a seperate file per class. You can as well group classes by functionality and put multiple classes in one file. (I think using one file per class is a java idiom).
|   130503 [vidhi.ghelan] In any file so the code in the if-block will be executed only if the
+ 130497 [caiot1@ib st] .rb
| 130499 [vidhi.ghelan] Thanks a lot! That really really helped. Wow, it seems like ruby is a
| 130509 [james@gr yp ] require 'superclass'
+ 130505 [james@gr yp ] Welcome to Ruby.
| 130507 [vidhi.ghelan] Hey ,
| + 130510 [ruby@br an s] chances are good it is installed together with the ruby interpreter. Just try to enter irb at the command line. (btw. what os are you using?)
| + 130512 [james@gr yp ] % irb
|   130514 [vidhi.ghelan] Hey,
|   + 130515 [vidhi.ghelan] Hey,
|   | 130516 [joaopedrosa@] That's cool, nonetheless. :-) Fun. :-)
|   + 130518 [curt@hi bs c] Did you install using the one-click installer?
|   + 130523 [rampant@gm i] Sure, just download http://rubyforge.org/projects/rubyinstaller/ and
|     130525 [vidhi.ghelan] Hey curt,
|     + 130528 [vidhi.ghelan] Hey Douglas,
|     | 130530 [fkchang2000@] you could cheat a little and write it in your editor
|     + 130529 [curt@hi bs c] and follow the download link. Download the latest version of the installer
+ 130531 [agorilla@gm ] Bill Guindon (aka aGorilla)
  + 130538 [vidhi.ghelan] Hey Forrest,
  | + 130540 [Tim.Ferrell@] It is two separate steps ... Edit with emacs and save then run irb and
  | + 130836 [fkchang2000@] Sorry I wasn't clear on this since you may not be
  + 130557 [cruzin@gm il] Thanks for those links. I'm also new to the language, so they were very
    130560 [ezra@ya im -] ...
    130572 [botp@de mo t] //Any help is appreciated,

[OT] The IBM/Sony/Toshiba Cell Processor
130504 [curt@hi bs c] ...
+ 130526 [matt@te hn r] And the engineers now have access to Ruby to help in the development.
+ 130602 [ptkwt@ar cn ] <drool>Looking forward to a Cell-based linux box (or OSX box - Apple

Currency formatting with regexp
130513 [jim@ji va fl] that's not your natural disposition.
+ 130521 [james@gr yp ] def commify( number )
| + 130536 [jim@ji va fl] It sure did, and cut my LOC count in half.
| | 130539 [james@gr yp ] Good news.
| + 130567 [discordantus] golf?
|   + 130590 [chneukirchen] IMHO, that's even easier to read...
|   + 130617 [ajohnson@cp ] That one doesn't do well with floats, which was what the poster
|     130630 [w_a_x_man@ya] <discordantus@gmail.com>
+ 130543 [halostatue@g] Might I suggest looking at Gavin Sinclair's "extensions" package? This

Need advice on recognizing patterns in strings and replacing them with other patterns...
130520 [htruax@st .c] ...
130589 [chneukirchen] Would it maybe easier to write a Domain-Specific Language and then
130592 [bob.news@gm ] "Christian Neukirchen" <chneukirchen@gmail.com> schrieb im Newsbeitrag

Re: continuations and throw / catch
130522 [wmorgan-ruby] Pit is absolutely right: you don't need throw/catch, just two
130532 [wmorgan-ruby] What the hey, here's a version that lets you pass values with suspend
130544 [rff_rff@re o] I think you just reinvented coroutines :)
130555 [wmorgan-ruby] Hey, just giving the people what they want. Not my fault it was invented

Correction to one of my input lines
130524 [htruax@st .c] ...
130564 [discordantus] Perhaps it would be easier to modify Ruby to accept the original

a problem outputting text
130534 [vidhi.ghelan] ...
+ 130541 [Tim.Ferrell@] try this...
| 130552 [dblack@wo bl] It doesn't; they're separate.  You can use #attr_accessor to do both
| 130559 [Tim.Ferrell@] Thanks for the clarification ... I am new here too :-)
+ 130542 [sjc2000_uk@y] class Song
  + 130547 [vidhi.ghelan] Somewhere in the code you have written
  + 130554 [dblack@wo bl] attr_accessor :name, :duration
    130583 [sjc2000_uk@y] Ah, never knew that. I have coded with a get and set

Re: problem using IRB
130537 [vidhi.ghelan] Hey,
+ 130545 [rampant@gm i] each line is evaluated as you type it in, hence it is "interactive".
+ 130548 [bg-rubytalk@] You seem to have a lot of questions!  You would probably really benefit
+ 130550 [gavin@re in ] ARGV = %w| 15 |
+ 130566 [discordantus] I'm not sure why you would need to run it all at once; there's no real

ri enhancements
130551 [rasputnik@he] is there any way to have ri pick up the rdoc of installed third-party
130569 [jamesUNDERBA] Yes, but.
130667 [rasputnik@he] Thanks James, that's what I was after. (wonder if there's a way to have

[ANN] Recipe Browser 0.4
130556 [belorion@gm ] After Curt Hibbs great article on Onlamp, I realized I should get off

A REAL money maker.  IT REALLY WORKS!!!
130563 [Chris48224@y] Try this out, it works!!!! Turn $10 into $10,000 with PayPal, easy and

Pimki question
130565 [ochronus@gm ] First  I'd  like to say hello to all the list members :) It's my first

utilizing ++ and -- for comments
130573 [botp@de mo t] Since ++ and -- wont see the light of day in ruby, can we use it for comment
+ 130587 [george.mosch] I also think that the =begin, =end notation is not comfortable to use.
| 130595 [rampant@gm i] That's a regex
| + 130597 [nobu.nokada@] A regex beginning with * is illegal, but
| + 130598 [chneukirchen] Why do you guys always propose comment syntaxes of icky languages? }:-)
|   + 130600 [bob.news@gm ] "Christian Neukirchen" <chneukirchen@gmail.com> schrieb im Newsbeitrag
|   + 130601 [rampant@gm i] All I'm after are multi line comments - if you've got some non-icky
|   | 130606 [sroberts@un ] Why?
|   | 130627 [rampant@gm i] Nope, I think I need to teach it how to behave properly :)
|   + 130621 [george.mosch] }:-)
|     130623 [chneukirchen] How about
|     + 130625 [ruby-lists@l] stupid amount of typing
|     + 130626 [dblack@wo bl] <<E
|       130636 [lists@be tr ] Commenting out code in C is normally done with `#if 0',
|       130654 [ay1204@qa i.] MUHAHAHA Ruby had multi-line comments all along :-)
|       130761 [botp@de mo t] yikes!, weird and dangerous, imho. And it confuses nubies (at least on me
|       130768 [dblack@wo bl] ...
+ 130599 [dave@bu t. d] +1
+ 130603 [binary42@gm ] I would like to see a multi-line that can nest other multi-line
| + 130604 [dave@bu t. d] +++ Disable this section
| + 130622 [g_ogata@op u] g@crash:~/tmp$ cat test.rb
+ 130605 [dblack@wo bl] ...
| 130608 [navindra@cs ] Interesting.  What does that do?  Integer identity op?
| + 130609 [jamis_buck@b] +(+(100))
| + 130610 [rff_rff@re o] they do
+ 130970 [ehames@gm il] Come on! Real programmers don't comment their code. It was hard to
threads.html
top