159917-162899

159704-169387 subjects 160049-165287

[QUIZ] [Solution] Text Image (#50)
159917 [ruby.brian@g] I went into this quiz using the following approach. I split the image
160003 [rascal1182@g] I do believe I got pWn3d!!1!...  Nice work, Brian.
160052 [ruby.brian@g] Thank you, rob. Though I can't decipher sms-code, though I hope it's
160131 [hhausman@gm ] ...
+ 160138 [dave@bu t. d] #It only supports 24bit bmp files, and it even chokes on most of them ;)
+ 160192 [dooby@d1 .k ] Not obvious to me until I tried it.
| + 160207 [dbatml@gm .d] Yes, a really nice solution.
| | 160336 [dooby@d1 .k ] I'd just like to be able to see the whole image without needing
| + 160209 [hhausman@gm ] ...
|   160335 [dooby@d1 .k ] I can't really judge when just two eyes or the beak
+ 160197 [robbie.carlt] ...
+ 160288 [wilsonb@gm i] Man, the output of this is very cool with large files and tiny font

Bit of Fun
159926 [lyndon.samso] ...
159968 [mrkode@gm il] ...

Looking for Hotel rm with 2 queens
159932 [jim@fr ez .o] I reserved a hotel room (months ago) with a king size bed.
159935 [lyndon.samso] ...

RCR 320: Extend Rational to play nice with floats
159934 [dave.burt@gm] It's been a while since I extended Rational to convert nicely from
159936 [vjoel@pa h. ] A typo, right?
159939 [dave.burt@gm] Yes. Well spotted.

ruports + RMagick = CrystalReports?
159938 [kevin.jackso] I've been browsing around the ruby eco-system, trying to put together an
+ 159940 [jqshenker@gm] That's a neat idea. It's definitely possible with Ruby. RMagick is afantastic piece of code. I love it. Really, I do. I don't have anyexperience with Ruports, though, so someone else will have to fill youin on that aspect. Incidentally, I'm just beginning (today!) on asimple RMagick-based graphing library for a commercial RoR project.Anyway, good luck! Keep us posted.
+ 159942 [dave.burt@gm] I think Ruport is trying to do what you want by itself. It's a new tool
| 159947 [gregory.t.br] Yes, I'd love to see how people are using Ruport so that I can
+ 159946 [gregory.t.br] Yes, avoiding Crystal Reports was my motivation for starting the Ruport

Executing ruby code withing a ruby app
159943 [fernand@di .] I have some ruby code stached away in a database table. I would like to
159944 [daniels@pr n] def run_some_script
159949 [bob.news@gm ] I guess it's just a typo but in this case it's

Any OOPSLA attendees doing XP designfest on 3/4 day Wed?
159945 [fkc_email-ne] Looking for fellow Rubyists to sign up for OOPSLA XP designfest

event based model - best way to implement?
159952 [snacktime@gm] ...
+ 159956 [bob.news@gm ] Concluding from a quick glance at POE all it does is already built into
| 160032 [snacktime@gm] ...
| 160067 [shortcutter@] Here's a typical example which uses a reader thread per client
| + 160265 [pbrannan@at ] require 'gserver'
| + 160298 [snacktime@gm] ...
|   160360 [bob.news@gm ] Usually one would use a Queue instead of the array because the Queue is
+ 159976 [Ara.T.Howard] are you on windows?
| 160035 [snacktime@gm] ...
| 160043 [Ara.T.Howard] you're options are open then.  select works, so does io/wait.
+ 160026 [pbrannan@at ] Have you considered using the reactor pattern?

my mother wants to code?
159953 [francois@ba ] my 50 year old mother wants to learn to code.
+ 159954 [makenai@gm i] ...
| + 159955 [makenai@gm i] ...
| + 159958 [francois@ba ] ...
+ 159957 [binary42@gm ] While Ruby is a great choice for expressiveness, some of the style
| 160044 [jeff@op nd m] So true. Motivation has always been the key in my experience. As a kid I
+ 159960 [kevin.jackso] If I was teaching someone to code now, I would start with something
| 159967 [robbie.carlt] ...
| 160347 [igouy@ya oo ] -snip-
+ 159969 [dave.burt@gm] Great!
+ 159975 [junk5@mi ro ] [Snip]
| + 159987 [josh.charles] I taught myself everything, and I started with QBasic. I know, but it
| | 159988 [Daniel.Berge] Dave Thomas just announced recently that he was looking for folks with
| + 159991 [flori@ni e. ] You think language choice doesn't matter, if someone wants to learn a
|   + 159996 [blackwaterde] Well my mother (50+) has been wanting to learn php so I'll throw that
|   + 160278 [chris@pi e. ] Absolutely!  And great examples.  I'm amazed that people would suggest
|     + 160305 [steve@wa ts ] Grain of salt indeed..  How about BASIC and/or Pascal?
|     | 160369 [chris@pi e. ] Well, if you look at the sentence *before* the one you quoted, I think
|     | 160436 [steve@wa ts ] Oh, of course.. neither language offers much of the way in modern
|     + 160345 [john.johnkni] ...
|     + 160539 [jussij@ze se] IMHO this is by far the better way to teach a new language.
|       + 160564 [steve@wa ts ] I absolutely agree.  Though I might choose notepad2 over vi/emacs for
|       | 160597 [martindemell] Use something with syntax highlighting and autoindent at least - afaics
|       | 160614 [rhkramer@gm ] like nedit ;-)
|       + 160601 [twa@po t. om] While I agree that the IDE learning curve obscures the language learning
|       | 160634 [jeffrey.dik@] I think this depends on what aspects of programming you want to learn.
|       + 160659 [scott@al da ] Not really - it forces them to learn the language, the command line, and
|         160663 [james@gr yp ] irb seems a promising option here.  Feedback is instantaneous in a,
+ 160599 [martindemell] Here's one reason I'd *strongly* urge not using Java as a first
+ 160639 [jeffrey.dik@] I think Ruby is a fabulous choice for learning to program.  Ruby makes
| 160641 [lukfugl@gm i] francois = Ruby::Talker.find( :name => 'Francois Paul' )
| 160642 [lukfugl@gm i] francois = Ruby::Talker.find( :name => 'Francois Paul' )
+ 162880 [warrens@ac c] Switching her when she's halfway through will only make it harder.  Switch immediately or
+ 162883 [warrens@ac c] Actually, the most important thing is at-the-elbow tech support.  She should learn a
  162892 [francois@ba ] I had a chat with everyone involved weighing Ruby and Java against each
  162899 [christophe.g] That's really nice!

