18289-19573 subjects 18638-19152

More newbie questions
18378 [matt@gr en i] OK. Now that I have Ruby installed and apparently (mostly) working, I'm trying my hand at simple things. (At least they seem like they'd be simple enough...)
+ 18380 [sean-ruby-ta] Hey.
+ 18381 [Dave@Pr gm t] rfc1123_date is a class method of CGI, as opposed to an instance
  18383 [matt@gr en i] OK. That worked! Now I'm confused (again) when to use the class and when to use an instance. For example take rfc1123_date. Why wasn't it inherited by the instance? I admit to not knowing enough about OO, but the only other language I've ever really tried was Perl's OO. And I hated it. ;)
  + 18385 [sean-ruby-ta] I don't know the answer to that, but I'm sure someone else on
  + 18386 [avi@be a4 co] Classes are themselves objects, and have a completely different set of
    18389 [ned@wh db y.] Generally speaking, methods defined on the class are ones that don't deal

Trouble Using FXRuby on cygwin/Windows NT
18393 [rgilbert1@mi] I am using ruby on Windows NT 4.0 with the cygwin installation (just
+ 18404 [decoux@mo lo] Try to put in LD_LIBRARY_PATH the directory where is located libFOX
+ 18435 [ljohnson@re ] <sigh>
| + 18456 [rgilbert1@mi] I have already built the FOX library from scratch using gcc on cygwin.
| | + 18457 [joe@vp p. et] I tried the same thing and got the same error.  My OS is windows-XP.
| | + 18460 [ljohnson@re ] Yes, I meant that you'd (possibly) need to compile first FOX, and then
| + 18458 [rgilbert1@mi] I rebuilt FXRuby using gcc/cygwin and was able to load it into ruby
+ 18455 [rgilbert1@mi] Actually I did add the directory where libFOX is located to my
+ 18461 [HolgerArndt@] I had the same problem with FOX 0.99.172 and the latest 1.6.4 installer from
+ 18550 [seanacarley@] This may be extremely not helpful but have you tried require 'FOX'

18395 [mikkelj-anti] I am fairly new to Ruby (the DDJ generation), so I may have missed something
+ 18396 [avi@be a4 co] Check out hipster's implementation at
| + 18423 [hipster@xs a] Credits to Dave, see [ruby-talk:03538]
| + 18424 [dblack@ca dl] Another project of interest in this connection might be matju's
| + 18425 [aleksei.guze] # -----Original Message-----
+ 18397 [jjenning@st ] umm, can you just give everything a clip method? i don't see why not. i think the reason has to do with this intersection thing. anyway read on.
+ 18399 [mikkelj-anti] think the reason has to do with this intersection thing. anyway read on.
+ 18400 [aleksei.guze] Modules seem help solving "multiple" problems. I recently catched that
+ 18401 [jweirich@on ] Assuming the choice of clipping algorithm rests solely in the type of

18402 [aleksei.guze] I really need some documentation.
18403 [decoux@mo lo] pigeon% cat b.rb

Socket vs. TCPSocket & UNIXSocket
18409 [eli.green@co] Socket.accept returns an array, whereas TCPServer.accept and UNIXSocket.accept
18411 [eli.green@co] Sorry, I meant
18412 [decoux@mo lo] You don't need ignore
18413 [eli.green@co] Cool! Thanks!

XML and dtd validation
18414 [dsafari@xt a] I was wondering if there in ruby that will validate an xml document
18416 [waisun.chia@] No, not yet. I have done a Ruby binding to libxml (which does DTD

Alan Kay Story [was: OO question]
18427 [jweirich@on ] The best writeup on this story I've seen is on the C2 Wiki (

nonblocking socket error under windows?
18430 [ rc@du ia de] those few lines crash with
+ 18436 [   xm@w3 .r ] There is select ;) the power of this function when building any
+ 18491 [mikkelj-anti] I'm not sure if this is related, but it is getting increasingly late.
+ 18516 [ rc@du ia de] If you manage to find a solution using select with FXRuby, let us know ;)

