206979-209723

206750-241699 subjects 207193-210027

^ porting perl regexp to ruby
206979 [niklasalveru] I have a perl regexp that strips c++ comments (I have not constructed
206989 [logancapaldo] Look at the documentation for gsub. Specifically the block form.

^ Newbie questions
206990 [luchezar.pet] I'm new to programming at all... and I suck at maths. Plus, I'm 16
+ 206993 [michel.casab] Yes.
| + 206997 [harish.tmh g] I love ruby, but its my opinion that it simplifies things so much that
| | 207115 [perrin apoth] I disagree quite a lot.  Learning to program is not the same as learning
| + 207114 [perrin apoth] It's unfortunately not quite that simple.
+ 206994 [jan.svitok g] Sure. It's a nice language where you don't have to worry about many
+ 206996 [sastph sas.c] Yes, Ruby is a good language to learn as your first language. (It's not
+ 207001 [M.B.Smillie ] Well, one language has to be your first, and they all have pluses and
+ 207005 [richard.conr] Well I am new enough to Ruby, but not programming.
+ 207179 [bcowdery gma] Ruby is a relativly simplistic and forgiving language, which fortuantly
+ 207181 [jeremy chaos] Speaking as a mathematician who later became a programmer, I don't
| 207410 [rick.denatal] This is a good perspective.
+ 207196 [steverummel ] I am also a newbie, though I took some C at University, I code for
  207428 [jeremy chaos] It's such a fine line between stupid, and clever.
  207456 [steverummel ] I hope I did... in that direction... but if I hadn't, well I wouldn't

^ prob with tutorial example
207009 [nephish gmai] Hey there,
+ 207010 [dblack wobbl] You're misspelling 'yield' :-)
+ 207011 [ben iagu.net] 'i' before 'e', except after 'c'.
| 207020 [nephish gmai] thanks, gents. i don't mean to waste fellow coders time. I am new to
| 207042 [shortcutter ] So it's in your belly? :-)
+ 207012 [shortcutter ] robert
+ 207014 [nephish gmai] geez, nevermind. guess it would help to spell yield correctly !
+ 207015 [james graypr] It's a spelling error.  Try "yield."  ;)
+ 207016 [doodpants ma] Offhand, I'd say you misspelled "yield". :-)
+ 207026 [logancapaldo] HTH

^ require 'mysql' is failing
207028 [michael webl] I really thought I'd be through at this point ... but
207029 [ariekusumaat] have you tried this?
207041 [michael webl] No I hadn't; I never saw that construct before (hey! I'm still learning
207045 [ben bleythin] Yes, it's correct.  In order to include a gem, you have to include
207049 [michael webl] OK, Ben. You're another one I owe a lunch if you're ever in the area of

^ Contract to hire: 2- Ruby Developers- Denver, CO 3-6month
207031 [chris.isaac0] Kforce is currently seeking a Ruby on Rails Web Developer for a
207034 [dblack wobbl] This message is in MIME format.  The first part should be readable text,

^ Info on continuations / callcc?
207033 [vasudevram g] I am Googling and will do more, found some stuff, but interested to get
+ 207037 [ara.t.howard] here's some code that uses it to impliment external iterators in ruby, may be
| 207044 [vasudevram g] Thanks, will look at it.
+ 207051 [Bil.Kleb NAS] Presumably you found,
| 207059 [vasudevram g] No, actually I found some others.
+ 207292 [martin snowp] Well, you probably ran across my old page from 2003 that does "amb" in
  207358 [vasudevram g] Thanks :) Sounds interesting - will check it out.
  207370 [martin snowp] Yeah, there was a post to the list earlier today saying that
  207515 [vasudevram g] Thanks for the reply.

^ Goto in Ruby?
207036 [aidy.rutter ] I have a simple web GUI that I would like to read a file and enter data
207043 [shortcutter ] Use a CASE statement for this.
207060 [aidy.rutter ] Thanks for the advice, but this will only enter the word 'address' in 7
207065 [shortcutter ] You probably should state more clearly what you need.  Then we can come
207256 [aidy.rutter ] This is an example of a file I am reading.
+ 207264 [has.sox gmai] This may not be the nicest solution, but it is flexible and it might get
+ 207265 [shortcutter ] task = nil
| 207297 [aidy.rutter ] took your advice, and works like a dream. I owe you a couple of beers.
+ 207343 [chneukirchen] Why don't you use a <textarea>?

^ load paths unions?
207056 [transfire gm] I want to be able to "union" some load paths. Eg. given
+ 207062 [shortcutter ] Usually you do
| 207136 [transfire gm] Yes, currently I a separate directory facet/ that I build automatically
| 207153 [shortcutter ] I'm not sure I would not go down that road.  Gems do it and from what I
+ 207068 [logancapaldo] cd facets
| 207131 [transfire gm] Unfortuately that's not cross-platform.
| 207164 [logancapaldo] Make a rake task to do it? But instead of ln -s just spit out
+ 207199 [botp delmont] # I'd like to be able to do
+ 207243 [nobu ruby-la] By moving them to
  207874 [transfire gm] BTW, that is nice solution, even if it is a bit lengthly when it comes

^ strange irb behaviour
207057 [junkone1 gma] When i use irb, sometimes i get a strage behavour especially when i do
207076 [drbrain segm] Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

^ Been there, done that - language shootout
207064 [igouy yahoo.] -snip-
207067 [halostatue g] Better yet, don't. The language shootout is only slightly more useful
207070 [igouy yahoo.] Austin, I knew I could rely on you!
+ 207074 [halostatue g] Certainly I'll post in response as long as you're going to shill
| + 207426 [igouy yahoo.] And I doubt you're surprised when Ruby shows up relatively slow; on the
| + 207433 [drbrain segm] I have to agree with Austin here.  There are benchmarks inside that
|   207462 [igouy yahoo.] Thank you for making a specific criticism.
|   + 207471 [ara.t.howard] can you elaborate?
|   | 207474 [igouy yahoo.] I guess the user I worked with would have demanded you be replaced by
|   | 207555 [ara.t.howard] you are right of course.  at my present job this has been brought up in the
|   | 207608 [igouy yahoo.] -snip-
|   | 207634 [ara.t.howard] then it is a brick moving contest - the kind i'm happy to lose ;-)
|   | 207636 [igouy yahoo.] Google "brick moving contest" didn't find anything.
|   + 207472 [vikkous gmai] I have to question your testing strategy, then. I have not looked
|     207475 [igouy yahoo.] If you're interested enough to speculate and question, please be
|     207603 [vikkous gmai] All right. I'm looking at it. Based on what I'm seeing on your
|     + 207617 [drbrain segm] test=fasta&lang=ruby&id=0
|     | 207648 [vikkous gmai] I did not see this test named 'random' when I looked through the
|     | 209102 [lukfugl gmai] I agree that the presence of "/old/" (vs. "/gc4/") in the URL probably
|     | 209349 [igouy yahoo.] There was and is an actual link to it from the FASTA benchmark
|     | 209648 [lukfugl gmai] Either remove or update to point to a current (not "/old/") benchmark.
|     | 209714 [igouy yahoo.] Jacob, why would we want to remove that constraint, and what problem
|     | 209723 [lukfugl gmai] The problem I see is that the current incarnation of the FASTA
|     + 207621 [igouy yahoo.] -snip-
|       + 207629 [tanner.burso] A "real program" uses the most efficient algorithm neccessary to reach an
|       + 207642 [vikkous gmai] My understanding of the goal of the fasta program(s) (aside from being
|         207663 [igouy yahoo.] I don't think you gave a direct answer to - What do you say the
+ 207519 [peter semant] Come on. I would hardly be telling people to write something in C if I
  207616 [igouy yahoo.] You're right - I was completely wrong to say you were surprised.
  207733 [peter semant] Because when people state that performance is their priority and are
  207846 [igouy yahoo.] I don't know what you mean by they start to change their story.

^ Init_xxx(with arg ??) in C for ruby ext ???
207069 [pere.noel la] hey all,
207077 [drbrain segm] The Init_ method initializes the shared library, it is not the

^ FOUND was (Re: Init_xxx(with arg ??) in C for ruby ext ???)
207078 [pere.noel la] rb_define_singleton_method(rb_cMyClass, "new", cd_new, 1);
207116 [drbrain segm] No.  MyClass.new is inherited from Class.
207174 [drbrain segm] Oops.
207182 [yvonthoraval] VALUE method_raliasfile_init(VALUE self, char * alias_path)
+ 207187 [drbrain segm] ^^^ remove this line ^^^
| 207233 [pere.noel la] RAliasFile.c:46: error: request for member 'alias_path' in something not
+ 207245 [nobu ruby-la] All arguments are passed as VALUE, not C type.
  207250 [pere.noel la] then this arg "VALUE alias_path" will be common to all of the methods i
  207252 [decoux moulo] Post your *complete* source
  207254 [pere.noel la] ok thanks a lot for your clear answer ;-)
  207255 [decoux moulo] Useless actually because you use instance variable rather than C struct.
  207257 [pere.noel la] ok, thanks for all and the time u spend about that, my "skeleton"'s

^ End-to-End performance - premature optimization
207080 [igouy yahoo.] -snip-

^ IRC
207086 [innu urgas.n] Can i use ruby language for building irc client and how? Im pretty
207088 [james graypr] Hope that helps.

^ solar local time
207093 [ara.t.howard] i'm working on a sticky issue:  i'm converting some times based on a utc time
+ 207101 [logancapaldo] Does TZInfo bring you closer?
| 207118 [ara.t.howard] nope.  timezones are politicalized solar local times.  basically i'm searching
+ 207117 [ara.t.howard] yeah - the thing is that this 'localtime' will be in utc ;-)
+ 207122 [tim.pease gm] nil}.compact.sort; end
| 207159 [ara.t.howard] require 'time'
| 207178 [ara.t.howard] off_sec =
| + 207263 [hutch recurs] I'm not sure I understand what you are trying to do. Are you trying
| | 207406 [ara.t.howard] yes.  not __political__ timezone - actual timezone.  each 15 degrees of lon is
| + 207411 [ara.t.howard] <snip my own broken code>
+ 207132 [tim.pease gm] snip
| 207160 [ara.t.howard] i'm starting to think it has to be a float...  but a time would be better.
+ 207168 [m_goldberg a] If I understand the problem you describe (likelihood estimate ~ 50%),
  207176 [ara.t.howard] yes.  i'm thinking of something similar - perhaps returning a fraction (of the