Tk, default event bindings
159964 [Fleck@sc le ] do the Tk widgets own default event bindings? In tutorials I' ve seen, that the 'command proc' statement was used to add a procedure to a button event. But the procedure just gets started, when the button is clicked. I thought I have to bind a procedure to a specific event. Does the procedure get bend to a default event when the "command proc" is used?
159998 [nagai@ai ky ] You can learn the default bindings of each widget with

Can't install RMagick on Windows XP
159965 [rover.rhubar] I'm trying to install RMagick for the first time on XP.
159970 [rover.rhubar] Okay, solved it myself by not using the normal remote gem install.
159999 [florgro@gm i] This step seems to cause buffer overflow errors on this game only
160064 [cyclists@nc ] There's a thread on the RMagick RubyForge Help forum about this. See
160068 [florgro@gm i] Thank you. Will the problem be fixed in RubyGems or zlib.so in the

Ruby Weekly News 3rd - 9th October 2005
159971 [timsuth@ih g] Ruby Weekly News 3rd - 9th October 2005

multi-dimensional Arrays
159974 [skull2crush@] I'm a Ruby noob so please forgive me...
+ 159978 [ruby.brian@g] you do it the same as in c, you say that you want an array of arrays.
| 160102 [skull2crush@] Thank you for all the replies! This is really great.
| 160114 [dblack@wo bl] In the first one, the block is executed once each time to fill up the
| 160116 [skull2crush@] I got that! Your explanation is clear & simple.
+ 159980 [dblack@wo bl] ...
+ 159990 [Ara.T.Howard] ...
+ 160017 [martindemell] There are several different kinds of multidimensional arrays. One is
| 160027 [Ara.T.Howard] ...
+ 160100 [meta@po ox c] require 'pp'

[meta] Why do some of my posts turn into weird multi-part mime documents?
159984 [dblack@wo bl] Every time I reply to Brian Schroeder (hi Brian! :-) my post gets
+ 160025 [calamitas@ad] ...
| 160028 [calamitas@ad] Scratch that comment. I just looked at Brian's reply to Peter's post and
+ 160051 [ruby.brian@g] sorry for the bad magic. I'm using gmail if that is of any helpfull information.