Ruby demos?
18437 [onge@mc .a l] I'm giving an introduction to Ruby at work tomorrow and I'm looking for
18462 [Dave@Pr gm t] Are they Java programmers? If so, I've got a distributed stock-ticker
+ 18465 [aaron.barnet] i'd like to see that.  is it online somewhere?
+ 18466 [onge@mc .a l] They're mostly scientists, so I think C, C++, and Fortran are mostly what
  18470 [hal9000@hy e] mostly what
  18471 [sprice@hi aa] It is by Jim Menard.  It can be found here.

File.expand_path is buggy?
18440 [larsch@cs au] File.expand_path "/foo/bar."     # => "/foo/bar"

Ruby vs. Objective Caml
18464 [SAT@MU TI EC] ...
18467 [mike@st k. o] Why do people keep on presenting choices as if they are mutually
18474 [toddg@li ux ] It does have a habit of winning the ICFPs.
+ 18475 [anany@ec .v ] He said it was AS FAST AS C, and even then, not all the time.
+ 18479 [panakal@bi f] Syntax aside I think he meant that 'it is often as fast as straight C'
| 18485 [toddg@li ux ] Once again, I demonstrate that Americans (such as myself) can't read
+ 18487 [mikkelj-anti] I thought I had already posted - I was just about to post a request on Ruby
| 18494 [toddg@li ux ] Why are you looking hard?
| 18522 [mikkelj-anti] You are definitely right in that serverside apps make it a lot easier to
+ 18509 [hal9000@hy e] is a
  18518 [neumann@s- i] at
  18531 [ugly-daemon@] I heard of fish!! I wanted to learn it before I found ruby but it's
  18548 [johann@ph si] I've been playing with ocaml fairly seriously for the past week or so;

Using C++ as extension language
18468 [Brett.W.Denn] As an experiment I am trying to write a Ruby extension in C++ instead of C.
18473 [pbrannan@at ] 1) Since Chris U. and I have been discussing Ruby/C++ exception-safety

