20724-21364

20588-22393 subjects 20979-21712

php.net style online manual
20724 [dempsejn@ge ] I've begun some basic code with ruby, and coming from a php/perl
+ 20727 [Dave@Pr gm t] How about
+ 20728 [anders@ig it] I believe that the pragmatic programmers at rubycentral.com have put
  + 20743 [dempsejn@ge ] Much thanks to the two replies. I downloaded the book recently, but
  | 20764 [chrris@ma l.] Instances of class CGI have a header method that acts like the one in PHP
  | 20789 [dempsejn@ge ] Thanks Christian, that's perfect. I just need to find a project and
  + 20761 [chrris@ma l.] While not featuring a search function, an indexed verison of Programming
    20763 [tobiasreif@p] ... and where was that online ri?

Nightly CVS tarball?
20730 [waisun.chia@] As I have no qualms to run bleeding-edge stuff, I'd love to run/try the
+ 20731 [sean-ruby-ta] Speaking of CVS, is there a cvsup server anywhere for ruby?  -sc
| + 20733 [matz@ru y- a] check out http://www.ruby-lang.org/en/cvsrepo.html
| + 20734 [eban@os ri .] eban
+ 20732 [matz@ru y- a] matz.
  20737 [waisun.chia@] Oops..

bug in tk.rb?
20735 [alwagner@tc ] @doc.dump('all', textStart, textEnd)

Ruby/Fltk preview release
20742 [ttate@ja st ] We are pleased to announce the initial "preview" release of

how update anonymous classes?
20747 [henning@ik o] (1) What is the preferable way to add instance methods to anonymous
20804 [vjoel@pa h. ] Will this work for you?

dRuby,TCPSocket and blocked ports (Linux question)
20748 [ptkwt@sh ll ] This may be more of a Linux question, but maybe someone else here has
20765 [decoux@mo lo] No, what you are seeing are the ports used by your server, i.e. the

how access inheritance chain after  class creation?
20760 [henning@ik o] when a class is already created; how do I add/change to the inheritance
+ 20762 [decoux@mo lo] this is a possibility
+ 20766 [matz@ru y- a] If you really need to do it, Python would be a good choice.  But

