258480-261132

258330-262465 subjects 258635-260878

[JT] Ruby: an original name for Visual Basic!
258480 [mike@os n. r] Visual Basic - bought as Ruby from Alan Cooper in 1988

[QUIZ][SOLUTION] Hangman (#130) -- Guesser Class
258489 [chris@wi sl ] ...

Creating XML from XSDs
258494 [probertm@gm ] I am wondering if someone has done similar and can point me in a

Beautiful Code : Pity he didn't ask here...
258498 [john.carter@] Just got the O'Reilly announcement of the book "Beautiful
+ 258502 [james@gr yp ] Hmm, I don't think we should slurp when we don't need too.  There's
| 258543 [ryand-ruby@z] 1) We can.
+ 258546 [martindemell] ARGF.read.scan( %r{GET /ongoing/When/\d{3}x/(\d#{4}/\d#{4}/[^ .]+) }) do |match|
| 258560 [robert.dober] I am with James do not slurp in the whole string it just does not make
+ 258561 [robert.dober] or
| 258602 [martin@sn wp] Good point.  In many ways, it feels that the author is not as
+ 258574 [martin@sn wp] As James said, I'm going to have to disagree on this, though I'd clean
| 258610 [Tim.Bray@Su ] Yep, much better, I wish I'd done it that way.
+ 258575 [dblack@wo bl] Yes, but be careful: your two lines don't do the same thing as each
+ 258583 [christoffer.] hash.sort_by { |k, v| v }.map { |k, v| k }
| 258587 [wayneeseguin] ...
| + 258595 [gregory.t.br] I find myself always using |k,v|, when used on something hashlike I
| | 258598 [james@gr yp ] I've also recently adopted the trick of using _ as an unused
| | + 258604 [pbattley@gm ] ... however, I wouldn't be surprised to find that Haskell took it fromsome other language.
| | | 258606 [james@gr yp ] I meant that I believe it was Ara who recommended it as a good name
| | | + 258712 [ara.t.howard] i'll only take credit if beer is involved ... ;-)
| | | | 258748 [robert.dober] Admit it, you took it from Prolog or Lua or Python or ... :)
| | | + 258840 [mattharmes@g] On Jul 10, 10:28 am, James Edward Gray II <j...@grayproductions.net>
| | + 258612 [wayneeseguin] ...
| | + 258777 [pit.capitain] Maybe it was Ara indeed, but the first reference I found on ruby-talk
| | | + 258782 [dblack@wo bl] ...
| | | | 258784 [robert.dober] yup was brought up by Robert (Klemme) recently, and if memory serves
| | | + 258793 [james@gr yp ] Oops, my mistake.
| | + 258848 [dwebsubmit@g] Nice, didn't know about it. Erlang has a similar thing for throwaway
| + 258669 [ryand-ruby@z] I won't. k and v work Just Fine? for me and whomever else I work
+ 258609 [Tim.Bray@Su ] Yep, mostly because for some reason I didn't know about sort_by.  I
| + 258645 [perrin@ap th] counts = Hash.new(0)
| + 258666 [caleb.powell] Perhaps because sort_by is defined in Enumerable, not in the Array
| + 258714 [ara.t.howard] - wtf is $1 ?
| | + 258716 [dblack@wo bl] I fell in love :-)
| | + 258717 [marcel@ve ni] Looking at all those \d is kind of hard to parse also. I think the following
| | | + 258731 [ara.t.howard] yeah, i actually like to break them out like
| | | + 258758 [dangerwillro] It is hard to parse. That's why all RegExes should include a comment
| | + 258718 [james@gr yp ] You just insulted all of my best friends in one go.  I think I better
| | | 258732 [ara.t.howard] many of mine too.  still, there are only a few of my friends i'd
| | + 258722 [perrin@ap th] Speak for yourself.  I didn't leave Perl at all.  I just added Ruby to my
| |   258733 [ara.t.howard] hey chad-
| |   258769 [perrin@ap th] All else being equal, if I have call to write OO code, I'll always choose
| |   258779 [robert.dober] Hmm that's for sure, but is not it's notational beauty which sometimes
| + 258969 [john.carter@] I perfectly agree with you.
|   258990 [tom@in oe he] Right on.  Today Rich Kilmer showed me some Rails code that Chad Fowler
|   258992 [ezmobius@gm ] Careful with that one Tom. It's *a lot* slower then writing out the
|   258993 [tom@in oe he] Ah, cool, OK, thanks for the heads up!
|   258999 [ara.t.howard] yeah!  i'm always on the lookout for code that runs slow but reads
|   259000 [jeremy@hi eg] I predict the following code will appear in a codeforpeople example
|   + 259020 [martindemell] That's definitely one route towards intestinal fortytwod :)
|   | 259168 [hal9000@hy e] That pun was despicable and pernicious, and I am disappointed in you...
|   + 259022 [robert.dober] Got you finally!!!,
+ 258934 [doug.ybarbo@] Well i for one am feeling pretty good that i learned Ruby here and not
| 258936 [robert.dober] That is something very nice to say :)
+ 261132 [chneukirchen] ARGF.grep(%r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) }) {

Drawing polygons with Ruby/SDL
258500 [geniusleonid] ...
258715 [steviedizzle] If you are talking about drawing circles, squares, etc,
258738 [geniusleonid] ...

Quicktime and Ruby
258504 [ari@ar br wn] Hey all
+ 258517 [rubyforum@we] I'm not sure I understand the question. But does this help
| + 258552 [has.temp3@vi] #!/usr/local/bin/ruby
| | + 258573 [ari@ar br wn] THANK YOU SO MUCH!
| | + 258579 [ari@ar br wn] Hey, thanks for your help. I just have a quick question.
| |   258603 [has.temp3@vi] module is discussed in more detail in the appscript documentation.
| + 258569 [ari@ar br wn] I saw that, and in fact that's what I'm using as my library. But I
|   258834 [matt@ti bi s] As I said, this is not a Ruby matter. You have to read the dictionary
+ 258822 [matt@ti bi s] You can tell QuickTime Player to open each file and export it as a

Mac AFP and Ruby
258509 [ari@ar br wn] Ugh. I have searched long and hard for an AFP library for ruby. I
258564 [fwmailinglis] charset="US-ASCII"
258576 [ari@ar br wn] Thanks! If scp doesn't work, what would you recommend as a backup plan?

Simple string operation
258513 [rubyforum@we] seqNo =
+ 258518 [caduceass@gm] Maybe you want [-3,3] instead of [-1,3]?
| + 258519 [rubyforum@we] Maybe I do.
| + 258537 [shortcutter@] Or
+ 258521 [alexg@ku cr ] Element Reference---If passed a single +Fixnum+, returns the code
+ 258825 [matt@ti bi s] seqNo =
+ 258826 [phrogz@ma .c] Slim2:~ phrogz$ irb

Repacking an array of arrays
258514 [jocubeit@gm ] [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15]]
+ 258515 [dblack@wo bl] array.flatten.in_groups_of(3)
| 258523 [jocubeit@gm ] Thanks again David.
+ 258548 [shortcutter@] require 'enumerator'
| + 258582 [dblack@wo bl] array.flatten.each_slice(3).to_a
| | 258589 [james@gr yp ] enum.each_with_index.inject?
| + 258692 [jocubeit@gm ] Thanks Robert,
+ 258553 [sonoflilit@g] a = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15]]
| + 258558 [shortcutter@] This outputs
| | 258597 [sonoflilit@g] Oi...
| + 258833 [kbloom@gm il] In that case, you'd just use a.transpose
+ 258827 [yermej@gm il] Is the fact that it goes from 3 of 5 to 5 of 3 significant or do you
+ 258831 [kbloom@gm il] require 'enumerator'

