39799-40552
39584-40176 subjects 39920-41815
More erratum 2 in "Teach Yourself Ruby in 21 Days"
39799 [jzakiya@ma l] Chapter 12
+ 39802 [ms@ia ta e. ] Yes, we had this one. (see http://www.ruby-lang.org/~slagell/misprints.html)
+ 39805 [philip@dy as] I'm sorry to say, but this is correct :)
Ruby/GTK with no window movement updates
39808 [fjm_maillist] I'm just starting to play around with Ruby, especially with it's
39825 [jeremy@ch os] Frank,
39926 [fjm_maillist] I figured something was going on like that, but don't know enough about how
39932 [nobu.nokada@] Oops, it's X's or kernel's issue, perhaps.
'Ultimate' FreeRIDE ?
39809 [xlucid@us rs] [Note: This is a post to the FreeRIDE developers mailing list, which I have
+ 39832 [Steve.Merric] Euan Eye, surely? ;-)
| 39851 [hal9000@hy e] Ha ha... that depends on context, Steve...
+ 39871 [llothar@we .] Its the same goals as ArachnoRuby*, which will be released in the
39875 [alan@di ik t] Will ArachnoRuby be Open Source?
39880 [rich@in oe h] And free?
39888 [llothar@we .] No the price will be the same as for the other Scripting/Python IDEs.
39908 [tobiasreif@p] It could be released as Free Software (GPL), and you still could charge
+ 39925 [llothar@we .] Sorry most companies showed that this is not a good idea.
+ 39953 [xlucid@us rs] I doubt this in practice.
+ 39959 [pate@ey er a] This only seems to work where there is a perceived benefit to the user in
+ 39969 [dossy@pa op ] You don't make a living selling development tools, GPL'ed or otherwise.
raf update [ruby applications finder]
39813 [lafor@ar ak ] while Raa.succ arrives, I remember you the existence of raf
39929 [stewartNO@SP] I notice that under Mozilla 0.98 in Linux, you can follow links
39933 [cameron@cw u] Yeah, I am pretty sure its due to the way JavaScript is calling things.
Execute .rb file in Ruby path
39820 [home@cl bs o] If I install myscript in a sitever sub-directory called mystuff, I can
39823 [matz@ru y- a] ruby -r mystuff/myscript.rb -e 0
[Q] non-alphabetic character in symbol
39821 [kwatch@ly os] I have a question.
39824 [matz@ru y- a] Yes. Minero Aoki once proposed % notation for symbols, but consensus
+ 39866 [kwatch@ly os] Thanks matz,
| 39883 [matz@ru y- a] If you call intern everytime, hash['+symbol'] (1 hash ref) is faster
| 39924 [kwatch@ly os] Oh, I understand clearly.
| 39956 [matz@ru y- a] Yes. It's defined in st.c
+ 39890 [nobu.nokada@] Have these been proposed already?
39893 [aamine@mx ed] It's not me but Hiroshi Igarashi.
39910 [nobu.nokada@] I guessed it equals "aa\#{str}bb".intern, it accepts only
39915 [jean_hugues_] either :A_WORD[:]
39918 [nobu.nokada@] I guess it's not good for ::WhatEver:, because of parser's
39922 [jean_hugues_] Well... :\:Whatever: (and also :\\Whatever: for that matter). Seems
39927 [nobu.nokada@] Also it may change meanings of foo?:Foo:bar, not?
39935 [jean_hugues_] Yes, that construct could generate an error because foo ? :Foo: bar is
RE: [FR-devel] 'Ultimate' FreeRIDE ?
39822 [curt@hi bs c] [snip, lots of good stuff]
How-to Cc when using Net/SMTP?
39829 [herman_graal] How can I CC when sending emails with Net/SMTP?
39842 [decoux@mo lo] You need to add the address 'some_adress@some_host.com' when you call
require variants
39830 [tsiivola@cc ] Regarding the recent dicussion of having require "dir" recursively require
39840 [pbrannan@at ] Handling these would be nontrivial. I think a better solution is to
Why is this a SyntaxError ?
39834 [David.Morian] class A
39836 [dsafari@xt a] I would gather that the << is not being bound to the object a. The following
Is the FXGIFCursor available on FXRuby ?
39841 [dmg@tr gs te] I am trying to use the FXGIFCursor primitive, but I receive
+ 39844 [jlj@cf rc co] FXGIFCursor is available to FXRuby (I don't know why you'd get the message
| 39891 [nobu.nokada@] Perhaps, David might write like FXGIFCursor(...) instead of
| + 39897 [daniel@ze ed] He's right. I've done that many times.
| + 39936 [jlj@cf rc co] Yes, I didn't think of that. As a recovering Python programmer I sometimes
+ 39847 [jlj@cf rc co] OK, more information after some debugging. I did find that it's important to
[ANN] QuantLib-Ruby 0.3.0
39843 [ballabio@ma ] QuantLib-Ruby 0.3.0
ruby in cocoon's XSP
39850 [fewayne@fa s] i just googled this idea with little result, but wanted to ping y'all
begin ... rescue WinSuxx; trow RubySuxx; end
39852 [kgergely@ml ] I have again and again problems with sockets and select.
RegExp: using $& in 2nd gsub argument
39853 [chris.morris] "test\n (he\nllo) \nhey".gsub(/\((.*\n.*)\)/, $&.gsub("\n", ''))
39854 [gotoken@no w] Move the second argument to inside of block, i.e.,
gets and eof?
39856 [pbrannan@at ] I have a program that reads input from a socket and displays output on
+ 39857 [wconrad@ya n] I can't answer your actual question, but I know that gets seems to
+ 39859 [dossy@pa op ] In the code shown, gets will read up to the line seperator which comes
+ 39930 [kwatch@ly os] .============================ prog1.rb ==
39937 [decoux@mo lo] ruby use an active model (is EOF waiting at the stream) rather than a
39996 [kwatch@ly os] I tried another program.
40006 [decoux@mo lo] To know if the stream is at EOF ruby try to read from this stream.
[ANN] JTTui 0.11.0 - textmode user interface
39865 [j.travnik@sh] new version of JTTui has been released.
Ruby in Mac OS X 10.2
39867 [gehlker@fa t] I just heard that Apple has announced that ruby will be pre-installed in the
+ 39872 [rich@in oe h] Article link
| 39884 [chris@cm -e ] Womder if there's any chance of Ruby coming with the 10.2 Dev Tools.
+ 39904 [ptkwt@sh ll ] Where did you hear this?
39941 [gehlker@fa t] Email from a friend at the conference. Now there is an article link.
Want application to read file or from pipe
39868 [jim@fr ez .o] Does anyone have a sample application that can read
+ 39869 [wconrad@ya n] wconrad@pluto:~/foo$ cat foo.rb
+ 39870 [tim@ve et .a] $ cat filter.rb
39873 [jim@fr ez .o] Close, but I am looking for something without the
+ 39874 [wconrad@ya n] Jim, I'm confused. I thought my little example did it all. Let me
| 39877 [ian@ca ib n.] The only change I'd make here is to substitute ARGF for $<, since it's
| 39879 [wconrad@ya n] Agreed.
+ 39876 [dossy@pa op ] $ ruby -pe '' filename.txt
+ 39878 [tim@ve et .a] Very well. To slurp an entire file into memory all at once, just use the
print to cgi error log
39882 [brian@ww .c ] I'm stuck on a silly question. How do I print to the httpd error log
+ 39885 [ian@ca ib n.] Use '$stderr.puts' to get a new-line at the end of your string. You
| 39892 [brian@ww .c ] I tried $stderr.flush() with no change. This is a bit frustrating! Do
| + 39894 [Dave@Pr gm t] $stderr.puts "Wombat"
| + 39913 [mfp@cs mu OZ] "The Ruby Way" has a fair chunk on CGI (pp. 452-473 approx.) It deals
+ 39895 [sean@ch tt n] Are you under mod_ruby? -sc
Thread#join doesn't accept a timeout?
39887 [dossy@pa op ] In trying to port JUnitPerf (which supplies nice test
+ 39889 [rick@ri kb a] Yes.
| 39947 [dossy@pa op ] Rick,
| 39949 [pate@ey er a] I think too many people wait for code to be perfect before sending it out.
| 39967 [dossy@pa op ] Thanks for the positive encouragement! It's motivated me to
+ 39900 [matz@ru y- a] Interesting. Should it be an RCR?
| 39903 [ptkwt@sh ll ] Yes. It looks good, though I have to admit that I didn't see the original
| 39912 [jean_hugues_] I guess timeout should be in seconds, as in sleep(), shouldn't it ?
| 39917 [nobu.nokada@] Agreed. And also in IO.select.
| 39923 [dossy@pa op ] But, it still gives millisecond precision, right?
| 39942 [nobu.nokada@] Yes, with Float.
| + 39945 [dossy@pa op ] Hmm. Still doesn't help me much with regard to mswin32 unless
| | 39946 [nobu.nokada@] Or you may try timeout.rb.
| | 39948 [dossy@pa op ] Excellent suggestion. I was just trying to avoid creating
| | 39976 [nobu.nokada@] I added thread.rb to Ruby Shim, so you can use it in 1.6 too.
| + 39960 [matz@ru y- a] OK, please commit.
+ 39961 [nathaniel@ta] Are the threads critical, or could you use the timeout extension?
39968 [dossy@pa op ] I did try using the timeout extension, but this just doesn't
39970 [nathaniel@ta] The timeout call should block until the send either finishes, or passes
It's an apache issue (Re: print to cgi error log)
39896 [brian@ww .c ] I just tried the same in a test file. No luck. Out of curiosity, I
cgi params api
39898 [patrick-may@] One thing that I don't like is the way cgi forces you to treat every
+ 39901 [brian@ww .c ] Since I'm bumping my head against that multiple stuff as I type this,
| 39911 [jean_hugues_] That would be nice. However I don't understand how it works.
| 39943 [patrick-may@] You stick the multiple method on the object stored in the params hash.
+ 39902 [djkea2@mu ca] Although I'm only a very casual user of cgi.rb ... me too.
| 39951 [patrick-may@] Well, I'd first maintain a patched version of cgi.rb. If it ever
+ 39954 [dblack@ca dl] I'm wondering whether there's a nicer name than "multiple" for this --
+ 39962 [wakou@fs ne ] cgi.rb has undocumented method "CGI#param".
39985 [patrick-may@] This looks better than my suggestion. I like that you make the single
+ 39987 [sean@ch tt n] Before these cgi param threads get too far down whatever path they're
| 39999 [patrick-may@] the single arg is the common case -- instead of cgi['key'].to_s all
+ 40032 [patrick-may@] I just noticed that :to_a conflicts with Enumerable.to_a, which String
40037 [jean_hugues_] cgi["name"].values ?
40049 [wakou@fs ne ] cgi["name"] # ==> "value"
40052 [jean_hugues_] Yes ! That works. I learned it recently ! You basically
40073 [wakou@fs ne ] cgi["name"].values
40077 [jean_hugues_] Well... I was comparing .values() versus .multiple()...
40086 [wakou@fs ne ] yes,
40137 [patrick-may@] I feel like I like values better, since it emphasizes the plural more
40139 [sean@ch tt n] Let me bounce this over from IRC. This isn't exactly the nicest
+ 40140 [patrick-may@] First of all, sorry I posted my reply to the list in a wierd spot. These
| 40145 [dossy@pa op ] cgi['key'].to_a.each { | value | ... }
| 40175 [patrick-may@] True, except that :to_a conflicts with the :to_a that String mixes in
+ 40144 [dossy@pa op ] My two cents?
+ 40148 [dblack@ca dl] "to_a", to_me, suggests something being converted to an array. That's
| + 40153 [wakou@fs ne ] $/ = "\0"
| | 40155 [dblack@ca dl] An array seems to me like a more natural container for multiple values
| | + 40161 [wakou@fs ne ] and,
| | | + 40169 [wakou@fs ne ] ??? size is unnecessary.
| | | + 40178 [patrick-may@] cgi["name"].values is better than cgi["name"].to_a, because of the
| | | 40190 [wakou@fs ne ] Enumerable depends on each(). to_a() is defined with each().
| | + 40177 [patrick-may@] Array is the more natural container for multiple values than a string.
| | 40193 [dblack@ca dl] My point, though, was that although "val1\0val2\0val3" is a single
| + 40159 [dossy@pa op ] I'm saying that 'val1' == 'val1' and that 'val1'.to_a == ['val1']
| + 40162 [wakou@fs ne ] if cgi["name"] return "val1" ... maybe I don't notice "val2"
| | 40191 [dossy@pa op ] True, but in the Ruby idiom, cgi["name"] ought to return a
| | 40194 [dblack@ca dl] Do you mean the CGI idiom? In Ruby, a hash value can be (and often
| | + 40195 [dblack@ca dl] Well, that was stated very narrowly, since it really isn't a Hash
| | + 40197 [dossy@pa op ] Sorry, it's 7:50 AM and I'm still in the "playing with my two
| | 40198 [dblack@ca dl] I'm in "about-to-drive-50-minutes-in-the-rain-to-graduation" mode,
| | 40203 [dossy@pa op ] Heh. I just realized that you're at SHU -- another New Jerseyean!
| | + 40207 [wakou@fs ne ] Oh, yes! It is important what a class of cgi['foo'] is.
| | + 40209 [Dave@Pr gm t] How can this be? You show cgi['foo'] as a String in your first case.
| | | 40222 [dossy@pa op ] I was wrong. :-) I didn't mean for it to be a String. I'm a big
| | | 40228 [wakou@fs ne ] not good?
| | | 40229 [dossy@pa op ] Good point.
| | | 40250 [wakou@fs ne ] I thought so, too. but, is CGI::Param necessary?
| | | 40291 [dossy@pa op ] Yes.
| | | + 40305 [dblack@ca dl] But see above...
| | | | 40309 [dossy@pa op ] cgi["key"] could only returns a String if there's only one value
| | | | 40310 [dblack@ca dl] But according to Wakou's proposal, cgi["name"] would always return the
| | | | 40312 [dossy@pa op ] Ah, but the problem is what if the "name" param has multiple
| | | | 40378 [patrick-may@] I agree that multiple forks would give us a chance to sort the more
| | | + 40322 [wakou@fs ne ] class CGI
| | | + 40325 [dossy@pa op ] Wakou,
| | | | 40331 [wakou@fs ne ] Oh, self.replace is not so good, maybe super() is better.
| | | | 40335 [dossy@pa op ] Oh, duh. I forgot String mixes in Enumerable. Thanks.
| | | | 40338 [sean@BU BY S] Random idea. Why not push all the CGI values into a REXML Document or
| | | | 40403 [wakou@fs ne ] one of reason, Ruby has no bundled XML libraries.
| | | + 40328 [dblack@ca dl] Personally I don't like it: it still feels to me like #to_a (on what
| | | | + 40332 [wakou@fs ne ] yes, This is a very difficult problem.
| | | | | 40336 [dossy@pa op ] This is my preferred idiom, personally. I don't know about
| | | | | 40377 [patrick-may@] even if you aren't looking for multiple params?
| | | | | 40387 [dossy@pa op ] Yes. Because this way the code works if there's only one value
| | | | | 40389 [dblack@ca dl] You could define your #[] to return an empty array instead of nil
| | | | | 40390 [dossy@pa op ] Given the parameters: foo=bar&quux=
| | | | | 40394 [dblack@ca dl] I was responding to the [0] point quoted above, specifically the
| | | | | + 40398 [dossy@pa op ] Right, and as I said, defining #[] to return [] instead of nil
| | | | | | 40401 [michael_s_ca] Is that important? If so, conceptually or pragmatically?
| | | | | | 40404 [dossy@pa op ] Conceptually, so far. I haven't come across any good examples
| | | | | | 40405 [michael_s_ca] You see where I'm going with this train of thought, I'm sure.
| | | | | | 40425 [dossy@pa op ] Cool! Are you lucky enough to get paid to do Ruby, or just here
| | | | | | 40487 [patrick-may@] I am paid to write software in Ruby. My suggestions for the cgi api
| | | | | | 40488 [dossy@pa op ] Writing web apps in Ruby? What's the size of the application, would
| | | | | | 40552 [patrick-may@] My current project is ~ 87k of ruby sources, though I'd love to see
| | | | | + 40456 [patrick-may@] + cgi["key"] returns multiple values, which is not the most useful
| | | | | | 40510 [wakou@fs ne ] ok, I think that it is good.
| | | | | + 40518 [jonathan@in ] Comments at the end...
| | | | | 40523 [dblack@ca dl] I'm not sure what you mean about thinking of them "as objects". As
| | | | + 40334 [dossy@pa op ] You're not dealing with a string. You're dealing with a Param,
| | | | + 40341 [dblack@ca dl] Right, but what I'm saying is that this Param on which I'm remarking
| | | | + 40379 [patrick-may@] Mixin CGI::Param instead of subclassing String, don't walk over any
| | | | 40386 [dossy@pa op ] Please explain, using executable Ruby code, how you would mix-in
| | | + 40344 [patrick-may@] This way, the api still works for file uploads / multipart forms.
| | | + 40351 [matz@ru y- a] Unless you really really seek compatibility, faking something behave
| | | 40402 [wakou@fs ne ] I like, values is an Array object. because,
| | | 40489 [patrick-may@] This makes the most sense. It solves the problem from my initial
| | + 40252 [sean@ru y- a] Perl is the wantarray() function.
| | 40290 [dossy@pa op ] Yes! This is definitely wantarray envy. I've just spent the last
| + 40164 [dblack@ca dl] So, if p['name'] returns 'val1', then the object on which you're
| 40196 [dossy@pa op ] Ah, I see the problem now. p['name'] would return some kind
+ 40151 [jean_hugues_] p['name'] >> 'valA'
Does the FXGIFCursor draw only in B&W ?
39906 [dmg@tr gs te] I am trying to use the setDragCursor method on a FXCanvas, but the
39938 [jlj@cf rc co] [I'm going to also try to post this message to the
xemacs & mode-ruby.el, broken ?
39914 [jean_hugues_] I added an autoload in my .xemacs/custom.el and that apparently works.
xemacs & mode-ruby.el, broken ?
39916 [jean_hugues_] Apparently there is a problem with both " and ' inside
39919 [nobu.nokada@] You mean font-lock-mode issue? Then it's known but hard to
39921 [jean_hugues_] Thanks. I am still having difficulties with syntax highlighting
39944 [nobu.nokada@] Concretely, in what case?
40011 [jean_hugues_] When I open a Ruby file, it is displayed with some coloring, very little.
40013 [Dave@Pr gm t] I found that with XEmacs I have to add a (load "font-lock") to the
40014 [nobu.nokada@] Fontifying codes are surrounded by (cond ((featurep 'font-lock))).
threads.html
top