209422-210280

209201-328501 subjects 209585-413123

{} as record separators?
209422 [punkrockgeek] I'm working on a ruby script to read Nagios's status.dat and output it's
+ 209439 [yu.ching.tie] ** first try **
+ 209441 [bauer.mail@g] def nagios_data(data)
| 209442 [punkrockgeek] nagios_test2.rb:10:in `nagios_data': undefined method `intern' for
+ 209444 [punkrockgeek] So this code actually works. It reads through my key=value pairs just
+ 209445 [johnatl@ma .] Bob,
  209901 [johnatl@ma .] So, did it work?
  209948 [punkrockgeek] Actually, I was just working on debugging this error that the script
  210044 [johnatl@ma .] Hm, probably a ' in the dumped data.

Initializing $LOAD_PATH manually? (embedding ruby)
209434 [dharple@ge e] I am embedding ruby in an application and shipping it with app as
209438 [dharple@ge e] NSBundle *bundle = [NSBundle mainBundle];
209447 [nobu@ru y- a] Or, you can use ruby_incpush(), which splits path list with

Metaprogramming: Dynamic class generation
209450 [luke@ma st p] The article discusses a new method I've created in Puppet for making
209510 [ara.t.howard] first off, thanks for the article - i know this stuff is hard to write
209518 [luke@ma st p] Yes, it is; I've got a grammar and everything for it.  Before

Dir.bitbucket?
209452 [djberg96@gm ] bitbucket = RUBY_PLATFORM.match('mswin') ? 'NUL' : '/dev/null'
209456 [luke@ma st p] it's not quite the same thing, since it's not a part of the Ruby

how to create multiple different arrays using a loop
209457 [chilaquil@gm] I need to create a different array each time that I am going through a
209458 [luke@ma st p] hash = {}
209500 [shortcutter@] I'd say Jeffrey's approach (i.e. stick those arrays into an array) is by far
209515 [luke@ma st p] Sure; if you need to be able to sort based on name, use an array, I
209533 [chilaquil@gm] Thanks to all of you...I used your suggestions and my code is working

private and self
209460 [marinho.tobo] Why doesnĄ­t the call with self doesnĄ­t work ? I know that private means
+ 209494 [dave@pr gp o] ...
+ 209502 [robert.dober] ...

Defining a method []=
209462 [brettkushner] I have used a method of [] with "def method[](string)". But I can't
+ 209463 [hal9000@hy e] Much the same way -- it will have two parameters.
+ 209464 [johnatl@ma .] def method[]=(index, value)
+ 209465 [arrogantpara] You define a method called "[]=".

Remove from an array
209466 [nicolasbenad] I have an array, let's name it items[]
209467 [nospam@no it] items.delete_at(3)
209468 [hal9000@hy e] Did he want to remove the element at index 3,
209474 [nospam@no it] I suppose I should have asked that before replying. :)
+ 209475 [robert.dober] ...
| 209484 [devlists-rub] This is slightly off-topic, but...
+ 209506 [nospam@no it] / ...

Ripper and Ruby 1.8
209477 [nochoice@xs ] For the past two days I've been trying to get Ripper to compile with
209481 [nobu@ru y- a] Ripper needs bison, but 1.8 can be compiled with other yaccs.
209505 [nochoice@xs ] Thanks for the reply but I'm a bit at a loss here. I'm a total noob
+ 209519 [dbatml@gm .d] I don't know how to get Ripper working, but depending on what you want to
| 209523 [nochoice@xs ] It's what we currently use in FreeRIDE and I kinda like the way Ripper
| 209532 [dbatml@gm .d] Ah okay, I thought you were trying to get Ripper running for the first
+ 209570 [nobu@ru y- a] Ripper needs a bison specific feature, but parse.y in 1.8 can't

When to use :symbol and when to use String?
209478 [forum@jo h. ] I experience that the use of symbols and strings is not consistent in
+ 209480 [shevegen@li ] Dont know about rails, but use symbols whenever you dont
+ 209486 [jake.mcarthu] There is really not a smart answer to this, at least as it pertains
  209564 [gilesb@gm il] Thank you for posting this. I've wondered about this many times, and

