[#173424] Ruby 1.8.4 and tcltk under Linux — Mark Volkmann <r.mark.volkmann@...>

I have some Ruby code that uses Tk that works fine under Windows.

10 messages 2006/01/01

[#173454] macworld — Mike Schwab <michael.schwab@...>

What Ruby stuff will be happening at Macworld? What software is

32 messages 2006/01/01
[#173606] Re: macworld — "Hampton" <hcatlin@...> 2006/01/02

I just bought a new Mac, and its the worst dev environment for ruby

[#173607] Re: macworld — James Edward Gray II <james@...> 2006/01/02

On Jan 2, 2006, at 9:47 AM, Hampton wrote:

[#173646] Re: macworld — Chad Perrin <perrin@...> 2006/01/02

On Tue, Jan 03, 2006 at 12:52:59AM +0900, James Edward Gray II wrote:

[#173648] Re: macworld — James Edward Gray II <james@...> 2006/01/02

On Jan 2, 2006, at 1:57 PM, Chad Perrin wrote:

[#173665] Re: macworld — Chad Perrin <perrin@...> 2006/01/02

On Tue, Jan 03, 2006 at 05:03:49AM +0900, James Edward Gray II wrote:

[#173520] Can't change the value of self — Jonathan Leighton <lists@...>

This code:

14 messages 2006/01/02

[#173544] New to Ruby and Programming — Will Shattuck <willshattuck@...>

Hi folks. Happy New Year!

36 messages 2006/01/02
[#173551] Re: New to Ruby and Programming — "J. Ryan Sobol" <ryansobol@...> 2006/01/02

Can you list and describe the programs you've developed in the past?

[#173555] Re: New to Ruby and Programming — Will Shattuck <willshattuck@...> 2006/01/02

On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:

[#173556] Re: New to Ruby and Programming — "J. Ryan Sobol" <ryansobol@...> 2006/01/02

Sounds like your at the cusp of a new and exciting thing, so I want

[#173557] Re: New to Ruby and Programming — Will Shattuck <willshattuck@...> 2006/01/02

On 1/1/06, J. Ryan Sobol <ryansobol@gmail.com> wrote:

[#173628] application and web app technologies — cartercc@...

January, 2006.

32 messages 2006/01/02

[#173657] Implicit block parameter? — "Ross Bamford" <rosco@...>

Hi,

33 messages 2006/01/02

[#173738] Rubyhelp wanted /offered — PG <PG@...>

hi guys - I read some of the posts here & wanted to point out that

16 messages 2006/01/03

[#173777] Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — Alan Garrison <alang@...>

Our company, which is beginning to use Ruby in production systems, has

37 messages 2006/01/03
[#173783] Re: Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — "M. Edward (Ed) Borasky" <znmeb@...> 2006/01/03

I just took a brief look at the Darcs web site and the Cogito web site.

[#173789] Re: Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — Alan Garrison <alang@...> 2006/01/03

M. Edward (Ed) Borasky wrote:

[#173797] Re: Ruby projects and interfaces to revision control systems — Ollivier Robert <keltia@...> 2006/01/03

Alan Garrison wrote:

[#173807] Re: Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — mental@... 2006/01/03

It's lunch time, so here are my own (very opinionated) thoughts on

[#173852] Re: Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — mathew <meta@...> 2006/01/03

mental@rydia.net wrote:

[#174304] Re: Ruby projects and interfaces to revision control systems (Darcs vs. Cogito) — Jeffrey Dik <jeffrey.dik@...> 2006/01/05

2005 seems to have been a really good year for open-source SCMs. Many

[#173791] - Requesting Comments for Process Definition and Presentation — Ilias Lazaridis <ilias@...>

comp.lang.python / comp.lang.ruby

23 messages 2006/01/03
[#173798] Re: [OT] - Requesting Comments for Process Definition and Presentation — Claudio Grondi <claudio.grondi@...> 2006/01/03

Ilias Lazaridis wrote:

[#173823] Re: [OT] - Requesting Comments for Process Definition and Presentation — Ilias Lazaridis <ilias@...> 2006/01/03

Claudio Grondi wrote:

[#174489] Re: [OT] - Requesting Comments for Process Definition and Presentation — Xavier Morel <xavier.morel@...> 2006/01/06

Ilias Lazaridis wrote:

[#173897] silly regex question — Joe Van Dyk <joevandyk@...>

Can someone help me make this code not suck?

15 messages 2006/01/03
[#173901] Re: silly regex question — James Edward Gray II <james@...> 2006/01/03

On Jan 3, 2006, at 4:22 PM, Joe Van Dyk wrote:

[#173902] Re: silly regex question — Joe Van Dyk <joevandyk@...> 2006/01/03

On 1/3/06, James Edward Gray II <james@grayproductions.net> wrote:

[#173905] Re: silly regex question — James Edward Gray II <james@...> 2006/01/03

On Jan 3, 2006, at 4:41 PM, Joe Van Dyk wrote:

[#173898] Proposed new rule — "Warren Brown" <warrenbrown@...>

> The three rules of Ruby Quiz:

40 messages 2006/01/03
[#173912] Re: [QUIZ] Proposed new rule — James Edward Gray II <james@...> 2006/01/03

On Jan 3, 2006, at 4:23 PM, Warren Brown wrote:

[#173923] Email Address Regex [was Re: silly regex question] — Jacob Fugal <lukfugl@...>

On 1/3/06, Dan Kohn <dan@dankohn.com> wrote:

30 messages 2006/01/03
[#174026] Re: Email Address Regex — "Andreas S." <f@...> 2006/01/04

Jacob Fugal wrote:

[#173989] Is there a way to clear the contents of a terminal? — John Maclean <info@...>

Hi Chaps,

15 messages 2006/01/04

[#174109] Question on iterating a hash — phil swenson <phil.swenson@...>

I have a hash that looks like this : {"1"=>"0, "3"="1", "45"=>"1",

17 messages 2006/01/04

[#174202] using irb — John Maclean <info@...>

So far I've created a ~/bin/rb/dev/foo directory as a place to write and test scripts. After reading the "pick axe" book some more it seems as is irb is a better "place" or "way" to try out stuff. This correct?

14 messages 2006/01/05

[#174257] Demystifying Symbols. — Dave Howell <groups@...>

I was actually doing really well until the strange discussion involving

24 messages 2006/01/05

[#174312] how remove puts inside method? — Carlos Delmar <k@...>

I have a method (process_transaction) that uses puts to output a result.

14 messages 2006/01/05

[#174357] Is it possible to create a GUI/TUI toolkit using ruby? — "simonh" <simonharrison@...>

this may be a daft question, but is it possible to create a widget

9 messages 2006/01/05

[#174374] How do you sort a text file? — Danny Abc <dannyabc@...>

I'm new to Ruby and was wondering how to sort a text file?

15 messages 2006/01/05

[#174521] Dice Roller (#61) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

111 messages 2006/01/06
[#174560] Re: [QUIZ] Dice Roller (#61) — Jim Freeze <jim@...> 2006/01/06

On Jan 6, 2006, at 12:56 PM, Ruby Quiz wrote:

[#174568] Re: [QUIZ] Dice Roller (#61) — Austin Ziegler <halostatue@...> 2006/01/06

On 06/01/06, Jim Freeze <jim@freeze.org> wrote:

[#174585] Re: [QUIZ] Dice Roller (#61) — Jim Freeze <jim@...> 2006/01/06

[#174587] Re: [QUIZ] Dice Roller (#61) — James Edward Gray II <james@...> 2006/01/06

On Jan 6, 2006, at 5:35 PM, Jim Freeze wrote:

[#174531] Re: [QUIZ] Dice Roller (#61) — "J. Ryan Sobol" <ryansobol@...> 2006/01/06

Please don't take this the wrong way, but I've never played D&D.

[#174593] Splitting strings on spaces, unless inside quotes — Richard Livsey <richard@...>

I want to split a string into words, but group quoted words together

17 messages 2006/01/07

[#174641] Iterator Fu Failing Me — James Edward Gray II <james@...>

I have a group of classes, all implementing a parse?() class method.

38 messages 2006/01/07

[#174669] RMagick exporting pixels as string — Ilmari Heikkinen <ilmari.heikkinen@...>

Hi,

4 messages 2006/01/07

[#174744] Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...>

After my first day back at my University, I was quickly reminded that

101 messages 2006/01/08
[#174749] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Seidman <gsslist+ruby@...> 2006/01/08

On Sun, Jan 08, 2006 at 11:28:17AM +0900, Gregory Brown wrote:

[#174752] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/7/06, Gregory Seidman <gsslist+ruby@anthropohedron.net> wrote:

[#174755] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — gwtmp01@... 2006/01/08

[#174756] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, gwtmp01@mac.com <gwtmp01@mac.com> wrote:

[#174800] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Edward Gray II <james@...> 2006/01/08

On Jan 8, 2006, at 12:14 AM, Gregory Brown wrote:

[#174839] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Steve Litt <slitt@...> 2006/01/08

On Sunday 08 January 2006 12:32 pm, James Edward Gray II wrote:

[#174847] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, Steve Litt <slitt@earthlink.net> wrote:

[#174856] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Steve Litt <slitt@...> 2006/01/08

On Sunday 08 January 2006 05:04 pm, Gregory Brown wrote:

[#174867] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — gwtmp01@... 2006/01/08

[#174875] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Britt <james_b@...> 2006/01/09

gwtmp01@mac.com wrote:

[#174894] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/09

On 1/8/06, James Britt <james_b@neurogami.com> wrote:

[#174895] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — dblack@... 2006/01/09

Hi --

[#174905] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/09

On 1/8/06, dblack@wobblini.net <dblack@wobblini.net> wrote:

[#174963] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — dblack@... 2006/01/09

Hi --

[#175030] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/09

On 1/9/06, dblack@wobblini.net <dblack@wobblini.net> wrote:

[#175036] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — gwtmp01@... 2006/01/09

[#175050] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/09

On 1/9/06, gwtmp01@mac.com <gwtmp01@mac.com> wrote:

[#175055] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Britt <james_b@...> 2006/01/09

Gregory Brown wrote:

[#174758] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, gwtmp01@mac.com <gwtmp01@mac.com> wrote:

[#174761] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — gwtmp01@... 2006/01/08

[#174766] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, gwtmp01@mac.com <gwtmp01@mac.com> wrote:

[#174794] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — gwtmp01@... 2006/01/08

[#174806] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Edward Gray II <james@...> 2006/01/08

On Jan 8, 2006, at 9:00 AM, gwtmp01@mac.com wrote:

[#174822] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, James Edward Gray II <james@grayproductions.net> wrote:

[#174826] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Edward Gray II <james@...> 2006/01/08

On Jan 8, 2006, at 2:04 PM, Gregory Brown wrote:

[#174827] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — Gregory Brown <gregory.t.brown@...> 2006/01/08

On 1/8/06, James Edward Gray II <james@grayproductions.net> wrote:

[#174828] Re: Ideas on "Why Living Dangerous can be A Good Thing" in Ruby? — James Edward Gray II <james@...> 2006/01/08

On Jan 8, 2006, at 2:21 PM, Gregory Brown wrote:

[#174768] Is Ruby RAILS really suitable for modern Web Development ? — "Jules" <Roseanna80@...>

I have been reading through RAILS and builing the Depot Application

13 messages 2006/01/08

[#174775] You want a Ruby extension? Talk to me, baby — Joe Van Dyk <joevandyk@...>

Hi,

25 messages 2006/01/08

[#174890] global variables are bad?? — John Maclean <info@...>

Chaps,

13 messages 2006/01/09

[#174921] Remove HTML from String? — "jotto" <jonathan.otto@...>

I can't find a method to remove HTML from a string in the core API. PHP

12 messages 2006/01/09

[#175020] Ruby, Unicode - ever? — dseverin <dmitry.severin@...>

Well, as I could search the web so far, since about 2001 or even early,

21 messages 2006/01/09
[#175025] Re: Ruby, Unicode - ever? — Austin Ziegler <halostatue@...> 2006/01/09

On 09/01/06, dseverin <dmitry.severin@gmail.com> wrote:

[#175275] Re: Ruby, Unicode - ever? — David Vallner <david@...> 2006/01/11

Austin Ziegler wrote:

[#175138] problem with running foxruby on windows 2000 — Mohsen Akhavan <cplus_developer@...>

Hello How are you ,I installed ruby 1.8.2 with fxruby 1.2.6 for

9 messages 2006/01/10

[#175219] Finding CPU% of a linux task — Joe Van Dyk <joevandyk@...>

Hi,

9 messages 2006/01/10

[#175277] Finding a sentence (more than one word & punctuation (, . ;)) in a string? — Kev Jackson <kevin.jackson@...>

given this string

12 messages 2006/01/11

[#175321] Parsing Japanese Language and Some Ruby Trivia — Michael Sullivan <unixwzrd@...>

All this talk about Unicode support and HTML parsing got me to

15 messages 2006/01/11
[#175417] Re-post: Parsing Japanese Language and Some Ruby Trivia — Michael Sullivan <unixwzrd@...> 2006/01/12

Hi,

[#175327] how can I give a name to an anonymous class — sayoyo@...

Hi,

15 messages 2006/01/11
[#175331] Re: how can I give a name to an anonymous class — gwtmp01@... 2006/01/11

[#175352] safe array index ? — Christer Nilsson <janchrister.nilsson@...>

Is it possible to catch index out of range ?

14 messages 2006/01/11

[#175408] Looking up properties and speed — Jonathan Leighton <lists@...>

Hi,

14 messages 2006/01/12

[#175429] Availability of Ruby 1.8.4 Windows (One Click Install) — jsp408@...

1.8.2-15 was the last release of Ruby (Windows One Click Install) in

17 messages 2006/01/12
[#175432] Re: Availability of Ruby 1.8.4 Windows (One Click Install) — David Vallner <david@...> 2006/01/12

jsp408@comcast.net wrote:

[#175444] Re: Availability of Ruby 1.8.4 Windows (One Click Install) — James Britt <james_b@...> 2006/01/12

David Vallner wrote:

[#175466] Re: Availability of Ruby 1.8.4 Windows (One Click Install) — Alexandru Popescu <the.mindstorm.mailinglist@...> 2006/01/12

Sorry to come in the middle of this thread, but I am wondering why

[#175458] Dice Roller (#61) — Matthew Moss <matthew.moss.coder@...>

My reason for choosing a dice roller is somewhat selfish: I was interested

13 messages 2006/01/12

[#175470] Newbie question about multiple assignments — Alex <AlexAfrasinei@...>

12 messages 2006/01/12

[#175487] Question about GUI API for Ruby — Jacek Olszak <jacekolszak@...2.pl>

Hi... currently I'm developing a small gui application. I don't know

29 messages 2006/01/12
[#175551] Re: Question about GUI API for Ruby — tsumeruby@... 2006/01/12

On Thursday 12 January 2006 08:37 pm, Jacek Olszak wrote:

[#175587] Re: Question about GUI API for Ruby — "David Vallner" <david@...> 2006/01/12

On Thu, 12 Jan 2006 17:44:33 +0100, <tsumeruby@tsumelabs.com> wrote:

[#175588] Nothern VA RUG to meet — Richard Kilmer <rich@...>

January 25...details can be found here: http://www.novarug.org

25 messages 2006/01/12
[#175589] RUGS — "J. Ryan Sobol" <ryansobol@...> 2006/01/12

It's exhilarating to see all the RUG announcements, like this one.

[#175655] ruby under cygwin & windows paths — Mojca Miklavec <mojca.miklavec.lists@...>

Hello,

15 messages 2006/01/13

[#175662] Packing (#62) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

16 messages 2006/01/13

[#175720] Range#member? Oddity — James Edward Gray II <james@...>

I'm not understanding what I am seeing here. Can anyone please

43 messages 2006/01/13
[#175732] Re: Range#member? Oddity — Matthew Desmarais <desmarm@...> 2006/01/13

James Edward Gray II wrote:

[#175745] Re: Range#member? Oddity — "David Vallner" <david@...> 2006/01/13

On Fri, 13 Jan 2006 22:16:14 +0100, Matthew Desmarais <desmarm@gmail.com>

[#175746] Re: Range#member? Oddity — James Edward Gray II <james@...> 2006/01/13

On Jan 13, 2006, at 3:58 PM, David Vallner wrote:

[#175750] Re: Range#member? Oddity — "David Vallner" <david@...> 2006/01/13

On Fri, 13 Jan 2006 23:00:37 +0100, James Edward Gray II

[#175781] Re: Range#member? Oddity — Hal Fulton <hal9000@...> 2006/01/14

James Edward Gray II wrote:

[#175783] Re: Range#member? Oddity — Christer Nilsson <janchrister.nilsson@...> 2006/01/14

Hal Fulton wrote:

[#175731] why is this a comile error — bimo remus <bmoremus@...>

I am doing a tutorial from the Thomas~Hansson book and am getting this

20 messages 2006/01/13
[#175733] Re: why is this a comile error — Austin Ziegler <halostatue@...> 2006/01/13

On 13/01/06, bimo remus <bmoremus@yahoo.com> wrote:

[#175735] Re: why is this a comile error — James Edward Gray II <james@...> 2006/01/13

On Jan 13, 2006, at 3:17 PM, Austin Ziegler wrote:

[#175755] Re: why is this a comile error — Austin Ziegler <halostatue@...> 2006/01/13

On 13/01/06, James Edward Gray II <james@grayproductions.net> wrote:

[#175832] Librend 0.4 — Ilmari Heikkinen <ilmari.heikkinen@...>

Librend 0.4-----------

5 messages 2006/01/14

[#175882] Resetting ruby — List Recv <listrecv@...>

I'm looking for a fast way to "reset" Ruby. That is, to reset the

19 messages 2006/01/16

[#175910] basic question about Fixnum & Integer — Tom Allison <tallison@...>

Hello,

25 messages 2006/01/16
[#175911] Re: basic question about Fixnum & Integer — zdennis <zdennis@...> 2006/01/16

Tom Allison wrote:

[#175913] Re: basic question about Fixnum & Integer — Tom Allison <tallison@...> 2006/01/16

zdennis wrote:

[#175919] Re: basic question about Fixnum & Integer — Jules <julesjacobs@...> 2006/01/16

No, you don't have to require integer, because it is in the core. The

[#175921] Re: basic question about Fixnum & Integer — Tom Allison <tallison@...> 2006/01/16

Jules wrote:

[#175923] Re: basic question about Fixnum & Integer — Daniel Harple <dharple@...> 2006/01/16

[#175950] this month, the next month, and the one after that — Mason Kessinger <masonkessinger@...>

What I want to do is simple.

14 messages 2006/01/16

[#175998] Question about regular expression — Eric Luo <eric.wenbl@...>

I need to hack out an regular expression, which will match "SNPB" without

12 messages 2006/01/17

[#176147] Unable to write to file... (example from "pickaxe book", second edition, p128) — John Maclean <info@...>

Following the example from "pickaxe book", second edition, p128

11 messages 2006/01/19

[#176155] My Thought on the "Pickaxe book" (from a Ruby novice) — John Maclean <info@...>

Chaps,

33 messages 2006/01/19
[#176157] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — Doug Bromley <doug.bromley@...> 2006/01/19

I think what John is saying is that in the other languages he's used

[#176158] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — John Maclean <info@...> 2006/01/19

Thanks Doug. More concise and articulate that I ever could be.

[#176162] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — Kenneth Collins <pine29@...> 2006/01/19

John, pick out the way to do something that seems most natural to you

[#176167] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — Mark Volkmann <r.mark.volkmann@...> 2006/01/19

On 1/19/06, Kenneth Collins <pine29@myfastmail.com> wrote:

[#176168] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — James Britt <james_b@...> 2006/01/19

Mark Volkmann wrote:

[#176186] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — Mark Volkmann <r.mark.volkmann@...> 2006/01/19

On 1/19/06, James Britt <james_b@neurogami.com> wrote:

[#176188] Re: My Thought on the "Pickaxe book" (from a Ruby novice) — ara.t.howard@... 2006/01/19

On Fri, 20 Jan 2006, Mark Volkmann wrote:

[#176196] Ruby Quiz #62 — Andrew Dudzik <adudzik@...>

Hi all--just found my way into this list by way of Ruby Quiz, which looks

14 messages 2006/01/19

[#176229] Mongrel 0.1.0 -- A Fast As Hell Mostly Ruby Web Server — Zed Shaw <zedshaw@...>

Hi,

16 messages 2006/01/20

[#176247] Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, Maybe) — Zed Shaw <zedshaw@...>

Hi All,

41 messages 2006/01/20
[#176430] Re: [ANN] Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, Maybe) — PA <petite.abeille@...> 2006/01/21

[#176461] Re: [ANN] Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, Maybe) — Jim Freeze <jimfreeze@...> 2006/01/22

On Jan 21, 2006, at 3:07 PM, PA wrote:

[#176469] Re: Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, M — Jeff Pritchard <jp@...> 2006/01/22

Noob question here.

[#176480] Re: Mongrel 0.1.1 -- A Fast Ruby Web Server (It Works Now, M — Zed Shaw <zedshaw@...> 2006/01/22

On Jan 22, 2006, at 12:42 PM, Jeff Pritchard wrote:

[#176255] Grid Folding (#63) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

28 messages 2006/01/20

[#176282] error:- "regex literal in condition" — John Maclean <info@...>

Hi Guys,

32 messages 2006/01/20
[#176288] Hungarian Case variable names. — Zach <zacharooni@...> 2006/01/20

This is an ignorant question to pose, but here I go anyway.

[#176297] Basic Inheritance questions {noob alert:- pickaxe ed. 2, page 27} — John Maclean <info@...>

Chaps,

12 messages 2006/01/20
[#176298] Re: Basic Inheritance questions {noob alert:- pickaxe ed. 2, page 27} — Wilson Bilkovich <wilsonb@...> 2006/01/20

You can do it one of three ways:

[#176329] Re: Basic Inheritance questions {noob alert:- pickaxe ed. 2, page 27} — John Maclean <info@...> 2006/01/20

Thanks for that speedy reply. I've decided to require the within the

[#176330] PostgreSQL in Ruby with SSL connections — Kevin Brown <blargity@...>

Is SSL supported with the ruby postgres adapter? I'd like to SSL the

13 messages 2006/01/20
[#176383] Re: PostgreSQL in Ruby with SSL connections — Dick Davies <rasputnik@...> 2006/01/21

It's handled transparently by libpq. If you're using the C library,

[#176879] Re: PostgreSQL in Ruby with SSL connections — Kevin Brown <blargity@...> 2006/01/25

I'd like to use SSL certificate authentication, and that happens

[#176456] #63: Grid Folding — Luke Blanshard <luke@...>

Greetings all,

16 messages 2006/01/22

[#176457] Minimizing memory allocations — Ilmari Heikkinen <ilmari.heikkinen@...>

So there I was this morning, staring at an ObjectSpace counter tellingme that I'm allocating 1500 Arrays and 10000 Floats per frame. Whichpretty much ground my framerate to ground by requiring a 0.2s GC runevery other frame. So I decided to get down and rid my code of as manyallocations as possible.

23 messages 2006/01/22
[#176512] Re: Minimizing memory allocations — John Carter <john.carter@...> 2006/01/23

On Sun, 22 Jan 2006, Ilmari Heikkinen wrote:

[#177139] Re: Memoization? — Dave Howell <groups@...> 2006/01/26

[#176479] remove non-ASCII characters in a string — Levin Alexander <levin@...>

Hi,

14 messages 2006/01/22

[#176525] Line breaking in Ruby can be dangerous — Sky Yin <sky.yin@...>

After programing in ruby for the past 3 months, I must say I'm

11 messages 2006/01/23

[#176543] WeakRef Hash — James Edward Gray II <james@...>

I need a Hash-like structure, using WeakRef, so that the key value

14 messages 2006/01/23

[#176622] About rant on Dave Thomas site, titled 'imitation...' — "simonh" <simonharrison@...>

Couldn't post a reply on Daves site so thought i'd post one here. Here

38 messages 2006/01/24
[#177011] Re: About rant on Dave Thomas site, titled 'imitation...' — "Francis Hwang" <sera@...> 2006/01/25

SteveC wrote:

[#177218] Re: About rant on Dave Thomas site, titled 'imitation...' — Dave Thomas <Dave@...> 2006/01/27

[#177219] Re: About rant on Dave Thomas site, titled 'imitation...' — Alex Combas <alex.combas@...> 2006/01/27

On 1/26/06, Dave Thomas <Dave@pragprog.com> wrote:

[#177269] Re: About rant on Dave Thomas site, titled 'imitation...' — Dave Thomas <Dave@...> 2006/01/28

[#177272] Re: About rant on Dave Thomas site, titled 'imitation...' — Alex Combas <alex.combas@...> 2006/01/28

On 1/27/06, Dave Thomas <Dave@pragprog.com> wrote:

[#177387] Re: About rant on Dave Thomas site, titled 'imitation...' — Eric Hodel <drbrain@...7.net> 2006/01/30

On Jan 28, 2006, at 1:05 AM, Alex Combas wrote:

[#177389] Re: About rant on Dave Thomas site, titled 'imitation...' — Alex Combas <alex.combas@...> 2006/01/30

On 1/29/06, Eric Hodel <drbrain@segment7.net> wrote:

[#176722] LazyLoad — "Erik Veenstra" <google@...>

Imagine, you're building a CVS like repository. A repository

22 messages 2006/01/24

[#176883] postgres database — Tom Allison <tallison@...>

What is the file I need to require for connection to a postgres

14 messages 2006/01/25

[#176899] I like the new ruby-doc.org! — James Edward Gray II <james@...>

Hadn't seen this mentioned here, so just wanted to say that I feel

30 messages 2006/01/25

[#176923] Gems zlib problem — Ryan Tate <ryantate@...>

I am going to echo posts scattered throughout the Internet here and say

16 messages 2006/01/25
[#176928] Re: Gems zlib problem — mlbright@... 2006/01/25

This is what worked for me.

[#177189] Re: Gems zlib problem — Ryan Tate <ryantate@...> 2006/01/27

Thanks, I'll give this a shot. I did install all three of those (zlibc,

[#177306] nil != [] — Alex Polite <notmyprivateemail@...>

OK. Here's my second stupid question for today.

13 messages 2006/01/28

[#177318] Loop weirdness — Jonathan Leighton <lists@...>

Hi,

16 messages 2006/01/28

[#177327] OpenGL-0.32g for Apple MacOS X — James Adam <james.adam@...>

In case anyone needs this, I've uploaded my tweaked version of the

9 messages 2006/01/29

[#177383] relative dates — charlie bowman <cbowmanschool@...>

today = Time.now

14 messages 2006/01/30

[#177404] Ruby tutorials w/ excercises — Scott Taylor <scott@...>

13 messages 2006/01/30

[#177415] One-Click Ruby Installer 184-16 preview1 is available! — Curt Hibbs <curt.hibbs@...>

One-Click Ruby Installer 184-16 preview1 is available!

18 messages 2006/01/30
[#177419] Re: One-Click Ruby Installer 184-16 preview1 is available! — Dirk Meijer <hawkman.gelooft@...> 2006/01/30

whoa!

[#177424] Strange posting about ebooks — Peter Hickman <peter@...>

For some unfathomable reason I have received four emails containing

58 messages 2006/01/30
[#177447] Re: Strange posting about ebooks — dblack@... 2006/01/30

Hi --

[#177452] Re: Strange posting about ebooks — Dirk Meijer <hawkman.gelooft@...> 2006/01/30

i got them as well...

[#177453] Re: Strange posting about ebooks — dblack@... 2006/01/30

Hi --

[#177455] Re: Strange posting about ebooks — James Edward Gray II <james@...> 2006/01/30

On Jan 30, 2006, at 8:21 AM, dblack@wobblini.net wrote:

[#177498] Re: Strange posting about ebooks — tsumeruby@... 2006/01/30

On Monday 30 January 2006 11:28 pm, James Edward Gray II wrote:

[#177502] Re: Strange posting about ebooks — Ryan Leavengood <leavengood@...> 2006/01/30

On 1/30/06, tsumeruby@tsumelabs.com <tsumeruby@tsumelabs.com> wrote:

[#177469] check for and if not there, create direcory and file — charlie bowman <cbowmanschool@...>

18 messages 2006/01/30

[#177491] Is this a floating point precision problem? — "Todd S." <tgate@...>

I'm using the Matrix module (matrix.rb) to help place a vertex into

11 messages 2006/01/30

[#177517] One-Click Ruby Installer 184-16 preview2 is available! — Curt Hibbs <curt.hibbs@...>

=== One-Click Ruby Installer 184-16 preview2 is available! ===

24 messages 2006/01/30
[#177532] Re: One-Click Ruby Installer 184-16 preview2 is available! — Tom Copeland <tom@...> 2006/01/31

On Tue, 2006-01-31 at 08:32 +0900, Curt Hibbs wrote:

[#177567] Re: One-Click Ruby Installer 184-16 preview2 is available! — Curt Hibbs <ml.chibbs@...> 2006/01/31

On 1/30/06, Tom Copeland <tom@infoether.com> wrote:

[#177596] Re: One-Click Ruby Installer 184-16 preview2 is available! — Joel VanderWerf <vjoel@...> 2006/01/31

Curt Hibbs wrote:

[#177612] Re: One-Click Ruby Installer 184-16 preview2 is available! — Curt Hibbs <ml.chibbs@...> 2006/01/31

On 1/31/06, Joel VanderWerf <vjoel@path.berkeley.edu> wrote:

[#177642] Re: One-Click Ruby Installer 184-16 preview2 is available! — Guillaume Marcais <guslist@...> 2006/02/01

[#177643] Re: One-Click Ruby Installer 184-16 preview2 is available! — Curt Hibbs <ml.chibbs@...> 2006/02/01

Maybe the RUBYOPT environent variable isn't getting set. Try manually

[#177539] Mongrel HTTP Library 0.2.0 (Fast And RubyForgified) — Zed Shaw <zedshaw@...>

Hi Everyone,

10 messages 2006/01/31

[#177619] Numeric#of — ara.t.howard@...

28 messages 2006/01/31
[#177621] Re: [RCR] Numeric#of — Yukihiro Matsumoto <matz@...> 2006/01/31

Hi,

[QUIZ.SUMMARY] Dice Roller (#61)

From: Matthew Moss <matthew.moss.coder@...>
Date: 2006-01-12 07:04:58 UTC
List: ruby-talk #175458
My reason for choosing a dice roller is somewhat selfish: I was interested
to see how people would solve a problem that required parsing a
mini-language. I've written lexers and parsers before, years ago, but I
wanted to see what methods the Ruby gurus would employ.

I was not unsurprised. While there were some "traditional" solutions, there
were also a few that made me remember something I realized in past Ruby
Quizzes: it's all about pattern matching.  One of the solutions to past quiz
#24 (Texas Hold'Em) showed how much power can be gained by a careful
examination of the patterns in the problem; with a few carefully built
regular expressions, some gsub calls and a bit of magic, you can turn what
looks like a complex problem into something much similar.  I should have
remembered that (or, at the least, realized that someone else would).

Discussion on the list about the quiz was rather active, most of the time
getting into the nitty-gritty details of what d10 and 5d6d7 meant, and
occassionally joking about munchkins and their stats of all 18 (with a
strength of 18/00, of course). As solutions came in, it was nice to see
about four or five people making their first attempt. With them, this quiz
gets the bronze medal for submission count, behind the LCD Numbers quiz
(#14) and the Numeric Maze quiz (#60).

I found unique bits in most every solution; even those that took almost
identical approaches would often, at the least, have different regular
expressions. If you are afraid of the mighty regexp, now would be a good
time to study some samples, since the syntax for the dice expressions is
reasonably simple, and many people documented their regular expressions.

Most solutions fell into one of a few types. I'll cover each a bit and point
out anything in particular that attracted my attention.

The first class of solutions massaged the input expression a bit, then used
Ruby's eval method to do the work. This simple solution eluded me, since I
was so fixed on seeing parsing code. Apparently a bunch of you realized that
(as Paul Novak so nicely put) "we don't need no steenking parsers." A few
substitutions and a helper function or two was enough to do the trick, since
aside from the 'd' operator, the expression were valid Ruby already.  Let's
take a look at Christian Neukirchen's solution:

    class Integer
      def d(n)
        (1..self).inject(0) { |a, e| a + rand(n) + 1 }
      end
    end

First off we have the random number generation; most solutions had this or a
very similar variant. So the call 3.d(6) will roll and accumulate three
six-sided dice, and the expression 3.d(6) is almost a valid dice expression.
It is in Christian's initialization method that dice expressions are turned
into Ruby expressions:

    def initialize(dice)
       @src = dice.gsub(/d(%|00)(\D|$)/, 'd100\2').
                   gsub(/d(\d+)/, 'd(\1)').
                   gsub(/(\d+|\))d/, '\1.d').
                   gsub(/\d+/) { $&.gsub(/^0+/, '') }

       @dice = eval "lambda { #@src }"
    end

(I've left out a bit of error checking; see the full solution to see
everything.)  The first substitution fixes up percentage and double-zero
values as 100. The second turns 'd' as a binary operator into 'd' as a
method call. The third substitution provides the default dice count of 1
if it wasn't specified. And the last substitution removes leading zeroes of
integers; this last substitution prevents the Ruby from interpreting values
as octal.

The morphed express is saved away in a lambda, which allows Christian to
reevaluate the expression repeatedly without performing those substitutions
every time roll is called.

There were several variations of the eval method solution, mostly in the
regular expression substitutions. A couple variations rewrote existing
operators (rather than adding new methods to Integer or Fixnum). Rather than
change the 'd' operator into a method call, he made a slightly different
twist and rolled the dice in method_missing. Perhaps Bill didn't know that
classes could be extended, or maybe he was hacking around for fun. Dennis
Ranke had a eval-looking solution with no eval to be found, because the gsub
calls actually substituted the results during parsing.  And Stefan Walk wins
for the shortest solution: three lines of hard to read Ruby code.

The second class of solutions involved using a parsing library or parser
generator tool. Three of these showed up: Pierre Barbier de Reuille used
racc, Austin Ziegler used syntax.rb, and David Tran pulled out ANTLR to
generate his parser. Each of these will let you describe your language  in
BNF format, or something quite similar to it, and it will generate a Ruby
language parser for you. These can be quite powerful solutions, although
readability of the language specification and the support code varies
widely. But I do recommend looking into these tools if you have need to do
something more powerful that dice expressions; generating a complex parser
with one of these would save much time and effort over a handcoded solution.

And now we're at the third class of solutions: the handcrafted parsers.
About nine people handcrafted parsers, mostly recursive descent which is
rather easy to code. Because these generally involve more code, I won't show
much, but I suggest taking a look at some of them.

Dominik Bathon's solution, while it prefers to use the eval method as it
goes along rather than build a parse tree, is a easy to read solution and
makes good use of StringScanner. Morus Walter's solution is decent to follow
and understand and builds up an expression tree with his Expr class, which
gets evaluated at the end with a single call to roll. My own solution is
similar, but creates a tree of proc objects.  Andrew McGuinness and Christer
Nilsson also have recursive descent parsers that can not only roll dice, but
calculation frequency distributions and histograms, and cheat.

I want to look now at a couple of standouts.  First, let's look at Dennis
Ranke's second submission. It's a recursive descent parser, contained in his
class RDParser which is included with the submission but a little too long
to summarize here. However, what RDParser has done is allow Dennis to write
this solution:

    parser = RDParser.new do
      token(/\s+/)
      token(/\d+/) {|m| m.to_i }
      token(/./) {|m| m }

      start :expr do
        match(:expr, '+', :term) {|a, _, b| a + b }
        match(:expr, '-', :term) {|a, _, b| a - b }
        match(:term)
      end

      rule :term do
        match(:term, '*', :dice) {|a, _, b| a * b }
        match(:term, '/', :dice) {|a, _, b| a / b }
        match(:dice)
      end

      def roll(times, sides)
        (1..times).inject(0) {|a, b| a + rand(sides) + 1 }
      end

      rule :dice do
        match(:atom, 'd', :sides) {|a, _, b| roll(a, b) }
        match('d', :sides) {|_, b| roll(1, b) }
        match(:atom)
      end

      rule :sides do
        match('%') { 100 }
        match(:atom)
      end

      rule :atom do
        match(Integer)
        match('(', :expr, ')') {|_, a, _| a }
      end
    end

Do I need to say how beautiful that is? It's short, clean, easy to read and
understand...  and all Ruby. Package that RDParser into a module and ship
it! I think I've found my next parsing tool...

Let's look at the guts of one more solution, by Pablo Hoch. Pablo's solution
didn't exactly fit into the other classes of solution: it's somewhere
between a parser and an eval-uator. He decided to take the infix dice
expression and turn it into a RPN (Reverse Polish Notation, that is,
postfix) expression:

    def to_rpn(infix)
       stack, rpn, last = [], [], nil
       infix.scan(/\d+|[-+*\/()d%]/) do |token|
         case token
           when /\d+/
             rpn << token
           when '%'
             rpn << "100"
           when /[-+*\/d]/
             while stack.any? && stronger(stack.last, token)
               rpn << stack.pop
             end
             rpn << "1" unless last =~ /\d+|\)|%/
             stack << token
           when '('
             stack << token
           when ')'
             while (op = stack.pop) && (op != '(')
               rpn << op
             end
         end
         last = token
       end
       while op = stack.pop
         rpn << op
       end
       rpn
    end

I love to see code that I can understand immediately, and also recognize how
it could be useful for other applications. This is definitely one of those
because postfix expressions (or prefix, to be complete) are a breeze for a
computer to evaluate:

    def roll
       stack = []
       @expr.each do |token|
         case token
           when /\d+/
             stack << token.to_i
           when /[-+*\/d]/
             b = stack.pop
             a = stack.pop
             stack << a.send(token.to_sym, b)
         end
       end
       stack.pop
    end


Thanks to everyone for the great submissions and lively discussion on the
mailing list (and the correction to the quiz that I missed!).  I just hope
when we all sit down to play that I don't see any of you with all characters
stats of 18.

In This Thread

Prev Next