comments found in ObjectSpace
159989 [amarison@ho ] all = []
159992 [oeaniz@gm il] simple answer: those are no comments
160005 [not.my.real.] I'm not sure what that code is supposed to do. Using my code, the text file
160013 [bob.news@gm ] These are no comments.
160015 [not.my.real.] Oh, yeah, I know that.
160016 [Bob_Showalte] I don't see the comments when I run on FreeBSD, but I do see them when I run
160018 [not.my.real.] Yeah, I am on Windows.
160019 [not.my.real.] This got me thinking. Would it be a 'good practice' to run
+ 160020 [Bob_Showalte] I just discovered that this is because on Windows, the RUBYOPT environment
| 160022 [Bob_Showalte] Personally, I wouldn't worry about it.
+ 160070 [bob.news@gm ] With GC runtime systems it's generally not recommended to do explicit GC as

Euruko 2005 Facebook
160001 [rob.02004@gm] ...

cross-thread violation on rb_thread_schedule()
160023 [  ruby@eq cz] is the following message indicating some problem inside ruby?
160164 [nobuyoshi.na] Perhaps, yes.
160182 [  ruby@eq cz] IMHO x86_64 is not the same as IA64, this is "just an ordinary Opteron".

Missing Commercial Date documentation?
160024 [mail@ad mv n] Good morning.
160063 [discordantus] The commercial year starts on the monday before or on Jan 1st.

problem with installation of rubygems-0.8.11
160030 [pirveli@o2 p] I have been searching for few days by now, but can't find answer for my
160036 [drbrain@se m] You need to install ruby.  There are arguments to configure that will
160176 [pirveli@o2 p] I've already installed ruby and it's working. Or I just don't
160228 [drbrain@se m] It is very hard to answer your questions if you don't quote replies.

Problem: Gem-installed sqlite3 once again
160038 [basi_lio@ho ] Windows XP SP 2
+ 160040 [jamis@37 ig ] Do you have the RUBYOPT environment variable set to rubygems?
| + 160048 [basi_lio@ho ] Thanks for the reply.
| + 160050 [basi_lio@ho ] RUBYOPT=rubygems rubygems
|   160055 [jamis@37 ig ] No, it loaded it fine. I don't understand why, but for some libs,
|   160061 [basi_lio@ho ] Mr. James,
+ 160042 [basi_lio@ho ] But then, after successfully gem-installing postgres-pr, and