Method to prevent writing over a file
258526 [rubyforum@we] Coming from OS X, I'm used to protection to overwriting files. I have
+ 258536 [shortcutter@] I believe IO::CREAT might do what you need.  Try this
+ 258539 [dangerwillro] You want to use the Dir class and File class.
+ 258570 [ari@ar br wn] Try using File.flock method.
+ 258592 [lists@be tr ] class File
  258593 [lists@be tr ] Sorry, this is wrong. The yield should _not_ appear inside

an alternative for VB using Ruby
258531 [thilankaster] I want to know if theres an alternative to VB.net using ruby.. I mean in
+ 258538 [dan@fl en ra] There is the Glade GUI builder, which has a Ruby binding. Here is a
| + 258646 [perrin@ap th] Ouch.  I wonder whose bright idea it was to produce a 1024x768 Flash
| + 258725 [thilankaster] ...
+ 258594 [sonoflilit@g] There is an old japanese implementation of a VB like IDE in ruby (that
| 258836 [greg.kujawa@] Hey, I like Ruby as much as the next guy but "all popular programming
| 258862 [sonoflilit@g] Java and .NET have GUI builders, but still store the interface plan in
+ 258829 [huw@DE TH SB] In the next release of Ruby In Steel Developer (later this year) you will be

ANN: Sequel 0.1.8 Released
258535 [ciconia@gm i] Sequel version 0.1.8 has just been released. This release is focused

Getting Gem Version from Within a Gem
258540 [frioux@gm il] Does anyone know if there is a way that I can have my program output
+ 258544 [kuba.podgors] gem list --local | grep <your_prog_name>
| 258600 [frioux@gm il] So there's not a variable inside the program that I can access that
| + 258613 [wayneeseguin] ...
| | 258614 [frioux@gm il] I am the author of the application in question.  I tested your
| | 258617 [wayneeseguin] ...
| | + 258618 [wayneeseguin] ...
| | + 258621 [frioux@gm il] Ok, I want to ensure that I am doing this the correct way, so is this
| |   + 258627 [wayneeseguin] ...
| |   | 258630 [frioux@gm il] So if I did end up using the check method would I do something like this
| |   + 258633 [drbrain@se m] UGH!
| + 258615 [kuba.podgors] I think, it depends on your gems' library/program.
|   258616 [frioux@gm il] So what I really need to do here is define a constant in a separate file
+ 258634 [drbrain@se m] Gem.loaded_specs.map do |n,s| s.full_name end
+ 258711 [ryand-ruby@z] invert!
  258935 [wayneeseguin] ...
  259259 [ryand-ruby@z] Huh? Even without hoe the point and the example still stand.

Rake?????
258547 [ujjwalt@he a] ...
258599 [dangerwillro] In short: Yes.
259615 [bas@va -g ls] perhaps=20
259783 [gethemant@gm] I hope you might have heard about 'make', which is a unix utility for

Showing CONSTANT warning with Ruby-MySql
258556 [swanand_deod] ...

Find display value in array
258572 [jon@eq ip .n] I have a array that looks like this
+ 258578 [james@gr yp ] => [["key1", "value1"], ["key2", "value2"], ["key3", "value3"]]
| 258590 [jon@eq ip .n] Thanks for a good solution!
| 258591 [florgro@gm i] Try rassoc. :)
| 258607 [jon@eq ip .n] Aha, sweet ;) Thank you!
+ 258588 [list.push@gm] Is this what you want to do?

