[#111191] invisible Infinity — gabriele renzi <rff_rff@...>

Hi gurus and nubys,

17 messages 2004/09/01

[#111202] Ruby blog software. — Lloyd Zusman <ljz@...>

As a favor to a friend, I'm setting up a blog for her on my server.

44 messages 2004/09/01
[#111206] Re: Ruby blog software. — Jamis Buck <jgb3@...> 2004/09/01

Lloyd Zusman wrote:

[#111284] Re: Ruby blog software. — Mike Clark <mike@...> 2004/09/02

[#111287] Re: Ruby blog software. — Jamis Buck <jgb3@...> 2004/09/02

Mike Clark wrote:

[#111294] Re: Ruby blog software. — Dave Thomas <dave@...> 2004/09/02

[#111212] - EZFX Editor 0.6.0 — Richard Lyman <lymans@...>

Download:

17 messages 2004/09/01

[#111214] ruby sidebar for firefox? — djberg96@... (Daniel Berger)

Hi all,

27 messages 2004/09/01
[#111710] Firefox Ruby sidebar (Re: ruby sidebar for firefox?) — James Britt <jamesUNDERBARb@...> 2004/09/07

James Britt wrote:

[#111245] Not just $SAFE, but damn $SAFE — Aredridel <aredridel@...>

I've been toying with an IRC bot that takes input from users in channel,

20 messages 2004/09/02
[#111273] Re: Not just $SAFE, but damn $SAFE — Florian Gross <flgr@...> 2004/09/02

Aredridel wrote:

[#111277] Re: Not just $SAFE, but damn $SAFE — ts <decoux@...> 2004/09/02

>>>>> "F" == Florian Gross <flgr@ccan.de> writes:

[#111300] autochomp? — Martin DeMello <martindemello@...>

Any way to make IO.readlines chomp each line before adding it to the

33 messages 2004/09/02
[#111436] Re: autochomp? — "Robert Klemme" <bob.news@...> 2004/09/03

[#111447] Re: autochomp? — Ara.T.Howard@... 2004/09/03

On Fri, 3 Sep 2004, Robert Klemme wrote:

[#111448] Pickaxe 2 Suspense Is Killing Me — Zach Dennis <zdennis@...> 2004/09/03

I have been suffering from what appears to be an pre-PickAxe 2 Suspense

[#111364] Pickaxe 2 and rpa-base — Carl Youngblood <carl.youngblood@...>

I was just drooling in anticipation for pickaxe 2 and looking through

16 messages 2004/09/02

[#111477] Hashes and ordering — Hal Fulton <hal9000@...>

I've been wondering something today...

35 messages 2004/09/04
[#111481] Re: Hashes and ordering — Markus <markus@...> 2004/09/04

> Do people test equality of hashes very often? I, for one,

[#111483] Re: Hashes and ordering — Hal Fulton <hal9000@...> 2004/09/04

Markus wrote:

[#111488] OK... :) question about hash and array literals — Hal Fulton <hal9000@...>

It has always bothered me a little that [...] and {...} do not

31 messages 2004/09/04
[#111499] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/04

Hi,

[#111521] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/04

Yukihiro Matsumoto wrote:

[#111576] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/05

Hi,

[#111595] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/05

Yukihiro Matsumoto wrote:

[#111607] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/05

Hi,

[#111610] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/05

Yukihiro Matsumoto wrote:

[#111614] Re: OK... :) question about hash and array literals — Bill Guindon <agorilla@...> 2004/09/05

On Mon, 6 Sep 2004 08:31:38 +0900, Hal Fulton <hal9000@hypermetrics.com> wrote:

[#111531] Anyone using Copland? I need feedback! — Jamis Buck <jgb3@...>

Copland (an IoC container for Ruby) is moving forward, and I *think*

13 messages 2004/09/04

[#111543] Videos of Ruby Conference — Carl Youngblood <carl.youngblood@...>

Is anyone going to be filming rubycon? I would really like to watch

51 messages 2004/09/04
[#111558] Re: Videos of Ruby Conference — Chad Fowler <chadfowler@...> 2004/09/05

On Sun, 5 Sep 2004 07:20:14 +0900, Carl Youngblood

[#111645] Re: Videos of Ruby Conference — Robert McGovern <robert.mcgovern@...> 2004/09/06

> I have a digital video camera of my own and am also planning to try to

[#111971] Re: Videos of Ruby Conference — Eric Hodel <drbrain@...7.net> 2004/09/09

Robert McGovern (robert.mcgovern@gmail.com) wrote:

[#112002] Re: Videos of Ruby Conference — Gavin Sinclair <gsinclair@...> 2004/09/09

On Thursday, September 9, 2004, 5:06:10 PM, Eric wrote:

[#112012] Re: Videos of Ruby Conference — Richard Kilmer <rich@...> 2004/09/09

We are going to have my buddy's audio mixing board, a wireless mic, and a

[#112016] Re: Videos of Ruby Conference — Chad Fowler <chadfowler@...> 2004/09/09

On Fri, 10 Sep 2004 00:08:22 +0900, Richard Kilmer <rich@infoether.com> wrote:

[#112021] Re: Videos of Ruby Conference — Richard Lyman <lymans@...> 2004/09/09

Please don't 'bittorrent-only' anything. There are those of use who

[#112025] BItTorrent: A Force for Good or Evil? (Re: Videos of Ruby Conference) — James Britt <jamesUNDERBARb@...> 2004/09/09

Richard Lyman wrote:

[#111687] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>

Dear fellow ruby-talkers,

49 messages 2004/09/06
[#111714] Re: Ruby-Nuby forum — "Robert Klemme" <bob.news@...> 2004/09/07

[#111718] Re: Ruby-Nuby forum — Alexey Verkhovsky <alex@...> 2004/09/07

On Tue, 2004-09-07 at 10:05, Robert Klemme wrote:

[#111765] Re: Ruby-Nuby forum — Brian Wisti <brianwisti@...> 2004/09/07

[#111770] Re: Ruby-Nuby forum — "Bill Kelly" <billk@...> 2004/09/07

> There will always be some folks who think that all

[#111855] Re: Ruby-Nuby forum — David Ross <drossruby@...> 2004/09/08

That is a very good idea. I have a few thoughts to add

[#111757] Request for ideas: simple, useful web app — "Kirk Haines" <khaines@...>

I'm working on a much broader set of IOWA documentation, and core to this is

14 messages 2004/09/07

[#111759] Reporting errors/problem with modules part of ruby base — Dany Cayouette <danyc@...>

I am a ruby newbie and am intimitaded by posting to this newsgroup... I only made two postings related to modules included with base ruby 1.8.0 and 1.8.1 (net/imap and net/telnet). I think I did my homework in researching the behavior I observed, but never saw any replies to my postings.

11 messages 2004/09/07

[#111786] Unified type conversion framework — gabriele renzi <rff_rff@...>

Hi gurus and nubys,

13 messages 2004/09/07

[#111808] Extending ruby with crypto++ — dwerder@... (Dominik Werder)

Hello everybody,

15 messages 2004/09/07

[#111839] ruby-dev summary 24171-24235 — Minero Aoki <aamine@...>

Hi all,

13 messages 2004/09/08

[#111922] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>

Hi all!

22 messages 2004/09/08

[#111972] Problem with ensuring consistency .. Finalization?? — Charles Hixson <charleshixsn@...>

I want to have a class which occasionally updates a file, but I want to

15 messages 2004/09/09

[#112096] OpenGL on MacOS X (again) — Gavin Kistner <gavin@...>

I'm trying to get Ruby/OpenGL working for just me on my MacOS X box;

13 messages 2004/09/09

[#112194] SQLite/Ruby 2.0.1 BETA — Jamis Buck <jgb3@...>

Another beta release for SQLite/Ruby is available, hard on the heels of

16 messages 2004/09/10
[#112200] Re: [ANN] SQLite/Ruby 2.0.1 BETA — Vincent Isambart <vincent.isambart@...> 2004/09/10

Hi,

[#112208] Re: [ANN] SQLite/Ruby 2.0.1 BETA — Jamis Buck <jgb3@...> 2004/09/10

Vincent Isambart wrote:

[#112195] hob x 0.2 .. blogink for ample abilities .. come into the arms of .. — why the lucky stiff <ruby-talk@...>

ok, ruby-talk. enough.

24 messages 2004/09/10

[#112229] Rails and RubyGems — Jim Menard <jimm@...>

I have two issues with installing Rails via RubyGems. I'm on Mac OS X.

12 messages 2004/09/11

[#112253] Singleton method on object via define_method? — Hal Fulton <hal9000@...>

OK, I have this variable called box.

50 messages 2004/09/11
[#112343] Re: Singleton method on object via define_method? — Martin DeMello <martindemello@...> 2004/09/12

"trans. (T. Onoma)" <transami@runbox.com> wrote:

[#112346] Re: Singleton method on object via define_method? — "trans. (T. Onoma)" <transami@...> 2004/09/12

On Sunday 12 September 2004 02:19 pm, Martin DeMello wrote:

[#112353] Re: Singleton method on object via define_method? — "David A. Black" <dblack@...> 2004/09/13

Hi --

[#112354] Re: Singleton method on object via define_method? — "Gavin Sinclair" <gsinclair@...> 2004/09/13

D. A. Black wrote:

[#112355] Re: Singleton method on object via define_method? — "David A. Black" <dblack@...> 2004/09/13

On Mon, 13 Sep 2004, Gavin Sinclair wrote:

[#112360] Re: Singleton method on object via define_method? — "Gavin Sinclair" <gsinclair@...> 2004/09/13

> On Mon, 13 Sep 2004, Gavin Sinclair wrote:

[#112382] Re: Singleton method on object via define_method? — "Robert Klemme" <bob.news@...> 2004/09/13

[#112464] Catching undefined global variable errors — "George Moschovitis" <george.moschovitis@...>

Hello everyone,

14 messages 2004/09/14

[#112506] Ruby Image — Brian Schroeder <spam0504@...>

Hello Group,

27 messages 2004/09/14
[#112511] Re: [Slightly OT] Ruby Image — James Edward Gray II <james@...> 2004/09/14

On Sep 14, 2004, at 9:04 AM, Brian Schroeder wrote:

[#112549] Programming Ruby available for pre-order — Dave Thomas <dave@...>

Folks:

37 messages 2004/09/14
[#112749] Re: [ANN] Programming Ruby available for pre-order — I did not <NOSPAM@...> 2004/09/16

On Thu, 16 Sep 2004 00:01:54 +0200, Dietmar Gack wrote:

[#112608] Ex-Perl coders: Howz it feel to convert to Ruby? — Chris <ceo@...>

I didn't even think about asking this question until now, based on a

95 messages 2004/09/15
[#112716] Re: Ex-Perl coders: Howz it feel to convert to Ruby? — ptkwt@... (Phil Tomson) 2004/09/16

In article <ER32d.2786$Qv5.1325@newssvr33.news.prodigy.com>,

[#112692] Hacking the Ruby interpreter — Tim Hunter <cyclists@...>

I've got an idea for a hack^H^H^H^H enhancement to the interpreter that I'd

12 messages 2004/09/15

[#112726] RubyGems 0.8.0 — Chad Fowler <chad@...>

Marking the 3000th download of RubyGems

13 messages 2004/09/16

[#112814] horribly impossible debugging task — "Ara.T.Howard" <Ara.T.Howard@...>

17 messages 2004/09/16

[#112815] Re: [ANN] Programming Ruby available for pre-order — Dale Martenson <dmartenson@...>

> -----Original Message-----

12 messages 2004/09/16

[#112831] Want a regular Ruby Quiz? (long) — James Edward Gray II <james@...>

I'm a fan of short, but regular programming "challenges" or "quizzes".

25 messages 2004/09/16

[#112881] Automatic class conversion / function overloading — torehalv@... (Tore Halvorsen)

Hi! Rather new to ruby, and I'm not quite sure where to look for the

18 messages 2004/09/17

[#112940] Accessing Hash elements in sorted order? — Chris <ceo@...>

Problem: I wanted to access the elements of a Hash (specifically from

14 messages 2004/09/17

[#112976] Return value of while loop. — Brian Schrer <ruby@...>

Maybe this question would be more adequate for the ruby-nuby forum ;), but

21 messages 2004/09/18

[#113026] Method improvement request .-- — Charles Hixson <charleshixsn@...>

I'm sure there must be a more idiomatic+efficient way to do this, but I

32 messages 2004/09/18

[#113055] Array#index block and rdetect — "trans. (T. Onoma)" <transami@...>

Tiny RCR suggestion:

62 messages 2004/09/19
[#113072] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/19

[#113097] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/19

Hi,

[#113100] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113103] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113105] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113130] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/20

[#113146] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/20

[#113150] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113172] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113179] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113219] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113237] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/21

Hi --

[#113118] Re: [ANN] Vim/Ruby Configuration Files, 2004.09.20 — "Mehr, Assaph (Assaph)" <assaph@...>

10 messages 2004/09/20

[#113192] Store object in on disk / mini database — Kristian Sensen <ks@...>

Hi!

19 messages 2004/09/20
[#113207] Re: Store object in on disk / mini database — "Bill Kelly" <billk@...> 2004/09/20

From: "trans. (T. Onoma)" <transami@runbox.com>

[#113222] - install.rb hack # 42 — "Ara.T.Howard" <Ara.T.Howard@...>

18 messages 2004/09/20
[#113226] Re: [ANN] - install.rb hack # 42 — Tim Hunter <cyclists@...> 2004/09/21

Ara.T.Howard wrote:

[#113227] Re: [ANN] - install.rb hack # 42 — Ara.T.Howard@... 2004/09/21

On Tue, 21 Sep 2004, Tim Hunter wrote:

[#113233] Re: [ANN] - install.rb hack # 42 — "trans. (T. Onoma)" <transami@...> 2004/09/21

On Monday 20 September 2004 08:54 pm, Ara.T.Howard@noaa.gov wrote:

[#113328] text analyzator — "martinus" <martin.ankerl@...>

I have created a little text analyzation tool, that tries to extract

16 messages 2004/09/21

[#113347] soap4r. I just dont get it. — nkb <nkb@...>

Hi.

15 messages 2004/09/22
[#113349] Re: soap4r. I just dont get it. — "NAKAMURA, Hiroshi" <nakahiro@...> 2004/09/22

Hi,

[#113407] Regexp Arity — "trans. (T. Onoma)" <transami@...>

Just ran into a need to know how many parenthetical groupings a Regexp has.

16 messages 2004/09/22
[#113410] Re: Regexp Arity — Yukihiro Matsumoto <matz@...> 2004/09/22

Hi,

[#113443] Newbie: Case statement — "Graham Foster" <graham@...>

As a newbie I'm confused about the Case construct. All the

14 messages 2004/09/22

[#113479] whitespace string only — Henrik Horneber <ryco@...>

Hi!

39 messages 2004/09/23

[#113533] Design Advice: Sub-Class 'Instances' — Gavin Kistner <gavin@...>

Summary

23 messages 2004/09/23

[#113615] The Solitaire Cipher (#1) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

26 messages 2004/09/24

[#113627] Ruby Code to HTML — James Edward Gray II <james@...>

I need to HTMLify some Ruby code. Before I go make some crude

22 messages 2004/09/24

[#113648] openssl examples and docs — "Ara.T.Howard" <Ara.T.Howard@...>

13 messages 2004/09/24

[#113697] Proc / def / yield semantics (long) — Markus <markus@...>

16 messages 2004/09/25

[#113750] local_method_missing possible — "trans. (T. Onoma)" <transami@...>

13 messages 2004/09/26
[#113752] Re: local_method_missing possible — Markus <markus@...> 2004/09/26

[#113754] Re: local_method_missing possible — "trans. (T. Onoma)" <transami@...> 2004/09/26

On Saturday 25 September 2004 10:42 pm, Markus wrote:

[#113803] RPM of Ruby 1.8.x — Matt Lawrence <matt@...>

I'm trying to find rpms for the latest released version of Ruby. After I

22 messages 2004/09/26

[#113885] {newb} Each statements — STEPHEN BECKER I V <Becker004@...>

Do each statements change the thing that they are using?

14 messages 2004/09/27

[#113888] Any YARV pre-questions in RubyConf2004? — SASADA Koichi <ko1@...>

Hi,

20 messages 2004/09/27
[#113897] Re: Any YARV pre-questions in RubyConf2004? — James Britt <jamesUNDERBARb@...> 2004/09/27

SASADA Koichi wrote:

[#113923] Best name for "this method" ? — "trans. (T. Onoma)" <transami@...>

Wondering what the conscensus is on the best name for "this method". Right now

67 messages 2004/09/27
[#113930] Re: Best name for "this method" ? — "David A. Black" <dblack@...> 2004/09/28

Hi --

[#113994] Re: Best name for "this method" ? — "Robert Klemme" <bob.news@...> 2004/09/28

[#114003] Re: Best name for "this method" ? — Gavin Sinclair <gsinclair@...> 2004/09/28

On Tuesday, September 28, 2004, 5:49:21 PM, Robert wrote:

[#114117] Re: Best name for "this method" ? — "trans. (T. Onoma)" <transami@...> 2004/09/28

On Tuesday 28 September 2004 05:44 am, Gavin Sinclair wrote:

[#114121] Re: Best name for "this method" ? — "David A. Black" <dblack@...> 2004/09/28

Hi --

[#113939] Re: Best name for "this method" ? — Florian Gross <flgr@...> 2004/09/28

trans. (T. Onoma) wrote:

[#113946] irb configure options — James Edward Gray II <james@...>

Where is a good source I can learn irb configuration options from?

15 messages 2004/09/28

[#113965] Wish list for 2.0 — STEPHEN BECKER I V <Becker004@...>

In ref to http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/31099

18 messages 2004/09/28
[#113968] Re: Wish list for 2.0 — Yukihiro Matsumoto <matz@...> 2004/09/28

Hi,

[#113971] Re: Wish list for 2.0 — STEPHEN BECKER I V <Becker004@...> 2004/09/28

does that work for end lines in the middle of a string? or a tab? I

[#113981] Re: Wish list for 2.0 — Yukihiro Matsumoto <matz@...> 2004/09/28

Hi,

[#113988] Re: Wish list for 2.0 — Gavin Sinclair <gsinclair@...> 2004/09/28

On Tuesday, September 28, 2004, 2:40:02 PM, Yukihiro wrote:

[#113976] RubyGarden Spam — James Britt <jamesUNDERBARb@...>

The rubygarden wiki has been over-run with spam links.

45 messages 2004/09/28
[#113980] Re: RubyGarden Spam — David Ross <drossruby@...> 2004/09/28

You should create a way to generate images with text

[#114135] Re: RubyGarden Spam — Patrick May <patrick@...> 2004/09/28

Hello,

[#115134] Re: RubyGarden Spam — Patrick May <patrick@...> 2004/10/06

Hello,

[#115183] Re: RubyGarden Spam — Chad Fowler <chadfowler@...> 2004/10/06

On Wed, 6 Oct 2004 11:53:55 +0900, Patrick May <patrick@hexane.org> wrote:

[#117646] RubyGarden Spam - One step to Solution — David Ross <dross@...> 2004/10/25

Here is one step of which many could be applied.

[#114152] Ruby gems crash on OpenBSD Sparc64 — Wes Moxam <wildwildwes@...>

Hi,

12 messages 2004/09/29

[#114197] ruby-dev summary 24298-24353 — SASADA Koichi <ko1@...>

Hi all,

29 messages 2004/09/29
[#114202] Re: ruby-dev summary 24298-24353 — "Robert Klemme" <bob.news@...> 2004/09/29

[#114436] Re: ruby-dev summary 24298-24353 — "trans. (T. Onoma)" <transami@...> 2004/09/30

> "SASADA Koichi" <ko1@atdot.net> schrieb im Newsbeitrag

[#114439] Re: ruby-dev summary 24298-24353 — Yukihiro Matsumoto <matz@...> 2004/10/01

Hi,

[#114443] Re: ruby-dev summary 24298-24353 — "trans. (T. Onoma)" <transami@...> 2004/10/01

On Thursday 30 September 2004 08:17 pm, Yukihiro Matsumoto wrote:

[#114229] Purely static build of Ruby — "rcoder@..." <rcoder@...>

I'm trying to find out whether it's possible to build a completely

13 messages 2004/09/29

[#114249] FXRuby help — Jamis Buck <jgb3@...>

Having some troubles getting FXRuby to work for me. Any script that I

14 messages 2004/09/29

[#114278] Too Many Ways? — Gavin Kistner <gavin@...>

At what point do you cross over from:

99 messages 2004/09/30
[#114286] Re: Too Many Ways? — "Robert Klemme" <bob.news@...> 2004/09/30

[#114298] Re: Too Many Ways? — "David A. Black" <dblack@...> 2004/09/30

Hi --

[#114314] Re: Too Many Ways? — Gavin Kistner <gavin@...> 2004/09/30

On Sep 30, 2004, at 4:04 AM, David A. Black wrote:

[#114319] Range syntax theory — Zach Dennis <zdennis@...> 2004/09/30

I have been thinking lately about rangess and I will give you the two

[#114333] Re: Range syntax theory — gabriele renzi <rff_rff@...> 2004/09/30

Zach Dennis ha scritto:

[#114408] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/09/30

> "Duplicate names and techniques to do the same

[#114631] Re: Too Many Ways? — Bob Sidebotham <bob@...> 2004/10/02

Brian Candler wrote:

[#114648] Re: Too Many Ways? — Gavin Sinclair <gsinclair@...> 2004/10/03

On Sunday, October 3, 2004, 3:34:57 AM, Bob wrote:

[#114652] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/03

On Saturday 02 October 2004 10:12 pm, Gavin Sinclair wrote:

[#114750] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Sun, Oct 03, 2004 at 12:29:39PM +0900, trans. (T. Onoma) wrote:

[#114792] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/04

On Monday 04 October 2004 04:06 am, Brian Candler wrote:

[#114797] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Mon, Oct 04, 2004 at 11:08:42PM +0900, trans. (T. Onoma) wrote:

[#114798] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Mon, Oct 04, 2004 at 11:37:09PM +0900, Brian Candler wrote:

[#114799] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/04

On Monday 04 October 2004 10:42 am, Brian Candler wrote:

[#114289] Funtionality of 'case'-Expression — Ralf Mler <r_mueller@...>

Salve!

15 messages 2004/09/30
[#114292] Re: Funtionality of 'case'-Expression — "Robert Klemme" <bob.news@...> 2004/09/30

[#114387] Proc.new(method)? (was Re: Funtionality of 'case'-Expression) — Mark Hubbart <discordantus@...> 2004/09/30

On Thu, 30 Sep 2004 16:50:03 +0900, Robert Klemme <bob.news@gmx.net> wrote:

[#114362] Re: Range syntax theory — "Mills Thomas (app1tam)" <app1tam@...>

Okay, maybe we think of it this way. '..' is a club. '...' is a club, with

23 messages 2004/09/30
[#114366] Re: Range syntax theory — Zach Dennis <zdennis@...> 2004/09/30

This has been a very fun discussion. I'll shut up now unless anyone

[#114447] Re: Range syntax theory — "Gavin Sinclair" <gsinclair@...> 2004/10/01

Zach wrote:

[#114450] Re: Range syntax theory — Zach Dennis <zdennis@...> 2004/10/01

Gavin Sinclair wrote:

[#114460] Re: Range syntax theory — "Gavin Sinclair" <gsinclair@...> 2004/10/01

Zach wrote:

[#114381] The new Pickaxe II book is a reality! — "Warren Brown" <WBrown@...>

To everyone eagerly awaiting Dave's new book:

29 messages 2004/09/30
[#114384] Re: The new Pickaxe II book is a reality! — Dave Thomas <dave@...> 2004/09/30

[#114399] Re: The new Pickaxe II book is a reality! — Kevin McConnell <kevin_mcconnell@...> 2004/09/30

> as of today

[#114402] Re: The new Pickaxe II book is a reality! — Mike Clark <mike@...> 2004/09/30

Got mine in Colorado today. I *love* the lay-flat binding. And

[#114483] Re: The new Pickaxe II book is a reality! — Victor Reyes <victor.reyes@...> 2004/10/01

PLEASSSSSSSSSSSSSSSSSSSSSSSEEEEEEEEEEEE stop enjoying it so much. I am

[#114492] Re: The new Pickaxe II book is a reality! — Florian Weber <csshsh@...> 2004/10/01

[#114392] Calling super methods — Grzegorz Dostatni <grzegorz@...>

16 messages 2004/09/30
[#114406] Re: Calling super methods — Andrew Johnson <ajohnson@...> 2004/09/30

[#114407] Re: Calling super methods — Florian Frank <flori@...> 2004/09/30

On Thu, 2004-09-30 at 22:20, Andrew Johnson wrote:

[#114398] irb: a great tool in it's own right — ptkwt@... (Phil Tomson)

irb (and a little Ruby knowledge) is great for system tasks, especially on

15 messages 2004/09/30

Re: RPN Fun

From: James Edward Gray II <james@...>
Date: 2004-09-30 23:42:37 UTC
List: ruby-talk #114437
On Sep 30, 2004, at 5:55 PM, Andreas Schwarz wrote:

> Hello,
>
> it's really nice, however there is one problem: if a define contains a 
> syntax error, the calculator quits instead of just showing the error 
> message.
>
> Andreas

I noticed that about the same time you posted this.  It's fixed in the 
version below.

Did I mention it has display modes?  Type "bin", or "hex".  :)

I know, it's a toy.  A fun one though...

James Edward Gray II

#!/usr/bin/env ruby

# class for generating RPN Calculator objects
class RPNCalc
	attr_accessor :mode		# defines methods mode() and mode = ...
	
	# handles setup after constructor
	def initialize( mode = "dec", stack = [ ] )
		@mode = mode
		@stack = stack
		
		@ops = { }
	end
	
	### Stack manipulation methods ###
	
	# primary input method, adds something to stack if it's numerical
	def push( number )
		if number.kind_of? Numeric	# don't touch non-numbers
			# the following if converts floats to ints, when it doesn't matter
			if number.kind_of?(Float) and number == number.to_i
				@stack.unshift( number.to_i )
			else
				@stack.unshift( number )
			end
			return top	# return top value, what we just added
		else
			return nil
		end
	end
	# pop from stack
	def drop( ) return unary { nil } end
	# swap top two elements from stack
	def swap( )
		return binary do |l, r|
			push( r )
			l
		end
	end
	# empty stack
	def clear( ) return @stack = [ ] end
	def dup( )
		return unary do |num|
			push( num )
			num
		end
	end
	# arbitrary stack position swap (up)
	def roll( )
		if @stack.size < top
			raise "Insufficient elements on stack for operation."
		end

		return unary { |num| @stack.delete_at(num) }
	end
	# arbitrary stack position swap (down)
	def rolld( )
		if @stack.size < top
			raise "Insufficient elements on stack for operation."
		end

		return binary do |num, n|
			@stack.insert(n, num)
			nil
		end
	end
	
	### Basis math methods ###
	
	def add( ) return binary { |l, r| l + r } end
	def sub( ) return binary { |l, r| l - r } end
	def mul( ) return binary { |l, r| l * r } end
	def mod( ) return binary { |l, r| l % r } end
	def pow( ) return binary { |l, r| l ** r } end
	def div( )
		return binary do |l, r|
			# defeat Ruby's integer division
			if l.integer? and r.integer? and l % r != 0
				l / r.to_f
			else
				l / r
			end
		end
	end

	### To int methods ###
	
	def floor( ) return unary { |num| num.floor } end
	def ceil( ) return unary { |num| num.ceil } end
	def round( ) return unary { |num| num.round } end
	
	### Higher math methods ###
	
	def abs( ) return unary { |num| num.abs } end
	def sqrt( ) return unary { |num| Math.sqrt( num ) } end
	def exp( ) return unary { |num| Math.exp( num ) } end
	def log( ) return unary { |num| Math.log( num ) } end
	def log10( ) return unary { |num| Math.log10( num ) } end
	def sin( ) return unary { |num| Math.sin( num ) } end
	def cos( ) return unary { |num| Math.cos( num ) } end
	def tan( ) return unary { |num| Math.tan( num ) } end
	def sinh( ) return unary { |num| Math.sinh( num ) } end
	def cosh( ) return unary { |num| Math.cosh( num ) } end
	def tanh( ) return unary { |num| Math.tanh( num ) } end
	def asin( ) return unary { |num| Math.asin( num ) } end
	def acos( ) return unary { |num| Math.acos( num ) } end
	def atan( ) return unary { |num| Math.atan( num ) } end
	def asinh( ) return unary { |num| Math.asinh( num ) } end
	def acosh( ) return unary { |num| Math.acosh( num ) } end
	def atanh( ) return unary { |num| Math.atanh( num ) } end
	def atan2( ) return binary { |l, r| Math.atan2( l, r ) } end

	### Bitewise manipulation methods ###

	# Warning:  These methods convert their operands to ints before 
operation
	def bit_and( ) return binary { |l, r| l.to_i & r.to_i } end
	def bit_or( ) return binary { |l, r| l.to_i | r.to_i } end
	def bit_xor( ) return binary { |l, r| l.to_i ^ r.to_i } end
	def bit_neg( ) return unary { |num| ~num.to_i } end
	
	### Operator definition methods ###
	
	# adds Ruby code as new operator
	def define_op( op, &code )
		@ops[op] = code
	end
	
	### Input/Output methods ###
	
	# parses and executes expressions in postfix notation
	# also understands "def OP RUBY_PROC_CODE" on it's own line
	def calc( postfix_exp )
		if postfix_exp =~ /^\s*def\s+(\S+)\s+(\{.+\})\s*$/	# define new op
			define_op( $1.downcase, &eval( "proc #{$2}" ) )
		else	# ... or process terms
			terms = postfix_exp.downcase.split(" ")
			terms.each do |t|
				if @ops.include? t	# use custom op definition
					if @ops[t].arity == 2	# choose handler by proc args
						binary &@ops[t]
					else
						unary &@ops[t]
					end
					next
				end
				
				case t	# ... or hardcoded definition
					when "+" then add
					when "-" then sub
					when "*" then mul
					when "%" then mod
					when "**" then pow
					when "/" then div
	
					when "&" then bit_and
					when "|" then bit_or
					when "^" then bit_xor
					when "~" then bit_neg
	
					when /^-?(?:\d[,_\d]*|0[,_0-7]+|0x[,_0-9a-f]+|0b[,_01]+)$/,
						 /^-?\d[,_\d]*\.\d[,_\d]*(?:e-?[,_\d]+)?$/
						push( eval( t.tr(",", "") ) )
	
					when "drop", "swap", "clear", "dup", "roll", "rolld",
						 "floor", "ceil", "round",
						 "abs", "sqrt",
						 "exp", "log", "log10",
						 "sin", "cos", "tan", "sinh", "cosh", "tanh",
						 "asin", "acos", "atan", "asinh", "acosh", "atanh",
						 "atan2"
						send( t.to_sym )
	
					when "bin", "dec", "hex", "oct"
						@mode = t
	
					else
						raise "Invalid term: #{t}."
				end
			end
		end
		return top
	end
	# getter for top of stack
	def top( ) return @stack[0] end
	# primary output method, display stack with optional limit
	def to_s( limit = @stack.size )
		if @stack.size == 0
			return "Empty Stack\n"
		else
			case @mode	# support four types of numerical display
				when "bin"
					return (0...limit).to_a.reverse.inject("") do |str, i|
						str + "#{i}: #{'%b' % @stack[i]}\n"
					end
				when "dec"
					return (0...limit).to_a.reverse.inject("") do |str, i|
						str + "#{i}: #{@stack[i]}\n"
					end
				when "hex"
					return (0...limit).to_a.reverse.inject("") do |str, i|
						str + "#{i}: #{'%x' % @stack[i]}\n"
					end
				when "oct"
					return (0...limit).to_a.reverse.inject("") do |str, i|
						str + "#{i}: #{'%o' % @stack[i]}\n"
					end
			end
		end
	end
	
	private
	
	### Operator processing methods ###
	
	def unary( &op )
		if @stack.size < 1
			raise "Insufficient elements on stack for operation."
		end
		
		return push( op.call( @stack.shift ) )
	end
	def binary( &op )
		if @stack.size < 2
			raise "Insufficient elements on stack for operation."
		end
		
		right, left = @stack.slice!(0, 2)
		return push( op.call( left, right ) )
	end
end

# basic stand-alone interface, just process lines and show the stack...
if __FILE__ == $0
	rpn = RPNCalc.new

	print "\n" + rpn.to_s + "\n"
	print ">  " if STDIN.tty?
	while line = ARGF.gets
		line.chomp!
		if STDIN.tty? and line =~ /^q(?:uit)?|exit$/i
			break
		else
			begin
				rpn.calc line
			rescue SyntaxError
				puts "Syntax Error:  " + $!
			rescue
				puts "Error: " + $!
			end
			print "\n" + rpn.to_s + "\n"
			print ">  " if STDIN.tty?
		end
	end
end

__END__


In This Thread