Minor cgi.rb question
20768 [hal9000@hy e] I don't have much experience with
+ 20776 [matz@ru y- a] The possible design decision was either
| + 20872 [larsch@cs au] If anyone is willing to take upon him-/herself the task of writing it, I
| + 21241 [toddg@li ux ] I'm just not connecting with the rest of this thread; the argument about
+ 20782 [YuriLeikind@] I also found cgi library a bit awkward,
+ 20847 [r2d2@ac .u u] [Hal E. Fulton]
  + 20848 [tobiasreif@p] On
  | 20853 [dblack@sa ur] The thing is, though, the CGI library isn't just dedicated to
  + 20851 [neumann@s- i] h = HTML.new('HTML3', [:lower_case, :pretty])
  | 20884 [dtillman@oz ] #!/usr/local/bin/ruby
  | + 20903 [elderburn@mi] "Webification" is certainly a desirable goal, and HTML cum CGI is a
  | | 20906 [tobiasreif@p] * Almost all attributes that specify the presentation of an HTML
  | | 20909 [ja@an er so ] Except that Netscape 4 won't read/use the css file if the user has
  | | 20913 [tobiasreif@p] Absolutely. As I suggested, options for the current version of HTML
  | | + 20914 [dblack@ca dl] For writing HTML, though, a tool like the CGI library (or the kind of
  | | | + 20921 [tobiasreif@p] Well an HTML lib doesn't have to validate to provide some nice API for
  | | | + 20953 [dsafari@xt a] - -----------------------------------> Snip good stuff.
  | | |   20955 [tobiasreif@p] ... and much more. XHTML is well-formed and valid XML. Just check the specs.
  | | + 20926 [r2d2@ac .u u] [Tobias Reif]
  | |   20931 [tobiasreif@p] I'd like an API for generating XHTML, another for CSS, another for HTML.
  | + 20904 [irving_1@co ] I am hereby expressing interest.
  + 20861 [hal9000@hy e] True.

Calling member methods from C++
20770 [jglueck@vo .] Some quetsions have been solved for me, but my message system does not
+ 20772 [decoux@mo lo] remove this line
+ 20773 [ttate@ja st ] I guess if you get rid of `callString += "()";',
| + 20823 [jglueck@vo .] Sorry, thanks for your answer, but i did that in the original version
| + 20827 [jglueck@vo .] I am coming closer to the solution of the problem ( thanks to Guy
| | 20839 [decoux@mo lo] If you look at your first message [ruby-talk:20588] "Calling class member
| + 20828 [jglueck@vo .] Another little bit closer.. maybe the method in intern.h of the Ruby
+ 20865 [jglueck@vo .] Puh it got it working after all... However there is one bug left and
  + 20866 [Dave@Pr gm t] Does it crash if you disable GC?
  | 20871 [kevinbsmith@] Or, to turn it around, if you call GC.start each time, does
  | 21076 [jglueck@vo .] Hm, I fixed the problem ... in my C++ method for calling a ruby object
  + 20867 [decoux@mo lo] Well difficult to say without a small example.

memory leak in simple tk script with ruby snapshot?
20787 [steve@ti ht ] Using ruby 1.7.1 (2001-09-01) [i686-linux] with tk and the following
20788 [decoux@mo lo] No, this is not a memory leak.

singleton help
20790 [alwagner@tc ] I need some help with a singleton class.
20791 [Dave@Pr gm t] There is a logical problem with having 'instance' take parameters
20832 [alwagner@tc ] Actually, I do need to pass an argument to the singleton.  It needs access to
20833 [Dave@Pr gm t] But the point there is that although you've created a single instance,

Indirect eval doesn't work??
20792 [waisun.chia@] Dear Rubyists,
20798 [dblack@sa ur] Because the # introduces a comment :-)  Here are two examples which
20836 [waisun.chia@] *SLAP*

File layout and version control
20801 [gabriel@de o] I am starting work on a port of one of my company's Visual Foxpro
20809 [sean-ruby-ta] Very cool.
20810 [nat.pryce@b1] I usually bundle tightly related classes into each file, and have multiple

passing hashes
20802 [thegrandbrie] A thought occured to me.  Earlier there was in the GUI/Fox discussions
20806 [Dave@Pr gm t] Matz is ahead of you :)
20814 [harryo@zi .c] I'm not sure I understand what's going on here.  Are you saying that this
20816 [Dave@Pr gm t] Exactly that. It seemed to be what the OP was asking.

Proc internals
20805 [chrris@ma l.] Is there any way to obtain a NODE from a VALUE of class
20807 [green@Fr eB ] They're not exactly interchangeable...  There may be an answer depending on
20812 [chrris@ma l.] The post from Henning von Rosen (`how update anonymous classes?'') gave
20813 [green@Fr eB ] Well, actually a proc is generally passed as a VALUE.  Check out

Regex utf-8 case detection?
20811 [henning@ik o] /[A-Z][a-z]+/ would detect a titelcased word ("Udddd")
20837 [matz@ru y- a] /[A-Z][a-z]+/u, I think.

Ruby/Tk core dump
20820 [harryo@zi .c] I asked someone at uni to install Ruby for me, so I could use it for an
20899 [kero@d4 50 u] Hm, you're not trying
20901 [harryo@zi .c] That doesn't make any sense to me.  Unless you call Tk.mainloop() no
20934 [kero@d4 50 u] OK, never mind. Your remarks just matched the point where the crash
21103 [harryo@zi .c] It could be that there's some connection between your problem and mine, but