[OT] Religion (was: god 0.1.0 released)
258608 [gregory.t.br] Okay, I have to be honest.   What about the non-Judaic practitioners
258988 [agorilla@gm ] Haven't been around lately, and just saw this one.  I was inspired!
259006 [michel.belle] ...
259012 [robert.dober] You got it all wrong, arrrg does anybody respect my believes here ;)

Re: Religion (was: god 0.1.0 released)
258619 [transfire@gm] On Jul 10, 10:42 am, "Gregory Brown" <gregory.t.br...@gmail.com>
+ 258620 [james@gr yp ] It seems to be drumming up business to me.
| + 258624 [wayneeseguin] ...
| + 258625 [lyle.johnson] Only if you believe there's no such thing as bad publicity.
| | + 258629 [james@gr yp ] See the Grand Theft Auto games.
| | | 258638 [caduceass@gm] No doubt.  I agree the publicity works for a popularity contest.  One
| | | 258639 [promos@bu ch] Ok, I think I understand.  The Judeo-Christian group has had their
| | | + 258644 [gregory.t.br] It's a matter of context.  The 10 commandments in courthouses make it
| | | | + 258652 [caduceass@gm] Emphasis on "might".  It's not easy to suddenly displace a thread into
| | | | | + 258653 [gregory.t.br] As long as you mark them that way rather than hijacking the thread.
| | | | | | 258655 [perrin@ap th] I tend to agree with *both* of you, in this case.
| | | | | + 258952 [benjohn@fy h] Damn strait.
| | | | | | 258959 [robert.dober] Hmm this has been discussed before here and there was no consenus for
| | | | | + 258981 [rlp1938@gm i] Agreed. I am a member of a couple of lists wherein the "wasted"
| | | | + 258660 [seebs@se bs ] And only some Christians; many find the notion offensive or even blasphemous.
| | | |   258724 [rlp1938@gm i] I worked for a firm once who employed some management consultants who
| | | + 258648 [jgarvin.list] ...
| | | | 258650 [ecomba@ma .c] Jeezzz...
| | | | + 258746 [robert.dober] I adhere 100% which what you say, but we are not living in the 22nd century :(.
| | | | + 258792 [anthonyeden@] I am *sooo* naming my next project pork_meat_eater...that's not
| | | | | + 258796 [michel.belle] ...
| | | | | + 258801 [ecomba@ma .c] LOL!
| | | | + 259207 [peter@pe er ] ...
| | | |   259214 [wiltroutja@h] If your definition of daemon matches mine of Demon, then I think that
| | | |   + 259233 [peter@pe er ] ...
| | | |   | 259237 [wiltroutja@h] Lol. I thought you were being serious. Sorry if I dont know what a slave
| | | |   | 259242 [dangerwillro] Master / Slave is a device status on a device controller. It is
| | | |   | 259245 [wiltroutja@h] It does seem rather offensive when you say put it that way. I think the
| | | |   | 259257 [perrin@ap th] I *really* don't think the IT industry in general is going to stop
| | | |   | 259276 [shevegen@li ] What do we learn?
| | | |   | + 259286 [sy1234@gm il] Maybe gnomes (or gremlins) would be more meaningful.  =)
| | | |   | | + 259293 [michel.belle] ...
| | | |   | | + 259330 [cdcarter@gm ] I vote "Long running processes that run in the background, and will
| | | |   | | | 259337 [michel.belle] ...
| | | |   | | | + 259351 [aurelianocal] I always understood that "god" means "god over daemons"
| | | |   | | | | 259379 [wiltroutja@h] Why would you need the Largely Used part? If I know one thing about
| | | |   | | | | 259437 [perrin@ap th] I'm pretty sure the LUCIFER acronym was proposed indirectly and
| | | |   | | | + 260584 [hal9000@hy e] Good idea... Lucifer ("light-bringer") is an old name for Jesus...
| | | |   | | |   260588 [perrin@ap th] News to me.  In Christian tradition, so far as I'm aware, Lucifer has
| | | |   | | + 259376 [mental@ry ia] Lessee... tiny ground-dwellers (gnomes), or squat creatures that
| | | |   | + 259366 [mental@ry ia] Really?  While "demons" would obviously be a poor name, the ancient
| | | |   | | 259370 [gregory.t.br] I was under the impression that daemon was just an archaic spelling of
| | | |   | | 259372 [mental@ry ia] Pretty much.  I wonder if most get the reference, though.
| | | |   | | 259436 [perrin@ap th] Like what -- servitors?
| | | |   | | 259441 [mental@ry ia] Not sure, honestly.  At this point I've been used to calling them
| | | |   | + 259377 [wiltroutja@h] Read em and weep sucker. This is from whatever page that was that the
| | | |   | + 260582 [hal9000@hy e] What do you mean? How is the spelling significant?
| | | |   |   260585 [perrin@ap th] The term "daemon" is primarily a variant of "daimon", which is (in the
| | | |   + 259371 [mental@ry ia] The term is a little overloaded; while daemon and demon share an etymology,
| | | |     259378 [wiltroutja@h] Good idea. Let's go and sue Runescape, Dungeons and Dragons, World of
| | | |     259380 [mental@ry ia] While I have to admit that fantasy settings which strip-mine the
| | | |     259382 [wiltroutja@h] Benefit to lawsuits? MONEY! I hate Runescape. Let's sue them. They lose
| | | |     259388 [gregory.t.br] i'm in ur computer. lernin' ur C++.
| | | |     + 259390 [wiltroutja@h] Could you speak in proper English? I can't understand you if you talk
| | | |     | + 259391 [mental@ry ia] omg u now lolcats rite lol
| | | |     | | 259396 [wiltroutja@h] Umm... Was that supposed to be mocking or something? Because I didn't
| | | |     | | + 259405 [mental@ry ia] Heh, sorry.  I couldn't help volunteering an impression of an actual
| | | |     | | | 259460 [wiltroutja@h] Yes, as a mater of fact I do have a life. And I have never seen most of
| | | |     | | | 259461 [wiltroutja@h] But Mental Guy, what did you mean with your first statment? Can I has
| | | |     | | | 259464 [gregory.t.br] It seems like you're not even reading this thread.  It wasn't mental
| | | |     | | | + 259470 [wiltroutja@h] Weird game ideas? Most of the people I'v talked to like my game ideas.
| | | |     | | | | + 259478 [gregory.t.br] No, it's not that C++ is unfamiliar here, it's just off topic, and
| | | |     | | | | | 259483 [seebs@se bs ] Maybe Joe should try lolcode.  Someone will eventually implement a MMORPG as
| | | |     | | | | + 259480 [seebs@se bs ] I'm autistic, so I may not have the whole social pattern down.  However, in
| | | |     | | | | + 259482 [mental@ry ia] Sky Pirates _are_ cool, no denying.  Just a bit weird topically for the
| | | |     | | | | + 259502 [perrin@ap th] The way you present those game ideas makes them seem a bit "weird".  That
| | | |     | | | |   259743 [wiltroutja@a] I hate to break it to you, but I was on-topic most of the time. I made a
| | | |     | | | |   259744 [wiltroutja@a] Lol. Could have gone on forever with that one.
| | | |     | | | |   259752 [perrin@ap th] No need.  I already got the point: you have *very* thin skin.
| | | |     | | | |   + 259778 [sy1234@gm il] And either no grasp of paragraphs or a broken enter key.  =)
| | | |     | | | |   | + 259815 [apeiros@gm .] Regards
| | | |     | | | |   | | 259872 [wiltroutja@a] I can always Right-Click.
| | | |     | | | |   | + 260595 [robert.dober] Actually that's excellent news!
| | | |     | | | |   + 259804 [wiltroutja@a] I don't get it. Do you want me to continue my story for ages and ages?
| | | |     | | | |     259805 [wiltroutja@a] I hate to break it to you, but I was on-topic most of the time. I made a
| | | |     | | | + 259525 [robert.dober] Loaded suite test-thread
| | | |     | | + 259811 [wiltroutja@a] Find the out out place paragraph and win a free trip to Disney Land!
| | | |     | + 259400 [gregory.t.br] can has irony?  kthxbye.
| | | |     |   + 259404 [robert.dober] Whats ist Iron-Y?
| | | |     |   + 259409 [mental@ry ia] In an attempt to wring some on-topic from what's become a very strange
| | | |     |   | + 259423 [robert.dober] Well maybe a little pun is in order -- if it works I am not sure.
| | | |     |   | + 259428 [gregory.t.br] My question is, does it really matter?
| | | |     |   + 260589 [hal9000@hy e] Thank you, Greg. :)
| | | |     + 259605 [sy1234@gm il] Just a quick thanks for this little comment.
| | | |       259608 [gregory.t.br] Hehehe, well, some humor was needed in that thread. :)
| | | + 258654 [perrin@ap th] Any time tax money is spent to display a set of religious precepts like
| | + 258658 [perrin@ap th] Sure there's such a thing as bad publicity.  That's what happens when you
| |   258661 [dangerwillro] ...
| |   258726 [znmeb@ce ma ] Well, I for one don't like the name "kill" for a command/system call
| |   + 258729 [gregory.t.br] Wow Ed, you've managed to get off-topic on an off-topic thread. :)
| |   + 258736 [rwoliver2@gm] ...
| |   | + 258740 [george.ogata] There already is a #delete, which is different to #destroy.
| |   | | 258741 [rwoliver2@gm] ...
| |   | + 258752 [dangerwillro] I think there was probably some reasoning behind it. Delete is
| |   + 258776 [hramrach@ce ] However, there was no command completion back then. Kill is shorter,
| |     + 258781 [robert.dober] May I suggest a politically correct rewrite of Posix
| |     | + 258785 [TimHunter@nc] I once suggested replacing "abend" with "succeed_at_alternate_goal".
| |     | | + 258787 [robert.dober] Yes but we are two now:)
| |     | | + 258856 [znmeb@ce ma ] And of course, there's the famous DOS triple-entendre Abort/Retry/Ignore :)
| |     | |   + 258860 [gregory.t.br] With Retry and Ignore never working, so you always had to abort anyway. :)
| |     | |   + 258861 [michel.belle] ...
| |     | |     258874 [robert.dober] You are a great spotter :)
| |     | + 258790 [hramrach@ce ] Once somebody suggested replacing cat with dog. Not sure what was the
| |     + 258881 [wbp@no om in] Actually, no.  The C equivalent of the kill command is kill(). (At least
| + 258626 [transfire@gm] On Jul 10, 11:23 am, James Edward Gray II <j...@grayproductions.net>
|   258637 [lionel-subsc] They rule our beloved Japan too?!?
+ 258623 [gregory.t.br] That's the reasonable argument against the name.   My concern is that
| + 258641 [khaines@en g] Going with that, using "god" as the name of a software package is likely
| | 258659 [perrin@ap th] On the other hand, "god" is a generic term for a deity.  Some religions
| + 258721 [rlp1938@gm i] Agreed, but "God == Islam" or "God == Judaism" is equally loathsome.
|   + 258772 [perrin@ap th] I don't recall anyone suggesting those particular two-way equivalencies.
|   + 259189 [jwkenne@at g] They're all nonsense, in fact. You might as well say "Computer == Linux".
|     259198 [wiltroutja@h] I'm not seeing your anology. Islams have a God. Judaism has a God.
|     259199 [gregory.t.br] We're really spinning off on a tangent here, well a tangent of a
|     259205 [wiltroutja@h] Good idea. So many threads and comment sections of AOL and MSN stories
+ 259196 [wiltroutja@h] If someone named a program "God", and people don't like people
  + 259200 [caduceass@gm] For me, it's not about taking offense.  It's about absconding with a
  | 259206 [wiltroutja@h] I'm sorry if I don't exactly know what these library things are, or ftp
  + 259203 [hassan.schro] Sigh. How soon they forget :-)
  | + 259216 [wiltroutja@h] That link led me to a 404 error page. Am I supposed to beleive that I
  | + 259604 [sy1234@gm il] "4. Vulnerabilities Probed by SATAN" .. haha.  =)
  + 259208 [perrin@ap th] You mean like this?
    259215 [wiltroutja@h] Yes. Exactly like that. I don't have a problem with it if it doesn't
    259248 [perrin@ap th] So . . . what do you think of this?
threads.html
top