47465-48638

47245-50124 subjects 47692-48851

Re: Help with a segv in mod_ruby - interpreter bug?
47465 [Dave@Pr gm t] Well, the problem goes away when I comment out the following three
+ 47480 [decoux@mo lo] Yes, the problem is on these line
| 47521 [patrick-may@] Windows 2k  with ruby 1.6.5 (2001-09-19) [i386-cygwin]
| 47522 [nobu.nokada@] Perhaps, Since new signleton classes for nil/false/true are
| 47525 [nobu.nokada@] Oops, this line lacks \ at the end.
+ 47512 [chr_news@gm ] Have you tried using
| 47515 [Dave@Pr gm t] Hmm.. interesting.
+ 47520 [patrick-may@] This sounds like an interpreter problem that we hit while working on

Difference between proc.call and yield?
47469 [airboss@no e] def func1()
+ 47473 [gsinclair@so] But I hate contrived examples!
+ 47474 [Dave@Pr gm t] There's an internal difference, in that 'yield' does not create a proc
| 47538 [chr_news@gm ] In recursive situations it's sort of advantageous to use the block
| 47539 [chr_news@gm ] Sigh, ...
+ 47509 [ADATE@kc rr ] The parameter passing is also different, quoting Matz (from ruby-talk

ascii to binary conversion
47483 [khabibiuf@ho] I'm trying to read in a file of numbers that are stored as strings and
47486 [flifson@cs u] Try Array.pack and String.unpack.

REXML again
47488 [the_supernov] I am using the following code on an XML file, which has a size of 121KB

Re: Help with a segv in mod_ruby - interpreter bug? (long)
47491 [Dave@Pr gm t] The following script, if run twice, segv's the second time.
47494 [decoux@mo lo] I've tried with
47523 [patrick-may@] If he's running with mod_ruby, the second time may be run on the same interpreter.

FreeRide install problem
47504 [armin@xs .d ] any help would be appreciated.
47517 [codon@op us ] I had the same problem and found the solution was to build FXRuby with
47531 [armin@xs .d ] Thanks a lot Martin. That works now.
47532 [armin@xs .d ] I got the latest CVS verrsion and all font problems

Couple of questions
47533 [tom@al al .s] Is there a ruby equivalent of perl's Data::Dumper?  I'm only
47535 [decoux@mo lo] You can look at pp (it's in 1.7)
47536 [tom@al al .s] Both just what I wanted, thanks!

How can I avoid "Insecure operation - stat (SecurityError) "
47545 [james@ja es ] I'm trying to get some ruby code, running under mod_ruby, to retrieve the
+ 47557 [pmak@an me l] RubySafeLevel 0
| 47570 [james@ja es ] Thanks, but I'm just a system user, with no access to the apache config.
+ 47573 [nobu.nokada@] $ ruby-1.6 -e 's = "/etc/fstab".taint; $SAFE=1; p File.stat(s)'
  47577 [james@ja es ] Thanks.

Re: What Ruby needs.
47547 [ADATE@kc rr ] I do not have any problem with item 1) on your wish list as long as I don't
+ 47548 [ADATE@kc rr ] Oops ! Here is a typo:       ^^^^^^^ was supposed to be "influential"
+ 47562 [olczyk@in er] Both OCaml and Lisp are very dynamic. Some might argue that these are
| + 47576 [alwagner@tc ] Yes, usually a very, very, large snapshot.  And usually full of crap that is
| | 47582 [olczyk@in er] 1) very,very,very large is a relative term. Checking clisp cores I
| | 47614 [vjoel@PA H. ] This in itself doesn't convince me you need a core. If you keep program
| | 47670 [olczyk@in er] And you think persistance is instantaneous?
| | 47673 [vjoel@PA H. ] I guess that's just my perspective. For me, simulations can take hours
| | 47721 [olczyk@in er] In simulations you have manymany objects which are constantly
| + 48310 [kgergely@ml ] But OCaml is strongly typed.
|   48354 [vze4cdy5@ve ] don't
+ 47575 [alwagner@tc ] I totally agree.  I did ST exclusively for 15 years.  But Ruby drew me away
  47588 [armin@xs .d ] I think the current trend is to move away from images.