Default argument values for blocks
160039 [daniel.schie] Is there a reason why I can't do this?
+ 160041 [daniel.schie] I of course meant |foo = "bar"|
+ 160045 [matz@ru y- a] Mostly because yacc does not allow it.  It confuses
  + 160046 [matz@ru y- a] For your information, you can do
  | + 160047 [Ara.T.Howard] -> means lambda?
  | | 160118 [matz@ru y- a] Yes, as in Perl6.  "lambda" here means lambda in other languages, not
  | | + 160124 [eric_mahurin] Other than syntax, what's the difference between this and the
  | | | 160128 [matz@ru y- a] They are same, same class, same behavior, except for full argument
  | | | + 160139 [eric_mahurin] I agree.  In addition to eval within the block (or even a
  | | | | + 160159 [transfire@gm] This still avoids a solution to closing scope for other uses. For
  | | | | | 160196 [twifkak@co c] Ho. That is wacky. Same thing for normal constants and for class
  | | | | + 160167 [christophe.g] Interesting. This syntax and the meaning of it remind me of METAFONT's way of
  | | | | + 160279 [sean.ohalpin] +1
  | | | |   160292 [Ara.T.Howard] eval(binding, &block) works.  the eval(string) method just needs to check it's
  | | | |   160309 [eric_mahurin] It doesn't need to check type.  If there is a block, the
  | | | + 160157 [kh.wild@wi o] and how I whould have to write that c is global?
  | | |   160158 [christophe.g] If I understood the discussion correctly, you *don't* have to write anything if
  | | |   160162 [kh.wild@wi o] You are right. I've overseen that. My intention wasn't to change the
  | | + 160132 [Ara.T.Howard] by that you mean it is a 'real' method - not a proc object?
  | | | 160134 [matz@ru y- a] By that I mean, it is a syntax, which gives you a Proc object.
  | | + 160189 [martindemell] Why not \ as in Haskell instead? Looks much more like the actual letter
  | |   + 160191 [christophe.g] Well, keystrokes are keyboard-dependent. At home, to get a \ I have to do an
  | |   | 160193 [christophe.g] For some reason, the rest of this message didn't seem to go through. Here it is
  | |   + 160212 [matz@ru y- a] A backslash is the most unfortunate character, which is caught by yen
  | |     160234 [chneukirchen] Imagine a ? on it's head... looks quite lambdaish. ;-)
  | + 160057 [daniel.schie] collection.each -> (element) { puts element }
  | | 160135 [matz@ru y- a] Yes.  It is still experimental though.
  | + 160066 [Daniel.Berge] MY EYES!!!!
  | + 160095 [dblack@wo bl] Is this definitely going to remain?  (Please say no.... :-)
  | | 160119 [matz@ru y- a] It is, but appearance may be changed.  But I haven't got the better
  | | + 160126 [dblack@wo bl] I definitely think a keyword would be better than -> .
  | | | 160129 [matz@ru y- a] Maybe.  Some prefer verbosity to clarity.  So what keyword you think
  | | | + 160136 [dblack@wo bl] In this case I think verbosity *is* clarity :-)  The -> thing really
  | | | | 160647 [matz@ru y- a] I meant "prefer verbosity *for* clarity".  Sorry for confusion.
  | | | + 160372 [ts_news1@so ] Instead of introducing a new keyword for lambdas wouldn't it be simpler
  | | + 160130 [ruby-ml@ma i] What about either
  | + 160096 [itsme213@ho ] I hope you can find a better syntax ...
  | | 160097 [Daniel.Berge] Or better yet, just drop the idea of default argument values for blocks
  | | + 160098 [dandrew.thom] ...
  | | + 160115 [itsme213@ho ] Please don't do that, some apps need to define methods dynamically (e.g.
  | + 160166 [transfire@gm] What of &?
  |   + 160170 [nobuyoshi.na] It passes a Proc object.
  |   + 160172 [sanobast-200] I was dreaming for a long time of a ruby dialect that has all these
  |     + 160186 [martindemell] And here I was wishing for \(foo="bar") {}, the way Haskell does it :)
  |     | 160188 [christophe.g] I wouldn't mind that one. "\" isn't too instrusive, and as a LaTeX fan I'm quite
  |     + 160187 [christophe.g] I have and can only concur. The arrows make things pretty confusing in most
  |       + 160195 [twifkak@co c] +1
  |       | 160201 [daryl@br nd ] +1.  Furthers Ruby/Smalltalk harmonic convergence. :)
  |       | 160202 [Daniel.Berge] -1. Sucks.
  |       | 160208 [daniel@th mi] I feel that the arrow syntax yielding a standalone Proc (my_proc = ->(x)
  |       + 160213 [matz@ru y- a] I have never thought of that.  Hmm, let me think about it during the
  |       | + 160215 [Ara.T.Howard] but
  |       | | + 160216 [hgs@dm .a .u] maybe :-(foo = "bar") {...}, where :-( is pronounced "sadly"
  |       | | | 160226 [ezra@ya im -] ~:(foo = "bar") {...}
  |       | | + 160222 [christophe.g] Does it mean "method(bool ? 42 : (0b101010)) { "block"}"? It looks so strange I
  |       | | | 160223 [Ara.T.Howard] yes.
  |       | | | 160256 [christophe.g] Difficult to parse indeed...
  |       | | + 160271 [sean.ohalpin] Hmmm... this is what I get. Have I missed something?
  |       | | + 160439 [lthiryidontw] Why would it be?
  |       | + 160218 [eric_mahurin] f = .(foo="bar"){puts foo}
  |       | | + 160232 [james@gr yp ] Ooo, I kind-of like that...
  |       | | + 160254 [christophe.g] Although I find it kind of attractive, I am concerned about the
  |       | + 160257 [christophe.g] I'm really honoured that you're considering my proposal. I can hardly
  |       | | 160352 [transfire@gm] Ha! How ironic, I thought of that last night too. But after playing
  |       | + 160492 [nohmad@gm il] +1
  |       |   160503 [dblack@wo bl] But why would you want a method call and argument list and block to
  |       |   160591 [chneukirchen] Read the : as "do".  When x is one, do... For every item of the
  |       |   + 160592 [dblack@wo bl] But it's such a stretch to look at it that way (and it's not the same
  |       |   + 160598 [Ara.T.Howard] it all seems like a __lot__ of coding for someone when one can simply
  |       |     + 160605 [transfire@gm] I don't think we should be relegated to these kinds of cleverness. It
  |       |     | 160609 [Ara.T.Howard] it's not unlike the cleverness of
  |       |     | 160630 [transfire@gm] All well said -a, perhaps matz will take a setback and consider all
  |       |     + 160607 [sean.ohalpin] Nice!
  |       |       160611 [sean.ohalpin] class Array
  |       |       160626 [matz@ru y- a] I will supply something behave like this, but with a different name
  |       |       + 160627 [matz@ru y- a] The point is not providing default values for block parameters, but
  |       |       + 160629 [sean.ohalpin] How about instance_call()? On the analogy with Proc.call().
  |       + 160255 [ruby-ml@ma i] So do not use it as a block. This syntax only solves the default args (etc.)
  |       | 160339 [ruby-ml@ma i] I am terribly sorry, that came out entirely too harsh. There was supposed
  |       + 160308 [itsme213@ho ] +1
  |       + 160338 [philtomson@g] I totally agree, David.  I can't believe that we're about to mess up
  |       | 160349 [vikkous@gm i] Ok, this has been bugging me ever since the last time this issue came
  |       | + 160351 [no.spam@pl a] I forget the details now, but C has the same problem with the comma
  |       | + 160376 [nobuyoshi.na] Me?  I'd tried it once by differentiating goal-post from
  |       |   160395 [eric_mahurin] Anybody ever just consider making a new expression (or maybe
  |       |   + 160398 [dblack@wo bl] obj.meth {
  |       |   + 160399 [christophe.g] Yacc does. Even the simple { |a,b=1| a*b } fails because Yacc treats it as { |
  |       |     + 160417 [eric_mahurin] Are you saying this from experience?  It sounds like it, but
  |       |     | 160470 [christophe.g] Is that authority enough for you? If matz says it doesn't work, I'd say
  |       |     + 160422 [halostatue@g] Is there any particular reason that we can't use a different parser,
  |       |       + 160457 [surrender_it] I remember matz talking about ANTLR long time ago, AFAIR he said
  |       |       + 160458 [philtomson@g] While I tend to agree that there are probably much better parser
  |       |         160461 [halostatue@g] I'm suggesting that it may be time for a parser change because the
  |       |         160467 [eric_mahurin] How do you interpret the above?
  |       |         + 160487 [philtomson@g] I'm not a parser expert, but wouldn't the second example you pose be
  |       |         | + 160489 [transfire@gm] lambda { foo = 1|2 -> puts foo }
  |       |         | | + 160506 [googlegroups] Aargh, no! :)
  |       |         | | + 160513 [dblack@wo bl] That's one of the things I don't like about it.  Just on a kind of
  |       |         | | | 160537 [transfire@gm] Yes, I felt that way as well. But I also sometimes feel like it's
  |       |         | | | 160550 [ruby-ml@ma i] I seem to recall this suggestion was presented on 2005.04.01.
  |       |         | | | 160646 [matz@ru y- a] No.  I presented it on June 7th, but I mentioned it as an
  |       |         | | + 160603 [halostatue@g] 1. I don't use 1.9 at this point. It doesn't yet have the features
  |       |         | + 160498 [eric_mahurin] Notice the word "interpretation" in what I said.  Those were
  |       |         + 160600 [halostatue@g] The first isn't a reasonable interpretation. (Why? Execute it
  |       + 160344 [christophe.g] No, but do you really want to have "->" instead?
  |         160357 [philtomson@g] I think the other option is to pass on the whole idea of default
  |         160363 [christophe.g] True. I'd rather have it like that too. But it seems a sizeable amount of people
  + 160065 [kballard@gm ] yacc? Maybe I was informed wrong, but I was under the impression that
  | 160091 [drbrain@se m] You were informed wrong.
  + 160356 [sanobast-200] Would this
    160358 [sanobast-200] Or
    160367 [christophe.g] Despite the fact that it looks like a monstruous cross between do... end and
threads.html
top