Converting String to Symbol?
20822 [fgp@ph o. rg] Sorry if this is a FAQ. Just flame me then ;-))
+ 20825 [dblack@sa ur] String#intern
| 20831 [fgp@ph o. rg] And I read over a passage about symbols in "Programming Ruby" over and over
+ 20863 [larsch@cs au] WouldntItBeNiceIf instance_methods and relatives returned an array of

OReilly Ruby book has snail on cover
20829 [ralph.amissa] Ruby animal/bird options - there is another bird (apart from the
20846 [tobiasreif@p] Good idea.

modify hash during iteration
20840 [brixi@un co ] I have a question to following piece of code
+ 20841 [Dave@Pr gm t] I'm not sure what you're asking about. If it's the pair[0] call, then
| 20842 [brixi@un co ] The question was about modifying the value of the  key (pair[0])
| 20843 [decoux@mo lo] Don't modify the key otherwise you'll have result difficult to
+ 20844 [matz@ru y- a] It's OK to change the associated value to the existing key.  In case
  20845 [matz@ru y- a] I should have mentioned adding new key during iteration may cause

New CGI lib (was: "Minor cgi.rb question")
20849 [tobiasreif@p] gnu.xml.util.XHTMLWriter

ruby & GUI
20854 [mynewnews@gm] I'm interested in GUI develeopment. Is ruby a good choice?
+ 20856 [YuriLeikind@] There is of course Ruby/Tk - the default.
+ 20859 [stramm@st ll] Ruby/Qt might be a good choice. Never tried it though, as I don't like
+ 20895 [kevinbsmith@] There are so many questions behind your question.

New CGI lib (was: "Minor cgi.rb question")
20855 [tobiasreif@p] David,

OReilly Ruby book has snail on cover
20858 [ralph.amissa] (a) leopards (Panthera Pardus - the most graceful & pound for pound

Control construct syntax error
20862 [larsch@cs au] while a = func b

Silly question re: doc/news
20874 [hal9000@hy e] In the doc/NEWS file where changes are
+ 20875 [decoux@mo lo] See the documentation of rd
+ 20876 [chadfowler@y] It's an RD link.
  20888 [hal9000@hy e] Thanks, Chad and Guy...

question about coding...
20879 [chiashow@si ] Dear all,
20881 [matz@ru y- a] It's now being developed under ruby_m17n CVS branch.  ruby_m17n can

newbie question
20882 [pate@ne wo k] after a rather long series of moves, trips, holidays, and vacations,
20883 [ned@bi e- om] class Movie
20885 [pate@ne wo k] I'd tried this, but it fails when I try to use the values outside a
+ 20886 [ned@bi e- om] Well, they're not globals, so you'd have to refer to them by fully-qualified
| 20889 [pate@ne wo k] [lots of ellision]
+ 20887 [hal9000@hy e] Use Movie::REGULAR rather than Movie.REGULAR --

Ruby Essentials on sale at Amazon
20890 [thucdat@ho m] ...
21095 [djberg96@ho ] not-yet-published "Ruby Essentials" are being on sale for 30% at Amazon.com.
21098 [mjais@gm -a ] in case you live in Germany, try

Code Style (a bit long)
20893 [charleshixsn] I have the beginnings of a string parser here, but the style feels

Need 2D canvas. Is Ruby/Tk the only choice?
20898 [vjoel@pa h. ] I'd like to use FXRuby, but I need a simple 2D canvas widget like in Tk.

RubyConf registration is now open: sign up today!
20902 [Dave@Pr gm t] RubyConf.new(2001)  -- October 12-13 -- Tampa, Fl
20935 [maki@op n- e] I don't know about PayPal, but should I open an acount(?)
20936 [chadfowler@y] maki@open-news.com
20949 [maki@in c. o] Thanks!  I'll try to do it.

Re: Code Style
20905 [kevinbsmith@] this
21073 [charlesh@po ] That's a good approach to refactoring, but it feels like the wrong

Problem with druby related to TCPServer implementation on linux
20907 [cboos@bc -t ] Well, I'm sorry to start my contribution to ruby-talk with a problem report,
20912 [decoux@mo lo] moulon% ruby -v
20917 [m_seki@mv .b] Can you try the configure with these options?
20924 [cboos@bc -t ] Yes. Now it works fine on this Linux 2.4.4 platform.
21072 [ptkwt@sh ll ] Would I need to do this for the Ruby 1.7 snapshot as well?

Removing singleton methods and instance variables - how ?
20908 [   xm@w3 .r ] Can anyone help me with information on possibility and ways of dynamically
20910 [matz@ru y- a] Use Module#remove_method and Object#remove_instance_variable.
20911 [   xm@w3 .r ] Aha! Undocumented method Object#remove_instance_variable ;)))  - at lest in
+ 20915 [decoux@mo lo] The name of your instance variable begin with a '@'
| 20919 [   xm@w3 .r ] Obvious :)
+ 20916 [dblack@ca dl] def Test.test_method
  20918 [   xm@w3 .r ] That's just an example - I don't use such names in real life ;) Thanks for

