205742-208204

205465-208101 subjects 205898-208705

R: Ruby Cookbook
205742 [david.riccit] A must-buy.
205796 [Paul.vanDels] information and examples about Ruby in one place is going to be looked upon favourably.
205809 [gene.tani@gm] I believe Oreilly's policy is that you can get the final PDF only if

Different semantics of Proc and method call -- bug or feature?
205753 [freese@ac .o] I stumbled over the following difference between method calls and
+ 205758 [shortcutter@] I think it's rather a feature although I can understand your surprise.
+ 205766 [m_goldberg@a] This _is_ strange. R. Klemme's explanation is enlightening, but now I
+ 205767 [matz@ru y- a] It's a feature, but we are trying to fix it in the next major release

Next Major Version (was Re: Different semantics of Proc and method call -- bug or feature?)
205770 [james@gr yp ] Matz, could you tell us why you are considering releasing the next
205773 [matz@ru y- a] In the current pace, it would take years to release 2.0, but some
205789 [wrecklass1@g] In keeping with your current numbering scheme, does this mean there
+ 205803 [chiology@gm ] What was it Mauricio had announced... Version 1.z or was it 1.Gamma
+ 205904 [matz@ru y- a] The version letters will be stay in one letter each, so that 1.a will
  206022 [rick.denatal] Matz,
  + 206023 [james@gr yp ] => false
  | + 206035 [transfire@gm] Which is another good reason for Ruby to have an actual Tuple class.
  | + 206073 [rick.denatal] Ah, but doing the comparison correctly in Ruby isn't that hard,  in a
  |   206078 [ara.t.howard] but this isn't correct by 'open source' standards
  |   206083 [rick.denatal] I'm not sure I see the point.  Each level has less signficance than
  |   206092 [ara.t.howard] you are right about that - i gues i was simply pointing out that, in order to
  + 206084 [matz@ru y- a] Ah, well, I forgot to put smiley after the sentence.  No, we are not

A left-exclusive Range class
205771 [hallc@lu un ] The current Range class in ruby is quite useful, however, I was recently
+ 205774 [Nuralanur@ao] ...
| 205776 [hallc@lu un ] Sure thing.  I'm working on a simulation environment for various
| + 205782 [Nuralanur@ao] ...
| + 205808 [shortcutter@] The simplest thing you can always do is to create a method that (and
|   205811 [hallc@lu un ] This isn't quite right however, as lor(0...10).include?(0.5) would
|   + 205816 [transfire@gm] Facets has an Interval class.
|   | 205972 [hallc@lu un ] Thanks transfire.  This is exactly what I was looking for.  I've got my
|   + 205951 [shortcutter@] Yeah, that was just a quick sample hack to illustrate the idea.
+ 206013 [bguthrie@cc ] You could try just appropriating a different piece of syntax and using
  + 206016 [bguthrie@cc ] Of course by doing that you've totally just broken the existing
  + 206020 [rforum@gm il] Doesn't preserve the fact that it started as a left exclusive range, but

Ruby can't see RMagick installed from gem on FC4
205777 [lance@al ee ] I'm planning on using RMagick to do thumbnails for a Rails project.
+ 205820 [collinsj@se ] <snip lots of stuff>
| + 206264 [lance@al ee ] This dose make the test code from the 'Users guide' work.
| + 206266 [lance@al ee ] Unfortunatly, no love from rails...
|   206274 [jaever@gm il] ...
|   206282 [lance@al ee ] This at least gives me a new error message.
|   206294 [ara.t.howard] ah.
|   206311 [lance@al ee ] require 'rubygems'
+ 205852 [anatol.pomoz] Try to run following line
  + 205853 [lance@al ee ] $ ruby -rrubygems -e "require 'RMagick'; puts Magick::Long_version;"
  | 205877 [anatol.pomoz] Add explicit
  + 205857 [lance@al ee ] Um... This is FC4 no sudo to worry about (there is a root account to
    205858 [ara.t.howard] you should never, never compile as root.  fyi.
    206269 [lance@al ee ] Yes, but I must 'su' for the 'gem install rmagick' to work properly.
    206278 [ara.t.howard] that means you are compiling as root.  if the installs uses non-standard
    206288 [lance@al ee ] should I then remove the package and again attempt to install as user?
    206293 [ara.t.howard] no prob.
    206309 [lance@al ee ] $ ruby -r rubygems -e'  require "RMagick"; p Magick  '
    206326 [ara.t.howard] therefore, you've got it installed.  if you are having issues with rails you
    206330 [lance@al ee ] This may or may not have happened when I tried to upgrade the version of
    206336 [ara.t.howard] all your erros showed the constant 'RMagick' - that doesn't exist.  it's
    + 206344 [lance@al ee ] O.K.... :)
    + 206370 [lance@al ee ] Thanks,
      206373 [ara.t.howard] that's not the issue.  rails is ruby.  if ruby sees it rails sees it.  what
      206379 [lance@al ee ] Might help if I know what constitutes 'works' is ;)
      206393 [ara.t.howard] so, there you have it - ruby, rmagick, and rails altogether.  any errors you
      + 207023 [lance@al ee ] Thanks for the debugging/verifying so far.
      + 207079 [lance@al ee ] After Much more Googleing for working code samples.

