203526-304135

203448-206907 subjects 203758-251929

Autoloading objects  Ruby equivalent for PHP5 "__autoload
203526 [naum@az la e] Does there exist a Ruby equivalent to PHP5 "magic" __autoload method
+ 203545 [lopx@ga et .] Sure there is ;D
| 203550 [alex@bl ck e] That's not quite it.  You need to call Module.autoload yourself.  PHP's
| 203554 [alex@bl ck e] I mean, besides the fact that it won't work, unlike Mat's.  Should have
+ 203720 [ggarra@ad an] def Object.const_missing elem

[ANN] One-Click Ruby Installer 1.8.4-20 is available
203534 [ml.chibbs@gm] If you already have 1.8.4-19 you probably don't need this release,

How to debug 'ri' ?
203535 [hhausman@gm ] convert nil into Array (TypeError)
+ 204079 [drosihn@gm i] I am not seeing that problem on my unix box, but that does not
+ 204800 [drbrain@se m] This is fixed in 1.8.5p1

=?WINDOWS-1252?Q?Re:_Autoloading_objects_=97_Ruby_?= =?WINDOWS-1252?Q?equivalent_for_PHP5_"=5F=5Fautoload?=
203539 [rubytalk@ea ] ...
203588 [shugotenshi@] =?WINDOWS-1252?Q?Re:_Autoloading_objects_=97_Ruby_?= =?WINDOWS-1252?Q?equivalent_for_PHP5_"=5F=5Fautoload?=

How to create standl alones applications with Ruby
203542 [jsnit@js it ] In .NET, Eclipse/SWT, Interface Builder (mac os X) it is possible to
203544 [farrel.lifso] You can use Glade which is a visual designer for GTK/Gnome
203584 [shugotenshi@] And don't forget about the Qt Designer for Qt/KDE applications.
203606 [jsnit@js it ] Is it possible to combine for example a SWT Eclipse form in java, and
+ 203608 [cdc@cy he s.] I haven't messed around with this but using JRuby I'd think so.  Could use
+ 203610 [brabuhr@gm i] JRuby has some examples using swing; I don't know if anyone has tried
  203655 [headius@he d] ...

SQL Parser in Ruby
203543 [drnicwilliam] Has anyone taken the time to bang together an SQL parser for Ruby?
203586 [shugotenshi@] I imagine it wouldn't be too difficult, but what good would an SQL92 parser be?
203699 [drnicwilliam] I wanted it for the subset of grammar for create/update/delete
203724 [buzdin@gm il] I believe that there is a feature in Ruby on Rails, which belongs to
203726 [drnicwilliam] It certainly should do something like that,shouldn't it - given it
304135 [mpagalan@gm ] im a newbie and want to know if this sql parser in ruby is already out

Export Data from Microsoft Access database
203546 [jatinder.sau] ...
+ 203560 [znmeb@ce ma ] that has part of the functionality of the real thing. If you have an
| 203564 [leslieviljoe] Les
| 203578 [jatinder.sau] ...
+ 203582 [snacktime@gm] Not ruby, but there is a collection of great little command line tools
  203612 [jatinder.sau] ...
  203669 [znmeb@ce ma ] If they're open source, they might be compilable/executable in CygWin.
  203696 [alex@bl ck e] There is.  I've used Ruby-ODBC for extracting from Access to MySQL

=?WINDOWS-1252?Q?Re:_Autoloading_objects_=97_Ruby_equivalent_for?= =?WINDOWS-1252?Q?_PHP5_"=5F=5Fautoload?=
203547 [schapht@gm i] const_missing is a little more like PHP's __autoload function.

[ANN] List of RubyConf 2006 presentations
203557 [dblack@wo bl] The (unordered :-) list of RubyConf 2006 presentations is now

Ruby settings, path/env/lib etc.
203570 [nbnntp1@ml .] I just downloaded the ruby one click installer. I am on a windows
203572 [one.three@gm] I don't think that Desktop\bin is the best place to install something

