223164-235875

222935-244483 subjects 223393-224283

Re:
223164 [dmjmusser@gm] ...

fatal flaw in popen4 on windows? [WAS] Re: Nonblocking IO read
223170 [ara.t.howard] not only is that true but, afaik, it's why popen4 cannot even work on windows!

Question about the Set class, XOR, and arrays
223176 [djberg96@gm ] Ruby 1.8.5
+ 223178 [ryand-ruby@z] It is the way it is implemented... subsequent 5's will toggle it on
| + 223179 [gavin.kistne] Looks like a bug due to Set#^'s implementation that assumes that the
| | 223226 [knu@iD em ns] I'll commit the following fix which I think is smaller and faster.
| + 223188 [djberg96@gm ] Done.
|   223261 [jeff@sc wa c] In what way is this a bug?  I'm not aware of set theory saying anything
|   223293 [vjoel@pa h. ] irb(main):009:0* [1,2,3] & [2,3,4]
+ 223180 [vjoel@pa h. ] irb(main):009:0> (0..10).each {|n| p Set[1,2,3] ^ ([3,4]+[5]*n)}
+ 223183 [nospam@no it] Are your irb entries above copied directly from the display? Or is this a

Ruby in emacs
223186 [dmitry.peski] Is there anyone using Ruby and Ri in emacs?
+ 223228 [ryand-ruby@z] Don't expect the author to be reading ruby-talk. You should file a bug.
+ 223240 [parragh@da k] I have the same problem with emacs 2.1

bayesian classifiers in ruby?
223187 [gilesb@gm il] I'm researching existing Bayesian classifiers in Ruby -- it looks as
+ 223189 [rf.oodanaw@s] I have used Bishop to classify the 488 articles of the Project of
| 223301 [gilesb@gm il] I'm hoping to develop yet another spam filter. in that sense I can
| 223308 [comp.lang.ru] that in my spam/email filtering. ifile is abandomware at the
+ 223191 [w3gat@nw ag ] want I can email you the source.  It works with about a 95% accuracy.
  223300 [gilesb@gm il] Definitely! That would be very cool.

Net::HTTP.get2 failure when using debugger
223192 [jnjortn@gm i] Can someone tell me if I have found a bug or am doing something wrong

Annoying If/Else behavior in SciTE
223193 [olsonas@gm i] Currently, when using SciTE, my if/else statements are formatted like
+ 223324 [david@va ln ] =46rom a cursory glance at ruby.properties, the SciTE autoindentation
| 223331 [gavin.kistne] While this is true, if you open a new SciTE document (without saving it
| 223353 [david@va ln ] You could comment out the lines in ruby.properties for the
+ 223409 [chris.hulan@] I get the impression to get smarter behavior you'd have to implement a

Ruby origins
223198 [mik@uk pl ye] been given the task of presenting a short perentation on Ruby on Rails.
+ 223199 [Gennady.Byst] I will share a secret with you -- GOOGLE ;-). Searching for "Ruby
+ 223200 [wilsonb@gm i] Takahasi-san presented on this topic at RubyConf this year.
+ 223389 [lutz.horn@gm] Posted via http://www.ruby-forum.com/.
  223543 [mik@uk pl ye] Thanks, I had seen a couple of those but hadn't found the informit one.