^ [OT] OS X Leopard shipping with Rails!
207096 [daniel.schie] Look under "Internet and Web"
+ 207098 [alex blackke] If I'm remembering things correctly, I believe that means that will be
+ 207099 [M.B.Smillie ] Until we have to install it all again from source because it's broken
| 207104 [chiology gma] Well, the core guys are working with Apple to make sure it doesn't,
| 207110 [Daniel.Berge] Step 1: Don't cross compile.
+ 207120 [tanner.burso] Having read some on DHH's blog, and other places, I think the real news here
+ 207126 [gusxedge gma] Just linking to the rails blog so others can see what's up ...

^ Stopping WEBrick from logging
207097 [alex blackke] I'm doing some local timing of some network code, and I'm using
+ 207105 [chiology gma] Could you redirect to a StringIO pointed at /dev/null? Without looking
| 207107 [alex blackke] Thanks...  I might try that next time.  For now I'm overriding
+ 207106 [alex blackke] Ah.  It would seem I should read a few more of the docs before posting.
+ 207112 [jan.svitok g] in your HTTPServer (or any descendant of GenericServer) write

^ mechanize timeout errors
207100 [akanksha.bai] I am using mechanize for scraping some urls.
207109 [Daniel.Berge] begin
207125 [alex blackke] Not so:  WWW::Mechanize#read_timeout= is your friend.
207138 [akanksha.bai] could you plz elaborate a little on that or point me to an example.
+ 207140 [Daniel.Berge] Ah, good to know, thanks. :)
| 207149 [alex blackke] No worries :-)
+ 207146 [alex blackke] irb(main):001:0> require 'mechanize'
  207167 [akanksha.bai] So I did what you said.....
  + 207173 [inxs.hemant ] require 'timeout'
  + 207175 [inxs.hemant ] eout

