208055-213472

207773-209210 subjects 208225-210818

^ Rubygem libs vs Non Rubygem libs
208055 [bulliver bad] charset="iso-8859-1"
208057 [tilman code-] as I=20
+ 208060 [bulliver bad] charset="iso-8859-6"
+ 208174 [khaines enig] Of course, this isn't such a great solution from inside a library,
  208191 [tilman code-] ed
  208237 [bulliver bad] charset="iso-8859-6"
  208241 [tilman code-] tem=20

^ Newbie at ruby - syntactic sugar for Range / Array
208056 [neil_lauranc] Was hoping someone could point me in the right direction. I'm currently
208059 [dblack wobbl] The * is the "unar[r]ay" (unary un-array) operator, or at least
208074 [rick.denatal] Or you can think of the * before the last rvalue in an assignment as a
208075 [dblack wobbl] a, b = "abc\ndef"  =>  a == "abc\n", b = "def"
+ 208086 [rick.denatal] Nothing at all wierd about that, any enumerable can, which makes
| + 208095 [chiology gma] _Why The Lucky Stiff calls it a splat. I like this because it's a very
| | 208260 [dblack wobbl] I think everyone does, except me :-)  That's certainly what it was
| + 208257 [rick.denatal] And an afterthought.
|   208261 [dblack wobbl] Let me rephrase my point: the only weird thing is that ranges are
+ 208278 [logancapaldo] irb(main):047:0> a, b = "abc\ndef"
  208514 [dblack wobbl] Yes -- I forgot the *, which sort of made my point pointless :-)

^ Parse/Split `cmd`
208085 [tjones acwor] I'm really new to Ruby, I have been using TCL for a really long time
+ 208087 [skurapat ucs] Use $x.split, which works on newlines by default.
+ 208090 [nobu ruby-la] lines = `cmd`.to_a

^ Re: XPath refreshers
208100 [Eric.Armstro] Again, greatly appreciated.

^ Rake: How to *stop* if a shell command fails???
208107 [Eric.Armstro] On a related note...
+ 208139 [nobu ruby-la] World writable system directories?  Hmmm..., amazing.
| 208451 [Eric.Armstro] There's one line in there that's driving me nuts.
| 208456 [hal9000 hype] Haha... it's a Perl/Ruby idiom...
| 208704 [Eric.Armstro] Thank you!
+ 208443 [Eric.Armstro] It turns out I was (happily) dead wrong about that.

^ Please help fixing gems on OSX
208114 [andreinla gm] I installed ruby 1.84 and ruby gems and rails and for a while
+ 208162 [canyonrat ma] Andre,
| + 208718 [andreinla gm] Please consider my being very new to Mac OSX and BSD Unix.
| | 208733 [canyonrat ma] OK, I would have used .bash_profile rather than .bash_login but OK.
| + 208861 [drbrain segm] Incorrect.  No version of Ruby ships with Rubygems.
|   208868 [canyonrat ma] Huh?
|   + 208870 [drbrain segm] Somebody downloaded the rubygems tarball and ran sudo ruby setup.rb
|   | 212916 [andreinla gm] I downloaded gems and ran sudo ruby setup.rb which seemed to run OK.
|   | 212925 [canyonrat ma] ~ $ gem
|   | 213318 [andreinla gm] which gem yelds
|   | 213404 [canyonrat ma] That's good. What does 'which ruby' yield?
|   | 213468 [andreinla gm] which ruby yelds
|   | 213472 [canyonrat ma] Don't thank me for much. If I recall correctly, if you just type
|   + 208875 [logancapaldo] yes the elves did sneak in. Don't believe me or Eric? Download
|     208878 [canyonrat ma] Well, I actually though of that and confirmed for myself that it
+ 213017 [andreinla gm] I downloaded gems and ran sudo ruby setup.rb which seemed to run OK.

^ [ANN] Ruport Day has begun!
208118 [gregory.t.br] == It's Ruport Day! ==
208194 [gregory.t.br] We're now past the halfway point, and support for SVG graphs is