Unescaping strings
47551 [Michael.Chap] What is the coolest way of unescaping strings?
47580 [vjoel@PA H. ] eval "\"#{s}\""
47611 [batsman.geo@] astring.gsub!(/\\[nt\\\"]/) { |x| eval "\"#{x}\"" }

Some comments on the 167-1 installer
47558 [bilotta78@ho] I just installed ruby 1.6.7 from the nice installer, after removing
+ 47563 [lyle@kn lo y] I just added a note about this to the WindowsInstaller page at the
| 47564 [bilotta78@ho] The problem is unpacking the other installer without actually
| 47589 [andy@to ls e] That's correct, if you don't choose to install Tcl/Tk you must
| 47597 [bilotta78@ho] ActiveState Tcl sets a registry entry in
+ 48583 [web2ed@ya oo] 172-1 didn't install rubywin.exe
  48638 [andy@to ls e] Nope, it sure doesn't.  Nor is it on the list of things that

Ruby Bot
47559 [bilotta78@ho] did anybody manage to use rbot on Win32 platforms?
47568 [charlesb@su ] not under windows but it runs fine under linux... i've even made a
47584 [bilotta78@ho] Well, with rbot 0.9.4 there was an error about SIGHUP not being a
47631 [charlesb@su ] Well SIGHUP isn't a commmand par se... it's a unix termination signal
+ 47633 [rick@be rd i] HUP is actually a hangup, generally used to reload a process rather tan
| 47822 [charlesb@su ] No but if ythe program isn't written to handle the SIGHUP signal, then
+ 47637 [bilotta78@ho] Yes, sorry.
  47823 [charlesb@su ] I would presume so the two files are exactly the same iirc
  47841 [bilotta78@ho] Still aborts saying that the requested address was not valid for the
  48060 [bilotta78@ho] I upgraded to 0.9.6 but still the same error. I don't even understand
  48064 [tom@li ux ri] Sounds like the socket libraries. Wanna paste the entire text of the
  48068 [bilotta78@ho] ../rbot/ircbot.rb:240:in `connect': failed to connect to IRC server at
  48091 [bilotta78@ho] Ok. /etc/host MUST contain the reverse DNS for the server. If it

Query regarding elsif
47560 [paul@No pA P] I'm a ruby newbie, but an old hand at programming (30 years, more than
+ 47566 [jfreeze@fr e] Hmm. don't know much about the possibility of adding the
+ 47605 [rawlins@cs u] Possibly not the solution you were looking for, but if you use an editor
  47668 [mghall@en er] Or add synonyms, and not break existing code.
  47907 [gsinclair@so] By the time he's done all that, do you think he'll have learned the correct

irb and 'singleton can't be dumped'
47569 [vjoel@PA H. ] Something changed in irb when I went from 0.9-02.06.12 to the more

Flash socket server - can I make it any shorter??
47574 [patrick-may@] no doubt, this is exciting.....

equivalent of python's __debug__
47585 [davegaramond] python can compile in two modes, normal and optimized. in optimized
47586 [shirai@p1 p.] Interpreter switch '-d' and $DEBUG may help you. This may be good for
48084 [davegaramond] sorry for the late response. my problem is, i want to insert lots of
+ 48086 [bilotta78@ho] I'm a newbie and I still haven't read any serious book, just been
+ 48090 [decoux@mo lo] Well, I've perhaps not understood but you can write (like previously said)
  48093 [davegaramond] but "a long string" still gets allocated by ruby. i want optimize _away_
  + 48095 [rich@in oe h] previously
  + 48100 [alan@di ik t] require 'dbg-strings.rb' if $DEBUG

Multithread with net/smtp?
47593 [marathoner@s] I'm working on a project to send a massive number of emails as quickly

Can't Have More Than 9 Mandatory/Optional Arguments in Ruby/C?
47594 [billtj@y. lu] In rb_scan_args() the char *fmt is specified as a string containing zero,
+ 47626 [pbrannan@at ] Well, you could change the definition of isdigit(), and then you can get
| 47744 [billtj@z. lu] I have read the definition of rb_scan_args() and probably I will not dare
+ 47635 [matz@ru y- a] By using rb_scan_args(), yes.  For that case (I believe it is very

STDERR vs $stderr - delegation bug
47596 [ahoward@fs .] all of the previous solutions seem to make the following assumptions -

ruby-dev summary 17965-18021
47598 [aamine@mx ed] This is a summary of ruby-dev ML in these days.
47606 [pbrannan@at ] In what ways does this library differ from dblack's Ruby Behaviors
47636 [matz@ru y- a] * more complex implementation
47658 [pbrannan@at ] Where can I find an example of how the type information of the class
47718 [matz@ru y- a] marshal.c in the latest CVS.  Notice it is going to change.

Ruby vs. TCL/TK?
47599 [christopher.] I've just started playing w/ Ruby and like it quite a bit so far.
+ 47608 [CRIBBSJ@oa w] I actually have used Tcl/Tk a lot more than Ruby.  I'm actually starting to
| 47665 [mghall@en er] (I replied to this, but didn't notice that it went to OP only.
+ 47627 [comp.lang.ru] - - Caution: My TCL knowledge is way out of date, I haven't really
| + 47650 [christopher.] Thanks very much for the feedback, that was great insight!
| + 47667 [mghall@en er] That's ancient history, in Tcl/Tk time.  :-(
+ 47664 [mghall@en er] Can we compare apples and oranges?

Texas codefest?
47600 [djberge@v5 h] Did the Texas codefest happen this past weekend?  What's the scoop?
47601 [hal9000@hy e] Laughed out loud when I read this.

Anything equivalent to Perl's LWP::UserAgent and HTTP::Cookies?
47602 [matt@bl ck b] I'm writing yet another web spider and I would strongly prefer to do it in

Test::Unit::UI::Fox::TestRunner
47603 [armin@xs .d ] Not your fault. The FXRuby-based test runner GUI distributed with the latest
+ 47604 [armin@xs .d ] require 'test/unit/ui/fox/testrunner'
+ 47607 [lyle@us rs s] To my knowledge, there hasn't been a new Test::Unit release since I sent
  47613 [mike@st k. o] Have you tried the version from CVS?  Look at
  47619 [armin@xs .d ] Perfect! Works like a dream!

诚邀代理业务,利润可达40%!全新jsp asp.net php虚拟主机,免费试用。
47610 [sanry@21 n. ] 虚拟主机、闪速邮局、域名注册、智能建站、代理业务一条龙服务!

RenameMethod refactoring (Was: Re: IDE vs. editor)
47615 [rking@pa op ] many examples where it's non-trivial to discover the correct type
47616 [hal9000@hy e] Interesting thread.
47638 [batsman.geo@] It's IMHO the only affordable way to do it: having method_missing check

drb -- distrib'd ruby and marshalling, question about methods
47618 [john@th nm n] pleased to see the light article in Dr Dobbs -- or was it Byte --
47629 [armin@xs .d ] I don't know much about drb, etc.  and look forward to be proven wrong :-).
47642 [transami@tr ] well, drb really serves a slightly different purpose, in that you're
48103 [john@th nm n] Thanks for the info... I had gotten the notion that somebody had

local variable bug
47620 [tran55555@ya] I am newbie in Ruby, I cannot find the bug on my financial program.
+ 47621 [kentda@st d.] You escape the # sign here, so the #{a} part isn't parsed as an
+ 47623 [guaracybm@ig] Delete '\' before '#'
+ 47628 [michael_s_ca] Remove the "\" before the "#" in position 6 (0 based) in the string.
+ 47675 [tran55555@ya] Oh, that's right, the simple "\" is too much.

PHB's fear, Spreadsheet alpha1 is here!
47622 [djberge@v5 h] If you've ever had the need to write a file on any platform that was readable by MS Excel, than take note!

Building Ruby on Linux ...
47624 [dmartenson@m] ...
47649 [martin.kahle] First check if you have any libtk[version-number].so

inconsistency in shared state between parent/child processes
47625 [ahoward@fs .] i am very confused about how/when global state is shared between
47808 [angus@qu va ] Because when you assign $stderr or $stdout to a IO object, Ruby does some

Ruby article in Linux Format
47630 [jostein.bern] There is a nice introductory article on Ruby written by Jonathan Lim in the
47632 [charlesb@su ] yes i've seen iut... I haven't had the time to have a decent read of it

Ruby Weekly News
47639 [Dave@Pr gm t] Ruby Weekly News: 08/19/2002
47641 [rich@li hi o] Am I the only one who didn't get 'links below'??
47655 [pate@re -b a] Hmm, I'd forgotten that the email version doesn't show the urls.  Check

Perl -> Ruby: assistance wanted (offlist)
47640 [hal9000@hy e] Looking for some assistance in translating
+ 47656 [x@ic im nk .] Hal, although I'm not nearly the Ruby hacker that you are and my Perl is
| 47657 [x@ic im nk .] Although you might want to find someone who can actually direct email to
+ 47674 [corion@in or] I'm quite good at Perl (although no Perl wizard), and adept at Ruby, so if

thread control
47643 [ADATE@kc rr ] I am trying to write a ruby script (Ruby 1.7.2 mswin32) which does the
+ 47645 [jfreeze@fr e] You may not need threads.
| 47647 [ADATE@kc rr ] It is my understanding that fork/wait2 is not supported on Windows
+ 47646 [ADATE@kc rr ] Sorry for the mistake,
+ 47652 [phasis@ko ne] an
| 47659 [ADATE@kc rr ] That does seem to make a difference ... the main program does end as I
| 47666 [phasis@ko ne] case
+ 47716 [phasis@ko ne] an
  + 47720 [ADATE@kc rr ] Thanks again !
  | 47723 [phasis@ko ne] but
  | 47725 [ADATE@kc rr ] Thanks for the prompt response... and for staying with me in difficult times
  | 47848 [phasis@ko ne] each
  | 47853 [ADATE@kc rr ] That does it ! You ought to be in the "Ruby's Hall of Fame".
  | 47854 [phasis@ko ne] Oh, no, not at all. It's my pleasure.
  | 47872 [ADATE@kc rr ] and run "pslist -t" it shows you the process tree.
  | 48087 [phasis@ko ne] the
  | 48105 [ADATE@kc rr ] I cannot thank you enough for all the efforts ...
  + 47724 [nobu.nokada@] This wouldn't work in 1.7 under Windows 9x, since pid is
    47726 [phasis@ko ne] Thanks, but it fails with Errno::E087 in Windows XP.
    48110 [nobu.nokada@] Apparently, there're some bugs.  What's your ruby version and
    48134 [phasis@ko ne] t.alive?

Easiest way to create a GUI for a Ruby app? (Follow-up to the Rb vs . tcl disc.)
47651 [christopher.] Easiest way to create a GUI for a Ruby app?
+ 47653 [bilotta78@ho] FOX, IIRC.
| 47661 [bobx@li ux a] Currently there is *no* wxRuby to distribute...
| 47660 [bilotta78@ho] That's the reason for the "Wish" at the beginning of the sentence ...
+ 47654 [armin@xs .d ] Yes. Tk and FoX.
  47709 [ykphuah@ho m] What about ruby-qt??

ANN: FXRuby-1.0.13 Now Available
47662 [lyle@us rs s] I am pleased to announce the latest release of FXRuby, the Ruby language
47663 [lyle@us rs s] Hope this helps,

Data_Make_Struct and ALLOC Considered Harmful?
47669 [billtj@gl e.] This is a follow-up of the thread with title "Data_Make_Struct
+ 47671 [decoux@mo lo] pigeon% cat aa.c
| + 47678 [batsman.geo@] For some reason he wants to use ALLOC, and not Data_Make_Struct. Ergo,
| + 47679 [billtj@y. lu] It took me a while to understand what is being proven by the code
+ 47677 [batsman.geo@] If I understand it correctly, you've got a pointer to a struct_C value
  47681 [billtj@y. lu] To give it more context, suppose struct_B contains a VALUE (a pure VALUE,
  + 47684 [pbrannan@at ] Or perhaps CALLOC or RUBY_CALLOC, to be consistent with C naming convention.
  + 47698 [batsman.geo@] In fact I wanted more detail about the top level object (the one that
    47739 [billtj@z. lu] Just the last details.  I want to use

quines (again)
47680 [billk@ct .c ] Sorry if this is annoying, 'cause I know we've done quines before,
+ 47707 [vjoel@PA H. ] Dude, that's tubular. (Sorry, I'm from CA.)
| + 47711 [billk@ct .c ] Just realized we could zap the space after the print.... to nitpick
| | 47713 [hal9000@hy e] Silly, silly. You think like me.
| | + 47719 [vjoel@PA H. ] Gee, foo is extensible (you've still got a, c, d, ...). It's also
| | + 47736 [ jimm@io co ] I bet my submission of your article to alt.humor.best-of-usenet is the
| + 47714 [eban@os ri .] % cp /dev/null zero
|   + 47715 [hal9000@hy e] Ha ha! Brilliant, brilliant.
|   + 47727 [jfreeze@fr e] There's just one problem. It also works for perl.
|     + 47729 [christopher.] What are quines?
|     | + 47731 [x@ic im nk .] On Wednesday 21 August 2002 07:37, christopher.j.meisenzahl@citicorp.com
|     | + 47733 [ljz@as as .c] They are self-reproducing computer programs; i.e., those whose output is
|     | + 47735 [ jimm@io co ] Jim
|     | + 47746 [michael_s_ca] Quine, via Douglas Hofstadter] A program that generates a copy of its
|     |   47747 [christopher.] Ouch! I've seen that done in C before, very scary stuff.  ;-)
|     + 47732 [michael_s_ca] Even better; it's a polyglot!
+ 47708 [ADATE@kc rr ] Cool!
+ 47741 [alwagner@tc ] What's the definition of a quine?
  47743 [alwagner@tc ] Sorry.  I just saw this answered farther down the list.

ZenWeb 2.12.0 Released!
47682 [ryand@ze sp ] ZenWeb version 2.12.0 has been released!
47683 [ryand@ze sp ] And in true form, I used a bad address for zenweb-talk... DOH! It's

Embeding Ruby in C/C++
47685 [web2ed@ya oo] I have been reading snippets that people have been saying about Ruby
+ 47686 [hal9000@hy e] Objectory?? I don't know that word. Does that mean object respository
| 47722 [ptkwt@sh ll ] I have used swig some lately and I do highly recommend it.  You'll need to
+ 47687 [pbrannan@at ] 1) You will probably want to avoid or limit the use of threads in your

the power of ruby
47688 [sturmpanzer@] As i get better writing ruby scripts (im pretty new), I often wonder
+ 47691 [ruby-talk@wh] Yours is rather succinct, but I find that you can often capitalize
| 47702 [sturmpanzer@] Wow, Doing it that way had never accured to me.
| + 47704 [ruby-talk@wh] The bracketed code is a Proc object and I'm just manipulating its
| + 47706 [ADATE@kc rr ] The block in curly brace: { |i| do_dot(i) } is only a parameter to .times.
|   47811 [sturmpanzer@] Your version runs about 10X faster than mine. but i see why now.
+ 47710 [gsinclair@so] My "imaginative" attempt is below.
| 47807 [sturmpanzer@] Great example!
+ 47740 [pbrannan@at ] WIDTH=78
| 47805 [sturmpanzer@] puts "#{' ' * i}*" <-- That's a very nice way of doing it.
| 47906 [gsinclair@so] I understand you're fairly new to Ruby, AW, but I must give you some guidance
| 47940 [sturmpanzer@] Of course!.
+ 47772 [duemoko@bi f] I'm very new, only started looking at Ruby Saturday / Sunday time. I
threads.html
top