68613-69507 subjects 69031-69701

sending a file via http
68816 [nospam123@an] I'm trying to send a file using http in a ruby script of mine.  I've been
68818 [B.Candler@po] A CGI, presumably?
68926 [nospam123@an] Yes, this is using CGI.  Your code seems to do almost what I want, but it
68956 [B.Candler@po] File.open("album.zip").read
+ 68977 [jason@jv eg ] Which reminds me again of the handy little utility methods that I've
| 68980 [B.Candler@po] def File.read(file_name, mode='r')
+ 69043 [nospam123@an] I'm not getting any errors.  The problem is that the whole file isn't being
  69064 [B.Candler@po] Please describe how you know that it is outputting only a few bytes of your
  69088 [nospam123@an] Ok, I removed the content-type stuff as I'm doing this from the command line
  69089 [jason@jv eg ] f = File.open("data.zip", "rb") {|f| f.read}

Distributed Ruby
68830 [clr@if .u o.] I'm writing a program which is supposed to be a kind of
+ 68853 [B.Candler@po] It just runs over a TCP port of your own choosing. Hence you can use ssh
+ 68857 [vjoel@PA H. ] I know I've done that but I don't remember the incantation. Try man ssh.

[Q] Ruby for graphics
68843 [jim@fi ek co] I just learned of Ruby, and was wondering if its a good lang for
68844 [michael_s_ca] Depends on what you consider "good".
68845 [jim@fi ek co] Well, in this case good means fast and efficient....
+ 68846 [hal9000@hy e] That's a long, involved question. Just do some more
+ 68850 [billk@ct .c ] Think of Ruby as even farther up the power continuum: About maybe
| + 68891 [jim@fi ek co] Yep, that answers my question...
| + 68931 [William.L.Kl] After measuring the bottlenecks and only corrected those as necessary?
|   + 68951 [billk@ct .c ] I think I probably spoke a bit over-generally, based on my project-
|   | 68957 [dwerder@gm .] I would like to do some graphics programming on my own, but I don't know
|   | 69014 [billk@ct .c ] [ http://froukepc.dhs.org/rudl/ ]), and also a little OpenGL.
|   | + 69017 [dwerder@gm .] Yes, thank you!
|   | | 69067 [k-zimir@gm .] hmm. has anyboy experience with this opengl thing for ruby??
|   | | + 69082 [ jimm@io co ] Niels,
|   | | + 69143 [billk@ct .c ] If you're on Windows and using the Pragmatic Programmers'
|   | + 69018 [k-zimir@gm .] thanx.
|   + 68994 [k-zimir@gm .] hm, just some stupid question. new to ruby. what is to use for graphic
+ 68862 [michael_s_ca] Ruby's strength, like most any scripting language, is not necessarily

Problem with timeout for DBI on Solaris
68854 [djberge@qw s] Ruby 1.6.8
68858 [B.Candler@po] I think that the problem is that once DBI.connect has committed to calling
+ 68863 [djberge@qw s] # Begin code
| 68874 [B.Candler@po] After 5 seconds?
+ 68885 [djberge@qw s] I installed the oci8 package and made the changes you suggested, but no
| + 68893 [djberge@qw s] oci.rb -> 91: do_ocicall(@ctx) { @srv.attach(conn) }
| + 68910 [B.Candler@po] No I don't know, but it works for me for non-blocking queries rather than
+ 69243 [kubo@ji ba .] This doesn't work for non-blocking connect because this changes
  69244 [kubo@ji ba .] oops.

Style Question
68866 [whitton@at a] I've looked in the RubyStyleGuide on the Wiki, and I don't see this addressed.
+ 68868 [michael_s_ca] I leave them alone.  the "lining up" I find just a bit too cutesy,
| 68869 [dave@la dr t] For me, it's not that lining up the equals makes the initializations
+ 68871 [billk@ct .c ] class SomePerson
| 69099 [jj5412@ea th] Which is fine until you need to remove @age. Instead of ^kk (emacs) or
| 69144 [billk@ct .c ] My editor's so advanced, I can actually make changes right
| 69178 [mgarriss@ea ] Yes but count the key strokes.  10 hours a day of programming makes this
| 69230 [rpav@nw in .] page   = Page.new
+ 68904 [mgarriss@ea ] Lining them up allows more interesting uses of vim's block commands......
  68930 [botp@de mo t] I do alignment, too, but not for alignment's sake. Basically like, all

(no subject)
68872 [markmar.it@f] unsubscribe markmar.it@inwind.it

how to start a http://www.rubygarden.org user page
68875 [ahoward@fs .] so please disregard.

1.8 parse error?
68878 [ahoward@fs .] ~/eg/ruby/btpgsql/btpgsql-0.2.0 > ruby test/btpgsql.rb
68880 [matz@ru y- a] Since it's PGError, not SyntaxError, the error must be in your SQL
68884 [ahoward@fs .] /tmp > cat bug.rb
+ 68886 [matz@ru y- a] Ruby 1.8 is much "smarter" in treating argument parentheses.
| 68892 [nemo@he lo r] Ruby 1.8 is much "smarter" in treating argument parentheses.
+ 68889 [michael_s_ca] I know we're delving into holy ground here, but what makes you think

68879 [jason@jv eg ] I was doing some research to try to get RubyGOODS up and running when I
68936 [decoux@mo lo] It was mentionned on ruby-core : if you want to use it change the Hash of

Can someone explain what's happening here? (String#gsub question)
68881 [michael_s_ca] I read the caveat in the pickaxe about when the replacement is a
68882 [matz@ru y- a] \1 in double quoted string is considered as \001 (^A) before reaching
68883 [michael_s_ca] Ok, I get that; thanks.  "<\\1>" did what I expected.

SOAP4R & https
68887 [mgates@ry .n] Is there a way to create a soap4r client which connects to a server via https?
72666 [nahi@ke na t] Sorry for late reply.

instance_variable_set question
68890 [nemo@he lo r] Is this how this is supposed to work?
68895 [dave@pr gp o] But the instance variable would be called :@bar  :)
+ 68900 [nemo@he lo r] But the instance variable would be called :@bar  :)
| 68932 [matz@ru y- a] Any concrete suggestion, please?
| + 68938 [vangczung@ya] Perhaps a small note in README.EXT?  :-)
| | 68939 [vangczung@ya] Whoops.  Apparently the top thread was referring to "pure ruby", though
| + 68942 [nobu.nokada@] What about these?
| + 68944 [nobu.nokada@] $ ruby -e 'instance_variable_set :"@bar...", 15'
|   68987 [nemo@he lo r] Isn't it fair enough?
|   69011 [kentda@st d.] s/allowable/allowed/
+ 68949 [ptkwt@sh ll ] It _is_ a bit confusing, though - if you made an attr_accessor for @bar,
  68955 [matz@ru y- a] You're specifying attribute names (i.e. exporting method names), which