^ A use case for an ordered hash
208131 [hal9000 hype] There have been numerous occasions when I wanted an
+ 208132 [znmeb cesmai] That sort of code is what Chuck Moore evolved into Forth. :)  Seriously,
| 208133 [hal9000 hype] Yes, I could use a single flat array... I could also program
+ 208134 [garbagecat10] actions.keys.sort {|a,b| b.to_s <=> a.to_s}.each {|k|
| 208135 [hal9000 hype] Clever workaround. Thanks for that.
+ 208136 [shortcutter ] To me a Hash feels wrong.  Why?  Because you don't make any use of hash
| + 208147 [chiology gma] Absolutely... an Array is perfect for ordered information.
| | 208153 [ mfp acm.org] That's not what he wants though (the point is matching against the Regexp ---
| | + 208208 [hal9000 hype] Now, that's clever. That's probably the least painful
| | | 208227 [tom helmetst] Tom
| | | 208234 [hal9000 hype] I knew we were reaching that point in the fugue
| | + 208213 [james graypr] You could use find() there, right?
| + 208177 [james graypr] He *is* making use of a Hash property.  He wants the keys to be
| | 208192 [ mfp acm.org] Hal is making the case for *literal* "ordered hashes".  The keys will be
| + 208206 [hal9000 hype] I never use a hash for fast lookup. I use it because it
|   208233 [shortcutter ] Um...  So you're saying that you wouldn't bother if lookups were O(n)?  Wow!
|   208236 [hal9000 hype] I think you mean "wouldn't care"?
|   + 208238 [shortcutter ] Probably.  I'm not a native speaker so I'm certainly not authoritative
|   + 208246 [sitharus sit] Unfortunately for you some of us do things that involve searching
|     + 208255 [hal9000 hype] Your point is well taken.
|     | + 208258 [transfire gm] +1 for Hal
|     | | 208265 [hal9000 hype] I've seen that, and it's kind of cool.
|     | | 208273 [logancapaldo] class AssocList
|     | + 208259 [sitharus sit] I would support this as there are uses for it.
|     + 209677 [w_a_x_man ya] # a = ['key 1','1',  'key 2', '2',  'key 3',3].to_assoc
|     + 209690 [Bil.Kleb NAS] I don't think anyone is suggesting replacing the
|       209695 [rick.denatal] Which, as has been shown can be provided without changes to the base
|       + 209698 [editor adnet] This functionality is not part of Hash as traditionally
|       + 209701 [hal9000 hype] Sure. And if you didn't have Hash, you could implenent
|       | 209741 [ihatespam ro] I disagree.  I dislike the hash literal syntax and I can't believe that
|       | 209759 [hal9000 hype] Haha... I don't think anyone said it's the *only* useful thing. :)
|       | 209765 [gavin refine] Coming to Ruby from JavaScript (among other paths) I personally dislike
|       | + 209766 [w_a_x_man ya] We already do; it's just that the pompous popinjays refuse to use it.
|       | | + 209771 [hal9000 hype] Is that the way the syntax goes?
|       | | + 209773 [halostatue g] Is it refusal, or a desire to do what is clearest and most compatible?
|       | | + 209892 [gavin refine] ruby 1.8.4 (2006-04-14) [i386-mswin32]
|       | |   209897 [gavin refine] Bah...don't mind me. I'm an idiot. Of course that works in 1.8.4 if you
|       | |   + 209913 [thoran thora] I switched from 'my' thread because this seems more appropriate to
|       | |   | 209928 [thoran thora] m = [:a => 'a'] # m is for map.  I could go for this term too as it
|       | |   | 210024 [hal9000 hype] Again, interesting... but what if your keys are integers? Or arrays?
|       | |   + 210114 [robert.dober] Why am I suddenly not feeling lonsome anymore ?
|       | + 209768 [james graypr] $ ruby_yarv -ve 'p({foo: "bar", baz: "bar"})'
|       | | 209895 [gavin refine] Yeehaw! Thanks, powers-that-be! :)
|       | | 210020 [hal9000 hype] It's pretty cool. The only catch is that your keys have
|       | | 210102 [james graypr] Correct.  It's just and alternate symbol Hash key syntax.
|       | + 209770 [hal9000 hype] I agree I'd prefer a "nicer" notation than we have, but the
|       + 209748 [gwtmp01 mac.] A ordered hash implementation in the standard library would be better
|       | 209753 [ara.t.howard] not if
|       | + 209763 [hal9000 hype] No, I think it would still require a core change -- because a
|       | + 209764 [halostatue g] Which, IIRC, no one but opponents to an (insertion) ordered
|       + 209762 [halostatue g] Such implementations *are* a bit slower and less efficient since
+ 208243 [john.carter ] I'm in the habit of automagically writing...
| + 208250 [perrin apoth] . . . but if you want them in a *specific* order (other than that
| + 208277 [halostatue g] In the case that Hal is talking about, and in the case where
|   208293 [hal9000 hype] Either (=>) or [=>] would be fine with me. I'd slightly prefer
|   208301 [martindemell] Or we could use another %?{ } constructor, which are, after all, being
|   + 208318 [halostatue g] Wouldn't it be the same as Hash lookup? It's still got every other
|   | + 208356 [martindemell] True, I suppose you could do it with a doubly linked list overlaid on
|   | | 208365 [gwtmp01 mac.] Can't you just maintain an internal array representing the key insertion
|   | | 208369 [halostatue g] It's a little more complex than that, but that's pretty much what all
|   | | 208380 [gwtmp01 mac.] Yep, I understand the need for the literal constructor. It is a bit
|   | + 208363 [robert.dober] That too is a point that needs definition.  I'd like to have two behaviors.
|   | + 208450 [hal9000 hype] OHash lookup should be as fast as Hash lookup.
|   |   209681 [robert.dober] Not necessarily
|   |   209700 [hal9000 hype] I meant an ordered hash would be slowed down simply
|   |   209702 [robert.dober] I know but I would not be storing that extra piece of information in one of
|   |   209710 [martindemell] The thing is, there's no way to preserve insertion order in a hash
|   |   209724 [robert.dober] You did it, thank you, I was *not* talking about InsertionOrder in Hash,
|   |   + 209725 [ara.t.howard] my alib has an orderedhash which maintains insertion order.
|   |   | 209799 [transfire gm] He he. Facets has one too called Dictionary (but also aliased as
|   |   | 209808 [ara.t.howard] indeed.
|   |   + 209734 [perrin apoth] OrderHash sounds good to me.
|   |     209735 [rick.denatal] <duck>Well when I OrderHash, I usually order CornedBeefHash with a
|   |     + 209737 [ara.t.howard] and i have a good time in amsterdam.  ;-)
|   |     + 209738 [perrin apoth] I was thinking of hash browns, actually.
|   |     + 210113 [robert.dober] De gustibus non dispudandum esse .
|   |       210226 [rick.denatal] Rick DeNatale
|   + 208442 [chneukirchen] #524<5|>lilith:~/src$ grep Dict ruby-0.49/dict.c
|     208458 [hal9000 hype] Now, that's funny.
+ 208422 [Bil.Kleb NAS] I had a string with a bunch of tagged "tolerance fields",
| + 208436 [garbagecat10] I've had to deal with this (interestingly, in something that was
| + 208453 [hal9000 hype] See, guys? An ordered hash in Ruby would help support
+ 210472 [surfunbear y] Can't you create your own using mixins and including enumerable or
  210476 [hal9000 hype] Yes, but I would lose the convenient literal notation.
  + 210489 [halostatue g] ...and which could have been seen by someone who looked at more than
  | 210493 [hal9000 hype] Heh heh. That's OK. We were at "that point" in the fugue.
  + 210748 [surfunbear y] ================================================
    210778 [halostatue g] hash-like objects. I've written one. Hal has probably written one. Ara
    210817 [surfunbear y] I started to get the idea to such an effect, or that some short hand

^ Tim Bray (Sun Microsystems) on Ruby
208138 [enogrob hotm] The Director of Web Technologies at Sun Microsystems jumps directly to
+ 208150 [fxn hashref.] "Finally, a minor, almost a footnote, issue. I miss polymorphism. In
| + 208164 [hutch recurs] I'm pretty sure he means 'ad hoc polymorphism' which is, within half
| | 208167 [garbagecat10] What I find myself becoming more and more comfortable with is passing
| + 208184 [james graypr] Hmm, I would say you would mimic this by accepting any number of
+ 208181 [james graypr] Looks like he will be giving the internationalization,

^ Secrets of lightweight development success
208140 [enogrob hotm] "The Javaprogramming language is powerful, but it has significant

^ Microsoft Phasing in Support for Dynamic Languages on .Net
208141 [enogrob hotm] Microsoft is working behind the scenes to enhance the support of .Net

^ Ruby climbed up to the 13th place in the Tiobe index
208142 [enogrob hotm] In blitz interview with Bruce Tate, he says that does not know, use, or
+ 208154 [dblack wobbl] know Ruby, not Bruce Tate.
+ 208158 [robert.dober] I just do not like these kind of ratings, I believe that they are
  208160 [bulliver bad] charset="iso-8859-6"

^ Gmail and ruby-talk (was Re: Pen and Paper (#90))
208172 [rick.denatal] Matt,
208176 [james graypr] I'm *assuming* this happens because Ruby Talk is configured by
+ 208224 [chiology gma] I did not know you could shut it off. But, yes, that's been my
+ 208350 [jmg3000 gmai] This has been discussed a number of times here. It might be useful to

^ How to update nested Hashes?
208178 [hammed gmail] Given two nested Hashes, is there an easy way to update one with the other?
208185 [dblack wobbl] def a.nested_update(b)
208190 [hammed gmail] Thanks David!

^ [SOLUTION] (1)   [QUIZ] Pen and Paper (#90)
208179 [curi curi.us] it works by assigning each square a point value based on how many

^ Ruby in Steel won't work, am I just screwed?
208183 [ihatespam ro] Okay, I've posted this before but I finally got around to trying it
208195 [huw DELTHISB] If you contact us direct we can walk you through your installation to check

^ [Solution] (2)  [QUIZ] Pen and Paper (#90)
208187 [curi curi.us] Here is my second solution.

^ [Solution] Bonus Questions  [QUIZ] Pen and Paper (#90)
208189 [curi curi.us] For 5x5, I found 9 steps (which is just your example with the first
208270 [bulliver bad] charset="iso-8859-1"
208280 [curi curi.us] i think jumping over 2 squares means landing on third square away.
208284 [curi curi.us] oh haha. there are typos. the 4 and 5 should be one row lower. i

^ stderr capture on Windows
208196 [sardaukary y] Is it possible to capture stderr on Windows?
+ 208221 [anatol.pomoz] See solution here
| 208223 [sardaukary y] Well that gives me another cryptic error
| 208229 [anatol.pomoz] Try to put following line to separate script and run
| 208411 [sardaukary y] Yes it was my script that works now.
+ 208235 [billk cts.co] or

^ Toward better project layouts
208197 [transfire gm] As some of you may know I've been working on and off on a lib versioing

^ [SOLUTION] Re: [QUIZ] Pen and Paper (#90)
208198 [skurapat ucs] Here is my solution, which uses recursion like the Civilization II
208239 [skurapat ucs] Well, I discovered that this solution doesn't always find the

^ Search objects
208199 [sambient gma] I've set up this class and objects and would like to "search" it
+ 208201 [m_goldberg a] I'm assuming that you are just implementing this for its educational
| 208205 [sambient gma] Well a few things.  For some reason, in the past I've attempted to use
+ 208207 [james graypr] Well, if we had those composers in an Array, we could use normal
+ 208211 [ara.t.howard] require 'weakref'
  208240 [sambient gma] That's a lot of food :)

^ [Solution] re: [QUIZ] Pen and Paper (#90)
208202 [collinsj sea] Here's my solution, which works the same way as Elliot's first solution,
208231 [collinsj sea] [justin@cheese ruby]$ time -p ruby penpaper.rb 5 > /dev/null

^ gems, helpers and rails
208203 [waspfactory ] this is the ruby forum but i think this might be half a ruby question. I
208214 [waspfactory ] okay update
208217 [waspfactory ] tis all sorted for now

^ [Solution] [QUIZ] Pen and Paper (#90)
208210 [boris.prinz ] my solution is recursive and works only for small boards. The largest
208232 [sander.land ] My solution also uses the Warnsdorff heuristic (moving to the square

^ Module to make guerilla (monkey?) / reopening classes easier. Comments?
208212 [logancapaldo] I hammered this out today. It has some limitations (works only for

^ Using Ruby in a commercial application?
208215 [chanon.s gma] I just began learning Ruby a few hours ago, but it has been enough to
+ 208244 [znmeb cesmai] My "advice" is to seek *legal* advice from *attorneys*, *accounting*
| 208248 [canyonrat ma] I got a grin out of Ed's advice, but, in fact, lawyers who know
| 208312 [richard.conr] With respect to licensing, I think most of the popular libraries ship with
+ 208245 [kbloom gmail] From a purely technical standpoint, you're not going to be able to protect
| 208247 [garbagecat10] Perhaps what you meant to say is "you're not going to be able to hide your
+ 208383 [jmg3000 gmai] You'll need to look at the licenses for each library/module you use,
  208478 [rdm cfcl.com] Nolo Press has a number of useful books on legal

^ Newsgroup/mailing list/ruby-forum.com disconnect?
208219 [eero.saynatk] I am using http://www.ruby-forum.com to view ruby-talk
+ 208404 [collinsj sea] What I've found works best is to double check ruby-forum against the
+ 208537 [f andreas-s.] Fixed, the missing mails have been imported into the forum, nothing has
  208604 [eero.saynatk] Thank you, all is in order!

^ gems timeout on the rubyforge repository
208222 [ryangrow yah] I have downloaded and compiled both ruby and gems. I am now trying to
208230 [canyonrat ma] Try again now. I just tried it and it works for me.
209145 [ryangrow yah] Yes, I just tried it and it worked. Thanks.
threads.html
top