178305-179989
178024-179984 subjects 178502-181499
^ [LAUGH] Proposal For New Ruby Mailing List Subjects
178305 [zedshaw zeds] Hey,
+ 178308 [ezmobius gma] LOL @ Zedas
+ 178310 [tsumeruby ts] HeHe
| 178312 [james_b neur] We also need
+ 178322 [l.d.u.n.c.a.] I was so disappointed when I read this last paragraph.
+ 178325 [shortcutter ] Well done, Zed! But I couldn't decide which list to be on. Could you
+ 178577 [david vallne] I *so* want the sellouts list. One of these days, I'll get serious mental
^ Ruby Syntax: 'initialize' versus 'init'
178307 [checketts gm] While programming with Ruby, I've grown to love just how clear and concise
+ 178311 [james_b neur] I suspect people call to_* more often than they call initialize.
+ 178318 [gmurray clou] There is a difference in wrapping to interface to C
+ 178321 [matz ruby-la] It can be very critical when the name of initializing method conflicts
^ Debian, gem(?) , and libraries
178319 [furufuru ccs] I'm using Ruby on Debian GNU/Linux. Ruby itself
+ 178335 [mtrier gmail] RubyGems is a separate packaging system that doesn't cause any
| 178338 [stefan mahli] What is in your sources.list - the package doesn't show up.
| 178348 [kasten.m gmx] deb http://www.sgtpepper.net/hyspro/deb unstable/ #rubygems
| 178695 [mtrier gmail] That's where I got it as well
+ 178337 [stefan mahli] I'm using gems on Ubuntu (and were using it on debian as well).
+ 178367 [ruby anthrop] } Hello all,
178498 [furufuru ccs] Thank you all who responded.
+ 178524 [jim weirichh] RubyGems only works for software explicitly packaged as gems. Although
+ 178573 [otanuki gmai] I pretty much don't like Debian's packages for ruby.
+ 178667 [furufuru ccs] [. . .]
^ I Broke Ruby (i.e. Missing the Brutally Obvious)
178324 [mjudge surve] It's been yet another late Friday. It's practically a lifestyle by this
178329 [g_ogata optu] Because it hasn't been defined when "class B < A" is evaluated.
178558 [mjudge surve] Thanks for your help, George. That's really interesting how the ruby
^ Fixnum#to_a
178326 [levin grunde] class Fixnum def to_a(base=10,min_length=0) self.to_s(base).rjust(min_length).split(//).map { |c| c.to_i(base) } end end
178352 [chneukirchen] It should be twos-complement for negative numbers, of course. ;-)
+ 178354 [levin grunde] 12345.encode(10) #=> [5,4,3,2,1]
+ 178358 [chneukirchen] For fun, an implementation of encode/decode.
+ 178376 [hhausman gma] Happy hacking indeed!
+ 178378 [levin grunde] T24gMi80LzA2LCBDaHJpc3RpYW4gTmV1a2lyY2hlbiA8Y2huZXVraXJjaGVuQGdtYWlsLmNvbT4g
^ [RubyCocoa] setting the items of an³¯SPopUpButton programmatically
178327 [pere.noel la] i'm starting within RubyCocoa, although i've been using Cocoa-Java, i
179330 [groups grand] That'd be because (as far as I can tell) it doesn't have an "addItem"
179368 [pere.noel la] fine, thanks, i didn't notice the "s" in "removeAllItems", i have to
^ how to vary sort's block?
178331 [wybo servaly] When I have an array of objects (Thing's, say) with two properties (say
+ 178347 [bob.news gmx] The easiest is probably to use sort_by.
| 178355 [wybo servaly] this does not allow for more complex sorts, like on name *and* amount,
| 178370 [bob.news gmx] "Wybo Dekker" <wybo@servalys.nl> schrieb im Newsbeitrag
+ 178350 [rossrt rosco] orders = {
+ 178371 [james graypr] #!/usr/bin/ruby
178488 [wybo servaly] Thanks all for the very valuable explanations and suggestions.
178571 [mark mwilden] Agreed. C# is the same.
^ Extract hash into local variables?
178332 [cool_screen_] Is there a Ruby function similar to PHP's extract/list? What I'd like to
+ 178340 [bruno.celest] Maybe args.inspect
+ 178345 [bob.news gmx] You cannot do that as local variables have to be declared in the code.
| 178353 [gene.tani gm] Robert's correct in the general case, but you can read a hash and have
+ 178377 [bauer.mail g] args.each_pair { |k, v| instance_variable_set("@#{k}", v) }
| 178379 [bauer.mail g] Duh... yea, should have read the previously posted link,
+ 178380 [jeff schwabc] I'm kind of disturbed by how hard this actually seems. There does not
+ 178381 [bob.news gmx] Very weak. This is by no means thread safe. Also it will keep references to
| 178385 [jeff schwabc] Of course not. But some code is a lot cleaner if you can use the local
| + 178406 [shortcutter ] Ruby != Perl && Ruby != Python
| + 178433 [gene.tani gm] I think on this specific point you're wrong about python. Writing to
| | 178438 [gene.tani gm] it's here too
| + 178472 [chneukirchen] If that's true, consider it a good reason *not to*. ;-)
| + 178483 [jim weirichh] It may be common in Perl, but it is just as misguided there as well.
+ 178384 [cool_screen_] def extract(hash)
178388 [cool_screen_] def foo(args = {'a'=>1, 'b'=>2, 'c'=>3})
178402 [rosco roscop] Careful with that, I think hash order is undefined?
^ How to use Ruby interpreter as Windows DLL library?
178341 [sunexdev mai] I have an idea (program, that uses Ruby interpreter). And I dont know
+ 178342 [sunexdev mai] Oh... Calling from C/C++... Windows XP platform.
| 178374 [deanwampler ] I don't know if this helps, but RubyScript2Exe
+ 178389 [billk cts.co] Here's some very basic code to load and run a ruby script from C/C++
178391 [sunexdev mai] Thanks a lot for your way!!! Thanks! Thanks! Thanks! =)
^ rcrarchive broken?
178346 [bob.news gmx] Application error (Rails)
178356 [dblack wobbl] Whoops. Let me check. (I'm in London but at least intermittently
178357 [dblack wobbl] OK, the MySQL daemon had died for some reason. It should be OK now.
^ [OT] Re: Ruby Syntax: 'initialize' versus 'init'
178349 [chneukirchen] Did the T object system influence the design of the Ruby object system?
178365 [matz ruby-la] No. I've heard it was pretty interesting but I didn't have any chance
178471 [chneukirchen] It's very lightweight and almost trivial. In fact, I once ported it
^ install mysql-ruby on RHEL
178361 [richard d2p.] Howdy,
+ 178363 [oliver.andri] I just packaged mysql-ruby for Fedora Core and in my SPEC file I use
| 178366 [richard d2p.] Thanks, Oliver.
| 178372 [oliver.andri] I just checked on my RHEL boxes, and even your method to compile the
| 178383 [richard d2p.] Hey Oliver,
| 178453 [logancapaldo] Speaking totally out of my rear end here, but it looks like A) its
| + 178458 [richard d2p.] Good call, Logan.
| | 178670 [logancapaldo] charset=US-ASCII;
| | 178696 [richard d2p.] Success! I spent most of the weekend and today coming back from a
| + 178582 [otanuki gmai] That's right, in Debian you need mysqlclient-dev (or whatever was the
+ 178369 [ dez mac.com] I don't know what is wrong in your case. However, in my case, I
^ Problem with weak references on OS X 10.3
178364 [vikkous gmai] I am having problems with weak references. The program below exhibits
+ 178373 [bob.news gmx] I'm a bit confused: where are the WeakReferences your subject mentions?
| 178387 [vikkous gmai] The call to __id__ creates the weak reference. Anyway, I consider it a
| 178410 [shortcutter ] You're right - I don't. Object#__id__ returns an object id.
| 178460 [vikkous gmai] It happens running it with plain ruby (no irb) on my ruby 1.8 (and
| 178465 [bob.news gmx] format=flowed;
| 178588 [logancapaldo] charset=US-ASCII;
+ 178470 [chneukirchen] o=#<Object:0x1d421c>, i=ea10e, o2=:reject, n=448 (RuntimeError)
+ 178477 [bob.news gmx] Wow! Does it exhibit the same behavior with #object_id instead of #__id__?
+ 178486 [ mfp acm.org] 0x1d421c.to_s(2) # => "111010100001000011100"
^ one click installer + gems
178375 [pihentagy gm] It was expected, that as of 1.8.4, ruby networking works on windows.
178386 [ml.chibbs gm] I don't have any problem.
+ 178394 [pihentagy gm] No error message.
+ 178413 [pihentagy gm] cannot ping gems.rubyforge.org
178426 [ml.chibbs gm] How can you say your internet connection is ok when you can't get to
+ 178428 [ mfp acm.org] I think he was hinting that the problem lies in Ruby's TCPSocket...
| 178435 [pihentagy gm] I've read that 6 month old post, but don't know what to do.
+ 178569 [pihentagy gm] I can of course connect to google with other methods...
^ Quiz #65, Principle of Great Surprise, and Array.delete sledgehammer
178392 [groups grand] I thought I was actually going to enter my first RubyQuiz, but I've
+ 178395 [levin grunde] class Array def without_one(elem) new = self.dup # make a copy so that the original is not changed new.delete_at(new.index(elem)) new end end
+ 178396 [james graypr] I was just wanting this method yesterday, and not for the first
| 178408 [groups grand] Wouldn't delete_first still ought to return "_obj_ or nil"?
| 178412 [james graypr] Good point. You are probably right.
+ 178397 [wilsonb gmai] class Array
| + 178403 [levin grunde] class Enumerable def delete_one_of(obj) self.inject([],false) { |(arr, already_deleted), elem| arr << elem unless elem == obj and not already_deleted already_deleted = true if elem == obj [arr, already_deleted] }[0] endend
| + 178417 [groups grand] You are, but it isn't. I might well have "nil" as a legitimate item in
| 178434 [wilsonb gmai] class Array
+ 178398 [ara.t.howard] class Array
| 178419 [groups grand] This is just a list of many other ways to not do what I want, yes?
| 178448 [ara.t.howard] class Array
| 178480 [SimonKroeger] Well, i don't think it's 'amazingly bad'. Array#- doesn't raise an error
| 178519 [ara.t.howard] good points all. i can only guess
| 178570 [groups grand] I think you're confusing "failure" with something else. If I ask a
+ 178400 [logancapaldo] require 'enumerator'
| 178407 [groups grand] Aha!
+ 178404 [SimonKroeger] You obviously know how to code such a method yourself and i can't answer
| 178405 [groups grand] class Array
| 178456 [adam.shelly ] I ran into that problem too when I was coding the quiz.
+ 178468 [w_a_x_man ya] This may not be of any use to you, but here's a way to delete all
+ 178489 [pdeuster gmx] class Array
+ 178510 [james graypr] Array.uniq!
178542 [w_a_x_man ya] irb(main):008:0> a=[1,1,2,2,3,3]
^ built-in vs. standard library
178393 [r.mark.volkm] I'm confused about whether the Date class is built-in or in the
178399 [james graypr] It's a standard library.
+ 178401 [wilsonb gmai] irb(main):001:0> Date.methods(false)
+ 178425 [r.mark.volkm] Then why does this code run?
+ 178430 [rosco roscop] Just curious, what is your output from this code?
| 178436 [r.mark.volkm] I get
+ 178431 [desmarm gmai] I wonder if you might have required rubygems at some point. Sifting
178439 [r.mark.volkm] Good suggestion! I tried that and I see that "rubygems.rb" is being
+ 178444 [desmarm gmai] Very odd. I noticed that earlier in the thread that you said that you
| 178446 [r.mark.volkm] Oops! You can color me red. I do have RUBYOPT set and it's set to
+ 178450 [james_b neur] Because I run rdoc over the base set of lib files.
^ optional yield -- was Re: Quiz #65, Principle of Great Surprise, and Array.delete sledgehammer
178409 [vjoel path.b] def one_two_three
^ What is YARV?
178411 [narf968 gmai] I see it's a VM for Ruby, but what does that mean and what is it good
+ 178432 [wilsonb gmai] ...
+ 178557 [david vallne] Put shortly, it's a Rubyists (for given values of Rubyist, notably including
^ rubyforge down?
178414 [ezmobius gma] I can't get to rubyforge at all today. Is it down for a reason or is
+ 178427 [gregory.t.br] no problems here
+ 178442 [tom infoethe] Yours,
^ libnet binding for ruby
178415 [dave davewki] I was hoping to be able to build raw packets in ruby. I've found and
178420 [vjoel path.b] I don't know libnet (except what I just read on the website) but if you
^ Scanning a string for decimal numbers
178416 [jeppe88 gmai] divided into 2 numbers.
+ 178421 [ksruby gmail] "24,4 + 55,2".scan /[\d,]+/
| 178424 [erne powerna] try
| 178449 [ara.t.howard] careful. you'll kill negatives.
+ 178473 [acangiano gm] a.scan /[-+]?[0-9]*\,?[0-9]+/
| + 178475 [acangiano gm] Or to be less verbose you can use \d in place of [0-9] :-)
| | 178478 [fxn hashref.] If you have Perl installed, the incantation
| + 179429 [ jupp gmx.de] Shouldn't that rather be the following?
| 179433 [jeppe88 gmai] Scanning a string for decimal numbers
| 179774 [ jupp gmx.de] [-+]?([1-9]\d*(\,[0-9]+)?)|(0(\,[0-9]+)?)
| 179895 [jeppe88 gmai] Scanning a string for decimal numbers
| 179905 [david vallne] That's a positive zero-width lookahead. I think. Gotta love regexspeak.
| 179989 [bob.news gmx] These is equivalent (?=\D)
+ 179436 [wilsonb gmai] This should handle periods or commas as the separator.
+ 179437 [jeppe88 gmai] Scanning a string for decimal numbers
+ 179445 [mail koffein] - signs are disregarded ("-24,4" becomes "24,4")
179451 [jeppe88 gmai] Scanning a string for decimal numbers
179452 [jeppe88 gmai] Scanning a string for decimal numbers
179456 [wilsonb gmai] Well, that's what I get for dashing off a quick e-mail before dinner.
179548 [jeppe88 gmai] Yes that worked, but I intend to convert the digits of my array to floats,
179579 [wilsonb gmai] digits[0] is an Array containing '24.4'.
179582 [jeppe88 gmai] /[-+]?\d+\.?\d+/
179587 [wilsonb gmai] Yes, as long as the numbers are always at least two digits.
^ Help with print cgi.header(
178418 [erne powerna] I'm trying to set a cookie using Apache on RHFedora core3 and Ruby CGI
^ RubyForge network problems
178423 [tom infoethe] We're experiencing some network problems upstream from RubyForge.
^ ruby-mode in emacs
178429 [h.dunnil gma] I'm new to emacs, just bought a book and started my way into it.
178437 [rubikitch ru] Do you complete Ruby tokens like emacs-lisp?
179973 [jussij zeuse] FWIW the Zeus for Windows IDE provides seamless integration
^ continuation
178440 [uval rz.uni-] irb(main):005:0* cnt=0
+ 178443 [rosco roscop] I've found that certain things like continuations don't work well under
+ 178445 [angus quovad] [Sche Daniel <uval@rz.uni-karlsruhe.de>, 2006-02-05 01.58 CET]
^ define_method with a &block?
178441 [pan erikveen] In the code below, I want test2 to receive a block, like test1,
178455 [ara.t.howard] class Test
178459 [vjoel path.b] module_eval do
178476 [pan erikveen] The problem is that, in my situation, the name of the method
+ 178516 [ara.t.howard] i'm having a hard time imagining a case where only the name of the method
| 178536 [pan erikveen] I've got a couple of cases where I want to wrap a method in a
+ 178541 [vjoel path.b] class A
^ POP email with SSL
178447 [r.mark.volkm] Can someone point me to an example of reading email from a server
178451 [james_b neur] I *think* the ruby gmail library (see rubyforge, if it's up) does this.
178462 [linguist gma] I believe that the gmail lib uses net/https for doing its work. I don't
178467 [sgentle gmai] I was trying to do a similar thing a while back, and found someone
^ [ANN] gonzui-emacs-0.3
178454 [rubikitch ru] == Abstract
^ DBI::ADO and image (binary) types
178457 [Brondoman gm] Anyone know how I can insert a binary file into an image field in SQL
^ tar2rubyscript/rubyscript2exe
178463 [kilivor hotm] I have been using tar2rubyscript and rubyscript2exe with FXRuby and it
179676 [rubyforum er] file = File.open(oldlocation("test.txt"), "w")
^ Continuations and GC
178466 [lerno dragon] I have problems getting things GC:ed properly when using
^ REXML::Parent#index does not return nil
178482 [noriyuki.tak] This is my first posting to ruby-talk.
^ Re: Indentation vs. "end"s [SPAM]
178490 [david vallne] The irony is UNBEARABLE, I tell ya...
^ Ruby feature request - enum.detect_index
178495 [j Tippell.co] I'd like to propose a new addition to the enum module.
+ 178497 [levin grunde] require 'enumerator' [1,2,3,4,5,6].to_enum(:each_with_index).detect {|elem, index| elem== 4} #=> [4,3]
+ 178500 [matz ruby-la] Nice idea. I'd rather name it 'find_index' though.
| 178506 [bob.news gmx] Don't we have that already?
| 178508 [james graypr] You can not use a block of Ruby code to select the item you would
| 178514 [bob.news gmx] Good point. In that case I'd just change the implementation of #index to
+ 178503 [rosco roscop] For this case, this might work?
178507 [matz ruby-la] It does so in 1.9.
+ 178513 [rosco roscop] Cool, so it does :) I need to update my snapshot more often I guess ...
+ 178517 [j Tippell.co] Ah! in that case my detect_index suggestion was rather unnecessary
threads.html
top