spread your best code-snippets
205780 [naPOLeon.Pol] I just ran over a nice code-snippet online-database: 'Programming is
+ 205844 [chneukirchen] This is the third kind of snippet site I see today---they all look the
| + 205897 [znmeb@ce ma ] Hmpf ... I spend whole *days* writing code snippets and never get a
| | 205911 [chiology@gm ] Yes, but that means those people would need to become unified, but I
| | + 205914 [ara.t.howard] long ago i suggested the subject line [SNIPPET] for postings to comp.lang.ruby
| | | 206138 [Eric.Armstro] Terrific suggestion!
| | + 205915 [danielbaird@] Or, kludge up something that uses those other sites as backends, so
| |   205916 [chiology@gm ] A mashup of snippets. Makes me drool in fright! :)
| |   205949 [robert.dober] ...
| + 206191 [jmg3000@gm i] 1. Keep the snippets categorized for easy browsing.
| | + 206429 [daniel@fl in] I'd add 5. dont be textsnippets.com - has anyone noticed that it looks just
| | | + 206542 [ezmobius@gm ] Actually the bigbold snippets site was written by Peter Cooper is an
| | | + 208105 [Eric.Armstro] LOL. THAT would be a great way to get a painless education.
| | |   208125 [perrin@ap th] Absolutely . . . as long as the snippets came with concise, but
| | |   208161 [danielbaird@] same, here.. for certain definitions of the word "help" :)
| | |   208204 [perrin@ap th] I could, perhaps, contribute a mailing list and editing if I can get
| | + 208104 [Eric.Armstro] That right there is the really hard part! Everything
| + 206364 [rsanheim@gm ] The increasing amount of snippet sites is pretty annoying.  There is
+ 206248 [leslieviljoe] I have snippets on my wiki, but programmingishard.com is much cooler.

Ruby MySQL Gem uses older client library
205785 [pauliephonic] use an older client library.
205787 [jaever@gm il] ...
205975 [pauliephonic] Thanks very much Jeff.

[ANN] Nabaztag 0.2.0 The Curse of the Web-Rabbit
205798 [pbattley@gm ] Good news, everybody!
+ 205799 [pbattley@gm ] I forgot to add that credit is due to Mario Martelli for his help in
+ 205810 [listbox@ju i] This device is so inexplicably _japanese_...
  205812 [pbattley@gm ] It does look that way, yet it's French, and the name's Armenian!