^ Simple looping question
207102 [aquafina mai] 20060712: [9.174, 131452]
+ 207108 [jgarvin.list] How about looping through the list backwards?
+ 207124 [daniel.schie] You'll need to figure out how to compare two dates, but I'm sure one of
  207205 [ruby muerman] equire 'yaml'
  207409 [aquafina mai] Brilliant. That enumerator mixin is crazy awesome. Thanks.

^ Global variables considered harmful?
207127 [bulliver bad] charset="us-ascii"
+ 207130 [garbagecat10] Look at optparse for a better way to do command line arguments. Look
| + 207133 [james graypr] I imagine a plain Struct is sufficient here, since all of the values
| + 207141 [bulliver bad] charset="iso-8859-1"
+ 207137 [coachhilton ] Well, this is quite a "can of worms" topic, now isn't it?  For whatever
| + 207144 [bulliver bad] charset="iso-8859-1"
| + 207148 [james graypr] You can also make the class a singleton so all code works with just
+ 207157 [john.carter ] I tend to parcel such things up into a Context object. Sort of like...

^ downloading web pages in watir
207128 [csamigroup g] could anybody tell me how to download web pages accessed through
207177 [bcowdery gma] While there isn't any methods in Watir to directly download a webpage to
+ 207188 [csamigroup g] thanks..
+ 207189 [christopher.] Also note that Watir does *not* return the actual HTML.  It returns the

