165610-166173

165412-167390 subjects 165866-168359

[ANN] isi.rb Version 0.8
165610 [t-nissie@No ] Dear Rubies and TeXnichians,
165636 [ruby.brian@g] <plug>

win32ole --Test-- Ruby vs. Python
165618 [ghalsey@ya o] I am just starting to learn Ruby and I am a beginner at Python. So keep
+ 165668 [dave@bu t. d] Wow - that's quite a surprising disparity. Also surprising is the fact you
+ 165745 [enleverlesO.] Bonsoir !     Hi!
  165779 [ghalsey@ya o] Thanks. It is a faster way to do it.

Thoughts on #require options
165620 [transfire@gm] Matz mentioned a few days ago leaving additional #require parameters
165621 [lyndon.samso] How about passing an IO as the source of the loaded library?

doh! cannot upload files to rubyforge
165623 [kevin.jackso] I've created a project on rubyforge, and like a dimwitted grape I've
+ 165624 [gregory.t.br] export CVS_RSH=ssh
+ 165625 [james_b@ne r] James

fxruby - need help
165626 [faker@ya oo ] I am just starting to use fxruby, so this might be a dumb question.
165638 [piet.haderma] showButton.connect(SEL_COMMAND) {
165802 [faker@ya oo ] Thanks. that solved this little test case I gave. I had a larger program

RMagick 1.9.3: examples/histogram.rb - erro
165629 [ces.fci.junk] undefined method `+' for nil:NilClass (NoMethodError)
165649 [rmagick@gm i] Hmmm...I get it, too. I should I say I "got" it, because after I
165700 [ces.fci.junk] I believe I figured it out although I'm not entirely sure of the
+ 165769 [cyclists@nc ] I'm reasonably sure there's nothing wrong with the script itself, at
+ 165781 [cyclists@nc ] Would you mind issuing this little command and sending me the output?
  165801 [ces.fci.junk] % ruby -r RMagick -e'puts Magick::Long_version'

[ANN] Ferret 0.2.1 (port of Apache Lucene to pure ruby)
165630 [dbalmain.ml@] I've just released version 0.2.1. Since my last announcement there
+ 165647 [se@di it le ] Thank you for this awesome library. I just wanted to tell you that you work
+ 165888 [itsme213@ho ] Any example of (web) search scripts (not necessarily Ruby) that will work

detect if windows or linux
165632 [Fleck@sc le ] what' s the best way to detect if I' m on a windows or linux machine. I don' t want to check that by handling an exception. Is there a function in the standard libraries.
+ 165633 [dave@bu t. d] RUBY_PLATFORM
+ 165634 [stefan@ma li] There is the constant RUBY_PLATFORM, on my WinXP-box it contains the
+ 165657 [dooby@d1 .k ] As a quick and nasty hack for domestic use, consider one of these two

Recursive functions
165656 [hans.sjunnes] I know that this is a trivial problem, but I'm having a hard time
+ 165659 [ruby.brian@g] Be carefull. Spoiler below
| 165662 [james@gr yp ] Brian was faster than me.  My own attempt follows, again, a spoiler...
| 165675 [hans.sjunnes] I'm not entirely sure what happened here. Did I transgress some
| 165677 [james@gr yp ] Not at all.  Us geeks just decided to answer your question in code.
| 165689 [hans.sjunnes] There must be something wrong with reading this newsgroup via
| 165692 [james@gr yp ] and
| + 165695 [hans.sjunnes] They do indeed. I think the dots might confuzzle google. Anyway, it
| + 165796 [jwkenne@at g] It's not Google's fault; I'm not seeing it, either, using Thunderbird.
|   165797 [jwkenne@at g] .... Interesting. Either my client (Thunderbird 1.5 RC1) or my ISP's
+ 165665 [dblack@wo bl] Boggle), which did something similar.  I don't remember exactly
+ 165842 [w_a_x_man@ya] There are 3**4 combinations. Instead of using recursion, we can simply
  165845 [michael.ulm@] to keep the function usable for any base up to 36, change
  165847 [w_a_x_man@ya] dict={}; IO.foreach(ARGV.pop||"words.txt"){|w| dict[w.chomp] = "" }
  165848 [pit@ca it in] def num_to_str( n, base, ary )

[bug?] (was Re: question of regexp select)
165666 [dooby@d1 .k ] m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
+ 165674 [decoux@mo lo] sub(/select/, "values_at")
+ 165679 [dooby@d1 .k ] m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")

REXML article on XML.com
165670 [james_b@ne r] James Britt
+ 165727 [nohmad@gm il] I'm afraid it's not proper reporting here.
| 165731 [nohmad@gm il] REXML could not parse DTD.
+ 165739 [dooby@d1 .k ] The heredoc input string and two example files
  + 165746 [james_b@ne r] No.  I just happened to hear about the article and thought it worth a
  | 165749 [dooby@d1 .k ] Splendid idea!  One of those interactive doo-dahs.
  + 165747 [kevin@kb de ] Thanks for testing and finding the bug! I'm not involved with the project but
    165750 [dooby@d1 .k ] It's not a REXML bug - it's an unsupported encoding.
    165751 [Stephan.Kaem] Unsupported? But there's
    165772 [dooby@d1 .k ] "... other encodings (UTF-8, UTF-16, ISO-8859-1, and UNILE

trouble reading a gzipped xml-file
165672 [guido.de-mel] I'm trying to read a gzipped xml-file into rexml, but I don't quite
165678 [bob.news@gm ] You're not closing f here.
165681 [guido.de-mel] It shouldn't, because ruby will determine the end of the file by itself
165686 [bob.news@gm ] I didn't mean to say that it fails because of the open file.  My point
165696 [guido.de-mel] Thank you very much! You solved it!

A dRuby application running as a Windows service?
165676 [dominic.mark] I'm attempting to write a small druby application which will run on our
165683 [cribbsj@oa w] In the latest version of KirbyBase I just released

Comparing Proc Objects?
165680 [daniel.schie] class. Basically, when you call a method on the proxyed object it checks
165687 [sean.ohalpin] I think the only way you're going to get equality with a supplied

Putting unit test cases in the code - RDoc & UnitTest
165682 [listrecv@gm ] for the class being tested itself.  This puts everything in the same
+ 165693 [dbalmain.ml@] How about just something like that at the end of your file;
| 165698 [listrecv@gm ] David,
| 165702 [dblack@wo bl] They shouldn't run at all from any require'd file, because the $0 ==
+ 165694 [dblack@wo bl] if $0 == __FILE__
+ 165714 [transfire@gm] =begin test
| 165762 [drbrain@se m] I like to run my tests all the time, and I like source control to run
| 165834 [drbrain@se m] But... I don't need that script, so I will never have to maintain it.
+ 165761 [drbrain@se m] So does creating a file per class and placing tests into identically

[ANN] Ruby-GNOME2-0.14.1
165684 [mutoh@hi hw ] Ruby-GNOME2-0.14.1 is out.

Re: [QUIZ][SOLUTION] Index and Query (#54)
165690 [bob_showalte] OK, here's a real down and dirty implementation of the basic bitmap
+ 165717 [bob_showalte] Oops, that comment is wrong. You must supply a block. I forgot to go
+ 165718 [ruby.brian@g] thank you for the solution, but please try to respect the non-spoiler
| + 165720 [warrenbrown@] Ummm, today is Monday :o)
| + 165721 [james@gr yp ] I'm pretty sure we're past that now.  ;)
| | 165723 [keith@or il ] Write a program that watches a mailing list (or newsgroup, if you
| + 165725 [bob_showalte] Sorry, I thought 48 hours had passed.
|   165729 [ruby.brian@g] So sorry for the confusion. I left friday and somehow thought the quiz
+ 165780 [bob_showalte] Here's an update of my solution that fixes my dump method and makes

Gateway again (Was: Re: Recursive functions)
165697 [bob.news@gm ] I don't think Google is to blame.  The gateway software is more likely to
+ 165701 [james@gr yp ] Ick.  That's not good.
| 165708 [mental@ry ia] It's one of those little gotchas with these old-school messaging
+ 165704 [leavengood@g] I'll venture a guess it has something to do with a single dot alone on
  165706 [bob.news@gm ] I'll join you guessing.  More precisely, I suspect the GW software doesn't
  165732 [dooby@d1 .k ] X-MIME-Autoconverted: from quoted-printable to 8bit by blade.nagaokaut.ac.jp id jAEELRZk017807

Re: Building postgresql on Windows
165707 [Daniel.Berge] Thanks Heesob.  Based on this, I've submitted a patch to Dave Lee,

SDL - how to enable window (surface) repaint
165710 [bouncer@no h] i am using sdl library from http://www.kmc.gr.jp/~ohai/rubysdl.en.html.
165712 [bouncer@no h] forgot to tell - i am drawing pixels...
165713 [bouncer@no h] solved, all it needed was an event loop, my humble apologies for wasted

Time out of range when selecting from database?
165728 [rm_rails@ch ] This especially annoying when other classes like DBI use
165740 [khaines@en g] See the discussion about converting between Time and DateTime.  Time uses

requiring extensions
165742 [hans@fu al n] I'm wrapping a library with swig, and I'd like to also implement some
+ 165770 [ mfp@ac .o g] require 'rbconfig'
+ 165819 [hans@fu al n] So it does. I wonder what I fat-fingered when I thought I tried this in

REXML -> attributes with single/double quotes
165743 [Stephan.Kaem] when I write a previously read XML using REXML, all attribute values are
165744 [dooby@d1 .k ] Throw it away :-)

[ANN] RedCloth mailing list
165748 [ruby-talk@wh] If you are a user of RedCloth who wants to talk about improvements to

Parameter names from reflection?
165752 [mercury542@y] Is there a way to use reflection or some other method to return the names of
+ 165758 [leavengood@g] No. Why do you need this?
| 165835 [drbrain@se m] Actually, ParseTree can give you this information.
+ 165855 [bob.news@gm ] IMHO you can't do that without changing the method.  Charlie asked for a
  166067 [mercury542@y] Thanks for the feedback. I need a way to do this without changing the method
  + 166153 [leavengood@g] In that case use ParseTree like Eric suggested. Here is something that
  + 166156 [sera@fh an .] RDoc parses this info too, maybe you could dig around in RDoc and see

[OT] Re: Ruby - Newbie to Guru - Advice?
165754 [dooby@d1 .k ] Vol 2, page xiv (cartoon digits 1..9) might help.
165756 [james_b@ne r] Ka-NOOTH.
165763 [dooby@d1 .k ] Oh, wow.  Thanks.

removing a constant definition from an environment
165755 [robert.evans] I am running unit tests that test the assignment of a constant value
165757 [leavengood@g] remove_const(sym)   => obj
165760 [robert.evans] Thanks for your help.
+ 165764 [ mfp@ac .o g] Object.remove_const(:FOO)
| 165765 [ mfp@ac .o g] Sorry, I meant
| 165795 [discordantus] I may be wrong, but I think using #send to bypass private methodencapsulation is not future-proof. Instead, you might use
| + 165824 [robert.evans] Hey Everybody,
| + 165840 [ mfp@ac .o g] Right, http://eigenclass.org/hiki.rb?Changes+in+Ruby+1.9#l11
+ 165766 [jgbailey@gm ] Ryan,
+ 165767 [leavengood@g] This is one of those odd methods that is hard to call. It is actually
  165775 [robert.evans] Thanks for all responses. I think I can work something out based on

Re: Index and Query (#54)
165768 [dale.martens] When I think of creating an index in Ruby I think of a Hash. So I
165773 [aurelianocal] This is my first post to the ruby quiz :).
+ 165777 [interfecus@g] This is my first submitted solution. I only started learning ruby in my
| 165787 [james@gr yp ] Here's a tip that leaped out at me just while glancing at your code.
| + 165804 [dbalmain.ml@] Here's my solution. It's an inverted index like Dale's solution
| | 165820 [james@gr yp ] Please do share...
| | 165822 [dbalmain.ml@] Will do. Still got a bit of work to do.
| + 165825 [interfecus@g] Thanks, I'll remember that. I was getting rather confused about which
|   + 165830 [horndude77@g] Here's my solution. Nothing fancy except for allowing searches for
|   | 165852 [kashia.buch@] looking at all those long subscriptions.. couldn't resist to make my own. probably not as complete/fast as those, but small and neat looking :D
|   + 165875 [james@gr yp ] 123=> nil
|     165908 [dbalmain.ml@] Hey Guys,
|     + 165924 [dale.martens] David,
|     | 165987 [dbalmain.ml@] I've updated the results. You may notice a number of the indexing
|     | 166003 [dale.martens] Thanks for updating the results.
|     + 166121 [bob_showalte] Blind dumb luck, I'm sure :)
|       166140 [dbalmain.ml@] Nice. Search is twice as fast as your original version. You've
+ 165782 [lyndon.samso] This sounds similar to how LZW compression works. Cool!

Re: Ferret 0.2.1 (port of Apache Lucene to pure ruby)
165771 [iamkris@gm i] Does it support indexing PDFs, Docs and PPT files? If I remember
165812 [dbalmain.ml@] If you want to index these you'll need to write (or acquire) specific
165890 [jasonallen@g] I'm really excited about this library. However, after testing it out
165910 [dbalmain.ml@] You've got me puzzled too. Would it be possible for you to send me a

Reading a signed byte in network byte order
165774 [robert.evans] In trying to read 4 bytes as a signed integer from an IO in big-
165961 [vjoel@pa h. ] You can unpack with "N" and then use the following to interpret that
165963 [vjoel@pa h. ] Oh, yeah, I forgot to show that you can use a BitStruct to parse strings

Does IRB run on Windows-98 ?
165785 [itsme213@ho ] Using the current 1-click installer I don't seem to get an IRB.
165792 [dooby@d1 .k ] It runs, yes.
165818 [itsme213@ho ] duh. i did not investigate beyond the (missing) entry in the start menu.

[ANN] Ruby/GD2 1.0
165788 [rob@ma s. rg] Greetings,
165886 [tom@in oe he] You may want to rebuild the Gem with Ruby 1.8.2...
165893 [duane.johnso] Perhaps your question is more basic in nature?  If you're wondering
+ 165894 [tom@in oe he] Ah, quite right, thanks Duane!  I skipped right over the obvious that
+ 165901 [rob@ma s. rg] Thanks!
  165921 [tom@in oe he] Yup!

Nesting Includes
165789 [listrecv@gm ] into my namespace.  Is this doable?

Re: Ruby/GD2 1.0
165790 [test <>] test

Ruby / RoR Resumes Requested
165798 [beau@su er o] To whom it may concern,
165836 [listrecv@gm ] Your post is a bit suspicous, as your home page (

Re: using n.times with gsub
165803 [jim@we ri hh] cat foo.out | ruby -pe 'gsub(/^/, " " * 5)
165813 [dblack@wo bl] Tiny further simplification: s/<// :-)

Post/View Open Source Jobs
165814 [beau@su er o] Post/View Open Source Jobs
+ 165821 [ezra@ya im -] Its up for me. And has been for a while now.
+ 165973 [kero@ch ll .] *why* does yahoo always seem to require I create an account just to read
  166130 [brianm@ap ch] All of your identity belong to Yahoo!

DateTime beauty
165823 [hhausman@gm ] I've got strings created by doing something on the order of
165826 [jamis@37 ig ] value.strftime("%a %b %e at %I:%M%p")
165827 [hhausman@gm ] Wow, that works like a charm, thanks.
165829 [dooby@d1 .k ] Just ignore this, then :)

[SOLUTION] Index and Query (#54)
165828 [daniels@pr n] And also a script that benchmarks it against grepping the files manually

Has anyone written an extconf.rb that depends on a Mac OS Framework?
165831 [duane.johnso] ...
+ 165841 [Pete.Wood@uk] I use a OS X framework in creating the FireRuby library on the Mac. All I
+ 165843 [nobuyoshi.na] See ext/tk/extconf.rb.
  165892 [duane.johnso] Thanks for your reply, Nobu Nakada.
  165896 [nobu.nokada@] It's older ext/tkutil/extconf.rb.
  165899 [duane.johnso] AWESOME!!  Thanks, Nobu Nakada.  I'll go digest this for a while on

Database Transactions
165837 [listrecv@gm ] ActiveRecord's standard procedure for transactions is to send a block,
165854 [f@an re s- .] You can start/commit/rollback transactions manually
165856 [bob.news@gm ] +1
165907 [listrecv@gm ] Okay, I'll trust you guys know better than I do.
165911 [bob.news@gm ] Why do you want to do a rollback here?  There is no rescue clause nor any
165933 [listrecv@gm ] It's not to catch exceptions.  It's to make sure that no account is

[ANN] Vancouver to host first Ruby on Rails Conference!
165838 [nshb@in mi .] Canada on Rails, to host the first ever Ruby on Rails conference held in

FireRuby 0.4.0
165839 [paw220470@ya] Actually released the files over the weekend but I'm only getting around to

Use of Ruby in Laboratory Automation
165844 [benn@ce ix b] I am guest editing a scientific journal (The Journal of the
165862 [twifkak@co c] Such a presentation was made at RubyConf.

Ruby library for AOL OSCAR protocol
165849 [jonathan.ott] Anyone away of an existing library in Ruby for AOL's OSCAR protocol?
165876 [hans@fu al n] I don't know, but if it hasn't been done it seems the approach to take

Ruby Weekly News 7th - 13th November 2005
165851 [timsuth@ih g] Ruby Weekly News 7th - 13th November 2005
166173 [timsuth@ih g] The two examples having "a = b" should be "b = a" instead.

unsubscribe
165858 [k-zimir@gm .] hey list...

Newbie question about Pickaxe example
165859 [carmineaskme] I'm just approaching ruby (so far I like it) coming from Python and
165861 [decoux@mo lo] here it define the module Inner under the module Mod
165863 [carmineaskme] Thanks for your clarification. It's clear now.

Find.find does not find orphaned links?
165864 [wybo@se va y] total 0
165887 [matz@ru y- a] It's a bug.  Thank you.

module_function question
165865 [carmineaskme] module Mod	# contained in the file "mymodule.rb"
165868 [decoux@mo lo] module_function make the method private (i.e. a method which can't be
165869 [carmineaskme] Clear now.
165884 [christophe.g] Don't worry, people don't mind silly questions here, as long as they are
threads.html
top