Has the font-lock problem been fixed yet in "ruby-mode.el"?
18469 [ljz@as as .c] I just started using `font-lock' in XEmacs, and I noticed problems
18476 [kero@d4 50 u] [emacs user responding]

Re: Threading  was: Re: Ruby as opposed to Python?
18492 [joe@vp p. et] I'd also vote to put this near the top of the priority list.
+ 18493 [eli.green@co] I'm just going to throw my $0.02 in here and point out that while Ruby's current
+ 18507 [jjenning@st ] Has anyone tried writing a libpthread extension?

baffling segfault
18495 [alwagner@tc ] Running Ruby-1.6.3 and FXRuby-0.99.173,  I have been receiving a lot of
+ 18497 [dblack@ca dl] David Alan Black
+ 18498 [dblack@ca dl] (Sorry for empty reply a minute ago!)

TCP problem under windows (again)
18500 [Dave@Pr gm t] I've been messin' around with Windows and Ruby, and thought I'd try out
18506 [toddg@li ux ] That would certainly put to rest any concerns about the size of Ruby's

Ruby source code and binaries for Mac OS 9
18502 [dnm@po ox co] I'm trying to track down Ruby source code and binaries for Mac OS 9
+ 18503 [matt@gr en i] I'd be interested in this, myself. Especially if it happened to work on a 68K mac running system 7.5. ;)
+ 18504 [feoh@fo rf z] I've never seen a Classic MacOS Ruby port.
  18536 [hotfusionman] Someone in Japan did a PPC port of 1.4.  You can find it at

Ruby and Expect
18505 [thucdat@ho m] ...
18524 [kjana@os xa ] Use expect.rb which should be ruby's lib directory for adding

Basic OO Tutorial, Ruby & Perl
18510 [clpoda@ie e.] I have prepared a document called rubyboot,
+ 18511 [decoux@mo lo] Another way :-)
| 18513 [spwhite@ch r] a = "hello there"
+ 18519 [dblack@ca dl] Get rid of the final space in that string.
+ 18546 [ned@wh db y.] I try to avoid dual-mode (class/instance) methods in my Perl code.

Re: File.expand_path is buggy? (PR#158)
18512 [matz@ru y- a] No.  It's a bug.
18514 [decoux@mo lo] You have this case no ?
18515 [matz@ru y- a] You're right.  Your patch (submitted to ruby-bugs) is superior.

RE: Welcome to our (ruby-talk ML) You are added automatically
18517 [jonathan.mor] help

Ruby installer for Windows - on a net drive
18528 [Stephan.Kaem] I'd like to have an installation of Ruby (for Win32 - the one from Dave &

Opening a FILE* in a C extension
18537 [Brett.W.Denn] In a C extension, I need to read data from a file using fread.  I also want
18538 [pbrannan@at ] One possibility is to use rb_file_open (which itself calls fopen) to open

RSA Factoring Challenge
18539 [onge@mc .a l] I saw this RSA Factoring Challenge link on Slashdot this morning and I

ruby on Hurd?
18540 [royhamel@ho ] ...
18556 [matz@ru y- a] I think it's our "Ruby".

I am clinically stupid. (fastcgi.rb bug)
18541 [eli.green@co] Hey, all.

Tk Demo Patch
18542 [jkaurin@ho e] I have not been following comp.lang.ruby much since 1.6.3, so please
+ 18559 [decoux@mo lo] What you see is the interaction between tk.rb (more precisely
| 18560 [decoux@mo lo] widget
| 18602 [rise@kn ve y] This is now fixed for 1.6.4 and 1.7.1 (2001-06-19) in the current tarball.
| 18807 [alwagner@ua ] The caltech link doesn't work today. Says "forbidden".  Is this
| 18850 [rise@kn ve y] This was a permissions issue with the directory in question.  Everything
+ 18589 [rise@kn ve y] The patch is versus the actual Ruby Tk libs, not the demos.  The demos

Re: More newbie questions
18544 [clpoda@ie e.] I found the perlboot man page to be helpful in understanding some basic

Problems calling a VB COM object
18547 [graham.brook] I am trying to script some COM tests using Ruby and WIN32OLE. I am new to
+ 18554 [derek@di it ] Just to be sure, check that your VB com component is accepting the
+ 18568 [graham.brook] Thanks for your suggestion. It worked a treat. Might be a problem in the

overloading [] in SWIG.i file
18551 [Craig_Files@] Another SWIG question:  I would like to overload the [] operator in my
18564 [luigi.ballab] You'll have to use Python conventions for special method names. They will

yield in SWIG
18552 [Craig_Files@] After getting such great responses after my last posting, I am hoping
18570 [ljohnson@re ] This looks fine, as long as you understand that because the third argument

Need help installing sablot extension
18557 [ruby@ja es r] I'm having a tough time getting the Ruby sablot extension installed on
18561 [maki@in c. o] Is there sablot.h in /home/james/include ?
18607 [james@ja es ] ruby extconf.rb --with-sablot-include=/home/james/Sablot-0.60/Sablot/engine \

ruby-audiofile 0.2
18558 [jjenning@st ] New Ruby-Audiofile 0.2. Need to read or write an audiofile? Problems with spots on your clothing? Just can't seem to cut those french fries right? Ruby-Audiofile 0.2(tm) is what you need. Now, with Super Scrubbing Agents!

Which database should I use?
18566 [the-master-o] I have a program that needs a database to store some data (actually a large
+ 18575 [the-master-o] I'm using Debian potato and I'd like to know if somebody has a database (from
| + 18582 [neumann@s- i] I've successfully tried Oracle, DB2, ODBC, InterBase, MySQL, msql, PostgreSQL with Ruby.
| | + 18584 [the-master-o] urban@debian:~/Programmieren/Ruby/mysql-ruby-2.3.2a$ ruby extconf.rb
| | | + 18599 [neumann@s- i] I am not sure, but could be a problem with ruby 1.7.1 ?
| | | + 18611 [   xm@w3 .r ] 1.7.1 changes a few method names (or macros).
| | |   18615 [the-master-o] Yes, this was it. It compiles correctly and the tests are running.
| | + 18594 [list@ch om t] Michael, hello to you and to everybody.
| |   + 18596 [jjenning@st ] My copy is in /usr/lib/ruby/1.6... yours should be too since you're
| |   + 18600 [neumann@s- i] That's a problem with the Ruby installation.
| |   + 18804 [roberto@RE O] Same situation here, ? standard ? debian package of 1.6.3/1.6.4 is missing
| |     + 18805 [decoux@mo lo] Do you have installed ruby-dev ?
| |     + 18818 [roberto@RE O] [courtesy cc of this posting sent to cited author via email]
| |       + 18822 [nconway@kl m] I've made unofficial (untested, experimental, etc) packages of ruby-
| |       + 18964 [roberto@RE O] [courtesy cc of this posting sent to cited author via email]
| + 18613 [dsafari@xt a] keen to try the 'testing' tree? It has much more up to date packages
+ 18580 [neumann@s- i] How large?

Need example for Net::HTTP Post
18569 [rbovet@in me] As a complete newbie to ruby I thought I'd start out by writing a
18571 [mike@le to .] require 'net/http'

where are WIN32OLE and tk
18572 [BPettersen@N] I just started playing around with Ruby. I downloaded the windows
+ 18576 [mike@st k. o] Mandrake 8 comes with ruby and the gtk module as RPMs, so you might have
| 18585 [ljohnson@re ] Hope this helps,
+ 18609 [mike@st k. o] My earlier post was complete nonsense!  Sorry.

ruby versus Perl Magic
18573 [info@mj is d] I have a small problem
+ 18574 [armin@ap ro ] replace it with
+ 18577 [mike@le to .] mathematical
| 18581 [jjenning@st ] Yes, that's how Perl does it: + is addition, . is string
| 18614 [pdcawley@it ] Yeah, but that's changing in Perl 6. -> is disappearing, . becomes the
+ 18579 [matz@ru y- a] Ruby had this magic too in ancient time.  I removed it because it
  18597 [info@mj is d] This is what I thought too.

Installing xmlparser
18578 [alunapr@ap l] I've just finished (?) writing an XML course for our training company,
18593 [anany@ec .v ] Alun and folks,
18603 [anany@ec .v ] What I forgot to say was that I think that expat.h is the important header

My first Ruby program... :-)
18583 [BPettersen@N] non-trivial program (it's converting a large c++ enum to constants). I'm
+ 18586 [jjenning@st ] Looks good... see bottom for my only suggestion
+ 18587 [mike@le to .] I'm
| + 18588 [BPettersen@N] Thanks, I changed it to
| | + 18590 [BPettersen@N] No, I like Fixnum#times much better (it took me a couple of minutes
| | + 18591 [mike@le to .] Actually, the most common way to "sprintf" is to use the operator '%'
| |   18592 [BPettersen@N] hey, cool! Coming from Python I should probably have tried this first...
| + 19183 [erik@ba fo s] Isn't there an each_index too??
+ 18598 [dblack@ca dl] I used your program as an excuse to explore class Matrix a little
| 18604 [joe@vp p. et] Here's my version, perhaps not as good as the matrix version, but more
| 18606 [dblack@ca dl] The matrix version works like this: It starts with a matrix with the
| 18610 [joe@vp p. et] Hmmm, Is there a way to find out the ruby method that "puts" calls via
| 18612 [decoux@mo lo] #puts call #to_s, except for nil and Array
+ 18647 [markus.lado@] as you said it would be a large c++ file,
  18652 [markus.lado@] class Maximizer

On Vacation
18595 [Richard@ru y] I will be away from the office from Friday, July 27

Full screen I/O?
18605 [Kirk@le in r] Does Ruby (or an extension) have facilities for full-screen (ncurses-like)
18625 [neumann@s- i] It comes with Ruby by default.
+ 18703 [J.Travnik@sh] I'm working on textmode user interface(TUI) (that use heavily modified
| 18711 [matz@ru y- a] Shall I integrate your modifies into standard ext/curses.c (and
+ 18849 [Kirk@le in r] Ah! I'm running ruby 1.6.4 (2001-06-04) [i386-cygwin], and the "ext"

ruby indenter
18608 [joe@vp p. et] Has anyone written a ruby pretty printer or indent-er in ruby?

18616 [   xm@w3 .r ] Recently when working with Apache (1.3.20), mod_ruby (0.9.0) and
+ 18617 [matz@ru y- a] Should I replace "vfork" by "fork"?  I don't have enough knowledge to
| + 18618 [sean-ruby-ta] By no means would I consider myself an OS guru, but, this tid
| | 18621 [decoux@mo lo] ruby call _exit(2), this is the first thing that I've verified :-)
| + 18619 [   xm@w3 .r ] I'm just not sure why this happens ... thish seemed to help but I changed a
| + 18620 [hgs@dm .a .u] I noticed that Perl commented about Solaris 2.5.1 vfork being "broken",
+ 18651 [jeremy@ch os] Well, I just read "man vfork" on my Linux system, so I'm hardly a guru
  18661 [sean-ruby-ta] Depends on the context: I'll explain below.
  18694 [knu@iD em ns] That's probably true, but NetBSD folks claim that a decently

Regex problems
18622 [rlipscombe@r] def assertStringsEqual(actual, expected)
+ 18623 [decoux@mo lo] You want this, I think
+ 18624 [dblack@ca dl] $1 will match what was (last) matched in the first set of parens from
  18626 [rlipscombe@r] That works great.  Thanks a lot.

SimpleTreeParser of XMLParser very slow
18627 [neumann@s- i] I am currently benchmarking XML-RPC with different XML parsers.

State of the Onion Five
18628 [Dave@Pr gm t] Larry Wall's fifth State of the Onion speech, summarized at
+ 18654 [matz@ru y- a] Yes.  I've felt Perl6 (and Python) coming closer to Ruby, probably a
| 18693 [decoux@mo lo] I don't think this is a coincidence.
+ 18658 [toddg@li ux ] $a = +{ key => val }; perhaps?
+ 18691 [pdcawley@it ] I think that'll still try and be a hash first. And you can always add

exit() called in ruby_run()?
18629 [onge@mc .a l] I've been working on this MPI Ruby thing and in it, I embed ruby into an
18630 [decoux@mo lo] The good question is why do you want to call ruby_run() ?
18631 [emilong@mi w] Well, what I'm trying to do is create a ruby that's parallel.  I need to
18632 [decoux@mo lo] ruby_options() also can call exit()
18633 [emilong@mi w] Eek!  Oh, well, atexit() should handle it.  MPI_Finalize() doesn't really

Most Sig. NonZero bit, efficiently?
18634 [hgs@dm .a .u] I see that integer types (Bignum and Co.) support [] to get the kth bit out.
18636 [nat.pryce@b1] FYI - UDP guarantees delivery of uncorrupted, complete datagrams, or no
18637 [hgs@dm .a .u] Oh.  Thank you, that has saved me some bother then.
18643 [nat.pryce@b1] datagram
18646 [hgs@dm .a .u] OK, that is reassuring -- I've not wasted too much of my time!

Non-blocking socket use in threads?
18635 [ned@bi e- om] I'm considering using Ruby for some work I'm doing. This program has been
18655 [matz@ru y- a] Ruby tries its best to avoid blocking whole system for any kind of IO
18664 [grady@xc .b ] Unfortunately (as I reported in Bug 112 at the Ruby Bug Tracking
18680 [matz@ru y- a] That's different issue.  Unfortunately, IO#eof does block the current