^ Re: OS X Leopard shipping with Rails!
207135 [garbagecat10] I know I'm just adding two cents here, but this really is incredibly
207143 [james graypr] Just so we're clear Apple has shipped Ruby with every single version
207180 [canyonrat ma] I don't remember it that way. I think Ruby first showed up in Jaguar.
207183 [james graypr] Yes, looks like you remember that better than I did.  Jaguar does
207213 [2006 howell.] When I decided I'd outgrown AppleScript, I said to myself "Well, let's

^ Using C++ Member Function with rb_protect
207147 [dharple gene] I'm having problems using a C++ member function with rb_protect. Here
+ 207151 [garbagecat10] VALUE val = rb_protect(&Sandbox::eval_protect,
| 207152 [dharple gene] test.cpp: In member function Á·ALUE Sandbox::eval(char*)
| + 207155 [garbagecat10] Is it possible to make Sandbox::eval_protect a static function? Because as
| | 207360 [mental rydia] Specifically, VALUE (Sandbox::*)(VALUE).  Pointers to non-static methods
| + 207165 [ mfp acm.org] Of course it won't work that way, being a member function (it is given a
|   207169 [dharple gene] Thanks, I ended up with something similar.
+ 207162 [caleb aei-te] I'm not sure if it will help, but for my C++ extensions, I've had to
+ 207163 [caleb aei-te] Also, have you tried casting to a void * ?

^ Nonblocking Windows Ruby popen?  (was: Re: C Threads and Ruby)
207154 [billk cts.co] This has been percolating in the back of my mind for a month

^ Installing rb-gsl-1.7.0 on Windows
207156 [andrew.foers] Maybe I'm being dense but I'm trying to install GSL on Windows.
207161 [ara.t.howard] (and it shouldn't have ':' in it!)
207166 [andrew.foers] Smashing!  That did it.  I was tearing my hear out about the config and
207170 [ara.t.howard] guess i should have put an INSTALL file in there eh ;-(  sorry!

^ parse error, unexpected $, expecting kEND
207158 [jamison_wild] Does anyone have any techniques or tools that they use to help narrow
207219 [gmurray clou] using an editor with colorizing is a big help.  Some use vim with the
207431 [chneukirchen] Using an editor with intelligent indentation is of even more help.

^ Here you go....
207184 [breakingsoft] I think this is exactly what you're looking for: The Little Book of
207185 [breakingsoft] Woops; nevermind.  I just noticed the date of the original post.  You're

^ For Float#class why is '===' different from '=='
207190 [richard_a_br] # Sorry, very newbie question ...
+ 207192 [logancapaldo] No one wants to hurt you my friend, in fact ruby has anticipated your
+ 207197 [zikiss gmail] The triple equals is a length of velvet rope, checking values much like
| 207198 [zikiss gmail] irb(main):006:0> puts "too bad" if 2000..2004 == year
| 207208 [richard_a_br] I appreciate the responses. I'm still puzzled. It seems that "case a"
| + 207209 [richard_a_br] What I mean to say is "a.class" is something that indicates "a" is a
| | 207226 [eero.saynatk] Right. a.class is Float which is a constant. Float.class is Class.
| + 207214 [dan-ml dan42] case a
| + 207287 [martin snowp] lhs === rhs   means  "Does rhs match lhs?", where the definition of
+ 207258 [gareth.adams] As others have said, === is a function call

^ =?WINDOWS-1252?Q?Re:_Dr_Nic=92s_Magic_Models?=
207191 [robmnl gmail] This is awesome. I love this. Magic magic magic.
threads.html
top