21387-21842

21212-22470 subjects 21612-23742

Segfault: ruby 1.7.1 (2001-09-08) during mod_ruby-0.9.3 build
21387 [waisun.chia@] [root@caspar root]# ruby -v
21389 [decoux@mo lo] Use the latest version
21403 [waisun.chia@] Would love to try latest one but the snapshot below seems to be stuck at
21424 [matz@ru y- a] Try it again, please.
21428 [waisun.chia@] Thanks Matz for your usual excellent response.

ANN: FormatR 0.9
21388 [rubel@cr c. ] ruby-talk:20561 inspired me to attempt perl-like formats in ruby. I've

Socket Scan against network computer
21394 [bobh@hs da o] require 'socket'
21395 [decoux@mo lo] The block `ensure' is always executed, even if TCPSocket::open failed.
21563 [bobh@hs da o] ../socket.rb:5: uninitialized constant TCPSocket (NameError)
21584 [phasis@ha an] If your source file name is 'socket.rb' and code use require 'socket',
21577 [bobh@hs da o] Ah...well I will have to wait for the Windows binary to come out.

Probs with MySql Interface
21404 [mike_thomas@] I'm attempting to install the MySql DBI interface stuff for Ruby, and
21421 [mike_thomas@] Got it!  I had to add -lsocket and -lnsl to the link instructions (a

Ruby/objects book in style of The Little Lisper
21413 [marick@vi ib] I fell in love with Lisp in the early 80's. Back then, I read a book called
+ 21415 [hal9000@hy e] Brian,
+ 21417 [petemcbreen@] <5.1.0.14.0.20010919152224.02dc7c40@mail48727.popserver.pop.net>...
| 21419 [nat.pryce@b1] The Little Lisper is not meant to be just read through, or used as a
+ 21420 [csawtell@pa ] This is my very different attempt at a computer language tutorial
| 21479 [kevinbsmith@] I think it's promising. I do think you could pull it off,
| 21628 [padiolea@ko ] Your version is certainly not simpler and safer.
+ 21434 [dtillman@oz ] You are definitely ip to it.  Your text is very much in the expected style.
+ 21437 [pate@ne wo k] In some cases it seems a little forced, but overall I think you've shown
+ 21443 [hotfusionman] Brian,
| 21469 [marick@vi ib] Thanks for the encouragement.
| 21473 [hotfusionman] You're welcome!  And BTW, thanks for _The Craft of Software Testing_.  I
| 21652 [marick@vi ib] You're welcome. I have somewhat more up-to-date materials at
+ 21562 [fgeiger@da e] I really enjoyed reading the 1st chapter of your book and wouldn't have

Net::HTTP.get not returning data (1.7.1, ok in 1.6.4)
21414 [ned@bi e- om] require 'net/http'
21416 [aamine@mx ed] It's a feature. In 1.7 Net::HTTP#get,post returns only HTTPResponse.
21842 [ralph@am ss ] Context changed but a search brings up the response in this posting as

is there an unsigned version of INT2NUM?
21422 [ptkwt@sh ll ] I've got a C variable thats an unsigned long that I want to be able to
21425 [matz@ru y- a] There is UINT2NUM().  See ruby.h

Re: is there an unsigned version of INT2NUM?(Nevermind)
21423 [ptkwt@sh ll ] Ooops...Just after I sent this I realized that I was looking in the wrong

chain methods inside and outside the class; how to intermingle mine and Strings' methods?
21430 [tobiasreif@p] I'm trying to understand objects, and instance @variables. Now I have
21431 [nfrykholm@rs] [Tobias Reif]
+ 21453 [tobiasreif@p] Thanks a lot for your help :)
+ 21460 [kevinbsmith@] Nice bit about new--I hadn't thought of that. But wouldn't
| 21461 [dblack@ca dl] The bare "class" usually doesn't parse because Ruby thinks it's
+ 21465 [tobiasreif@p] Here is the new version, thanks a lot.
  21475 [neumann@s- i] Write a Delegator class that delegates all String methods to the internal-hold
  21484 [tobiasreif@p] May I ask why String methods behave in such different ways?

Where can I get getpot for ruby
21435 [jim@fr ez .o] I saw that getpot was available for Ruby, but now
+ 21438 [matz@ru y- a] Try getoptlong, which is bundled in the distribution.  getopts.rb is
| 21442 [jim@fr ez .o] Does getoptlong do file (name = val) parsing that getpot does?
| 21445 [matz@ru y- a] I'm not sure what do you mean by (name=val).  getoptlong accepts long
+ 21441 [rich@in oe h] ...

Ruby GTK
21444 [wpinelo@ho m] Can you tell me where i get the lastest version for Ruby-GTK ?
21466 [nconway@kl m] Cheers,

what is a Ruby implementation?
21446 [dblack@ca dl] I see we've got Java implementations and VM's on the rise.  That's great.  I'm
+ 21459 [dblack@ca dl] Remaining questions stand.
+ 21468 [matz@ru y- a] I call a interpreter/compiler Ruby if its author intends to follow

Getting Started
21447 [logross@sc o] I have a downloaded Ruby 1 6.5. I am using Windows 98 as the OS.  I have
+ 21448 [toddg@fo bo ] I guess the first thing you'll notice as the difference is that there is
+ 21449 [ned@bi e- om] First, Ruby isn't itself an IDE (though there is ruby-win). If you're used to
+ 21566 [Stephan.Kaem] You will probably like to use the 1_step_windows_installer by Dave &
+ 21567 [bdelmee@ad a] Mmh...just wondering: did you download the source package fo 1.6.5,

Low level file I/O question
21450 [mdavis@se ai] I have created a class in c that fills a buffer with information.  I would
21458 [pbrannan@at ] A Ruby string is essentially a char* pointer and a length.  Thus, you can

newbie help
21451 [doug@sa ep r] If this is not the place to ask such questions, let me know.
21452 [joe@vp p. et] There is a bug in the above (sorry).  change

Interaction system() / $stdout ?
21454 [holmberg@ia ] I've been trying to redirect the output of commands invoked by
+ 21455 [pbrannan@at ] $saved_stdout = $stdout
+ 21456 [joe@vp p. et] $saved_stdout = $stdout.dup
  21502 [marick@vi ib] I think the solution needs to be more complicated. Try closing the logfile
  21521 [marick@vi ib] Hmm. Perhaps the correct answer to "How do I redirect $stdout" is "Don't."

Tester wanted for small network code fragment
21457 [hal9000@hy e] I have a skeletal version of a net app that I
21470 [csawtell@pa ] Sounds interesting.

ruby-gtk and entry validation
21472 [ned@bi e- om] The Gtk FAQ has an example of validating a Gtk::Entry field using an
+ 21506 [nconway@kl m] Okay, the reason you can't find those functions is because they're not
| 21828 [ned@bi e- om] Well, in this instance, all that's needed is a way to execute a block from
+ 21572 [szegedy@or u] Does not this signal_handler_unblock requires a block?

Re: make error: cannot exec gcc (after many compiles) : Win95 : Cygwin of 9/19/2001
21474 [gp@fa il eh ] After configure and compiling, I cannot say more as before, sorry.

proposal: add Method reflection for source line, filename
21478 [ned@bi e- om] I've been using the rbbr (Ruby browser), and have enjoyed it. However, coming
+ 21480 [avi@be a4 co] Emphatically yes.  I've played games with hooking into method_added and
+ 21487 [jweirich@on ] I've been thinking of starting an RCR on this topic.  Yes, this is
+ 21555 [matz@ru y- a] I think

Regexp hangs
21482 [WYS@he bl ng] Good morning (evening to Matz and Co ;-)),
21488 [decoux@mo lo] No, no. You have a regexp which is really complex.

getaddrinfo: DNS temporary failure (SocketError) - again
21483 [WYS@he bl ng] I didn't get an answer to my last post, so I re-try ;-)
21497 [sean-ruby-ta] You'll have to give us a little more than what you have... code
21548 [WYS@he bl ng] - OS: Solaris 8

Chaining methods in Ruby (spinoff)
21486 [niklas@ka i.] [Tobias Reif]
21489 [tobiasreif@p] Me too. Perhaps you want to consider posting an RCR? Or are we missing

SV:  Re: Ruby/objects book in style of The Little Lisper
21491 [mikkel_damsg] Hey! Ruby is proper tail recursive, so since the recursive
+ 21492 [larsch@cs au] Is it?
+ 21494 [kevinbsmith@] Sorry, I disagree. Recursion is "cool", but is rarely
  + 21509 [nat.pryce@b1] That very much depends on the problem.  If traversing linear structures or
  + 21510 [toddg@ma l. ] "Anyone who cannot cope with mathematics is not fully human.  At best
  | 21514 [kevinbsmith@] Well, I'm glad to see we're keeping this civil. Do I get to
  | + 21515 [toddg@ma l. ] You are making a classic marketing mistake, namely confusing lack of
  | | 21523 [dblack@ca dl] determining audiences for computer books (or whatever) doesn't have to
  | + 21589 [buggs-clr@sp] Yeah, and what if your good at maths
  + 21533 [marick@vi ib] I don't have an opinion on that. But here's a nugget.
  + 21601 [jb@ru yx l. ] How weird.  I started out as EE, but changed to CS because

SV:  Re: SV:  Re: Ruby/objects book in style of The Little Lisper
21495 [mikkel_damsg] Ups. I guess I was a little to trigger happy ;=)
21516 [matz@ru y- a] Maeda once implemented it (using tricky way).  And the future version

Problem with directory?  Re:  Path walking on windows
21496 [charleshixsn] Thanks immensely for this code snippet.  I'm quite new to Ruby,
+ 21498 [charleshixsn] f = File.stat(x)
| 21578 [charlesh@po ] I have been trying various things to detect a directory.  I am
| 21591 [barry_shultz] It works for me if I change
| + 21637 [charleshixsn] It runs without detecting an error, but it misidentifies actual
| + 21640 [charlesh@po ] That runs, but without detecting the directories as separate
|   21717 [barry_shultz] I'm running the same Ruby, under Win95 4.00.950r-7 and I'm not getting
|   21731 [charlesh@po ] ...
|   21747 [charlesh@po ] At this point I got disgusted.  I deleted CygWin from my hard
+ 21765 [edsin@sw s. ] I'm sorry to answer so late but I was away for a while. The problem
  21810 [charleshixsn] I don't think that's the answer.  It found the directories, it

Speed
21499 [dtillman@oz ] I would like to speed up the following bit of code if possible.
21500 [jjthrash@po ] If you're not totally adverse to writing in Java, take a look at the
21501 [dtillman@oz ] I am.

Trouble in native library...
21503 [kero@d4 50 u] [Mailed to both ruby-talk and ruby-dev]
21518 [matz@ru y- a] Can you disclose all the program that crashes?
21520 [kero@d4 50 u] Attached.
21522 [decoux@mo lo] Try this patch
21599 [kero@d4 50 u] It works.

Replacement for __FILE__ == $0
21504 [ntalbott@ro ] ...
21507 [kevinbsmith@] The __FILE__ part doesn't bother me, but the $0 does. How
+ 21511 [nat.pryce@b1] Doesn't "require 'English'" do what you want?
+ 21512 [ntalbott@ro ] Why? It means one less thing that has to be remembered (two less things
  21513 [kevinbsmith@] I am always reluctant to add new keywords or methods to
  + 21519 [pit@ca it in] Yes, it does.
  + 21549 [charleshixsn] The $0 notation isn't strictly Perl.  I first encountered it when
    21550 [mps@di co sy] $0 has been around in Unix almost forever, and was even in PC-DOS from
    21557 [kevinbsmith@] True. However, that doesn't make it any more friendly or

Re: Changes to date in 1.7.*
21505 [anany@ec .v ] What is M17N?
+ 21508 [toddg@ma l. ] MultilingualizatioN
+ 21517 [matz@ru y- a] Multilingualization, whatever it means.

ARGF question
21525 [ms@ia ta e. ] Does ARGF read all input at once (i.e., is it unsafe with very large
21527 [decoux@mo lo] Probably I've not understood your question, but it depend of the method
21531 [ms@ia ta e. ] As I understand it, these are logically equivalent, but the first will
21532 [decoux@mo lo] like (1)

Restoring $stdout in Windows
21528 [ms@ia ta e. ] puts 1
21529 [decoux@mo lo] Well I don't know the difference (I don't have Windows : too expensive for

Win32: rubyw.exe and exceptions in a message box
21530 [mike@le to .] Since rubyw.exe cannot output anything (no console), fixing unhandled

Math and Programming
21534 [avdi@av i. r] Well, that would have been me, anyway. I started programming because I
+ 21547 [siigron@si .] Seems like no-one else will answer this, so I guess I'll "have to".
| 21588 [johann@ph si] It doesn't have to call itself.  If the last thing a function
+ 21551 [fgp@ph o. rg] What the computer can do for you is not math. Math is not about calculation
| 21558 [kevinbsmith@] Math means a lot of different things. Arithmetic is a part
+ 21552 [marick@vi ib] I've decided to go ahead with the book. So, to avoid giving prospective
  + 21554 [cbroult@sa i] ...
  + 21560 [ned@bi e- om] I'd consider presenting objects first, rather than operations on "plain old

irb
21535 [fabio.spelta] messages , so I don't know if this is an already discussed topic. Sorry
+ 21536 [decoux@mo lo] Generally this is because readline is not available
| 21538 [fabio.spelta] $ 0: No such file to load -- readline (LoadError)
| 21539 [decoux@mo lo] You must *NOT* modify ext/Setup
| + 21540 [fabio.spelta] The first time, I've compiled ruby without touching the ext/Setup file;
| | 21541 [decoux@mo lo] * it don't find a library
| + 21542 [fabio.spelta] checking for tgetnum() in -lncurses... no
|   21543 [decoux@mo lo] Can you make
|   21545 [fabio.spelta] All I did *before starting all this was
|   21546 [decoux@mo lo] Probably you don't have libreadline.so or it's in a special directory
+ 21561 [csawtell@pa ] You do not say what operating system and distribution you are using so

Reassigning and reopening $stdin
21553 [marick@te ti] puts(gets)
21556 [matz@ru y- a] You've find the hole.  Sigh.  That is a behavior that I couldn't
21559 [charleshixsn] Perhaps stdin, stdout, and stderr are important enough to have

Returnin own C++ type from ruby method
21564 [jglueck@vo .] After having solved so many problems with ruby with the great help of
+ 21565 [jglueck@vo .] Just another question... I would like to catch all exceptions thrown
| + 21596 [decoux@mo lo] No rb_catch is for #catch
| + 21621 [decoux@mo lo] No rb_catch is for #catch
+ 21595 [decoux@mo lo] [[ well, initially I've replied in the news, but my newsserver seems
+ 21620 [decoux@mo lo] use Data_Wrap_Struct() like in MessageNew

ANN: Ruby Win32 Library
21568 [ptkwt@sh ll ] Well, it's not complete yet, but there are a few useful things in it so

eruby does not like CGI#out?
21569 [fritz.heinri] I had a working ruby cgi script which lacks corporate look so i wrapped

What's the "Data" class?  Don't we need a namespace for standard classes?
21573 [furufuru@cc ] I spent a hard time to debug my code, which boils down to something
+ 21571 [kentda@st d.] I would hate to have to prepend every usage of the library classes with
| + 21570 [kentda@st d.] I meant
| + 21575 [furufuru@cc ] Right.  So I'd like to have a mechanism to "require" only those names
+ 21574 [szegedy@or u] Don't you use Gtk? I think it defines a data class in the main module...
| 21576 [kentda@st d.] <SNIP>
+ 21592 [niklas@ka i.] [Ryo Furue]
+ 21659 [csawtell@pa ] [ ... ]

Re: Factory for "struct"-ish classes?
21579 [kentda@st d.] Struct?
21615 [senderista@h] Imagine if a question like this had been asked on comp.lang.perl.misc...

Version 1.65 Installer For Windows
21581 [tub4jxr@ho m] Where is it available?
21586 [Stephan.Kaem] It is not yet. But I'm rather sure it will be available sooner or later.

Ruby licence in commercial software
21583 [accbuy@ho ma] I have been using Tcl/Tk for several years and recently was asked to
21600 [matz@ru y- a] For convenience, consider it as LGPL.  You must disclose Ruby's
21603 [accbuy@ho ma] Thank you for the reply.
21614 [matz@ru y- a] OK, here's the checklist, see README for detail.

How to return own type from C++ to Ruby
21585 [jglueck@vo .] After having solved so many problems with ruby with the great help of

Someone mentioned "Parrot". Have you looked at "XLang"?
21587 [domingo@da -] There is an interesting project called "XLang" that aparently try to

platform neutral dir operations
21590 [vjoel@pa h. ] Any suggestions on how to do directory operations, such as cp, mv, rm and

Re: irb: strange....
21593 [fabio.spelta] I've previously said that I've solved my problems about
21594 [decoux@mo lo] Have you made (in the directory ruby-1.6.5)
21597 [fabio.spelta] No, thanx again.
21598 [decoux@mo lo] Well, the problem is that when you have made the first "make install" the

Re: Programming requiring math? (was: about The Little Lisper)
21602 [kero@d4 50 u] *grin*

Is there a naming service in Ruby?
21604 [anany@ec .v ] Does there exist a naming service in Ruby already? I have looked

Please translate this easy snip of C++ to Ruby
21605 [phlip_cpp@my] #define TRACE_(x) cout << #x ": " << x << endl
+ 21607 [angus@qu va ] Just put in your script
| 21608 [angus@qu va ] Actually
| 21609 [green@Fr eB ] You don't.  Ruby Is Not C.  It doesn't use a magic preprocessor.  If you
+ 21610 [mikkel_damsg] def trace(expr)
  21611 [Dave@Pr gm t] def trace(&b)
  21618 [phlip_cpp@my] Forgot about blocks going in, but...
  21627 [angus@qu va ] Yes, I think easier. Based on what you said about how it is done in Python
  21629 [Dave@Pr gm t] Why not just 'yield' to get the value of the block in this case? I
  21631 [angus@qu va ] Because I didn't think, only copied ;). You are right.

gtk on win32
21606 [benoit.cerri] I've installed the win32 ruby version from the pragmatic programmers but
21619 [benoit.cerri] By the way,
21622 [bdelmee@ad a] Please report back to this NG whether these somewhat
+ 21677 [benoit.cerri] It doesn't work any better than with the libs which are coming from the gimp
+ 21678 [benoit.cerri] By the way
  21681 [rich@in oe h] -Rich
  21711 [benoit.cerri] Thanks a lot.
  21721 [rich@in oe h] It does nothing other then get unpacked into a /usr/local directory structure (yeah...not very Win32 but...)
threads.html
top