For performance, write it in OCaml
205805 [w_a_x_man@ya] Here's an OCaml version that runs in about 1.5 seconds when
205854 [w_a_x_man@ya] An expert did suggest replacing a couple of lists with arrays.
205896 [znmeb@ce ma ] *This* expert suggests comparing performance between the C version and
+ 205919 [jon@ff on ul] On my machine (Athlon X2 4400+, Debian Linux, gcc 4.0.4, OCaml 3.09.2, Sun
| + 205925 [headius@he d] ...
| | + 205940 [robert.dober] ...
| | + 205941 [peter@se an ] Can we just clear something up here. The Latin squares mini project was
| + 205939 [peter@se an ] I only have this on my box.
| | 205973 [jon@ff on ul] $ ocamlopt -v
| | 205977 [peter@se an ] Yup, got that. Will time and test it tonight.
| + 205954 [perrin@ap th] Actually, OCaml is one of the languages in which I've been meaning to
| | + 205958 [robert.dober] ...
| | + 206024 [wneumann@gm ] Primarily, the online resources come from one of the two mailing lists,
| |   206066 [perrin@ap th] Thanks.  I'll look into it.
| + 206056 [w_a_x_man@ya] A small point.
| | 206087 [w_a_x_man@ya] Not with the interpreter; it's slower.  Haven't tested the compiler yet.
| | 206097 [wneumann@gm ] If anything, it'll be slower, as print_endline flushes the buffer every
| + 206065 [wneumann@gm ] Depending on your goals, you can do even better by stuffing the output
| + 206068 [w_a_x_man@ya] Perhaps google has mangled you code; at this point ocaml reports
| | 206081 [wneumann@gm ] It lost a . for array access.  It should be (slightly reformatted
| | 206220 [peter@se an ] Thanks for that fix. We now have an even faster Ocaml version
| + 206146 [jon@ff on ul] That was 64-bit. Here are my 32-bit timings (language versions are the
|   206154 [w_a_x_man@ya] Here's a faster version of my program.
|   206166 [jon@ff on ul] Heh, should've thought of that. :-)
|   206168 [w_a_x_man@ya] It's 800MHz.  I ran each program 4 times and took the average.
|   206193 [perrin@ap th] I guess that means we should be testing everything on the laptop I'm
+ 205938 [peter@se an ] I have run the first Ocaml version on the same box as all the other
  205974 [jon@ff on ul] Yeah. I didn't bother doing that. ;-)
  205980 [peter@se an ] Not wanting to name and shame but there was one submission (off list)
  + 206002 [kristof@vl e] "ruby latin.rb | wc -l" to test if the number of squares matches the
  | 206012 [peter@se an ] The thing that was bothering me was "have I missed any?" Sure the
  + 206027 [wneumann@gm ] Hard to say, as it won't be available for another three months, and I
  + 206144 [jon@ff on ul] It looks very good but not as good as my book. ;-)
    206222 [peter@se an ] Mmmm. Your code convinces me, you have a sale.

.irbrc Goodies
205818 [aleks0@gm il] I was wondering, what are some of your favourite .irbrc tricks?  For

For performance, write it in C#
205819 [jgbailey@gm ] ...
+ 205929 [headius@he d] ...
+ 205943 [peter@se an ] Would this work with Mono?
  206018 [jgbailey@gm ] ...
  206067 [headius@he d] ...
  206069 [tanner.burso] ...
  206070 [headius@he d] ...
  206114 [mtrier@gm il] In the cradle?  I understand it has successfully passed all ruby 1.8.2
  206131 [headius@he d] ...
  206214 [drjflam@gm i] I spent a lot of time with Miguel at Lang .Net this week, and what he
  206798 [jgbailey@gm ] ...

irb: Segmentation fault
205827 [smerk@fi mu ] in the following two cases irb fails (I've removed spaces from the
205829 [collinsj@se ] $ irb -v

How to split(//) with respect to bigraphs?
205828 [smerk@fi mu ] In Czech, c followed by h is considered (for sorting etc.) as one
+ 205832 [collinsj@se ] Does this work?
| + 205839 [pbattley@gm ] str.scan(/(?:ch)|./i)
| | 205847 [smerk@fi mu ] Yes, the use of scan strikes me in the meantime too. Why (?:)?
| | 205849 [pbattley@gm ] Yeah, there's no need for the (?: ... ). I started off thinking it was
| + 205848 [smerk@fi mu ] one more :)
|   + 205850 [collinsj@se ] As far as I can see, it's not in the documentation. I found it by
|   | 205872 [2006@ho el .] Oh, my gosh. If only you'd posted this little tidbit two days ago, I'd
|   + 205886 [m_goldberg@a] "If pattern is a Regexp, str is divided where the pattern matches.
+ 205845 [chneukirchen] string.split(/ch|./i)

Does one-click install leave other installs intact?
205830 [bradjpeek@gm] In the process of learning Ruby, so this is a newbie question....
205834 [navinsamuel@] My guess is that you will have to. When I upgraded to 1.8.4 from 1.8.2,
205842 [ml.chibbs@gm] You can have multiple versions installed simultaneously (or even
205876 [bradjpeek@gm] Thanks for your response Curt...
205902 [ml.chibbs@gm] Unftunately you would have to reinstall them. Once everything is

[ANN] SanDiego.rb Meeting Tomorrow, August 3rd
205833 [kevin.clark@] If you're in the San Diego area we'd enjoy having you at the next

Ruby 1.8.4 & MemCached 0.0.4
205838 [navinsamuel@] I recently upgraded my Ruby from 1.8.2 to 1.8.4. I also installed

Building plruby on Windows
205841 [agnewtj@no p] Has anyone successfully implemented plruby on the Windows version of

Sending messages to gtalk via jabber4r
205851 [anatol.pomoz] I am trying to use jabber4r in my application to send messages via GTalk

Errno::ENXIO (Device not configured) when using net/https from rails
205855 [snacktime@gm] I have the following code that creates a https connection from within
205856 [snacktime@gm] Also, this is on Freebsd 6.1, and line 68 of the authorize method is

parsing with delimeters ---new programmer
205859 [ricardo.oroz] text....
+ 205861 [Thomas.Mark@] Your regular expression does not accommodate more than one space between
+ 205862 [chiology@gm ] Is your Regexp in multiline mode? (Sorry, I can't remember if it's the
+ 205864 [rakrok@gm il] ...
+ 205866 [collinsj@se ] Isn't this the third time you've posted the same question?
+ 205893 [w_a_x_man@ya] Why did you ignore the answers that you were given at that time?
  205922 [rubyprogramm] I wondered the same thing. But the answers don't seem to be showing up
  205924 [collinsj@se ] Yes, I've sent an email to Andreas about it (the emails not showing up

cross-platform microsoft access parser
205863 [aran.donohue] Is there an existing cross-platform library which can read microsoft
205894 [znmeb@ce ma ] I don't know about cross-platform in a single tool, but there is an open

Can't convert String into Integer (TypeError)
205869 [TimHunter@nc] Okay, I'm stumped. I've been looking at this program off-and-on for 3
205870 [ara.t.howard] ["raise"]
+ 205875 [TimHunter@nc] Arg! I should spend more time coding in Ruby and less in C. Thanks, Ara!
| 205879 [ara.t.howard] yeah - i have the opposite issue ;-)
+ 205882 [fred@la av .] [0.0, pct, 1.0].sort[1]

How to capture a SOAP exception from a webservice?
205871 [breakingsoft] I???m trying to catch a soap exception from a web service, but I???m a n00b
205885 [christopher.] begin
206049 [breakingsoft] Hmmm???
206327 [u.alberton@g] From what I understand, I believe your method call has to be inside
206416 [breakingsoft] Excellent; thanks!

rubygems problem
205880 [jaydonnell@g] I didn't know where else to ask this so please point me in the right

Using gsub to remove embedded newlines in HTML file
205883 [weyus@at .n ] I have an HTML file that is in a string.
205884 [weyus@at .n ] @html.scan(/~\^LNK:.*?\^~/mi).each do |link_line|
205887 [weyus@at .n ] @html.scan(/~\^LNK:.*?\^~/mi).each do |link_line|
205907 [angus@qu va ] @html.gsub!(/~\^LNK:.*?~/mi) { |s| s.gsub /\s/, '' }
206098 [weyus@at .n ] Thanks.  That is the _Ruby_ way to do it, and that's what I wanted to

user space on rails open registration
205889 [mcgoverp@la ] I am Happy To announce that USOR now allows for user registration aswell

[ANN] RubyConf 2006 registration is open
205892 [dblack@wo bl] Registration for RubyConf 2006 is now open, at
205931 [rsanheim@gm ] Out of curiousity, how rapidly is registration filling up?
205932 [makenai@gm i] Looks like it sold out in about four hours. I saw the title of the
205948 [rsanheim@gm ] That was fast.  I guess I was lucky enough to get in at around 10 pm

[MacOS X] finding the orig file of an alias
205895 [pere.noel@la] for the time being i'm using the finder thru AppleScript and then aeosa
+ 205899 [logancapaldo] You might be able to use RubyCocoa to do it a little more directly.
| 205900 [cdn.ainu@gm ] ...
| 205927 [yvonthoraval] ...
+ 205903 [sitharus@si ] An alias or a symlink? Symlinks should be easy, but aliases are harder.
  + 205926 [yvonthoraval] ...
  + 205937 [yvonthoraval] ...
  | + 206115 [2006@ho el .] irb(main):002:0> require 'osx/aeosa'
  | | + 206125 [pere.noel@la] ok thanx
  | | + 206140 [pere.noel@la] not at all, i'm sure about that ))
  | |   206201 [2006@ho el .] Hmm. I suspect if you hunt around in ~/Library/Frameworks or
  | |   206204 [yvonthoraval] ...
  | |   206208 [2006@ho el .] Yes, people are always telling me about the lovely powers of
  | + 206118 [2006@ho el .] Oh, yea, I forgot to mention that the fastest place to find answers to
  |   206124 [pere.noel@la] they have a tendancy, fo such a question, to direct me by Cocoa-Dev ))
  + 206206 [yvonthoraval] ...
    206213 [sitharus@si ] I can't help you with calling the CF functions, the rubycocoa list
    206231 [pere.noel@la] fine thanx, i've found something by googleing...
    206291 [luc@ho k- on] Yes. The BDAlias class does not support resolving existing aliases,
    206304 [pere.noel@la] <http://developer.apple.com/documentation/Cocoa/Conceptual/LowLevelFileM
    206334 [luc@ho k- on] ...to resolve the alias record *you* create in the initWithXXX or
    206339 [pere.noel@la] i understood : alias record != alias file )))
threads.html
top