Newbie block question
209479 [listrec@sn w] I'm working on some code that extracts data from a set of XML files
209482 [robin@ni or ] So I took your code, made it look more like Ruby code (snake_case),
209509 [listrec@sn w] Many thanks for the help - much appreciated. You were right, the problem

Re: [QUIZ] [Solution] QAPrototype (#91)
209483 [bulliver@ba ] charset="iso-8859-6"
209577 [bulliver@ba ] charset="iso-8859-6"
209587 [chiology@gm ] ...

irb newbie question
209488 [wave2ocean@a] I'm new to Ruby and this group.  I was hoping that someone could lend
+ 209489 [eero.saynatk] One thing to try is load '/home/myname/classes.rb' or,
| 209492 [wave2ocean@a] The load File.expand_path('~/classes.rb) that you mentioned did the
+ 209490 [logancapaldo] This should have worked. Can we see your code?

#unsuscribe
209495 [fernando.gre] ...

Fwd: Please Forward: Ruby Quiz Submission
209496 [james@gr yp ] ...

The Brisbane Ruby Brigade
209497 [pgokeeffe@gm] The Brisbane Ruby Brigade has been set up to bring together local Ruby

The Brisbane Ruby Brigade
209498 [kef@ii et co] The Brisbane Ruby Brigade has been set up to bring together local Ruby

2D DFT of an image?
209503 [alex@bl ck e] What's the easiest way to get the 2D DFT of an image?  I can take care

Rails Project Story [Weekly Tutorial Series]
209507 [rbarazi@gm i] ...

[ANN] ruby-oci8 0.1.16
209508 [kubo@ji ba .] ruby-oci8 0.1.16 is released.

Initialize and superclass
209513 [jvivenot@gm ] Lets say I have two classes A and B, where A is B's superclass. B's
209514 [tilman@co e-] If I understood your problem correctly, you're after the "super" method.
209516 [eero.saynatk] And in the event that you some arguments to B that
209544 [jvivenot@gm ] Wonderful !
209548 [jvivenot@gm ] Actually, it seems that I if I write only super because the super
209641 [gwtmp01@ma .] If you don't want to pass any arguments to the superclass's initialize
209750 [jvivenot@gm ] Oh, thanks, but actually, I found it by myself, my previous message was

[ARTICLE] enzymatic ruby - sciruby talks with alex gutteridge
209520 [ara.t.howard] from hello world to enzymatic madness.  sciruby chats with bioruby contributor

is there a ruby cluster analysis tool?
209522 [daniel@fl in] Is there a ruby tool to perform cluster analyses and output the results in a

detect user
209525 [ryankaye@gm ] Im new to ruby and trying to learn by building a small app for mac osx.
+ 209526 [rubytalk@ea ] ...
| 209527 [ryankaye@gm ] Magic - so simple
+ 209529 [m_goldberg@a] I'm running on OS X, too. Here is what works for me in getting user
  + 209530 [ryankaye@gm ] Nice one
  + 209670 [Gennady.Byst] require 'etc'

SpiderMonkey / OSSP js?
209534 [transfire@gm] Anyone here use SpiderMonkey / OSSP js?  I wondering how that works out
+ 209545 [james.britt@] Interesting.
+ 210120 [grrr@to o. a] Whats there to wonder? Its javascript (=ECMAscript), standalone (instead
| + 210134 [james.britt@] If you think of JavaScript as an OO language (or a class-oriented OO
| + 210168 [david@va ln ] -1, Troll (and gods what a blatant one)
|   210195 [gavin@re in ] Depending on your definition of what OO means, I might disagree.
|   + 210207 [david@va ln ] Problem of approach? Trying to grok Javascript OO if you consider
|   + 210280 [jtregunna@bl] Anyone who has a view that OO requires classes is in for a shock.
+ 210191 [gavin@re in ] My company uses SpiderMonkey as the JS engine for the scripting
  210192 [gavin@re in ] I forgot to mention - if you have any interest in seeing a reference

Time.parse of empty string returns Time.now?
209535 [peter.krantz] I am Ruby newbie and have a question regarding Time.parse(). I am
+ 209539 [logancapaldo] def parse_time(s)
+ 209552 [ara.t.howard] irb(main):001:0> require 'date'

Fwd: Reap's rubytest script
209536 [transfire@gm] My 'rubytest' program which allows one to directly run tests that are
+ 209540 [eero.saynatk] test/inline?
+ 209553 [wccrawford@g] test# makes me think it's for testing C#.  They name all their stuff
+ 209721 [transfire@gm] Thanks for the suggestions.

Threads and fake forking
209537 [logancapaldo] Today I was thinking about how you could use a Thread + Continuation
209547 [sander.land@] Ruby errors in a thread often don't show up.
+ 209549 [drbrain@se m] Add Thread.abort_on_exception = true
| 209628 [chneukirchen] Why is this not set by default, btw?  Tracking such bugs down is a
+ 209632 [logancapaldo] That's disappointing. I didn't really want to call it across threads

Re: Reap's rubytest script
209538 [wave2ocean@a] unittest
209554 [m_goldberg@a] The idea's good, but I would prefer a variant: 'inline_test'.

[OT] Vim Question
209550 [tim.pease@gm] This is for all the Rubyists out there who can really rock the Vim.
+ 209551 [ara.t.howard] here i type
| + 209558 [luke@ma st p] You can also just type !! with no colon to do the same thing (two
| + 209658 [tim.pease@gm] Okay, the solution I came up with is to build up the command inside
+ 209605 [ruth_andy@fa] Tim,
  209649 [tim.pease@gm] That's a cool little fact to know, but it won't work for me :(
  209654 [logancapaldo] Sounds like a job for DSCM such as darcs, git or mercurial. ;)

Invoking a batch file with Ruby on Windows
209557 [brian.kejser] Does anyone know how I could invoke a Windows batch file (e.g.
209559 [jan.svitok@g] - `MyBatchFile.bat`

syntax errors when job run from cron
209560 [r.fulton@au ] Well this is weird!  I'm used to odd problems when you run programs from
+ 209562 [danielbaird@] Check your paths, maybe?
| 209566 [r.fulton@au ] All the ruby files are in the same directory which the job cds into
+ 209572 [ara.t.howard] probably you have two ruby installations and the wrong one is running your
+ 209574 [james.britt@] What is the user that actually runs the job in cron?
  209575 [r.fulton@au ] we are getting close here!  I've managed to reproduce the error on the
  209576 [ara.t.howard] you have 1.8.4 installed in one place, probably /usr/local/bin/ and 1.6.8 in
  209579 [r.fulton@au ] Bugger! you're dead right!

Fwd: Please Forward: Ruby Quiz Submission
209565 [james@gr yp ] ...

Re: [QUIZ] QAPrototype (#91) - Updated solution with bells and whistles.
209567 [rick.denatal] 1) First, I added the ability to optionally use the Readline module to
+ 209589 [chiology@gm ] I like how you handle getting the source much better. My
+ 209597 [bulliver@ba ] charset="iso-8859-1"
  209679 [rick.denatal] Ahwww Shucks <blush/>

Why Does Hash Apparently Reorder Its Internal Representation And Other Associated Ponderings
209568 [thoran@th ra] I was surprised to find the following...
+ 209569 [sitharus@si ] Really? Take a comsci course at uni
+ 209571 [danielbaird@] Hashes are unordered so that Ruby can use the hash function of the
+ 209590 [hal9000@hy e] This has been discussed many times over the last
| 209591 [matz@ru y- a] I am open to introduce order into 1.9 Hash, as long as we can
| + 209593 [hal9000@hy e] My use case (I started that thread) may not be compelling. Other people,
| | 209607 [Bil.Kleb@NA ] So far, I've managed to duplicate the functionality of two
| | 209610 [w_a_x_man@ya] Did you try association lists?
| | 209614 [Bil.Kleb@NA ] Sort of, but I liked the interface of Hash too much
| | + 209616 [martindemell] You can do this automatically (if you aren't already) by creating an
| | | + 209621 [hal9000@hy e] There are any number of ways to do this sort of thing.
| | | + 209625 [Bil.Kleb@NA ] Hmmm... good idea.  I've largely missed out on the
| | |   209630 [martindemell] require 'enumerator'
| | |   + 209634 [Bil.Kleb@NA ] Thanks!
| | |   + 209678 [pedro@pe ro ] def respond_to?(*args)
| | |   + 209682 [ihatespam@ro] Is there a reason why you don't simply inheret from Hash, or is this
| | |   | + 209687 [thoran@th ra] I doubt it would have helped very much with respect to those responses
| | |   | | + 209704 [ihatespam@ro] I've been watching this thread intently and I don't recall anyone being
| | |   | | | 209713 [gavin@re in ] Personally, I perceived the beginning of Philip's original terse
| | |   | | | + 209718 [gavin@re in ] (My public apologies to Phillip for twice misspelling his name.)
| | |   | | | + 209731 [ihatespam@ro] These are good examples and your point is well taken...
| | |   | | | + 209758 [sitharus@si ] I blame deadlines, insufficient caffeine and cold weather :P
| | |   | | + 209715 [halostatue@g] Hash doesn't reorder, though. The nature of a Hash is that it is an
| | |   | | + 209795 [thoran@th ra] Sorry for the poor attempt at quoting and the ignorance of the
| | |   | |   + 209800 [ihatespam@ro] This is so dishonest of you.  You take one sentence and remove all the
| | |   | |   + 209802 [halostatue@g] Um. This is an overstatement. Hashes aren't ordered by default because
| | |   | |     209833 [pedro@pe ro ] It is a Hash, since it provides it's interface and general performance
| | |   | |     + 209849 [halostatue@g] No, I'd say it's hash-like, but not a hash in the "proper" sense of
| | |   | |     | 209857 [pedro@pe ro ] If you define hash like that, sure. But I would say hashes aren't
| | |   | |     + 210017 [hal9000@hy e] If you capitalize Hash (naming the Ruby class) that is arguably true.
| | |   | |     + 210158 [gwtmp01@ma .] class A
| | |   | + 209689 [martindemell] On 8/21/06, Just Another Victim of the Ambient Morality
| | |   | + 209692 [sastph@sa .c] "Favor composition over inheritance" - Design Patterns
| | |   | | 209716 [halostatue@g] Which is ... questionable advice in Ruby. Since mixins are a *form* of
| | |   | | 209746 [TimHunter@nc] Interesting. And I've read on this list many times that inheriting from
| | |   | | 209754 [halostatue@g] Is derivation the best choice, or is delegation the best choice? I
| | |   | + 209693 [dblack@wo bl] You mean TMTOTMTOWTDIS? :-)
| | |   |   210033 [david@va ln ] Groan.
| | |   + 209709 [halostatue@g] I'm not sure that everything is as you said, but look at the OHash in
| | + 209707 [halostatue@g] Indeed. There is a legitimate use case of having both fast random
| + 209608 [w_a_x_man@ya] Ruby is already slow enough.  Those who are griping should be
| | 209609 [hal9000@hy e] What's an association list?
| + 209612 [robert.dober] ...
|   209613 [matz@ru y- a] I think it's not just "ordered" but "sorted".
|   209627 [robert.dober] ...
+ 209669 [ihatespam@ro] I am always surprised whenever this question comes up.  Whenever it
| + 209675 [canyonrat@ma] On Aug 21, 2006, at 9:05 AM, Just Another Victim of the Ambient
| + 209699 [collinsj@se ] ...
| + 209711 [halostatue@g] On 8/21/06, Just Another Victim of the Ambient Morality
|   + 209717 [gavin@re in ] And, for what it's worth, JavaScript's Object primitive is also an
|   | + 209757 [hal9000@hy e] I find that interesting, since so many appear convinced that
|   | | + 209776 [headius@he d] ...
|   | | + 209861 [gavin@re in ] I don't. I wouldn't call most JavaScript engines 'fast', but I suspect
|   | |   + 209866 [thoran@th ra] "This is a bold statement, especially from a self proclaimed newbie.
|   | |   | 209893 [ihatespam@ro] I don't know, my interpretation looks reasonable to me.  If Matz was
|   | |   | 209899 [thoran@th ra] "    How would this even work?
|   | |   | 210022 [hal9000@hy e] [snippage]
|   | |   + 210018 [hal9000@hy e] Haha... I've put that in my notes. That's all I guarantee right now.
|   | + 209889 [gavin@re in ] that the insertion order be preserved; it's just that the major JS
|   + 209729 [ihatespam@ro] Ah, of course.  I get the two (sorted order and insertion order) mixed
|   + 209751 [isak.hansen@] I don't think 'ordered' is a good name for something sorted by
|   | 209761 [hal9000@hy e] The fact that something can be "sorted" at all is only because it
|   | + 209919 [isak.hansen@] You're right. Ordered merely means that elements have a position, I had
|   | | 209935 [thoran@th ra] Dear Spamhater,
|   | | 209951 [ihatespam@ro] I couldn't help but notice you haven't quoted anything.
|   | + 210037 [rick.denatal] Uh, no.
|   |   210043 [hal9000@hy e] I wasn't speaking in a Ruby sense. And even if I were, there
|   + 209755 [vjoel@pa h. ] Red-black trees are (like binary trees) sorted by keys, rather than
|   + 209756 [hal9000@hy e] That probably speaks for me. I've never used PHP, but
+ 209801 [ihatespam@ro] How would this even work?

[ANN] Nebular Gauntlet v0.2a
209580 [steviedizzle] I am incredibly pleased to announce the second public release of Nebular Gauntlet along with an update of the map editor. It's been a couple months since the last release and there have been a multitude of fixes and features that have been added to the project. The month's of work have not, however, resulted in any increase of my artistic skill, so the look of the project is still quite below par and should definitely not be taken as a sign of the underlying code. Again, any feedback would be wonderful.

Strategy pattern / interface design arrangement
209582 [rabbitblue@g] Imagine you have a module, CreditCardProcessor. Inside
+ 209583 [snacktime@gm] I would probably not put CreditCardProcessor inside Company.  I would
+ 209595 [shortcutter@] I find it odd that AuthorizeNet is a module and that it's contained in
| 209703 [rabbitblue@g] I realize Ruby doesn't explicitly support the concept of an interface
| + 209706 [kenosis@gm i] GOF = Gang of Four (the authors of the "original" Design Patterns"
| | 209719 [rabbitblue@g] Ah... I'm currently reading Kathy Sierra's Head First Design Patterns.
| + 209733 [rick.denatal] Yes, but Modules in Ruby provide implementation, so they don't really
|   + 209760 [oliver@fi st] A while ago I heard about duck typing.
|   | + 209767 [gavin@re in ] The short of it is: two different classes of objects are
|   | | + 209779 [rabbitblue@g] Thank you! That's what I needed to hear! :) :) :)
|   | | + 209780 [khaines@en g] An example in real life.
|   | + 209867 [wccrawford@g] I haven't seen anyone mention it, and I think it's important to know...
|   |   209881 [rick.denatal] Yes.
|   + 209775 [rabbitblue@g] Wow. Okay, your description of the Strategy pattern doesn't mean a lot
|     209854 [shortcutter@] Yes, but you have to adjust the implementation to the language at hand.
+ 209661 [coder68@ya o] Some of the GOF patterns don't translate to a dynamically typed language
threads.html
top