[OT] Re: 1.8 parse error?
68894 [ahoward@fs .] gnu coding standards.
68897 [michael_s_ca] if (foo)

packing signed long in a portable fashion
68896 [pmak@aa ni e] Is there a way to pack() a signed long in a portable fashion (i.e. it
+ 68899 [djberge@qw s] Will this do?
+ 68912 [batsman.geo@] Won't this transform the number into a Bignum?
+ 68913 [B.Candler@po] [-1].pack("N")
+ 68934 [austin@ha os] m = -1                        # => -1

Versioning prototype for discussion
68901 [ptkwt@sh ll ] I was looking at the latest post on Rubygarden about versioning support in
+ 68914 [batsman.geo@] It's a lot of work if you consider
| + 68946 [ptkwt@sh ll ] Yeah, I didnt' see it before.  But actually it wasn't a lot of work since
| + 69104 [jj5412@ea th] Looks like that depends on the file system being able to do links.
|   69108 [ahoward@fs .] i have not considered windows yet - but my first thought is that you could
|   69109 [colinml1@ex ] Actually you can do links on NTFS (and thus Windows 2000 and Windows XP
|   69118 [nobu.nokada@] Recent 1.8 mswin32/mingw32 support hard link on NTFS.
+ 68922 [ahoward@fs .] have you seen

Urgent Assistance Needed.
68905 [gbenga3danie] Dear Sir/Ma

Student Study
68906 [NWRIGH1@pr d] My name is Nyota and I am a graduate student at Hofstra University. I am currently working on my thesis project and invite you to participate in a short survey. A winner of $100 will be selected from amongst the responders.

The "!" and "?" characters.
68908 [dcarrera@ma ] One of the things I like about Ruby is that it can use ! and ? in method
+ 68915 [B.Candler@po] It's a boolean operation, and they can't be redefined (ditto 'and', 'or',
| 68925 [dcarrera@ma ] Oops.  Okay, I'm being dumb today.
+ 68916 [nemo@he lo r] This is cool.  But it'd be cooler if I could write 'def !' and '5.!'.
| + 68917 [vjoel@PA H. ] With a test for the self==1 case, it works...
| | 68920 [nemo@he lo r] With a test for the self==1 case, it works...
| | 68937 [nobu.nokada@] When stack really overflowed, OS kills the process immediately.
| + 68918 [nemo@he lo r] Well, I don't know why that other code segfaulted (ideas, anyone?), but this
| + 68954 [matz@ru y- a] Segmentation fault was caused by a GC bug.  Thank you for finding.
|   68989 [nemo@he lo r] Segmentation fault was caused by a GC bug.  Thank you for finding.
+ 68919 [hal9000@hy e] For one thing, it's an operator (the "not" operator).
| 69208 [kgergely@ml ] By the way why not allow to define new operators, like in prolog and
| + 69231 [rpav@nw in .] I've talked about this from time to time on #ruby-lang.  It's not
| + 69252 [matz@ru y- a] (a) it would make the parser hard to write, hard to maintain, and
|   + 69255 [Ephaeton@gm ] You're the chief but ... macros make it actually easier to read programs.
|   | + 69257 [batsman.geo@] Watch matz's presentation at LL2 for some real-life discussions on that :-)
|   | + 69304 [matz@ru y- a] cond in Lisp is not necessarily a macro.  It can be a syntax (or
|   + 69258 [rpav@nw in .] I wonder at this... Lisp has macros, and they don't make it harder
|     69262 [B.Candler@po] Perhaps because it is impossible to make Lisp harder to read :-))
|     69268 [rpav@nw in .] I knew someone was going to say that. :-( ;-)
+ 68923 [batsman.geo@] batsman@kodos:/tmp$ expand -t2 a.rb
  68928 [jim@fr ez .o] You could always compromise and ust

embedding ruby
68929 [emilie3012@n] Please forgive the following if answers appear elsewhere but I have
68972 [0bz63fz3m1qt] I had some trouble with extending a SWIG-class, it resulted
69091 [emilie3012@n] this thread carries on in 'embedding ruby with swig'

[BUG] unknown node type 0
68943 [fg@si me om ] [BUG] unknown node type 0
+ 68948 [matz@ru y- a] There are some reports like this from gcc 3.x users.  I'm not sure
| + 68958 [hgs@dm .a .u] I had problems on Solaris building 1.8.0 snapshots with less that
| | 68959 [matz@ru y- a] I'm using gcc 3.2.3 without any problem.  But I can't tell whether
| | 68970 [hgs@dm .a .u] Just to clarify: Is that really 3.2.*3*?
| | 68971 [batsman.geo@] I believe he's using the following
| | 68974 [hgs@dm .a .u] OIC.  Thanks.
| + 68981 [pbrannan@at ] FWIW, I'm using Ruby 1.6.8 compiled with gcc 3.2.1 and I don't see this
|   + 68986 [batsman.geo@] In my case Ruby 1.6.8 w/ GCC 3.2.1ds6-1.
|   + 69134 [fg@si me om ] Had that bug with Ruby 1.8.0 preview 2, or versions from CVS, compiled with
+ 69072 [child@t9 ds ] I had the same problem with several Ruby versions (1.6.7, 1.6.8,
  69083 [pbrannan@at ] Or perhaps your subconscious mind has learned how to write code that

Problems installing cvs ruby to user dir
68952 [invalid@in a] I am trying to install cvs ruby 1.8 to my home directory. I configure
68965 [tpeters@in a] Sound's like you have another ruby interpreter installed in
69037 [invalid@in a] <Pine.LNX.4.44.0304091141420.23810-100000@localhost.localdomain>, Tobias

Array.new returns nil
68960 [han.holl@pr ] Greetings,
68966 [0bz63fz3m1qt] I see you are inheiriting from Array, but you don't call super.
68991 [han.holl@pr ] I think ruby provides one if you omit it. Anyway I tried with

Hash table order
68961 [drejewic@ws ] => {}
+ 68962 [B.Candler@po] Hashes are unordered, by definition. A hash works by dividing the keys into
+ 68964 [bob.news@gm ] "Szymon Drejewicz" <drejewic@wsisiz.edu.pl> schrieb im Newsbeitrag

Re: Problem with TkOptionMenubutton
68963 [kero@ch ll .] Edit "kind_of" to become "kind_of?" and try again.

Simple Question
68967 [dwerder@gm .] my question is probably a little bit stupid, but anyway it would be nice if
68968 [emmanuel.tou] if
+ 68969 [dwerder@gm .] Thank you very much!
+ 68973 [dwerder@gm .] This works really fine with the normal ruby interpreter but unfortunately
  68983 [nemo@he lo r] This works really fine with the normal ruby interpreter but unfortunately

Investment Partnership.
68975 [nzanga_1@zw ] Nzanga Kuzulu Mobutu

Investment Partnership.
68976 [nzanga_1@zw ] Nzanga Kuzulu Mobutu
68978 [0bz63fz3m1qt] If I had 59 millions, I would rather spend 58 of them on the ruby project.
68990 [nedry@ma l. ] Now, that's dedication.  More than I have... I'll be sipping martinis on

[OT] Re: Investment Partnership.
68979 [batsman.geo@] Just don't invest in Rite, they want to get some returns soon ;-)
68982 [0bz63fz3m1qt] Would ruby stand stronger if it had some rich generous sponsers?
+ 68985 [peter@se an ] Deep suntans and a better appreciation of sushi?
+ 68992 [nobu.nokada@] 10 millions $ make the global variable table overflow.
+ 68997 [hal9000@hy e] I think the result would be beneficial.
| 68999 [0bz63fz3m1qt] Sorry, I am just a poor man. But if I had that amount of money.. damn.
+ 69021 [ptkwt@sh ll ] Are you volunteering?  ;-)

ANN: ri v1.8
68996 [dave@pr gp o] I'm releasing a very preliminary version of 'ri' for Ruby 1.8. This
+ 69002 [ian@ca ib n.] ri was already pretty comprehensive. Which are the new classes and, if
| 69003 [dave@pr gp o] ri was comprehensive for Ruby 1.6(.1) - the new one is comprehensive
| 69016 [michael_s_ca] I can't get the .tgz to expand on a windows box.  I d/l it twice
| + 69019 [lyle@us rs s] Despite the extension, it appears to be an uncompressed TAR file and not
| | 69023 [michael_s_ca] Of course.  Stupid me.  I even opened it up in emacs and saw plain
| + 69020 [hgs@dm .a .u] If you got it directly from that link on the page Dave gave, this is a
| + 69027 [dave@pr gp o] Try just untaring it (without the 'z'). I looks like something
+ 69042 [sroberts@un ] Is there any way to extend ri with my own libraries? I use it all the
  69046 [dave@pr gp o] That'll happen when the fabled rdoc/ri integration happens (sometime
  69176 [james_b@ne r] In the meantime, you might want to play around with Rimport, which
  69177 [ oct@zo .o g] James,

69000 [ahoward@fs .] please add to this as you see fit.

Re: ri v1.8
69001 [nemo@he lo r] `ri' was based on the pickaxe class reference, right?  Any chance of seeing
69005 [dave@pr gp o] Yes, and possibly. I produced this new ri by updating the PickAxe
+ 69009 [lyle@us rs s] Dave,
+ 69044 [xrfang@ho ma] I encountered a problem when install ri on my windows 2000 system.While
  + 69047 [dave@pr gp o] Hmm - I shouldn't be shipping the CVS directories in the first place,
  + 69053 [sdate@ev re ] I was able to install ri 1.8a on my Win 2K system.
    69107 [mikkelfj-ant] I haven't looked at this distribution, but one thing I am missing in ri 1.7
    69127 [dave@pr gp o] That's an interesting idea: I'll keep it in mind for the eventual

Proc Question
69004 [whitton@at a] As I was coding this morning, a question occured to me. Why must proc objects
+ 69006 [djberge@qw s] def square(n)
| 69010 [whitton@at a] Hmm.... you've got a point there. I guess adding this feature could break
+ 69007 [B.Candler@po] square(4) currently is a method call, i.e. self.square(4), or
+ 69008 [nemo@he lo r] def fiveSquared
  + 69028 [B.Candler@po] Well, there's a bit more to it than that really.
  | 69030 [nemo@he lo r] Well, there's a bit more to it than that really.
  | 69035 [B.Candler@po] I thought what you were highlighting was the difference between the syntax
  + 69062 [bob.news@gm ] "Chris Pine" <nemo@hellotree.com> schrieb im Newsbeitrag

I quote:  "Maybe IRB bug!!"
69012 [nemo@he lo r] Hmmm...
+ 69013 [nemo@he lo r] Uh... how do I kill a process if `kill <processID>' doesn't work?
| 69022 [mgarriss@ea ] kill -9 <processID>
+ 69024 [matz@ru y- a] irb does not support $SAFE>0.  It is restriction, not bug.
  69026 [nemo@he lo r] irb does not support $SAFE>0.  It is restriction, not bug.
  69039 [matz@ru y- a] Hmm, it seems like a bug.  Platform info please.
  69041 [nemo@he lo r] Hmm, it seems like a bug.  Platform info please.
  + 69055 [nobu.nokada@] All you need is typing EOF.  C-d on UNIX, C-z (and Enter) on
  + 69059 [matz@ru y- a] Try hitting ^D.
    69092 [nemo@he lo r] Try hitting ^D.
    69113 [matz@ru y- a] I told your issue to Keiju (the irb author).  He will take some

tutorial on embedding ruby (review)
69025 [0bz63fz3m1qt] What do you think about it ?
+ 69029 [lyle@us rs s] Simon, I have not had a chance to look over it yet, but I don't want you
+ 69034 [armin@xs .d ] Figure 3 alone is one reason to look at it.
  69036 [ptkwt@sh ll ] Figure 4 is pretty cool too.
  69048 [emilie3012@n] I'm in the middle of embedding ruby into a c++ project and read the
  + 69060 [batsman.geo@] It could happen but Ruby's GC is conservative, which means that it will
  | 69087 [emilie3012@n] Yes, I've learnt a lot in the last 12 hours! I read some of the
  + 69073 [0bz63fz3m1qt] You are lucky that you don't have to figure this out all over again :-)
  | + 69075 [0bz63fz3m1qt] I have added your comments into the document, now I
  | + 69325 [emilie3012@n] Thanks Simon,
  | | + 69330 [0bz63fz3m1qt] rb_require()  versus  rb_load()... what is the difference ?
  | | + 69350 [decoux@mo lo] You don't reference it : one use is when you don't want the the loaded
  | + 69329 [emilie3012@n] I hope this does not remove my last post
  | | 69332 [0bz63fz3m1qt] Which newsreader are you using ?
  | | 69333 [0bz63fz3m1qt] what is libdl ?
  | | 69426 [0bz63fz3m1qt] Does it work for you now ?
  | + 69331 [emilie3012@n] One other thing on the tutorial,
  + 69077 [tpeters@in a] Tobias
    69326 [emilie3012@n] I did. It was useful as far as it went. What it did'nt say was how the
    69351 [tpeters@in a] Thanks for the critique. I don't want to look it up in "Programming Ruby"
    69405 [emilie3012@n] Sorry, should have said it was very useful (as far as it went :-). My
    69416 [tpeters@in a] No, but see below. If you view it from the C side, Ruby objects are never
    69481 [emilie3012@n] Err....
    + 69488 [batsman.geo@] Gets GC'ed because v goes out of scope and there's thus no reference to
    + 69497 [tpeters@in a] v is a C variable on the stack and is of course removed when test()
      69560 [emilie3012@n] Thanks v much for reply. However, Mauricio (prev reply) says v
      + 69586 [0bz63fz3m1qt] I don't know.. but I would think it gets destroyed by GC.
      + 69588 [0bz63fz3m1qt] This is called lazy behaiver, only doing stuff when its really needed.
      + 69600 [batsman.geo@] I believe it will be GC'ed right away as it won't be marked in that
      + 69669 [t-peters@in ] Steve -- despite the hurry you are in, please discover that Mauricio and