RubyGems or packages or both?
203575 [roman.hausne] I am puzzled as to what the recommended way to install packages (from
203580 [ruby@ml ic m] I'm using rubygems on ubuntu, which works fine.
+ 203634 [runlevel7@gm] I've had good success making a .deb package of rubygems using the
+ 203852 [kbloom@gm il] You're misrepresenting Debian and Ubuntu's reason. Debian and Ubuntu

Store function output to string?
203576 [reed.adam@gm] I am looking for a way to store a function's output to a string.
+ 203577 [has.sox@gm i] ...
+ 203581 [reed.adam@gm] Nevermind, got it.

Dumb question about assigments
203579 [genooma@gm i] answer anywere.
+ 203593 [tim.pease@gm] Ruby only allows a single value to be assigned using the = operator.
| 203598 [genooma@gm i] Yep, that certainly helped, I should smack the programmer in the head
+ 203600 [phurley@gm i] b = BlahBlah.new
+ 203601 [flori@ni e. ] blah =  BlahBlah.new
| 203659 [fred@la av .] Mind you, in some languages (well, at least - don't shoot ! - Visual
| 203700 [nobu@ru y- a] It's tough for ruby parser.
| 203886 [fred@la av .] Sure, ruby already has plenty of constructs for this purpose.  I was
+ 203603 [m_goldberg@a] That is very strange code you've posted. I wonder what the original
  203604 [genooma@gm i] Now that I know this is not common (I don't have much real life

Re: Autoloading objects  Ruby equivalent for?
203587 [naum@az la e] That's seems to be the ticket.

File::Separator on win32
203594 [info@si be t] ...
+ 203595 [Daniel.Berge] Use File::ALT_SEPARATOR instead.
| 203597 [info@si be t] ...
| 203602 [Daniel.Berge] Which docs?  Anyway, it's nil on *nix platforms.  I'm not sure about VMS, though.
| 302742 [brian.hartin] `md #{File.join("c:","foo")}` fails as well.  STDERR contains 'The
+ 203596 [alex@bl ck e] It shouldn't be a problem - Windows uses / and \ pretty much
  203599 [info@si be t] ...
  302741 [brian.hartin] `md #{File.join("c:","foo")}` fails as well.  STDERR contains 'The

CGI session and namespaces
203605 [listrecv@gm ] Are there any issues in storing objects defined within namespaces (eg

htmltools incorrectly parsing HTML containing server-side tags
203609 [dsutch@gm il] I'm using HTML Tools 1.09 to parse HTML that contains tags that are to
+ 203635 [w_a_x_man@ya] ...
| 203665 [dsutch@gm il] Thank you for this information.  I did a bit more research and now
| 203680 [w_a_x_man@ya] Perhaps this will work.
+ 203661 [danielbaird@] ...

How do I scan for keypresses in console ruby?
203613 [myrddin@gm i] I'm writing some text apps that need keyboard scanning... the only
203617 [martin@sn wp] Check out cbreak.rb that is shipped with ruby as a sample program.

exiftool / reading WMV meta information
203620 [ekolve@gm il] I found a really nice package on CPAN called Image::ExifTool and I was
204064 [bulliver@ba ] charset="utf-8"

Slow regular expressions
203621 [stein@du el ] ...
+ 203623 [collinsj@se ] I'm not a regex expert, so I can't help you with optimizing yours, but
+ 203631 [w_a_x_man@ya] Your regular expression does not match your string.
+ 203636 [kmgaughan@ei] No. The point behind regular expressions is to provide a succinct
+ 203640 [kmgaughan@ei] 1. What's with the all the '\s+'? All you need to do is match a space,
+ 204747 [drbrain@se m] In addition to the other advice you've received, don't use String#match.
  204836 [jeremy@ch os] Yow!  Calling String#match is 2-3 times as slow!  Why is that?  The
  204874 [vikkous@gm i] I was curious about this too.
  204937 [drbrain@se m] Yes, it is the work of constructing the MatchData object.

Apache + fastcgi timeouts ?
203622 [user@do ai .] be the -idle-timeout parameter of the FastCgiServer in httpd.conf ?

Object to which a meta class belongs?
203633 [erikveen@gm ] If a singleton class belongs to an object, it should be
203651 [sean.ohalpin] How about this?
203694 [erikveen@gm ] It does work work, but...
203735 [sean.ohalpin] Whoops! Knew I should have benchmarked it. :)

RubyJavaBridge (rjb)
203637 [tim@pl gg .c] Does anyone know where I can find the binaries to RubyJavaBridge? I

RubyJavaBridge (rjb) - let's try again
203638 [tim@pl gg .c] Does anyone know where I can find the binaries for this? The config

Mongrel XMLRPC?
203642 [alex@bl ck e] Has anyone looked at wrapping the stdlib's XMLRPC server in Mongrel?  I
203654 [zedshaw@ze s] I haven't.  Probably wouldn't be hard depending on how much of WEBrick

unsubscribe
203646 [chuck.day@me] Please unsubscribe me.
203648 [agorilla@gm ] List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?body=unsubscribe>
203687 [tanushree.bh] ...
203743 [schapht@gm i] ...

Test::Unit and logging
203650 [listrecv@gm ] Is there a simple way to have Test::Unit use Log4r (or Logger) to add a
203740 [schapht@gm i] I'm no expert here, but since your question still doesn't have a

[ANN] Ruby Central's Regional Conference Grant Program
203652 [dblack@wo bl] We are very pleased to announce the launching of the Ruby Central
203667 [james.britt@] Will this information also be available as an HTML page?

Still looking for a Ruby MUD client?
203656 [sy1234@gm il] Look no further!
203698 [eirik@at as ] I tried too write my mud client but I gave up because
203712 [sy1234@gm il] In muby, the keypad seems to be working correctly, because there are
205311 [sy1234@gm il] muby has been completely overhauled and is working amazingly well now.

Had Ruby interview, considering J2ME as well ...
203660 [surfunbear@y] I had sent a contractor the following message (below). They are going
203668 [greg.kujawa@] What is your primary motivation for choosing a language? Is it
203704 [surfunbear@y] There is not just one reason. I do need a job however. I have a ruby
203730 [greg.kujawa@] I can empathize with you. There was a mobile app I was trying to deploy

bit-struct and constructing ARP messages.
203663 [ooberyoozer@] I have been trying to write a ARP packet injector script for Ruby
203683 [nohmad@gm il] You can achieve the goal using Array#pack / String#unpack by
203843 [ooberyoozer@] Array#pack / Array#unpack is useful for packaging the datagram yes, what
204201 [nohmad@gm il] Sorry for misreading you post.

confused by different REXML/xmllint parsing errors
203666 [ammon.christ] Here's the XML
203686 [ammon.christ] I thought the times character was an asterisk.  It must be that

fcgi
203670 [tallison@ta ] I am a little familiar with running FCGI applications and have done some work in
203688 [ara.t.howard] ??

question on instance variable access
203671 [surfunbear@y] I came accross a problem which made me wonder. Sort of about dotting
+ 203672 [sitharus@si ] Yes. In Ruby all instance variables are private.
+ 203675 [pollak@gm il] myobj.instance_variable_get(:@friend).instance_variable_get(:@num)

Most Compelling Ruby + 2D Web Graphics Combination
203673 [dworden@gm i] ...
203677 [james.britt@] James Britt
+ 203690 [hal9000@hy e] Umm. That's just cool.
+ 203746 [dworden@gm i] ...

Escaping international characters
203689 [Alexander.J.] ...
+ 203692 [hal9000@hy e] My fear is that escapeHTML simply isn't that smart.
+ 203697 [pbattley@gm ] HTMLEntities.encode_entities("cole", :basic, :named)# => "&eacute;cole"
  203703 [Alexander.J.] ...

Finding files in a directory and regexp
203691 [Alexander.J.] ...
203693 [hal9000@hy e] I don't usually use Find... Dir is fairly powerful.
204222 [Christopher.] One could use Rio (rio.rubyforge.org)

druby - How to close connection from client?
203702 [boesemar@gm ] I need to disconnect explicitly from a druby client.
+ 203750 [tim.pease@gm] DRb.stop_service
+ 203790 [michael.moen] Martin- I'm doing something similar but using Rinda as a middle man.
+ 203800 [ezmobius@gm ] He Martin-
  203812 [boesemar@gm ] That's great! I will for sure look into this plugin..

Proving Ruby's effectiveness
203705 [benjohn@fy h] Our company (2500 employees) has a development conference in a few
+ 203707 [hal9000@hy e] This is probably only tangential to what you need, but if it is of
| 203723 [benjohn@fy h] Thanks Hal, I've seen that before, and it's a good piece of evangalism.
| 203785 [jeff.barczew] ...
+ 203801 [garbagecat10] Your company is very small, so perhaps the following comments don't
+ 204243 [marcus.bagul] I have recently written a white paper that you may interest you....

FCGI:  How do you use it?
203710 [tallison@ta ] I'm kind of perplexed here so I'll ask the stupid questions.
203767 [ara.t.howard] fcgi loads the cgi module for you.  when you write
203805 [tallison@ta ] this is "key".  I now have some direction in which to go play.  Thank
203807 [ara.t.howard] exactly.

Defining a method with an argument with a default value
203711 [pedro@pe ro ] define_method(:initialize){|value| @value = value}
+ 203714 [daniel.schie] First of all, you don't need the `if value' part -- when Ruby sees
| + 203715 [drnicwilliam] Foo.class_eval do
| | 203719 [pedro@pe ro ] Yep, this works great, thanks. It's an eval but it's the one with a
| | 203722 [drnicwilliam] If you're feeling really lazy or just want to test something in IRB
| | 203725 [drnicwilliam] def bar(tar=0)
| + 203718 [pedro@pe ro ] Yes, I knew that.
| + 203766 [dan-ml@da 42] Sorry for being pedantic but this is not quite true (although in this
|   203844 [daniel.schie] I know, but I was trying to simplify the problem :)
+ 203728 [nobu@ru y- a] define_method(:initialize) {|*values|
  203732 [drnicwilliam] [Warning: Anal retentive refactoring ahead]
  203871 [patrick@us r] As long as we're throwing around options...

Re: Ruby Central's Regional Conference Grant Program
203742 [stark.dreamd] in the footer there is "ww.rubycentral.org" instead of
203748 [dblack@wo bl] Thanks.  I thought I had typed four w's, and backspaced over the extra

=?WINDOWS-1252?Q?Re:_Autoloading_objects_=97_Ruby_equivalent_for?= =?WINDOWS-1252?Q?_PHP5_"=5F=5Fautoload?=
203745 [schapht@gm i] you need

=?WINDOWS-1252?Q?Re:_Autoloading_objects_=97_Ruby_?= =?WINDOWS-1252?Q?equivalent_for_PHP5_"=5F=5Fautoload?=
203747 [shugotenshi@] I do hope you know that there's a lot of things in Ruby that makes a

How to verify cgi.params values?
203751 [tesla.nicoli] ...
203771 [tesla.nicoli] ...
+ 203819 [collinsj@se ] username = cgi['username'].strip
+ 203820 [collinsj@se ] username = cgi['username'].strip

Hash order bug?
203752 [jvalencia@lo] def foo
+ 203753 [dblack@wo bl] Hashes are unordered.  If you need an ordered collection, you'll need
| + 203755 [jvalencia@lo] Oh my god, i didn't know it, sorry. Is that a missing feature?
| | + 203756 [rubytalk@ea ] ...
| | + 203757 [dblack@wo bl] Debate rages on this point :-)  It's mostly a speed issue, I think.
| | | + 203760 [Daniel.Berge] No, it's just the way hashes behave.  Note that there are ordered hash
| | | | 203905 [hal9000@hy e] In case anyone tries to refer me to these, I'll point out that
| | | + 203780 [kero@ch ll .] I guess there won't be many ppl using algorithms that use the *un*sorted
| | | | 203849 [alex@bl ck e] It's not that it's unordered, it's that it's anordered.  The concept
| | | + 203796 [pbattley@gm ] I think that would depend on whether {:a => 1, :b => 2} == {:b => 2,
| | | | + 203797 [Daniel.Berge] Oh, yeah, that brings up the whole Comparable bugbear.  I didn't think
| | | | + 203910 [hal9000@hy e] In previous discussions, Matz said these would still be equal.
| | | + 203904 [hal9000@hy e] I don't know if it really rages. ;)
| | + 203825 [w_a_x_man@ya] No.  What language has ordered hashes?
| | | + 203842 [kmgaughan@ei] Java, in the form of the TreeMap collection. The usefulness of them is
| | | | 203846 [headius@he d] ...
| | | | 203887 [kmgaughan@ei] Very true. While a peek at the source code will reveal that the
| | | + 203860 [sitharus@si ] PHP (*shudder*). Since PHP only has a single array type that supports
| | | | 203889 [kmgaughan@ei] That's not really fair on either Ruby or PHP. You're taking a
| | | | 203890 [sitharus@si ] I believe it's fair. It's one of my reasons for liking Ruby (and
| | | + 203915 [hal9000@hy e] Your point is well taken. David Alan Black also argues eloquently
| | |   203931 [w_a_x_man@ya] In awk, such hash literals don't exisit; so when using that language,
| | + 203847 [ruby-talk.cl] ...
| + 250371 [axgle@12 .c ] Hashes are unordered. that is how sadly for me,really!
|   250372 [nickclare@gm] ...
|   250380 [dblack@wo bl] sorted_keys = hash.keys.sort
|   + 250386 [nickclare@gm] ...
|   | 250390 [dangerwillro] Ruby is often this way. If it seems like the thing you want to do
|   + 250407 [robert.dober] sorted_keys = hash.keys.sort_by{|k| k.to_s }
|     250413 [dblack@wo bl] I can't seem to find the first two or three messages in this thread
|     250415 [robert.dober] unfortunately Symbols are *not* comparable :( (yet)
|     250431 [dblack@wo bl] Right -- what I mean is, to_s is OK for strings and symbols but not
|     + 250433 [gwtmp01@ma .] irb(main):001:0> 186.to_s
|     | 250436 [robert.dober] Yes but
|     | 250441 [gwtmp01@ma .] Ah, I was missing the context of 'sorted keys'.
|     | + 250448 [robert.dober] I agree with you and when it comes to keys being Strings and Symbols I
|     | + 250450 [dblack@wo bl] It's not that integers aren't comparable; it's that they're an example
|     |   250456 [gwtmp01@ma .] I wasn't clear.  My 'not comparable' comment was about a hash
|     + 250435 [robert.dober] Right -- what I mean is, I am stupid :(. Should have understood your
+ 203754 [nicolas.desp] by definition a hash table is not ordered.
| + 203764 [jvalencia@lo] Well, i don't mind ordering alphabetically, just to maintain their
| + 203892 [allergic-to-] I'm  not sure I like the idea (discussed elsewhere in this thread) that the
+ 204908 [w_a_x_man@ya] True.
+ 204920 [perrin@ap th] Oddly enough, I never made that assumption -- but I think that's because
| 205046 [perrin@ap th] That would explain why I thought .sort didn't work with hashes.
| 205054 [logancapaldo] hash.sort_by{ |k,v| k.to_s }
+ 204945 [ihatespam@ro] Why doesn't someone write a red-black tree for Ruby?  I mean, it would
  204946 [hal9000@hy e] Not sure, but I think it's been done.
  204947 [djberg96@gm ] I think there are others, too.
threads.html
top