288916-358831 subjects 289346-332188
Using gems from C extensions
289132 [andre@di ir ] I'm trying to use the json gem from a C extension. Doing this fails with
+ 289200 [radek.bulat@] TWF5YmUgdGhlIGJldHRlciB3YXkgaXMganVzdCB1c2Ugb25seSByYl9yZXF1aXJlKCJqc29uIikg
| 289201 [andre@di ir ] This is for a controlled environment. I know I have rubygems :)
+ 289232 [drbrain@se m] Yes. rb_require calls the base require, not the RubyGems overridden
289244 [andre@di ir ] Strange, I tried that but it didn't find the json gem. I tried with both
Reading Images via RMagick until Ruby killed
289134 [guido@sp rt ] Hey mates,
289137 [TimHunter@nc] Also, if you're using RMagick 2: http://rmagick.rubyforge.org/rmagick2.html.
289145 [guido@sp rt ] Thanks! that was the reason :-)
Cannot load Ruby extension (.so) checked into ClearCase
289140 [daniel.akeru] ...
Start and stop a ruby loop ;(
289143 [sameera207@h] I have the following loop
289152 [greenewm@ya ] You're almost there. First of all, in Ruby, you don't declare your
+ 289293 [sameera207@h] Thank you very much for your great help. It has lots of things to learn
+ 289302 [shortcutter@] Why make it more complicated than necessary?
289150 [hanymorcos@y] ...
[ANN] Erubis 2.5.0 released - a fast and extensible eRuby
289154 [kwa@ku at -l] I have released Erubis 2.5.0.
Capture stdout and stderr from another process
289155 [marcus.brist] I want to
289193 [chris.hulan@] Look at Win32-Process (http://rubyforge.org/docman/view.php/85/1720/
help me out
289158 [projectonrub] PLEASE HELP ME OUT
help me out
289159 [projectonrub] PLEASE HELP ME OUT
+ 289161 [raffaele_tes] i think "getaddrinfo: Temporary failure in name resolution" = problems
+ 289163 [s.korteling@] Did you just decide to mail your password to thousands of people and put
289166 [glpunzi@lo d] At the moment, I need to start some projects in my job.
289174 [danielsson.l] Ruby is slow for some tasks. Looking at your application list, I doubt
289195 [glpunzi@lo d] I don't need Quake 5, and I don't want it :)
no such file to load -- ruby_to_c
289167 [bcparanj@gm ] I am getting that error message even after I installed the ZenHacks
289168 [dominikho@gm] Are you sure that it's called ruby_to_c?
The Ruby Programming Language
289169 [chris.hulan@] Just got note from O'Reilly about The Ruby Programming Language
+ 289183 [jmedelstein@] Looks like a ground-up approach going over most of the language. I can
| 289194 [paul@pa la c] Apparently, it is what would have been the second edition of "Ruby In
| 289504 [dflanagan@gm] Paul,
+ 289502 [dflanagan@gm] Chris,
Re: Each time you code 'unless... else'...
289172 [shortcutter@] Isn't this rather a case for an exception?
289336 [shortcutter@] I am not a big fan of that rule. Multiple exits can come in handy, for
DBI error please help
289175 [peter@iw bs ] I cannot do a select on a decimal field all others work fine. Any help
Parsing a string with quotes
289180 [liquid_rails] My dog "ate" my "math homework" and "my cat"
+ 289186 [phrogz@ma .c] irb(main):001:0> str = 'My dog "ate" my "math homework" and "my cat"'
+ 289187 [ara.t.howard] cfp2:~ > cat a.rb
| 289191 [liquid_rails] Thank you for your help. Where is a good resource to read up on what
| + 289203 [bbxx789_05ss] The topic is called 'regular expressions'. That regular expression says
| + 289205 [phrogz@ma .c] ...
+ 289188 [fedzor@gm il] require "shellwords"
+ 289190 [aledonne.lis] irb(main):001:0> require 'rubygems'
Re: Erubis 2.5.0 released - a fast and extensible eRuby
289189 [shevegen@li ] Nice :D
Warning when running sqlite3 with Ruby on Windows
289192 [eliben@gm il] I installed ruby-sqlite3 as a gem from Rubyforge to my Windows PC.
289233 [luislavena@g] Can you be more specific?
289304 [eliben@gm il] Luis,
289385 [luislavena@g] Enabling warnings is a good practice doing testing. In that way you
counting the number of repititions in an array
289196 [adamtemporar] array how do i go about it...is there a method?
+ 289199 [stefano.croc] a = [2,4,6,2,1,3,4,6,4,1,2,3,1]
| 289220 [adamtemporar] If the hash is empty to begin with, when you try to look up the key
| 289222 [stefano.croc] writing
| 289224 [adamtemporar] thanks for the info on adding to hashes. I think i understand the res[i]
| + 289225 [robert.dober] A small 1.9 solution
| + 289274 [stefano.croc] res[a] = res[a] + 1
| 289284 [shortcutter@] Just adding a point because it seems this might not have become
+ 289202 [ariekusumaat] do you mean this?
289204 [adamtemporar] Wow thats excellent...just what i was looking for.
289197 [nandayadav@g] when I parse html file and capture the elements, hpricot automatically
Ruby Puzzle Challenge
289206 [greenewm@ya ] Write a Ruby program that prints out the numbers 1 to 100, one number
+ 289208 [ljjarvis@go ] Lol whats this all about?
| 289212 [dominikho@gm] Would you be so gentle and explain this piece of code to me?
| + 289214 [sepp2k@go gl] * can be a binary operator, yes, but here it is the unary, prefix
| | 289215 [dominikho@gm] Ah, yeah of course... I totally forgot about that.
| + 289217 [greenewm@ya ] This is the problem with writing "clever" code...it's unreadable!
| + 289226 [ljjarvis@go ] don't really see the first/second operand
+ 289209 [sepp2k@go gl] Does this have some kind of spoiler-period like the ruby quiz? Well, since it
| 289211 [greenewm@ya ] I was thinking of p *1..100
| + 289230 [lionel-subsc] I tried another approach by relaxing your conditions a bit : the number
| | 289241 [greenewm@ya ] On Jan 30, 6:01 pm, Lionel Bouton <lionel-subscript...@bouton.name>
| + 289242 [nyarly@gm il] How about 0 characters?
+ 289245 [olsonas@gm i] For more golf fun see: http://codegolf.com
+ 289250 [fedzor@gm il] p *1..100
Learn how to program
289210 [Regnum@ar en] Posted via http://www.ruby-forum.com/.
+ 289216 [greenewm@ya ] On Jan 30, 4:30 pm, "Reg...@argentina.com Reg...@argentina.com"
| + 289218 [Regnum@ar en] Thanks!!!.
| + 289254 [znmeb@ce ma ] You're right about C++ ... I don't think it should be anyone's first
| | 289283 [micathom@gm ] Also, DrScheme was created with an educational intention in mind.
| | 289424 [perrin@ap th] Is this another example of the common (mis)conception that Perl is a
| | 289430 [eeklund@gm i] Too arcane syntax, too many special cases, bad handling of error
| + 289434 [hrvoje.blaze] Strange? I agree about C++, but Scheme???
+ 289280 [bbxx789_05ss] I would not choose it as a first language. I recommend python.
| 289423 [perrin@ap th] I disagree.
+ 289351 [michael.mell] On Jan 30, 4:30=A0pm, "Reg...@argentina.com Reg...@argentina.com"
| + 289353 [jeremymcanal] I disagree. Languages like that make you focus more on what the deuce
| + 289392 [wieczo.yo@go] Yeah, start with Java or C#, you will be in heaven when you get back to Ruby ;)
| | 289395 [wieczo.yo@go] Another great side of Ruby is that it embraces different programming
| + 289401 [michael.bevi] ...
| + 289449 [d_rems@ya oo] The only Ruby drawback IMHO is I never want to program in any other
| + 289503 [perrin@ap th] I'm mystified at the notion that Java, C#, or VB.NET would be good as a
| + 289506 [lloyd@2l ve ] I agree wholeheartedly. Avoid whatever is discouraging. Even the test
| + 289513 [micathom@gm ] Well, since Java is used at many schools/university for introductory
| + 289669 [eeklund@gm i] Why Perl? I know Perl fairly well, unfortunately having done most of
| + 289670 [shevegen@li ] Perl is a horrible language as far as aesthetics are concerned.
| | + 289689 [Regnum@ar en] Thanks for the answers. I decided by Ruby.
| | | + 289693 [ashleywnj@gm] ...
| | | + 289774 [perrin@ap th] I agree with Ashley Wharton, re: the Poignant Guide and Learn to Program.
| | | 289808 [james@gr yp ] Interesting.
| | + 289773 [perrin@ap th] Paul Graham: "Real ugliness is not harsh-looking syntax, but having to
| + 289768 [perrin@ap th] Learning Perl, by Randal Schwartz, is one of the all-time best books for
| | 289796 [sigzero@gm i] I'd
| + 289797 [sigzero@gm i] The "irregularities" usually only happen when you are doing more
+ 289451 [lloyd@2l ve ] The answer to this is, as with so many things, in the eye of the
Rubyquiz: Making Change (#154)
289213 [e.ian@ho ma ] This is my first rubyquiz solution. I think it does as intended although it=
[ANN] Thin 0.6.2 Rambo release
289221 [macournoyer@] Hey all,
How to get rid of escaped characters
289223 [liquid_rails] How do you get rid of unwanted escape characters that rails adds to a
+ 289261 [kruse.christ] should be able to call the String#strip! method on it to remove
+ 289331 [chris.hulan@] Have a look at CGI.unescape()
is there a way to send chat message via AOL AIM (with ruby of course!)
289234 [aktxyz@gm il] poking around, there seem to be numerous walking dead projects, anyone
+ 289243 [RubyTalk@gm ] I have seen people use swig to wrap the pidgin libs.
| 289253 [qbproger@gm ] I played around with it. Pretty cool, just don't have a use for it.
+ 289260 [jeremymcanal] The net-toc library is excellent for AIM. My books shows you how to
Idiomatic way to copy parameters ?
289240 [leif.eriksen] Some background - bear with me
+ 289246 [adam.shelly@] I'm no idiom expert, but I'd say no. You are correct that if you are
+ 289270 [ara.t.howard] yes. i might just use
| 289440 [leif.eriksen] Super - thanx, both ideas are great - and I need to work out why I chose
+ 289442 [shortcutter@] I'd say, this is generally considered bad OO. A better solution would
Referring to method in enclosing class
289247 [rich.everhar] I need to do something like what is being attempted in the code below.
+ 289263 [gwtmp01@ma .] This doesn't really make sense. First of all nested classes are just
| 289379 [rich.everhar] Thanks for the reply.
| 289394 [phrogz@ma .c] class Foo
+ 289272 [bbxx789_05ss] Why do you want to nest Hello inside Enclosing?
+ 289383 [coder68@ya o] Not to fear, I have used similar stuff in other languages .. I believe
289248 [greenewm@ya ] Can you guess what this program will do when run?
+ 289249 [phrogz@ma .c] It's either going to be 58 or 63, is my guess before IRB. :)
+ 289251 [gm.vlkv@gm i] I guess same as a = ?? ? ?? : _any_
+ 289271 [sepp2k@go gl] a = ?? ? ?? : ?? ? ?? ? ?? : ?? : ?? ? ?? : ??
Net::HTTP using SSL certificate
289257 [julianparry@] I'm attempting to login to a URL over SSL using Net:HTTP.
289323 [yermej@gm il] This message is telling you that the file you passed to
Fwd: Please Forward: Ruby Quiz Submission
289262 [james@gr yp ] ...
DRB+Mixin, a defect or an usage error?
289265 [edge_hh@ho m] ...
289341 [devi.webmast] Wow, this is surprising. I would really appreciate some enlightenment
289402 [edge_hh@ho m] ...
289520 [devi.webmast] I've spent some more time looking through the various Ruby test
289521 [devi.webmast] On Feb 1, 2008 2:24 PM, Daniel Brumbaugh Keeney
289273 [receprd@gm i] Does anybody some experiance aout FxRuby ? i have Ruby 1.8.2-14 with
+ 289317 [chris.hulan@] There's a new book coming out this month, http://www.pragprog.com/titles/fxruby,
+ 289327 [lyle@ly ej h] As Chris noted, the FXRuby book is now available in beta and it should
| 289400 [fedzor@gm il] Does it cost any money to view the beta version of the book?
| 289411 [lyle@ly ej h] When you buy the Beta book, you're basically buying the latest draft
+ 289390 [wieczo.yo@go] The book is great to get started. Try also the user guides on the fxruby.org
289399 [ranieri.tx@g] I'm using Ruby 1.8.6 with fxruby-1.6.12-mswin32. I get started using
[ANN] hoe 1.5.0 Released
289277 [ryand-ruby@z] hoe version 1.5.0 has been released!
289278 [pluskid@gm i] $ sow foo
[ANN] ZenTest 3.9.0 Released
289281 [ryand-ruby@z] ZenTest version 3.9.0 has been released!
289282 [ryand-ruby@z] I forgot to add: IF YOU USE RSPEC WITH AUTOTEST there are enough
289354 [james.herdma] ...
289357 [ryand-ruby@z] Then you have something bad in your .autotest.
289358 [james.herdma] ...
can ik make this more beautifull?
289286 [remco@hu jd ] nowadays i try to improve my coding style to produce nicer and beter
+ 289287 [felipegiotto] Actually, when you set x to nil, in the end of the code, you're losing
| 289326 [avatar.79@gm] just learn to quote... http://www.carnackyweb.com/?p=30
+ 289288 [fwmailinglis] HTH,
+ 289289 [jari.william] A case expression is probably the most clear alternative. The shortest
289301 [peter@se an ] Short it may be but this sort of code can hardly be called beautiful, I
+ 289306 [greenewm@ya ] case temp
+ 289308 [jari.william] But this elsif solution isn't heading for clarity either, compared to
| + 289318 [shortcutter@] x = case
| + 289321 [peter@se an ] Indeed this is a nice solution to the problem of assigning a value.
| 289325 [greenewm@ya ] On a more general note, here are some guidelines I use to write clear
+ 289309 [mberrow1@pa ] That is apparently a matter of opinion.
| + 289316 [chris.hulan@] Since your making a choice, a hash seems like it might be a tidy
| + 289324 [peter@se an ] When you have to debug or maintain multiply nested ?: logic you will
| | 289335 [mberrow1@pa ] Well you might, but I won't. Like I said, it's a matter of opinion.
| + 289328 [avatar.79@gm] quoting...this stranger!! http://www.carnackyweb.com/?p=30
+ 289345 [lists@be tr ] x = if cond1 then
289290 [dchelimsky@g] RSpec-1.1.3 has been released.
Newbie: add few lines to file ..?
289298 [marcin@my an] I try to write code which adding extra lines to my file
+ 289312 [bbxx789_05ss] File.open('data.txt', 'a') do |file|
| 289313 [ljjarvis@go ] Yeah, as 7stud says, open the file with the append flag..
+ 289315 [sepp2k@go gl] Replace the > with a >> and the output of your script will be appended to
Writing text files with an explicit encoding (UTF-16LE)
289300 [hello@ti pe ] Hey all,
289307 [bbxx789_05ss] require 'iconv'
+ 289319 [bbxx789_05ss] require 'iconv'
+ 289320 [hello@ti pe ] So presumably something like the below would work?
289322 [hello@ti pe ] Yup - it works :)
[SUMMARY] Making Change (#154)
289303 [james@gr yp ] One submitter commented that our solutions were pretty complex. The reason for
Reverse RegEx or How to write a KeywordGenerator for a given
289310 [ruby-forum.c] im new to ruby and have not the deep knowledge of all the possible ways
289311 [james@gr yp ] James Edward Gray II
Re: Reverse RegEx or How to write a KeywordGenerator for a g
289314 [ruby-forum.c] i look quick over the quiz. i think there some solutions for it :-)
289330 [aktxyz@gm il] Here is some code that adds encrypt/decrypt methods to string, quite
289332 [yermej@gm il] Google?
289497 [kyleaschmitt] You have two options. Go to msdn, search for what you want (it's in
289498 [kyleaschmitt] One of, not what of. Phew.
validate email address?
289333 [REMOVE-CAPSb] Anyone have a code snippet that tells whether an email address is
+ 289337 [dominikho@gm] email = "firstname.lastname@example.org"
| + 289348 [phrogz@ma .c] !@phrogz.net
| | + 289349 [ara.t.howard] address.scan( %r/[^@]+/ ).size == 2
| | + 289352 [dominikho@gm] And as nearly no website nor many email clients (i even believe, that some email servers will fail on this adresses)
| + 289360 [REMOVE-CAPSb] Looks fine. Go figure that I've been programming for decades and to this
+ 289338 [ruby@an hr p] See http://www.regular-expressions.info/email.html
+ 289350 [yedingding@g] module ActiveRecord
289334 [eliben@gm il] I've recently installed wxruby2 (version 1.9.4) from a precompiled
289366 [alex@de et m] wxRuby2 is substantially larger than wxruby 0.6.0 because it supports
weird binding error
289339 [pedz@ea es f] # Below is code that represents the code I am working on. The line
289343 [ara.t.howard] there really isn't enough code there to say, but i'm guessing you have
289421 [pedz@ea es f] Thanks Howard.
289340 [aart85@gm il] ...
289347 [moises.trovo] ...
howto perfom Image.read
289344 [guido@sp rt ] Hey mates,
289374 [TimHunter@nc] Open a bug track on the RMagick project at RubyForge and either upload a