counter
223202 [lhandelsman@] Pretty new to ruby (and programming but am getting better).
+ 223203 [Gennady.Byst] $stdout.sync = true
| 223206 [TimHunter@nc] printf doesn't
+ 223204 [gabriele.mar] This isn't language dependent, and there isn't a "standard" way which
+ 223387 [lutz.horn@gm] You can set the varibale $\ (the output record separator for the print
+ 223438 [patrick@pk p] 1.upto(50) {|index|
  223440 [lhandelsman@] Thanks guys, I will give it a shot and let you know how it goes.
  223448 [patrick@pk p] Sorry about the lack of explanation for the code snippet in my previous

Net:HTTP performance downloading large files
223205 [chad@un er l] I'm working on my first ruby/rails project and have run into my first
+ 223225 [craigbeck@lu] How about just calling out to curl?
| 223254 [louis.j.scor] Chad;
+ 223359 [aaron_patter] It probably has more to do with the buffer size used in Net::HTTP.
  225033 [chad@un er l] and changed
  + 225034 [chad@un er l] /usr/local/lib/ruby/1.8/net/protocol.rb
  + 225035 [keith@au io ] With Ruby's open classes, you shouldn't have to. At the top of your
    225039 [chad@un er l] That worked great Keith, thanks.
    226433 [steve@fo wo ] Works great with me too!

String#unpack
223207 [joevandyk@gm] the_string.unpack("i").first
223270 [wardies@gm i] Looks ok to me.  You should of course double check that both your

Input file, change data, write to file
223209 [brr@bl er dg] I'm a ruby newbie trying to read data from a file, make a few changes,
+ 223214 [nospam@no it] It is very important in a case like this to define the problem clearly.
| 223217 [nospam@no it] / ...
+ 223215 [matt@ti bi s] I think the most newbie-appealing approach to files is with
+ 223219 [dblack@wo bl] ...
+ 223238 [stefano.croc] I'm not sure I understood what you want to do. Do you want to write the

file size revisit
223211 [python152@gm] the subject has been reported before, basically, ruby File.size() won't
+ 223218 [djberg96@gm ] Whoa, what?  Can you please elaborate on how win32-file causes problems
| 223220 [python152@gm] please see the code segment, once I put in "require win32/file", the
| + 223222 [python152@gm] Also, I am not sure why these two modules (or other reasons) are not
| + 223223 [djberg96@gm ] Please define "not working any more".  What isn't working exactly?  Is
|   223265 [python152@gm] ok, usually, I ran the program and supply directory name "." as
|   223278 [djberg96@gm ] These are warnins not errors.  They are harmless - I redefine a bunch
|   223285 [python152@gm] Find.find(some path) do |path|
|   223292 [djberg96@gm ] Aha! The culprit appears to be lstat.  In the find module you'll see
|   223294 [djberg96@gm ] Ok, fixed in CVS.  I'll have a release out tonight.  If you want the
|   223297 [python152@gm] Dan -
|   223311 [djberg96@gm ] Actually, we all agree. It's a bug in Ruby. It has been brought up,
|   223367 [phasis68@ho ] The File.size of win32-file still has a bug.
|   223454 [djberg96@gm ] Looks like I used "L" instead of "Q" in the original buffer.  Oops.
+ 223229 [phasis68@ho ] require 'Win32API'
  + 223266 [python152@gm] thanks for the suggestion. With this redefined function, it works fine
  + 223281 [djberg96@gm ] I don't think the problem is File.size.  I suspect it's the "if

Change class of existing object?
223212 [Max.Afonov@m] ...
223213 [dblack@wo bl] No, an object retains its "birth class" forever.  I think there might
223250 [phurley@gm i] pth

Ruby noobist, roobist?
223221 [shyguyfrenzy] ...
+ 223233 [m.fellinger@] require 'test/unit'
| 223235 [shyguyfrenzy] Sweet thanks for the quick response!
+ 224107 [sam@po er ou] The 2nd end ends the class, so you should put the 2nd test above it...

Can we run ruby codes (Heatmap) in PHP/Apache running server
223227 [raju_drg@ho ] I have a project in PHP/MySQL installed in *NIX server with Apache. Now
223251 [usenet-09200] Can you execute programs on this server?
223253 [haug@be nd a] Actually, it might jeopardize your account as well; installing binaries

Ruby for Symbian
223232 [tbray@te tu ] ...
223284 [ezmobius@gm ] Wow thats cool. Is this a different ruby on symbian then the google
223460 [jeffdh@u. as] It is in fact different than the ruby-symbian project that I presented

Something more compact for getopt
223234 [bantu@SK SU ] I use GetoptLong but I miss something much shorter in usage like
+ 223242 [jan.svitok@g] try optparse [1], though not that concise, it's pretty nice and easy
+ 223256 [transfire@gm] I'll give you two options. One that I worte that isn't as concise as

Permissions in SVN folders and Ruby scripts
223239 [thedossone@g] (I'm cross posting this from SVN forum)
223279 [ben@bl yt in] svn doesn't really pay attention to permissions, so when you check

Watir and regexp
223241 [asmir.biscev] We want to test a value given in a text field with a regular
223249 [nospam@no it] Define "work". Have you take the step of creating a test regex that must

Hooking IE events in Watir
223255 [patrick@pk p] I need to handle the onMouseDown event for the IE controller in Watir.
223260 [thedossone@g] I'm working with something similar trying to get a mouse drag to work, I

Civ4/integration question and practice for the golfers
223264 [spoooq@gm il] ...
223447 [spoooq@gm il] Not sure if anyone's reading this, but here's where I'm at now.

remote file glob
223269 [eegreg@gm il] What is the fastest way to do a recursive file glob on a remote server?
+ 223275 [shortcutter@] That would rather be something like
| 223295 [eegreg@gm il] I think I will just use the find command.
+ 223276 [znmeb@ce ma ] If you're talking about a Linux or other Unix-like server, indexing a

Solved:  Input file, change data, write to file
223272 [brr@bl er dg] Stefano,

dbm library
223277 [pw_richards@] I am using Ruby 1.8.2 on Windows and am wanting to use the dbm library
223286 [ara.t.howard] it comes with ruby.
223298 [snacktime@gm] With ruby 1.8.5, there is no DBM on windows, it's SDBM or GDBM.
223401 [pw_richards@] Thanks, that's solved it. I am now using SDBM.

[QUIZ] Fuzzy Time (#99) - Results
223289 [gavin.kistne] Following are the results I obtained from running my test script against
+ 223291 [gavin.kistne] Oops. I found a small bug in my test script's counting of offsets.
+ 223321 [wardies@gm i] I see now why the quiz mentioned that we might need to assume a

RubyInline
223290 [rubytalk@ea ] ...
223628 [drbrain@se m] [rearanged]

Just a question to throw out there...
223299 [shyguyfrenzy] ...
+ 223302 [dblack@wo bl] Have you looked at Chris Pine's "Learn to Program" book?  It uses Ruby
| 223303 [shyguyfrenzy] Yah David,
| 223315 [chris.hulan@] Have a look at this research paper
| + 223316 [rtilley@vt e] I'd suggest a 'Computers & Networking for Dummies' type book that gives a broad
| | 223319 [shyguyfrenzy] Yah, see that's what I figured it's more than just "me learn to program, me
| | + 223322 [ruby@ph li .] One thing i haven't seen anyone mention yet (maybe I just missed it) is to
| | + 223348 [nepentherepr] ...
| + 223317 [raju.gandhi@] ...
| | 223320 [shyguyfrenzy] Yah I've got Why's guide bookmarked. I really enjoy his style of writing and
| + 223341 [wilsonb@gm i] Thanks for linking to this. It's pretty amazing.
+ 223305 [tim.pease@gm] How much programming experience do you have?  If you have never done
| + 223306 [shyguyfrenzy] This is indeed my "first" dive into programming, with little unsuccessful
| + 223309 [m_goldberg@a] IMO not good advice for someone new. There's a good chance that a
| + 223313 [james@gr yp ] Wow.  I respect that book a lot Tim, but start there?  I must be a
|   223323 [tim.pease@gm] I'll be honest, it has been a long time since I've opened up Knuth and
|   223333 [james@gr yp ] <dies laughing>
|   223358 [m_goldberg@a] Yes, Ruby makes implementing turtle graphics both easy and fun. It
|   223361 [james@gr yp ] Well we could always do it as a multi-part quiz.  I was also
|   223429 [Brian.Hartin] Skotty,
|   + 223430 [shyguyfrenzy] I looked at Perl briefly and all the {'s kind of make me nervous.
|   + 223434 [james@gr yp ] Are you sure?  I honestly don't know, I'm just asking.  I'm wondering
|     223439 [Brian.Hartin] I'm not sure, but I suspect that closures would be hard to understand
|     223446 [james@gr yp ] You're probably right.
+ 223312 [james@gr yp ] There was a fun side conversation on this at RubyConf this year.
| + 223314 [shyguyfrenzy] That was the most amusing email I've read all day. Thank you, that made me
| + 223858 [coder68@ya o] I greatly respect James's opinion on practicaly everything he writes on
|   223878 [james@gr yp ] Ack, don't say that.  I was *trying* to provide encouragement!  ;)
+ 223356 [bob.conn@bt ] If it's any consolation, I'm a programmer and am finding Ruby tricky
| 223357 [shyguyfrenzy] I was alright with blocks, and then along came these @ and several other
+ 223431 [Mail@Jo as H] what kind of programs do you want to create?
+ 223836 [chen_li3@ya ] Depends on your background and your goals. I assume you have no

net/http and rexml
223304 [louis.j.scor] Hey all;
+ 223338 [nospam@no it] You mean, line by line? The socket class you are describing doesn't know
| + 223343 [louis.j.scor] Nope.  Not line by line.  All the parser should need is a token, and I
| | 223345 [nospam@no it] And you could set things up to read more data when your block-oriented input
| + 223352 [vidar.hoksta] Class TCPSocket has both the methods each_line and readline. That isn't
+ 223355 [vidar.hoksta] I fully sympathize... I went through the same mess a while back.

Stockholm RUG?
223310 [ola.bini@ki ] Just wanted to throw out a call for information/action: Is there any

str1 = str2 is not a copy?!?
223325 [joeat303@ya ] File.foreach(data_file) do |line|
+ 223326 [jcribbs@ne p] Nope.  Now, you have two variables, base_name and line, referencing the
+ 223327 [farrel.lifso] It doesn't create a copy, both variables reference the same object. If
+ 223328 [halostatue@g] No, it isn't. You're not understanding Ruby variables and assignment.
| 223329 [gavin.kistne] Variables point to objects, they do not "hold" or "contain" them.
| 223335 [tanner.burso] ...
+ 223330 [snacktime@gm] As far as my understanding goes most assignments just copy object
| + 223334 [gavin.kistne] the line).
| + 223336 [louis.j.scor] As has been pointed out, you are creating a new binding to the same
|   223461 [gregory.t.br] I get the point of this example, but it's worth noting that you can
|   223462 [gavin.kistne] Wording like that promotes dangerous mental models, IMO.
+ 223337 [nospam@no it] / ...
| + 223340 [gavin.kistne] The thing to wrap your head around here is that 'slots' in an Array, and
| | 223344 [louis.j.scor] Of course.  I'm just pointing out how this could be confusing to
| | 223346 [gavin.kistne] Yup. To be clear, my response was not an attempt to 'correct' you, but
| | 223350 [louis.j.scor] Absolutely. Your explanation was excellent, as always.  What I meant
| + 223342 [dblack@wo bl] base_name = line.dup
| + 223351 [david@va ln ] And I'm guessing the sake of simplicity too. The Ruby basic data item
+ 223347 [kabigon@gm i] Yep. All variables in Ruby are actually references to objects ... so

[SUMMARY] Fuzzy Time (#99)
223354 [gavin.kistne] The core requirements for this quiz were somewhat easy. Let's look at

RubyCocoa - selectors for Ruby classes
223363 [gabriele.mar] I'm using the RubyCocoa framework (well, trying to), freshly compiled
235875 [ruby.hardwar] I don't know anything about RubyCocoa but I happened to see these

foxGUIb & ruby 1.8.5 spewing hundreds of errors at launch time.
223364 [kenosis@gm i] Greetings all,
+ 223368 [lyle.johnson] Hope this helps,
+ 223421 [noonknight@g] Until the 1.8.5 bug is fixed, just precede the "require" with: $VERBOSE
  223424 [kenosis@gm i] Thanks to all - much appreciated.

Cool API reference thingy
223365 [dblack@wo bl] Have a look at http://gotapi.com.  It's very cool.
+ 223366 [greg.carbon8] ...
+ 223373 [flazzarino@g] nice site.
| 223433 [ruby-talk@ba] I made one for ActionScript (using Ruby, of course),
+ 223414 [doodpants@ma] It's nice, but in the Ruby Core Classes section, the sidebar links to

Garbage collection/memory unfreed problem
223374 [mark@st ee l] It appears that the ruby garbage collector is not freeing up unused
+ 223383 [Childe.X@gm ] I tried your code on a RHEL4 x86-64 server and I got the same problem
+ 223635 [drbrain@se m] Ruby's garbage collector is conservative and walks the stack looking

Hackers wanted
223375 [vihanpandey@] ...
223377 [foamdino@gm ] I'm interested in part-time/contract/freelance work, but not full-time
223378 [foamdino@gm ] Sorry all, wrong reply option :(
223380 [vihanpandey@] ...

How to parse an WSDL file ?
223381 [stephane.wir] I would like to use the wsdl api from stdlib, but I didn't understand.
223384 [Childe.X@gm ] soap4r can use REXML as the XML parser. I think you can use it's WSDL
223385 [stephane.wir] Thanks, because I would like to generate a C++ code from this WSDL with
223475 [nakahiro@sa ] lib/wsdl/classDefCreator.rb (and friends) generates Ruby code from WSDL

webrick-webdav(gem) served files are mounted only read-only
223382 [ruby-forum@s] while i easily get a webdav server up an running with
223386 [gabriele.mar] Exactly, that's a Mac OS X issue: webrick-webdav supports protocol

REXML + Gruff: display label problem
223388 [luc.juggery@] I have a little question regarding graph configuration for Gruff

ruby lexer/parser
223390 [am@ar bo .d ] Just a short question concerning the ruby lexer/parser
223391 [farrel.lifso] * can have dual meanings. It can be a method call on an object (in
223394 [am@ar bo .d ] yes, you are right. I was just suprised, that it only is a problem

Vacancy for Ruby developer in Amsterdam
223392 [davaco@gm il] We're hiring! Please email me if you're interested.
223399 [pratiknaik@g] I'm based in India. Can I apply for this position ?
threads.html
top