interbase driver
20923 [simon.mason@] I'm trying to use the interbase driver from RAA but have no idea how to
20944 [tarod@ho e. ] Are you using the cygwin or the ms Ruby?

why not a lizard for the bookcover?
20933 [erik@ba fo s] I'm getting a lizard this weekend,  a bearded dragon.  It has a redish

trouble loading self-compiled extension in cygwin.
20937 [   ml@sp .d ] After compiling and linking the mysql extension within the
20938 [   xm@w3 .r ] Just an idea - maybe mysql extension is build dynamically and it cannot find

pop code review
20939 [aaron.barnet] the following code works but i wanted to run it past someone since i'm in
20948 [marick@vi ib] Thanks very much for posting this. I was really in the mood for
20988 [aaron.barnet] thanks for diggin at that, i really appreciate it.  nice work.

calling original method in overrided method?
20940 [hajhouse@ho ] I don't like the default behavior of String#to_i and String#to_f to return
+ 20941 [aaron.barnet] Class String
| 20942 [hajhouse@ho ] Works like a charm! Thanks.
+ 20950 [matz@ru y- a] use alias.
| + 20952 [renaud.heber] I'm curious: why is the default conversion act like that ?
| | 20954 [matz@ru y- a] It's inherited from C and Perl.  It's useful sometime.
| | 20959 [renaud.heber] While I do not deny that it may be useful sometimes, does it has to be
| + 20958 [pbrannan@at ] Is there a difference between "alias" and "alias_method"?
|   20961 [decoux@mo lo] * alias is a keyword, its syntax is
+ 20975 [pdcawley@it ] Note that this will only find you positive integers. Maybe you mean
  + 20980 [dblack@ca dl] super takes you back up the class hierarchy, which isn't the same thing as
  + 20982 [pdcawley@it ] And then I realised how stupid I was being... We return you now to

Ruby Conference: info on paying from outside USA
20943 [dblack@ca dl] Apparently some people outside the USA have had trouble paying for

GUI suggestions to display FAXes please
20945 [csawtell@pa ] I have a project in hand which involves the display of FAX images.
20946 [ned@bi e- om] What's wrong with converting them to temp files and then deleting them? I'd

Is Ruby/Tk being maintained?
20947 [alwagner@tc ] I there an active maintainer of Ruby/Tk?  I have posted a couple of problems
20951 [matz@ru y- a] Well, Hidetoshi Nagai is maintaining it.  But it seems that he didn't
+ 20957 [alwagner@ua ] I send to him directly? I am running on Win32 during the day at
+ 20964 [alwagner@tc ] ...
+ 21083 [ jimm@io co ] I, too, have reported a bug here. What is the best way to get it to
  21158 [nagai@ai ky ] Yesterday, I subscribed ruby-talk ML. :-)
  21167 [ jimm@io co ] Thank you very much for that explanation. I have also found, after reading

