219560-236211

219330-220970 subjects 219756-226496

instance_function
219560 [transfire@gm] Useful? Better name?

running a ruby script once a week automatically
219561 [jonathan.ott] I have a SQL query that examines an entire column (right now 25,000
+ 219607 [s.druzkin@gm] I have the same situation with scripts, cron is a right choice.
+ 219671 [shortcutter@] What exactly do you mean by "every time the page is loaded"?  Is this some

Rails webmin like application
219569 [ghiggia@gm i] I'm a newbie in ruby I'm wondering if there are a way to build a little

Problems with upgrade to 1.8.4
219574 [anton@si on ] Actually this is _almost_ a gems problem in that it shows up with gems.
219603 [wilsonb@gm i] What Linux distro is this? Sounds like you don't have zlib installed.

Regex parsing against filenames
219577 [pbailey@bn .] I need to match incoming filenames in a directory on my server, so that
219584 [hgs@dm .a .u] Without seeing the result of the r.dbfilename call it's hard to tell.
219593 [pbailey@bn .] Thanks, Hugh.
219597 [hgs@dm .a .u] So none matched. But did it tell you anything about the cases that didn't

robots.txt protocol support for Ruby
219578 [nicolas.desp] I'm looking for a ruby gem supporting the robots.txt protocol such as

[ANN] Ruby-VPI 8.0.0
219579 [skurapat@uc ] Version 8.0.0 (2006-10-13)

DRb.thread.join in a Process.fork block?
219582 [port001@gm i] ...
+ 219585 [vjoel@pa h. ] Forking with threads is a little tricky. It causes all threads except
+ 219588 [ara.t.howard] you have to fork first.

Re: Problem with a regular expression
219592 [m_goldberg@a] Whrn I substitute '\/TD' for '/TD' and make the regex case
219596 [david@va ln ] Use a HTML parser? Hpricot considered sexy recently.

[ANN] slave-1.0.0
219600 [ara.t.howard] ** PLEASE NOTE THAT THIS IS A DEVELOPMENTAL RELEASE **
219604 [ezmobius@gm ] Awesome thanks Ara!
219606 [ara.t.howard] no prob - it was a good idea

No such object errors with Ruby-LDAP...
219601 [augustf@gm i] I'm in the process of writing a small script for my LDAP-enabled

file_put_contents analog?
219605 [joeat303@ya ] PHP has a function file_put_contents(file, stuff) -- is there any
219608 [wilsonb@gm i] file.puts(stuff)
219609 [gavin.kistne] def file_put_contents( name, *contents )
219611 [gavin.kistne] Er, missing a paren there. Also, if you want append vs. wipe-and-write,

Newbie - File Rename
219613 [snoopy.pa30@] I am obviously missing something.
219645 [nobu@ru y- a] newname = path.sub('longfilename - 0', '0')
219939 [snoopy.pa30@] Just got back and tried this.
+ 219967 [aquasync@gm ] What about trying `require "fileutils"', at the top, and then using
+ 220040 [nobu@ru y- a] Are you sure there is no exclamation mark?
  220062 [snoopy.pa30@] I had originally missed that.

File.puts or File.write ?
219618 [joeat303@ya ] For general purpose file writing, does it matter whether puts or write
+ 219634 [collinsj@se ] Yes, using puts adds a newline to the end of the output, while write and
| 219636 [wilsonb@gm i] puts only does that when you're not in binary mode, though. I have yet
| 219666 [jan.svitok@g] And IIRC write is atomic - 'puts' consists of two 'write's, so there
+ 219668 [shortcutter@] I tend to view #puts and #print as printing methodsi, i.e. for textual

Sorting through an array of an array
219620 [dominicson@g] container[0] = ["foo", "bar", "baz"]
+ 219621 [joshknowles@] ...
+ 219622 [emarkp@so a.] container.sort { |x,y| x[1]<=>y[1] }
+ 219623 [binary42@gm ] Actually, the better way to sort in this scenario is to use sort_by.
  219624 [dominicson@g] But how to do apply this to having 3 elements in the value of an array?
  + 219625 [wilsonb@gm i] Having more entries in the array doesn't change the number of
  + 219626 [caldridge@gm] container.sort_by {|x| x[2]}

unpack block?
219627 [tbray@te tu ] unpack doesn't seem to take a block.  This seems like an obvious
+ 219630 [binary42@gm ] Possibly a good idea. Lets go ahead and try it out.
| 219631 [binary42@gm ] On second thought... each_unapck is a much better name.
| 219632 [wilsonb@gm i] Shouldn't it just be 'unpack', and have some 'if block_given?' juice
| 219693 [binary42@gm ] Not when I am monkey patching [1] like this. If I felt like writing a
+ 219696 [matz@ru y- a] No, it's a quite interesting idea.  I implemented it with a few

[ANN] Boogaloo Simple Cache Server 0.1
219628 [port001@gm i] ...
219776 [gethemant@gm] Interesting, so where do you cache the data that clients send you?
219809 [port001@gm i] ...

Backwards references in arrays of arrays of...
219633 [lutzky@gm il] I'm creating a scheduling application for my university, the Technion.

Re: A* (#98)
219637 [interfecus@g] My solution for last week's quiz used an A* search with a priority

Calling a reader from a writer
219643 [clintpachl@g] class Test
+ 219646 [nobu@ru y- a] An assignment expression always returns the assigned value,
+ 219650 [dblack@wo bl] This just came up today on IRC.  I'd forgotten about it, but was
  219670 [clintpachl@g] David, you are right on. Now that I think about it, Ruby does the

[ANN] ZenTest 3.4.1 Released
219647 [ryand-ruby@z] ZenTest version 3.4.1 has been released!

[Adv] Ruby Tutorial for beginners
219649 [prakash.diby] ...
+ 219652 [darkintent@g] Neat thanks for the heads up.
| 219653 [darkintent@g] One quick question in one of his examples he states that using single
| 219654 [has.sox@gm i] ...
| + 219656 [darkintent@g] I see thanks for the info.
| + 219755 [twifkak@co c] No, it didn't. The hypothesis was that the *parser* has a little easier
|   + 219759 [rick.denatal] Yes, the reason for single over double quotes isn't about performance.
|   | 219764 [prakash.diby] ...
|   + 219771 [james@gr yp ] James Edward Gray II
|   + 219816 [hal9000@hy e] A common convention is to use single quotes unless there is
|     219827 [david@va ln ] Seconded. Though recently, my fingers protest against my Java day job
+ 219665 [firmanw@gm i] Great turtorial, It was covered what a newbie need to learn about Ruby.
  219765 [prakash.diby] ...

Speaking of COBOL ...
219651 [znmeb@ce ma ] Interesting article on the future of COBOL ... perhaps a COBOL to Ruby
219681 [alibby@ta ge] My guess is that the need to use COBOL has to do with the
219697 [znmeb@ce ma ] A COBOL refactoring IDE written in Ruby! Sounds to me like
219703 [matt@te hn r] Don't dismiss all of the ideas in COBOL so quickly.  For decades it has
+ 219711 [znmeb@ce ma ] Ah ... so Ruby is not mainstream? Perhaps an ability to refactor legacy
| + 219717 [matt@te hn r] Ruby is just starting to become mainstream.  There are still a lot of
| + 219743 [jwkenne@at g] Actually, no. Decimal arithmetic in microprocessors goes back to the
+ 219744 [jwkenne@at g] PL/I, RPG, and Ada from Ada 95 on. And they all avoided the horrible
  219751 [rick.denatal] Not to mention quite a few implementations of SQL.  Certainly a

[ANN] win32-mmap 0.2.0
219655 [djberg96@gm ] The Win32Utils team is happy to announce the release 0.2.0 release of
+ 219664 [enleverlesX.] I use mmap for exchange data with Python's scripts, and some other
+ 219686 [tim.pease@gm] Thanks for putting out all the win32 utilities. Myself and others in
  219735 [guslist@fr e] +1. That would be great.

Ruby conference ticket available
219657 [reta.miller@] Fellow Rubyist,
219658 [caldridge@gm] I want it.. its mine!!

Basic ActiveRecord Usage
219659 [jonathan.ott] I want to run a Ruby script outside of Rails and still use Active
+ 219661 [jeremy@bi sw] ...
+ 219679 [alibby@ta ge] I found this Wiki article, which helped me out a lot.

redirect STDOUT
219669 [cyberblue.yo] I'm writting a program to detect the cursor position with the vt100 command "\x1b[6n".
219727 [smartgpx@gm ] I suggest looking at the code for the win2console library, which gives
+ 219728 [smartgpx@gm ] Oh bother! That should be "win32console".
+ 219769 [cyberblue.yo] Thank you very much.
  + 219770 [ara.t.howard] string = ` your_cmd.exe `
  + 219787 [smartgpx@gm ] see "ri StringIO"
  + 219788 [drbrain@se m] You don't.
    219798 [cyberblue.yo] #!/usr/bin/ruby
    219880 [drbrain@se m] sstring = StringIO.new will suffice.

New edition of  "The Ruby Way" coming soon
219676 [pcunix@gm il] Review of "The Ruby Way (second edition) at

Source files for "YART - Yet Another Ruby Tutorial" now available.
219677 [paul.barry@i] Thanks to everyone who sent me words of encouragement about my Ruby
+ 219687 [santiago.lun] Excelent work Paul, i just have noticed that there's a mistake in the
| 219704 [paul.barry@i] Duh!
+ 219722 [gdprasad@gm ] newRubyTutorial]$ cat download.rb
  219724 [rick.denatal] WHAT!  You didn't make this a rake task? <G>

Select
219678 [pablo@li tl ] I want the user to be able to select from a drop down menu if s/he wants
219680 [alibby@ta ge] This sounds to me to be more of a DHTML/ DOM manipulation

typesetting long options in rdoc
219682 [wybo@se va y] I don't succeed in nicely typesetting long options in itemized lists in

Ruby's include path
219683 [alibby@ta ge] Greetings,
219684 [dblack@wo bl] It's called the load path, and it's stored in the global $: variable,
219685 [alibby@ta ge] Outstanding, thanks!

Re: win32-mmap 0.2.0
219688 [djberg96@gm ] I thought about it, but Guy is currently using what amounts to an

What's wrong with my metaprogramming?
219689 [newhoggy@gm ] def define_my_method(method_name)
+ 219690 [dblack@wo bl] The problem is that define_method creates instance methods -- in this
+ 219691 [lopx@ga et .] def define_my_method(method_name,&blk)
+ 219692 [ara.t.howard] you don't want yield here as the context of that yield is bound to the
+ 219694 [transfire@gm] Yea, funny thing about Ruby, closures go a long ways. Have a look at

Active Record Inheritence
219695 [alibby@ta ge] Greetings,
219701 [dblack@wo bl] If you want to do single table inheritance, you need to use a single
219705 [alibby@ta ge] Thanks for your comments.  It seems I completely missed
219707 [dblack@wo bl] The has_one stuff is separate from the STI stuff.  The basic idea of

Global lock
219698 [eustaquioran] Does Ruby threading model uses a global lock as Python uses?
219699 [matz@ru y- a] No.  It's worse (in a sense).  It uses its own green thread.
219702 [eustaquioran] Thanks for your answer, Matz! Can you give me a tip where I can learn
220037 [matz@ru y- a] See http://www.ruby-lang.org/en/downloads/ for source download
220050 [eustaquioran] I download and compile the sources on every release, I made a Slackware

Re: Text
219700 [twoggle@gm i] Version 1.1.0 now includes the Porter Stemmer. Thanks for the
221388 [junkeraccoun] Sorry for the dumb question, but I couldn't find ANY documentation in
221642 [twoggle@gm i] Not a dumb question, seeing as the documentation isn't actually
221667 [pbattley@gm ] I uploaded the currents docs to the project web space a few days ago.
221675 [transfire@gm] Also, a mixin for String that provided method interfaces to all these
221689 [mtrier@gm il] Very cool.  Thanks.  I had a couple of these in separate libraries.

Can ruby comment out a block of code???
219709 [roseanne@ja ] It sounds pretty stupid, but I could not find a way to do it in Ruby
+ 219710 [james@gr yp ] =begin
| + 219716 [roseanne@ja ] Huge Thanks!
| + 219813 [esad.nospam@] Are there any plans on introducing shorter form in ruby 2?
|   219828 [david@va ln ] Using all pound signs is more common - I only see the =3Dbegin / =3Dend
+ 219712 [znmeb@ce ma ] <do this>

[ANN] wxruby2-preview 0.0.36
219714 [alex@de et m] wxRuby2 preview 0.0.36 has been released!
+ 219732 [hutch@re ur ] That's great news!
| + 219734 [ezmobius@gm ] I got the exact same thing on intel osx.
| + 219762 [roys@mi ds r] Thanks for the report, Bob.  We'll get on that.  We should be statically
|   + 219766 [ezmobius@gm ] Thanks Roy-
|   + 219833 [hutch@re ur ] I did the same as Ezra (configure; make; sudo make install -- but I
|     219843 [roys@mi ds r] Bob, we look forward to the reports.  We're very excited to see interest
+ 220012 [jeremymcanal] Before I get excited, does this add support for the StyledTextControl?
  220094 [roys@mi ds r] The Windows gem has Scintalla compiled in, same functionality, more or

What books to buy?
219719 [kyrreny@br a] Hey all!
+ 219720 [TimHunter@nc] Start with David Black's _Ruby for Rails_.
+ 219721 [znmeb@ce ma ] I would buy the Second Edition of Agile Web Development With Rails
+ 219726 [james.britt@] Go get David Black's book, Ruby for Rails, and then use Google for free
| + 219731 [znmeb@ce ma ] You mean there aren't any Ruby-specific software engineering books? :)
| + 219797 [kyrreny@br a] Yes I would be really interested in that.
|   219817 [hal9000@hy e] I've looked at that, it seemed fairly good to me.
|   + 219826 [david@va ln ] Along those lines, avoid "Head First", a little too detractingly silly
|   | + 219836 [paul@pl ys c] I'll +1 on the suggestions to go for Ruby for Rails, Agile Web
|   | | 219846 [david@va ln ] Unit testing isn't strictly equal to TDD, mind you. Former is a Good
|   | | 219873 [jamesmead44@] ...
|   | | 219878 [david@va ln ] sing
|   | + 219879 [rimantas@gm ] That's true... if you want a reference book, or if you prefer boring,"serious"
|   |   219907 [paul@pl ys c] Head First has some aspects of value, but also some serious
|   |   219965 [rimantas@gm ] "Head First" books make little sense if you are already an expert in
|   |   219998 [paul@pl ys c] Pr?cis: tutorials should be written in a conversational, rather than
|   |   236126 [pmsprasa@ya ] I would suggest that you try the following Freely available books before
|   + 219834 [rdm@cf l. om] Although I'm sure that O'Reilly has some books in the works,
|   | + 219837 [paul@pl ys c] I like those.
|   | + 219838 [james@gr yp ] James Edward Gray II
|   + 219855 [znmeb@ce ma ] Ah, now *there's* a challenge for the authors amongst us -- translate
+ 219739 [satish.talim] ...
| 219741 [dfdumaresq@g] ...
| 219748 [james2mccart] Get Agile Web Development by Dave Thomas & Ruby for Rails by David
+ 219795 [kyrreny@br a] Thank you all for such wonderful advice!
  236211 [richard.conr] I have that problem too.

How to?
219725 [andrewchinna] I Need a script that will make it so the person using the app inputs a
219729 [collinsj@se ] puts gets

Re: Source files for "YART - Yet Another Ruby Tutorial" now
219730 [smartgpx@gm ] Lesson 9, Slide 3: "Classes to Stings" !

[ANN] GPX gem 0.1
219733 [doug.fales@g] GPX is an XML format for representing GPS data.  This 100% ruby gem
219737 [ara.t.howard] right on dude - share the wealth!

Ruby and Prolog
219736 [kevin.olbric] Anyone had any experience interfacing Prolog with Ruby?
+ 219740 [znmeb@ce ma ] What is it you're trying to accomplish? It seems to me, at least on an
| 219746 [kevin.olbric] Probably not.  I anticipate that I may need to interface with a
| 219790 [yacaowang@gm] ...
| + 219791 [znmeb@ce ma ] Well ... I just took a look at all the Prolog implementations in
| | 219808 [kevin.olbric] Thanks again, Ed.  That helps.
| + 219823 [eleanor@ga e] I've been considering implementing Icon-style backtracking for some
| | + 219854 [znmeb@ce ma ] I'm starting to wonder, with about half a dozen open-source Prolog
| | + 219863 [richard.j.da] I've started working on Prolog as a Ruby DSL, but haven't got anything
| + 220136 [martin@sn wp] You might be interested in looking through the solution to ruby quiz
+ 219848 [chneukirchen] I have a very basic and still brittle binding to XSB, if you want, I

Preferred way to call a class method?
219742 [pachl@ec nt ] class Test
219749 [rick.denatal] In the first case the class_meth will be sent to the receivers class,

[ANN] Fast JSON 0.0.1 Released
219747 [brian.takita] ...
219753 [max@ma id or] I can check it on OS X
219782 [brian.takita] ...

include inside and outside classes
219750 [newhoggy@gm ] Does include do different things depending on where it is use?  Is it
+ 219754 [rick.denatal] The method sqrt is a module method of Math.
+ 220080 [pit@ca it in] Rick has already written about the differences between class scope and
  220339 [rick.denatal] And the reason that this works is that these functions are module

Initialize a subclass inside a namespace
219752 [james2mccart] I have a namespace Foo and a class Bas and a class Bar. I am adding
219757 [rick.denatal] I don't see a callback when a class (or any constant for that matter)
219758 [james2mccart] Good idea Dave, I will give that a go.
219794 [james2mccart] Whoops replied to the wrong message!
threads.html
top