[#60304] FreeRIDE hangs when I use gets — sothoth@... (Yog-Sothoth)

Hi there, and happy new year!

23 messages 2003/01/01
[#60305] Ruby DBI — David King Landrith <dave@...> 2003/01/01

Is there any way to retrieve the table and database associated with

[#60306] Re: Ruby DBI — Tom Sawyer <transami@...> 2003/01/01

On Wednesday 01 January 2003 07:03 am, David King Landrith wrote:

[#60309] Re: Ruby DBI — David Landrith <dlandrith@...> 2003/01/01

On Wednesday, January 1, 2003, at 09:20 AM, Tom Sawyer wrote:

[#60378] Interfaces in Ruby — "Robert" <bob.news@...>

15 messages 2003/01/02

[#60541] testunit 0.1.6 problems — Daniel Berger <djberg96@...>

ruby 1.6.7, 1.6.8, 1.7.3

39 messages 2003/01/04
[#60556] Re: testunit 0.1.6 problems — <nathaniel@...> 2003/01/04

Daniel Berger [mailto:djberg96@yahoo.com] wrote:

[#60579] Re: testunit 0.1.6 problems — Gavin Sinclair <gsinclair@...> 2003/01/04

On Sunday, January 5, 2003, 2:46:04 AM, nathaniel wrote:

[#60914] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — <nathaniel@...> 2003/01/08

Gavin Sinclair [mailto:gsinclair@soyabean.com.au] wrote:

[#60947] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — Gavin Sinclair <gsinclair@...> 2003/01/09

On Thursday, January 9, 2003, 6:56:44 AM, nathaniel wrote:

[#60959] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — "Mike Campbell" <michael_s_campbell@...> 2003/01/09

> In my mind, there's nothing whatsoever wrong with an empty unit test.

[#60604] Forward: Drafting a "The Year in Scripting Languages" — matz@... (Yukihiro Matsumoto)

Hello,

21 messages 2003/01/05
[#60652] Re: Forward: Drafting a "The Year in Scripting Languages" — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/06

I noticed several replies which said that they could not do this - I

[#60620] bad interpreter — Arnaudo Massimo <marnaudo@...>

Hi everibody,

31 messages 2003/01/05
[#60985] Re: bad interpreter — mkcon@... (Martin Kahlert) 2003/01/09

In article <20030105144216.GA2879@gull.zena.it>,

[#61045] Re: bad interpreter — Arnaudo Massimo <marnaudo@...> 2003/01/09

* Martin Kahlert <mkcon@gmx.de> [gioved09 gennaio 2003, alle 16:36]:

[#61046] Re: bad interpreter — dblack@... 2003/01/09

Hi --

[#61052] Re: bad interpreter — Stoyan Zhekov <zhware@...> 2003/01/09

> > masarn1@gull:~/Ruby$ ./test.rb 2> error.log

[#61183] Re: bad interpreter — Arnaudo Massimo <marnaudo@...> 2003/01/11

* Stoyan Zhekov <zhware@hotpop.com> [venerd10 gennaio 2003, alle 08:55]:

[#60636] Compile time constant folding? — Dan Sugalski <dan@...>

Here's a quick question, now that parrot's close to getting object

19 messages 2003/01/05

[#60650] attr_cast, one a small step for interface techniques — Tom Sawyer <transami@...>

another addition to tomslib/rubylib:

16 messages 2003/01/06
[#60657] Re: attr_cast, one a small step for interface techniques — Jim Freeze <jim@...> 2003/01/06

On Monday, 6 January 2003 at 10:30:54 +0900, Tom Sawyer wrote:

[#60665] Re: attr_cast, one a small step for interface techniques — Gavin Sinclair <gsinclair@...> 2003/01/06

On Monday, January 6, 2003, 1:20:06 PM, Jim wrote:

[#60691] Re: attr_cast, one a small step for interface techniques — Tom Sawyer <transami@...> 2003/01/06

On Sunday 05 January 2003 09:30 pm, Gavin Sinclair wrote:

[#60702] Re: attr_cast, one a small step for interface techniques — Gavin Sinclair <gsinclair@...> 2003/01/06

On Monday, January 6, 2003, 7:48:18 PM, Tom wrote:

[#60766] Re: A very humour game — Gavin Sinclair <gsinclair@...>

Should a rule be set up that disallows messages (or attachments) of

13 messages 2003/01/07

[#60786] Re: attachment:ot -was RE: A very humour game — "Pe, Botp" <botp@...>

12 messages 2003/01/07

[#60877] Can you detect if a method takes a block argument? — Martin Hart <martin@...>

Hi all, hope everybody had a great new year - it is snowing outside for

16 messages 2003/01/08

[#60910] Ruby advocacy in sigs — Brennan Leathers <digibren@...>

I've started using the following as a sig on leoville.com, a very large

51 messages 2003/01/08
[#61644] Re: Ruby advocacy in sigs — "Gennady" <gfb@...> 2003/01/15

>

[#61645] Re: Ruby advocacy in sigs — Daniel Carrera <dcarrera@...> 2003/01/15

On Thu, 16 Jan 2003, Gennady wrote:

[#61662] Re: Ruby advocacy in sigs — "Park Heesob" <phasis@...> 2003/01/16

Hi,

[#61664] Re: Ruby advocacy in sigs — dblack@... 2003/01/16

Hi --

[#61667] Re: Ruby advocacy in sigs — "Hal E. Fulton" <hal9000@...> 2003/01/16

----- Original Message -----

[#61678] Re: Ruby advocacy in sigs — Tom Sawyer <transami@...> 2003/01/16

"More powerful than Perl, more object-oriented than Python."

[#61684] Re: Ruby advocacy in sigs — Hugh Sasse Staff Elec Eng <hgs@...> 2003/01/16

On Thu, 16 Jan 2003, Tom Sawyer wrote:

[#60926] The Year in Scripting Languages (Final Draft) — Lyle Johnson <lyle@...>

All,

44 messages 2003/01/08
[#60928] Re: The Year in Scripting Languages (Final Draft) — Tom Sawyer <transami@...> 2003/01/08

so who are we?

[#60943] Rubyists (Re: The Year in Scripting Languages (Final Draft)) — matz@... (Yukihiro Matsumoto) 2003/01/09

Hi,

[#60965] Re: Rubyists (Re: The Year in Scripting Languages (Final Draft)) — Jim Freeze <jim@...> 2003/01/09

On Thursday, 9 January 2003 at 9:18:00 +0900, Yukihiro Matsumoto wrote:

[#60944] OT: apple x11 — Brennan Leathers <digibren@...>

just in case anyone missed the word on the wire, apple has released its

24 messages 2003/01/09

[#61002] @@'s are not inherited? — Tom Sawyer <transami@...>

please correct me if i'm wrong but i beleive i just discovered something i did

12 messages 2003/01/09

[#61098] Using Observer pattern in client/server architecture - how? — Martin Hart <martin@...>

Hi everyone,

10 messages 2003/01/10

[#61144] Why Fox — Daniel Carrera <dcarrera@...>

Could someone explain to me why Ruby is adopting Fox as its standard GUI?

24 messages 2003/01/10

[#61167] 'require' search path — Tim Bates <tim@...>

I wish 'require' would count the current directory as the directory the file

16 messages 2003/01/11

[#61220] Ruby: politics & performance [long] — Louis Krupp <lkrupp@...>

The problem: Read a structured file (the details are irrelevant)

26 messages 2003/01/11

[#61271] sorting with the Swartzian transform — Daniel Carrera <dcarrera@...>

Hello all,

14 messages 2003/01/12

[#61349] OT: IE blatantly defiant of HTML standards — Tom Sawyer <transami@...>

33 messages 2003/01/13
[#62019] Re: OT: IE blatantly defiant of HTML standards — Eric Hodel <drbrain@...7.net> 2003/01/19

Tom Sawyer (transami@transami.net) wrote:

[#62046] Re: OT: IE blatantly defiant of HTML standards — Dmitri Colebatch <dim@...> 2003/01/20

> Tom Sawyer (transami@transami.net) wrote:

[#62048] Re: OT: IE blatantly defiant of HTML standards — Tom Sawyer <transami@...> 2003/01/20

On Sunday 19 January 2003 08:21 pm, Dmitri Colebatch wrote:

[#62049] Re: OT: IE blatantly defiant of HTML standards — Dmitri Colebatch <dim@...> 2003/01/20

Tom Sawyer wrote:

[#62060] Re: persistence (was: IE blatantly defiant of HTML standards) — Anders Bengtsson <ndrsbngtssn@...> 2003/01/20

--- Dmitri Colebatch <dim@colebatch.com> wrote:

[#62122] Re: persistence (was: IE blatantly defiant of HTML standards) — Tom Sawyer <transami@...> 2003/01/21

On Monday 20 January 2003 04:58 am, Anders Bengtsson wrote:

[#61351] UML tool for Linux? — Tim Bates <tim@...>

Does anyone know of a good OO modelling (UML?) tool for Linux, that works well

23 messages 2003/01/13

[#61435] Yet Another Test First Example ... in Ruby — Jim Weirich <jweirich@...>

Our local XP group did a Test-Driven Design clinic. Although most of

13 messages 2003/01/14

[#61497] ruby-dev summary 19198-19345 — Kazuo Saito <ksaito@...>

49 messages 2003/01/14
[#61499] Re: ruby-dev summary 19198-19345 — Paul Brannan <pbrannan@...> 2003/01/14

On Wed, Jan 15, 2003 at 02:31:22AM +0900, Kazuo Saito wrote:

[#61534] Re: ruby-dev summary 19198-19345 — Matt Armstrong <matt@...> 2003/01/14

Paul Brannan <pbrannan@atdesk.com> writes:

[#61565] Re: ruby-dev summary 19198-19345 — matz@... (Yukihiro Matsumoto) 2003/01/15

Hi,

[#61566] Re: ruby-dev summary 19198-19345 — Matt Armstrong <matt@...> 2003/01/15

matz@ruby-lang.org (Yukihiro Matsumoto) writes:

[#61571] Re: ruby-dev summary 19198-19345 — Gavin Sinclair <gsinclair@...> 2003/01/15

On Wednesday, January 15, 2003, 3:17:11 PM, Matt wrote:

[#61574] Re: ruby-dev summary 19198-19345 — matz@... (Yukihiro Matsumoto) 2003/01/15

Hi,

[#61512] Re: ruby-dev summary 19198-19345 — Tom Sawyer <transami@...> 2003/01/14

On Tuesday 14 January 2003 10:31 am, Kazuo Saito wrote:

[#61665] Re: ruby-dev summary 19198-19345 — Tom Sawyer <transami@...> 2003/01/16

On Tuesday 14 January 2003 12:40 pm, Tom Sawyer wrote:

[#61653] Quick question for Japanese speaker — "Hal E. Fulton" <hal9000@...>

I've created a graphic based on the Kanji

12 messages 2003/01/15

[#61682] Re: ruby-dev summary 19198-19345 — "Pe, Botp" <botp@...>

13 messages 2003/01/16

[#61749] Linux Editor — dwerder@... (Dominik Werder)

What's your favorite ruby editor on linux?

22 messages 2003/01/16

[#61757] quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...>

quick quest: anyone know of a nice slick short and sweet way to do this:

38 messages 2003/01/17
[#61797] Re: quick: it responds, it evaluates, and is not empty — "Bulat Ziganshin" <bulatz@...> 2003/01/17

Hello Tom,

[#61842] Re: quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...> 2003/01/17

On Thursday 16 January 2003 11:25 pm, Bulat Ziganshin wrote:

[#61846] Re: quick: it responds, it evaluates, and is not empty — "Bulat Ziganshin" <bulatz@...> 2003/01/17

Hello Tom,

[#61848] Re: quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...> 2003/01/17

On Friday 17 January 2003 07:08 am, Bulat Ziganshin wrote:

[#61854] Re: quick: it responds, it evaluates, and is not empty — Gavin Sinclair <gsinclair@...> 2003/01/17

On Saturday, January 18, 2003, 1:22:09 AM, Tom wrote:

[#61855] Re: quick: it responds, it evaluates, and is not empty — dblack@... 2003/01/17

Hi --

[#61864] Re: quick: it responds, it evaluates, and is not empty — ahoward <ahoward@...> 2003/01/17

On Fri, 17 Jan 2003 dblack@candle.superlink.net wrote:

[#61872] Re: quick: it responds, it evaluates, and is not empty — dblack@... 2003/01/17

Hi --

[#61896] Re: quick: it responds, it evaluates, and is not empty — ahoward <ahoward@...> 2003/01/17

On Sat, 18 Jan 2003 dblack@candle.superlink.net wrote:

[#61759] most popular unix scripting language — dorli@... (dambalaMaster)

does anyone know which is the most popular unix scripting language?

26 messages 2003/01/17

[#61810] Automating Perl -> Ruby translation? — "Hal E. Fulton" <hal9000@...>

Has anyone given any thought to this

22 messages 2003/01/17
[#61875] Re: Automating Perl -> Ruby translation? — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/17

In article <034a01c2be07$95670380$0300a8c0@austin.rr.com>,

[#61901] Resolution to CGI API problem? — Travis Whitton <whitton@...>

There is a very long thread [ruby-talk:39898] that talks about changes

11 messages 2003/01/17

[#61965] PickAxe index? — Daniel Carrera <dcarrera@...>

Does PickAxe online have an index?

14 messages 2003/01/18

[#62063] a single class that supports multiple facets/interfaces — David Garamond <davegaramond@...>

i want to have a class that can support multiple sets of methods, based

16 messages 2003/01/20
[#62090] Re: a single class that supports multiple facets/interfaces — dblack@... 2003/01/20

Hi --

[#62268] extend (Re: a single class that supports multiple facets/interfaces) — David Garamond <davegaramond@...> 2003/01/22

dblack@candle.superlink.net wrote:

[#62093] Local variable scope — Daniel Carrera <dcarrera@...>

I'm a bit confused by the scope of local variables.

24 messages 2003/01/20

[#62203] accessors for module instance vars — ptkwt@...1.aracnet.com (Phil Tomson)

I've got a module that that has several classes defined within it. These

17 messages 2003/01/21
[#62250] Re: accessors for module instance vars — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/22

In article <Pine.LNX.4.33.0301212020500.6373-100000@eli.fsl.noaa.gov>,

[#62213] Newbie Q: do i need PStore for this or something else ? — "Vandemoortele Simon" <delirious_nospamplz@...>

_Background info:_

17 messages 2003/01/21

[#62319] Re: exit status, stderr and stdout — "Berger, Daniel" <djberge@...>

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

14 messages 2003/01/22

[#62321] Definition: iterator — Daniel Carrera <dcarrera@...>

I sort of know what an iterator is, but not well enough to explain it.

18 messages 2003/01/22

[#62340] mod_ruby: what's persistent and what's shared? — Tom Sawyer <transami@...>

i'm tired of being confused about this and i'm hoping someone can clear this

21 messages 2003/01/23

[#62344] Can we attack the 'not enough libraries' thing straight on? — dblack@...

Hi --

136 messages 2003/01/23
[#62349] Re: Can we attack the 'not enough libraries' thing straight on? — Simon Cozens <simon@...> 2003/01/23

dblack@candle.superlink.net writes:

[#62358] Re: Can we attack the 'not enough libraries' thing straight on? — dblack@... 2003/01/23

Hi --

[#62645] Re: Can we attack the 'not enough libraries' thing straight on? — "MikkelFJ" <mikkelfj-anti-spam@...> 2003/01/25

[#62648] Re: Can we attack the 'not enough libraries' thing straight on? — ahoward <ahoward@...> 2003/01/25

On Sat, 25 Jan 2003, MikkelFJ wrote:

[#62658] Re: Can we attack the 'not enough libraries' thing straight on? — Mark Wilson <mwilson13@...> 2003/01/25

The following is my initial, and not yet complete, proposal on

[#62696] Re: Can we attack the 'not enough libraries' thing straight on? — "Iain 'Spoon' Truskett" <spoon@...> 2003/01/26

* Mark Wilson (mwilson13@cox.net) [26 Jan 2003 09:44]:

[#62699] Re: Can we attack the 'not enough libraries' thing straight on? — Mark Wilson <mwilson13@...> 2003/01/26

[#62705] Re: Can we attack the 'not enough libraries' thing straight on? — "Iain 'Spoon' Truskett" <spoon@...> 2003/01/26

* Mark Wilson (mwilson13@cox.net) [26 Jan 2003 17:26]:

[#62725] Re: Can we attack the 'not enough libraries' thing straight on? — Dave Thomas <dave@...> 2003/01/26

Iain 'Spoon' Truskett wrote:

[#62731] Re: Can we attack the 'not enough libraries' thing straight on? — "Mike Campbell" <michael_s_campbell@...> 2003/01/26

[#62738] Re: Can we attack the 'not enough libraries' thing straight on? — Dave Thomas <dave@...> 2003/01/26

Mike Campbell wrote:

[#62750] Re: Can we attack the 'not enough libraries' thing straight on? — Daniel Carrera <dcarrera@...> 2003/01/26

I certainly think that RAA should have a search feature.

[#62808] Re: Can we attack the 'not enough libraries' thing straight on? — "NAKAMURA, Hiroshi" <nahi@...> 2003/01/27

Hi, all,

[#62733] Re: Can we attack the 'not enough libraries' thing straight on? — ahoward <ahoward@...> 2003/01/26

On Sun, 26 Jan 2003, Dave Thomas wrote:

[#62369] Re: Can we attack the 'not enough libraries' thing straight on? — Simon Cozens <simon@...> 2003/01/23

Daniel Carrera <dcarrera@math.umd.edu> writes:

[#62373] Re: Can we attack the 'not enough libraries' thing straight on? — dblack@... 2003/01/23

Hi --

[#62381] Re: Can we attack the 'not enough libraries' thing straight on? — Tom Sawyer <transami@...> 2003/01/23

want to here a crazy idea?

[#62545] Re: Can we attack the 'not enough libraries' thing straight on? — Warren Brian Noronha <warren@...> 2003/01/24

dear devels

[#62345] Hash#+ ? — Daniel Carrera <dcarrera@...>

I think that there should be a Hash#+ method, aking to Array#+.

22 messages 2003/01/23
[#62347] Re: Hash#+ ? — dblack@... 2003/01/23

Hi --

[#62350] Re: Hash#+ ? — Tom Sawyer <transami@...> 2003/01/23

On Wednesday 22 January 2003 06:52 pm, dblack@candle.superlink.net wrote:

[#62351] Re: Hash#+ ? — Daniel Carrera <dcarrera@...> 2003/01/23

On Thu, Jan 23, 2003 at 11:14:08AM +0900, Tom Sawyer wrote:

[#62376] Re: Hash#+ ? — Tom Sawyer <transami@...> 2003/01/23

On Wednesday 22 January 2003 07:20 pm, Daniel Carrera wrote:

[#62378] Re: Hash#+ ? — matz@... (Yukihiro Matsumoto) 2003/01/23

Hi,

[#62383] Missing libraries?? — "Hal E. Fulton" <hal9000@...>

I'm starting a new thread to get away from

22 messages 2003/01/23

[#62665] RAA proposal — Daniel Carrera <dcarrera@...>

Hello all,

20 messages 2003/01/26
[#62667] Re: RAA proposal — Jim Freeze <jim@...> 2003/01/26

On Sunday, 26 January 2003 at 10:48:02 +0900, Daniel Carrera wrote:

[#62669] Re: RAA proposal — Daniel Carrera <dcarrera@...> 2003/01/26

On Sun, Jan 26, 2003 at 10:57:28AM +0900, Jim Freeze wrote:

[#62708] solaris porting problem -- flock failure? — Joel VanderWerf <vjoel@...>

Any solaris gurus out there?

27 messages 2003/01/26

[#62730] cascading configuration variables — Wilbert Berendsen <wilbert@...>

-----BEGIN PGP SIGNED MESSAGE-----

13 messages 2003/01/26

[#62767] common regular expressions — Michael Garriss <mgarriss@...>

Sorry if this a stupid question but I am new to ruby AND regular

17 messages 2003/01/26

[#62836] Test::Unit -> order of tests? — Mauricio Fern疣dez <batsman.geo@...>

28 messages 2003/01/27
[#62845] Re: Test::Unit -> order of tests? — Michael Garriss <mgarriss@...> 2003/01/27

IMHO, it would be nice if they were run in the order they were defined.

[#62852] Re: Test::Unit -> order of tests? — ahoward <ahoward@...> 2003/01/27

On Tue, 28 Jan 2003, Michael Garriss wrote:

[#62855] Re: Test::Unit -> order of tests? — Chad Fowler <chad@...> 2003/01/27

[#62861] Re: Test::Unit -> order of tests? — ahoward <ahoward@...> 2003/01/27

On Tue, 28 Jan 2003, Chad Fowler wrote:

[#62867] Re: Test::Unit -> order of tests? — Matt Armstrong <matt@...> 2003/01/27

ahoward <ahoward@fsl.noaa.gov> writes:

[#62899] Re: Test::Unit -> order of tests? — "Warren Brown" <wkb@...> 2003/01/28

> To implement this, I would suggest renaming all your test_XXX methods

[#62847] tkgnuplot problem: fork() on win — Ralf <lausianne@...>

Hi,

17 messages 2003/01/27
[#62936] Re: tkgnuplot problem: fork() on win (popen3 for windows?) — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/28

In article <20030128122113W.nagai@ai.kyutech.ac.jp>,

[#62890] ruby-dev summary 19380-19436 — TAKAHASHI Masayoshi <maki@...>

Hello all,

14 messages 2003/01/27

[#63065] Local variables & blocks — ahoward <ahoward@...>

108 messages 2003/01/29
[#63072] Re: Local variables & blocks — Gavin Sinclair <gsinclair@...> 2003/01/29

On Wednesday, January 29, 2003, 5:04:51 PM, ahoward wrote:

[#63075] Re: Local variables & blocks — Gavin Sinclair <gsinclair@...> 2003/01/29

On Wednesday, January 29, 2003, 6:17:44 PM, Gavin wrote:

[#63087] Re: Local variables & blocks — Mauricio Fern疣dez <batsman.geo@...> 2003/01/29

On Wed, Jan 29, 2003 at 04:40:21PM +0900, Gavin Sinclair wrote:

[#63100] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/01/29

Hi,

[#63103] Re: Local variables & blocks — ahoward <ahoward@...> 2003/01/29

On Thu, 30 Jan 2003, Yukihiro Matsumoto wrote:

[#63119] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/01/29

Hi,

[#63203] Re: Local variables & blocks — Martin DeMello <martindemello@...> 2003/01/30

ahoward <ahoward@fsl.noaa.gov> wrote:

[#63211] Re: Local variables & blocks — ahoward <ahoward@...> 2003/01/30

On Thu, 30 Jan 2003, Martin DeMello wrote:

[#63558] Re: Local variables & blocks — "Robert Klemme" <bob.news@...> 2003/02/03

[#63560] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/02/03

Hi,

[#63094] Ruby Books -- A Question — Mark Probert <probertm@..._acm.org>

Rubyists,

15 messages 2003/01/29

[#63198] reading past a file header — Martin DeMello <martindemello@...>

Looking for a more idiomatic way to do this:

12 messages 2003/01/30

[#63216] Newbie question — n.vasiliev@... (Nicolay Vasiliev)

Hello!

17 messages 2003/01/30

[#63284] Return values from assertions — <nathaniel@...>

Eivind Eklund and I have been discussing whether assertions ought to

12 messages 2003/01/31

[#63305] %L, %l revisited — Tom Sawyer <transami@...>

this is a general request for opinion/support. i, for one, would very much

40 messages 2003/01/31
[#63556] Re: %L, %l revisited — nobu.nokada@... 2003/02/03

Hi,

[#63566] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/03

On Monday 03 February 2003 01:26 am, nobu.nokada@softhome.net wrote:

[#63592] Re: %L, %l revisited — nobu.nokada@... 2003/02/03

Hi,

[#63773] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/05

Nobu,

[#63777] Re: %L, %l revisited — dblack@... 2003/02/05

Hi --

[#63784] Re: %L, %l revisited — "Hal E. Fulton" <hal9000@...> 2003/02/05

----- Original Message -----

[#63799] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/05

On Wednesday 05 February 2003 02:44 pm, Hal E. Fulton wrote:

Re: Newbie Q: do i need PStore for this or something else ?

From: ahoward <ahoward@...>
Date: 2003-01-22 16:00:52 UTC
List: ruby-talk #62290
On Wed, 22 Jan 2003, Vandemoortele Simon wrote:

> This is something I would really like to discuss even though I might go
> a little of topic (sorry).

i think it's on topic.  the session management isn't that complete in it's
doccumentation and kinda tricky to understand (for me it was anyhow).

> I am entirely new to CGI scripting and trying to make an interface to edit
> my dynamic photo-album (add sections, pictures, etc). I've discovered in the
> process how inefficient it can be to code a UI with ! since every time you
> need more input from the user you have to send him to another (or the same)
> script and doing so *lose all the input you have collected*.  Until now I've
> been solving that problem by sending all the collected input along as
> 'hidden params' but that's a lot of work.  Is there a better way ? Would
> that be CGI::Session ?  or CGI::Session::PStore ?

all entirely valid/correct observations.  i think everyone deals with state
using hidden params at some point, it's just a matter of _how_much_ state you
want to deal with that way : when it's _alot_ of state that becomes pretty
tiresome.  sessions, in general, essentially deal with this by using cookies.
if you don't know this already, cookies are little peices of _textual_
information that can be stored by _your_ browser at the request of the web
server servering the page you are browsing.  the whole thing get pretty
complicated and seem to stir up debate so i'll state here that i am NO expert
on such matters - but understand enough to write usefull cgi scripts at my job
(which is with the government to take that with a grain of salt ;-) ) ...
anyhow, the way sessions work is that the 'first time' you browse a page using
them the server sends you down one little cookie - a session key - which
itself is key'd by the page you are browsing.  the next time you vist that
page your browser will send that session key to the sever _automatically_
allowing the server the know 'hey, it's you again!'.  the session key can then
be used to identify that user (his browser more like) in order to retrieve
information cached about him/her on the _server_ machine.  all the client ever
has is the cookie.  at this point i must make my disclaimer again, this is
only vaguely correct and much of the handshaking is configurable by the
browser - but i'm ignoring all of that.  so at this point the server is able
identify the client and do 'something' with that key.  one thing might be to
store information about the client in a database (there's a
cgi::session::postgresql or something like that on the raa), in a file like
cgi::session::filestore (the default session), or in a pstore (if you have my
module).  so the point is ANY session manager can do what you desire - it's
simply a matter of how difficult it will be to write.  a
cgi::session::filestore for example could not store any images directly, but
_could_ store the names/paths of them on the local filesystem.  a session
managed by postgresql could handle the images directly, but would require you
to install/learn postgresql, storing them using yaml is an option - but also
requires learning another api.  cgi::session::pstore is a little tiny thing i
wrote which is neither fast and probably has some bugs (though i've used it
extensively finding none so far) but it is _easy_ and doccumented.  if you
read the pickaxe cgi::session section and then read the pstore section you
will understand it.  here's an anotated example


  #!/usr/local/bin/ruby

  require 'cgi'
  require './cgi/session/pstore'


  # this is what the cgi will cache in it's session
  # you could make an ImageData class and perhaps
  # a Layout class or the like
  # this class is really silly, it just has a random number
  # and a Time stamp.  also, it know how to display itself
  # as html

  class SessionData
  public
    attr_accessor :time
    attr :n

    def to_html
      <<-html
	<table border=1>
	  <tr>
	    <td>n</td><td>#{n}</td>
	  </tr>
	  <tr>
	    <td>time</td><td><strong>#{time}</strong></td>
	  </tr>
	</table>
      html
    end

  private
    def initialize time = Time.now
      @time = time
      @n    = rand
    end
  end



  cgi     = CGI.new 'html3'

  session = CGI::Session.new cgi, 'database_manager' => CGI::Session::PStore

  # or
  # session =CGI::Session.new cgi,'database_manager'=>CGI::Session::FileStore
  # session =CGI::Session.new cgi,'database_manager'=>CGI::Session::MemoryStore
  # but these can only store String(key) -> String(value)!!


  # here i'm getting the client' session (if they have one) or, if this is
  # the first time the client has been here - instantiating a new one

  data = session['data']
  data = session['data'] = SessionData.new unless data


  source      = CGI.escape(ENV['DOCUMENT_ROOT'] +  ENV['SCRIPT_NAME'])
  server_addr = ENV['SERVER_ADDR']


  # simply display the session data - note that this page automatically
  # refreshes every 5 seconds (anoying!)

  $content = <<-html
    <html>
      <meta http-equiv=Refresh content=5>
      <body>
	#{data.to_html}
      </body>
    </html>
  html


  # this is _critical!  we set the time of the session data to be the
  # current time and then _update_ the session (write it to disk)

  data.time = Time.now
  session.update


  # print the page

  cgi.out { $content }


the above is simplified a little.  you can view it's output at

  http://eli.fsl.noaa.gov/ruby/class/0/cgi/session/pstore.cgi

view the original source at

  http://eli.fsl.noaa.gov/ruby/class/0/cgi/session/pstore.html


obviously it requires cgi::session::pstore which you can get from the raa.  if
you look at cgi::session::filestore and memorystore you'll understand how/why
i wrote the pstore version - it's pattern _directly_ off of those modules, i
certainly didn't make it up!  ;-)


> P.S.: Plz understand that I do have a book about ruby, access to google and
> RAA but my experience is so limited that I can't make sense of the
> information I find there. (Maybe I should find my way to more general
> information about CGI since that's the knowledge I'm lacking. Any pointers
> ?)

not really, some of the oreily perl/cgi books are informative though.  it took
me a while too, but this group was most informative.  in fact it was reading a
thread like this where matz suggested that someone complaining about no object
persistence being support via CGI::Session::MemoryStore and
CGI::Session::FileStore simply write there own CGI::Session::Pstore that
prompted me to do it.  after looking at the sources (a great source of
information if you did some sort of binary install you should get them) i
discovered that it was actually pretty simple to do!


-a

-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward@fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================


In This Thread