Ruby logo
20956 [webmaster@op] ...
+ 20960 [renaud.heber] I hadn't notice the ask for discussion of the logos, so here is my
+ 21017 [ugly-daemon@] I like Jared Smiths bird logo for the t-shirt contest. The one that is the
+ 21120 [kentda@st d.] .... which reminds me...

Ruby Conference: please register now!
20962 [dblack@ca dl] If you're planning to come to the Ruby Conference, please register

creating lots of files
20965 [joe@vp p. et] I'm going to be dealing with a lot of files, some operating systems
+ 20966 [ned@bi e- om] Well, you'll probably have to make sure that the parent directories exist
| + 20967 [green@Fr eB ] Here's a simple algorithm for you, if you'd like to use real filenames
| | 20969 [joe@vp p. et] Interesting ideas.  I would of course change join('/') to
| + 20968 [joe@vp p. et] Good point, File::SEPARATOR is much better.  I will use that.
| + 20972 [r2d2@ac .u u] [Joseph McDonald]
+ 20973 [renaud.heber] This is not Ruby related but if you ever want to list the content of a
+ 20981 [dtillman@oz ] This isn't an answer to your question - How large are the files?
  + 20985 [billk@ct .c ] FWIW we have had little problem with 1,000,000's of files in
  + 20986 [ned@bi e- om] Ah, but there is a Ruby interface to the Berkeley DB (called, as I recall,

Sockets on OpenBSD
20970 [geniusj@bl e] Please refer to thread starting at: [ruby-talk:5715]
20974 [decoux@mo lo] I know nothing about OpenBSD but there are some known problems on 2.6 with

Ruby Conference: help for international registration
20971 [dblack@ca dl] Since Paypal makes it hard for non-USA people to make a payment

destructor
20976 [ruby@sb -o l] Does Ruby have a destructor as in C++?
20977 [r2d2@ac .u u] [Frank Sonnemans]
+ 20978 [nat.pryce@b1] Ruby uses blocks to scope resource allocation and deallocation to scopes ,
| + 20983 [hal9000@hy e] with
| + 20984 [Dave@Pr gm t] You know - I think that's a pattern...
| + 20991 [Dave@Pr gm t] module Resource
| | + 20999 [nat.pryce@b1] Fantastic.  I was going to suggest making it a mixin, but you beat me to it
| | | 21000 [decoux@mo lo] Probaly a little faster with yield
| | | 21006 [Dave@Pr gm t] Although I probably shouldn't be picking up the block parameter and
| | | 21008 [decoux@mo lo] Well, when I've seen it I've said "but it's #extend !!!" and I was
| | + 21001 [ned@bi e- om] Why are you passing the block to new() here? What if it doesn't take one?
| | | + 21002 [dblack@ca dl] def thing(*args,&blk)
| | | | 21005 [ned@bi e- om] Ah. So if the constructor took a different block than you wanted to pass to
| | | | 21012 [dblack@ca dl] yes :-)  Only one block can be associated with each method call, so to
| | | + 21003 [decoux@mo lo] It is ignored.
| | | + 21007 [Dave@Pr gm t] It doesn't matter if it doesn't take one. However, it doesn't make
| | |   21009 [ned@bi e- om] Of course. Sorry ... pre-coffee ...
| | + 21004 [marick@vi ib] module Resource
| + 21112 [vjoel@pa h. ] There is no try. Only begin. Teach you I will.
|   + 21099 [mrchameleon@] Resource.use, Luke.
|   + 21144 [nat.pryce@b1] Touche!  Well, I did say it was pseudocode (didn't I?).
+ 21348 [eric@ba tu .] I was about to ask this same question.
  21351 [Dave@Pr gm t] You might want to look at the tempfile.rb standard library package for
  21360 [jweirich@on ] Another approach is to use blocks to manage resources.  If you code
  21364 [Dave@Pr gm t] def sandwich
threads.html
top