[#68392] J->E translation of Matz's interview on Slashdot Japan — OTA Takashi <t00156to+news@...>
Hi.
On Tue, 1 Apr 2003, OTA Takashi wrote:
OTA Takashi <t00156to+news@sfc.keio.ac.jp> writes:
[#68410] SIGSEGV and crash in $std***.print — Rudolf Polzer <abuse@...>
The following program creates a segfault or interpreter crash extremly
[#68412] JRuby still alive? — "Volkmann, Mark" <Mark.Volkmann@...>
Is development of JRuby still active? Looking at
[#68414] Re: OO vs. procedural programming — "Robert Klemme" <bob.news@...>
[#68415] eval'ing a config file — Ian Macdonald <ian@...>
Hi,
Well I *am* new to Ruby, been playing around for about three weeks now
On Fri, Apr 04, 2003 at 08:25:25AM +0900, Damphyr wrote:
Brian Candler wrote:
On Sat, Apr 05, 2003 at 08:36:12PM +0900, Damphyr wrote:
Brian Candler wrote:
On Sat, Apr 05, 2003 at 11:09:50PM +0900, Damphyr wrote:
[#68417] Getting readline support on solaris — Jim Freeze <jim@...>
Hi:
[#68421] sharing objects between tests (revisited?) — Paul Brannan <pbrannan@...>
I don't know if I've asked this on this list before or only on irc (I
In article <20030401183531.GK24880@atdesk.com>,
On Wed, Apr 02, 2003 at 04:27:46AM +0900, Phil Tomson wrote:
[#68436] April Fools. — Daniel Carrera <dcarrera@...>
Hey guys and gals,
----- Original Message -----
[#68449] Newbie question:read file speed — "Greg Brondo" <greg@...>
Why is ruby (on windows) so much slower at reading lines in a file (as
Here they are:
On Thu, Apr 03, 2003 at 12:51:28AM +0900, Greg Brondo wrote:
On Friday, April 4, 2003, 12:10:00 AM, Dan wrote:
[#68520] Madeleine 0.2 — Anders Bengtsson <ndrsbngtssn@...>
http://sourceforge.net/project/showfiles.php?group_id=74624
[#68527] Any Hardware/EDA engineers out there? — ptkwt@...1.aracnet.com (Phil Tomson)
[#68538] Tricky install question — Mike Wyer <mike@...>
Hi,
[#68551] cgi serving xml from Apache problem — "Chris Morris" <chrismo@...>
(This seems like more an Apache question than a Ruby question, but ...)
[#68564] FXRuby -- Table with FXComboBox items — Yura Kloubakov <yura@...>
Hi,
[#68573] "benchmark.rb:435: warning: obsolete method" — Brian Candler <B.Candler@...>
Just been playing with 1.8 preview 2, would like to point out that the
[#68584] read/write slow, and TCPSocket and sys{read,write} — Ryan Pavlik <rpav@...>
OK, so I'm throwing things back and forth over the network. Marshalled
On Fri, 4 Apr 2003 05:48:53 +0900
On Fri, Apr 04, 2003 at 06:06:15AM +0900, Ryan Pavlik wrote:
[#68587] Building Ruby on HP-UX B.11.22 — Daniel Berger <djberge@...>
Hi all,
[#68605] keeping track of non-exported global variables — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
problem:
[#68612] Suggestion for Ruby Weekly News — leikind@... (Yuri Leikind)
Hello all,
Yuri Leikind (leikind@mova.org) wrote:
[#68613] Debugger — Seth Kurtzberg <seth@...>
Hello list,
[#68623] To inherit or to include? That is the question. — Jim Freeze <jim@...>
Hi
[#68624] Relocatable install patch — Mike Wyer <mike@...>
Hi,
[#68657] reading from $stdout ??? — "meinrad<dot>recheis" <"meinrad<dot>recheis"@...>
hi rubyists,
[#68672] Strangeness in Find.find — Brian Candler <B.Candler@...>
I was just looking at lib/ruby/1.8/find.rb and I am stumped by the marked
[#68707] Call for standardised package installation procedure — google@... (Tom Payne)
I'm helping maintain Ruby and Ruby packages in Gentoo Linux.
> It would make my job a lot easier if just one were chosen, and perhaps
> > It would make my job a lot easier if just one were chosen, and perhaps
On Mon, Apr 07, 2003 at 03:52:28AM +0900, John Johnson wrote:
----- Original Message -----
> From: Hal E. Fulton [mailto:hal9000@hypermetrics.com]
In article <NGEDJNFKAGDNDOIPFPBDIEDIDNAA.james_b@neurogami.com>,
On Tue, 8 Apr 2003 james_b@neurogami.com wrote:
John Johnson <jj5412@earthlink.net> wrote in message news:<1049655145.1847.10.camel@hppav.home.net>...
On Mon, 7 Apr 2003 16:47:20 +0900, Tom Payne wrote:
On Tue, Apr 08, 2003 at 02:34:26AM +0900, Austin Ziegler wrote:
On Tuesday, April 8, 2003, 3:42:49 AM, Mauricio wrote:
On Tue, Apr 08, 2003 at 10:11:28PM +0900, Gavin Sinclair wrote:
On Tue, Apr 08, 2003 at 10:11:28PM +0900, Gavin Sinclair wrote:
gsinclair@soyabean.com.au wrote in comp.lang.ruby:
"James Britt" <james@jamesbritt.com> wrote in message news:<NGEDJNFKAGDNDOIPFPBDGECLDNAA.james@jamesbritt.com>...
[#68726] Mutexes end critical sections? — Tom Felker <tcfelker@...>
I was looking at threads.rb for Ruby 1.6, and I noticed that Mutex,
[#68760] ruby-dev summary 19944 - 19957 — Kazuo Saito <ksaito@...>
Hello,
[#68764] a question about regexp — "Ben Thomas" <ben.thomas@...>
Hi,
[#68774] exit status from popen3 — Daniel Bretoi <lists@...>
Hi,
[#68803] Having trouble getting iconv-0.5 working on OS X — Sam Roberts <sroberts@...>
I do a make, install, and then:
Hi,
I think so, too, but I've no idea how. The only thing I can think of is
The error turned out to be deceptively simple. extconf.rb fails to find
Hi,
Quoteing nobu.nokada@softhome.net, on Sun, Apr 13, 2003 at 02:15:54PM +0900:
Hi,
Quoteing nobu.nokada@softhome.net, on Sun, Apr 13, 2003 at 07:44:34PM +0900:
[#68811] Array Sutraction — Jim Freeze <jim@...>
Ok, this has been discussed at length previously,
>
----- Original Message -----
On Tuesday, 8 April 2003 at 22:59:50 +0900, Michael Campbell wrote:
On Tue, 8 Apr 2003 23:33:17 +0900, Jim Freeze wrote:
----- Original Message -----
[#68816] sending a file via http — "Andrew" <nospam123@...>
Hello,
Yes, this is using CGI. Your code seems to do almost what I want, but it
[#68843] Ruby for graphics — "Your Name Here" <jim@...>
I just learned of Ruby, and was wondering if its a good lang for
--- Your Name Here <jim@fivek.com> wrote:
[#68854] Problem with timeout for DBI on Solaris — Daniel Berger <djberge@...>
Hi all,
[#68866] Style Question — Travis Whitton <whitton@...>
I've looked in the RubyStyleGuide on the Wiki, and I don't see this addressed.
[#68878] 1.8 parse error? — ahoward <ahoward@...>
[#68881] Can someone explain what's happening here? (String#gsub question) — Michael Campbell <michael_s_campbell@...>
I read the caveat in the pickaxe about when the replacement is a
[#68890] instance_variable_set question — "Chris Pine" <nemo@...>
Hello,
----- Original Message -----
[#68901] Versioning prototype for discussion — ptkwt@...1.aracnet.com (Phil Tomson)
On Wed, Apr 09, 2003 at 06:36:25AM +0900, Phil Tomson wrote:
[#68908] The "!" and "?" characters. — Daniel Carrera <dcarrera@...>
One of the things I like about Ruby is that it can use ! and ? in method
----- Original Message -----
By the way why not allow to define new operators, like in prolog and
Hi,
[#68943] unknown node type 0 — Francois GORET <fg@...>
Hello,
Hi,
On Wed, 9 Apr 2003, Yukihiro Matsumoto wrote:
Hi,
[#68967] Simple Question — Dominik Werder <dwerder@...>
Hi there,
[#68976] Investment Partnership. — Nzanga Kuzulu Mobutu <nzanga_1@...>
Nzanga Kuzulu Mobutu
[#68996] ANN: ri v1.8 — Dave Thomas <dave@...>
I'm releasing a very preliminary version of 'ri' for Ruby 1.8. This
`ri' was based on the pickaxe class reference, right? Any chance of seeing
On Wed 09 Apr 2003 at 23:52:47 +0900, Dave Thomas wrote:
[#69004] Proc Question — Travis Whitton <whitton@...>
As I was coding this morning, a question occured to me. Why must proc objects
[#69012] I quote: "Maybe IRB bug!!" — "Chris Pine" <nemo@...>
Hmmm...
[#69025] tutorial on embedding ruby (review) — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
What do you think about it ?
[#69054] PRIVATE AND CONFIDENTIAL — "Mr. John Eze" <mr_musa3@...>
As an aside not only would the origonal spam be removed by your rules,
On Thu, 10 Apr 2003, Peter Hickman wrote:
[#69096] Need IO Optimization help — Jim Freeze <jim@...>
Hello:
In article <20030411115918.A35958@linnet.org>,
The following is from
Mark Wilson wrote:
On Sat, 12 Apr 2003 13:40:07 +0900
On Apr 12, Ryan Pavlik wrote:
On Sun, 13 Apr 2003 00:49:00 +0900
Just a note on my questions about type (also known as class, in Ruby).
Jim Freeze wrote:
On Friday, 11 April 2003 at 17:47:39 +0900, Robert Klemme wrote:
On Fri, Apr 11, 2003 at 06:47:27PM +0900, Jim Freeze wrote:
In my experience, the fastest way to access files (by far) is mmap.
On Thursday, 17 April 2003 at 19:29:16 +0900, David King Landrith wrote:
On Thursday, April 17, 2003, at 06:45 AM, Jim Freeze wrote:
On Thursday, 17 April 2003 at 22:11:55 +0900, David King Landrith wrote:
> > >> In my experience, the fastest way to access files (by far) is
On Friday, 18 April 2003 at 3:19:08 +0900, Michael Campbell wrote:
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
On Thu, Apr 17, 2003 at 10:34:53PM +0900, ts wrote:
On Thursday, 17 April 2003 at 22:46:04 +0900, Brian Candler wrote:
[#69106] changing behavior of literal {:k => :v} — ahoward <ahoward@...>
[#69132] FAQ for comp.lang.ruby — hal9000@...
RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby! (Revised 2003-1-7)
[#69145] "illegal radix 1" — Daniel Carrera <dcarrera@...>
Hi,
> |>> "2".to_i *1.1
[#69151] plotting 2D math functions — ptkwt@...1.aracnet.com (Phil Tomson)
I know there's a package on the RAA for plotting functions with
[#69161] rb_io_getline question — Jim Freeze <jim@...>
Hi:
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
[#69179] Two questions — "Steve Adams" <adamss@...>
What restrictions does the Ruby license place on the construction and sale
[#69181] rb_str_chomp or rb_str_strip — Jim Freeze <jim@...>
How do I access the chomp(!) or strip(!) functions in C?
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
On Saturday, 12 April 2003 at 1:00:44 +0900, ts wrote:
[#69194] splat question — "Chris Pine" <nemo@...>
(This question assumes that the unary `*' (used in arrays and such) is
[#69214] class documentation — "Bermejo, Rodrigo" <rodrigo.bermejo@...>
Hi all;
On Sat, 12 Apr 2003 06:00:30 +0900, Bermejo, Rodrigo wrote:
Ok, I've been looking at Marshal, PStore, Madelaine and mnemonic. None of
[#69271] Controlling an interactive program from Ruby — Daniel Carrera <dcarrera@...>
Hi,
On Sun, 13 Apr 2003 11:26:20 +0900, Daniel Carrera wrote:
Simon Strandgaard wrote:
On Sun, Apr 13, 2003 at 12:16:54PM +0900, Joel VanderWerf wrote:
On Sun, Apr 13, 2003 at 05:06:42PM +0900, Mauricio Fern?ndez wrote:
[#69280] ruby_script() — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
I am wondering what exactly ruby_script() is doing ?
[#69282] using ruby reflection to generate code — Doug Beaver <doug@...>
hello,
In article <20030413004111.A80880@beaver.net>,
[#69301] problems embedding ruby in win32 — "Gaffer" <gaffer@...>
hello there,
[#69323] ANN: RFC 2047 decoding library (MIME format for non-ascii in mail headers) — Sam Roberts <sroberts@...>
There was a few posts about this, so perhaps somebody will find it
Saluton!
Thanks for the feedback. I'll run your example (thanks) through iconv,
Saluton!
(Nobu, this question relates to using iconv to convert from iso-2022-jp
Hi,
[#69338] YAPLL — <james_b@...>
Yet another programming language list.
On Mon, Apr 14, 2003 at 03:24:47PM +0900, james_b@neurogami.com wrote:
On Mon, Apr 14, 2003 at 05:17:59PM +0900, Mauricio Fern疣dez wrote:
[#69339] File::expand_path amok — "Ariff Abdullah" <skywizard@...>
$ pwd
[#69342] ANN: FreeRIDE 0.5.0 Release Candidate 2 — "Curt Hibbs" <curt@...>
FreeRIDE 0.5.0 Release Candidate 2 is available for download. Go to
[#69357] A class, that knows about it's instances + Sets — KONTRA Gergely <kgergely@...>
Hi!
I ran into a similar problem using Madeleine. In Madeleine, you need to
[#69366] How do I call a regex from C? — Jim Freeze <jim@...>
Hi:
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
On Monday, 14 April 2003 at 23:25:03 +0900, ts wrote:
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
On Tuesday, 15 April 2003 at 0:06:08 +0900, ts wrote:
>>>>> "J" == Jim Freeze <jim@freeze.org> writes:
[#69372] , ruby 1.6.8 (2002-12-24) [i586-mswin32] — student_vienna@... (daniel)
hello,
[#69413] rb_class_new_instance behaves strange — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
My code is behaving different, when im doing this change:
On Wed, 16 Apr 2003 01:32:33 +0900, nobu.nokad wrote:
[Nobu said:]
[#69424] Urgent Assistance — "Victor Aloma" <victorloma@...>
Could someone point me to an open-source SPAM filter that I can install on
Hello!
On Wed, Apr 16, 2003 at 07:00:20AM +0900, Pablo Lorenzzoni wrote:
[#69439] ANN: Debian packages of FreeRIDE, FOX, FXRuby, Ripper, FXScintilla, etc — Mauricio Fern疣dez <batsman.geo@...>
> I have tested that it is possible to rebuild all the packages with
[#69449] Re: [OT] spam filter Was: Re: Urgent Assistance — <wtanksleyjr@...>
From: "Shannon Fang" <xrfang@hotmail.com>
On Wed, Apr 16, 2003 at 03:43:11AM +0900, wtanksleyjr@cox.net wrote:
[#69470] regular expressions — "Chris Pine" <nemo@...>
When I first learned regular expressions, they were no problem. It was in a
----- Original Message -----
Hi --
[#69494] Libxml SAX parser? — han.holl@... (Han Holl)
Hello,
[#69518] Roundoff problem with Float and Marshal — cilibrar@... (Rudi Cilibrasi)
The following small test program:
nobu.nokada@softhome.net wrote in message news:<200304161751.h3GHpIHQ017185@sharui.nakada.kanuma.tochigi.jp>...
[#69527] Debugger not working in 1.8.0 snapshot — Jeff Putsch <putsch@...>
Howdy,
[#69531] example — student_vienna@... (daniel)
hello,
[#69536] Reg. Expressios with "\n" — Daniel Carrera <dcarrera@...>
Hello,
----- Original Message -----
[#69568] How to test for text file — "Peter B. Ensch" <pNOeterSPAM4MEbe@...>
In perl, -T <file> returns true if <file> is a text file and
[#69585] extension - redirect a block — student_vienna@... (daniel)
hello,
[#69595] ANN: ri 1.8b — Dave Thomas <dave@...>
I've updated ri:
Dave Thomas wrote:
Dave Thomas wrote:
[#69611] Cryptic -w warning: ambiguous first argument; make sure ... — Johan Holmberg <holmberg@...>
[#69639] FreeRIDE 0.5.0 - problem opening files — Markus Jais <info@...>
Hello
[#69645] avoiding the module name — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
[#69672] Fw: Possible bug? — "Chad Fowler" <chadfowler@...>
I'm having some trouble sending to ruby-core, so I'll send this here. Sorry
[#69680] Warning: redefine instance — jbshaldane@... (haldane)
Does anyone know why I am getting this warning?
[#69700] Biased weighted random? — "Hal E. Fulton" <hal9000@...>
Hi, all...
----- Original Message -----
----- Original Message -----
----- Original Message -----
----- Original Message -----
[#69712] Multi-dimensional arrays — marsberger@... (Andi Scharfstein)
Hi,
[#69723] Bug in Rational? — "Chris Pine" <nemo@...>
This *can't* be right:
[#69762] Multi-Lingual Ruby — Jim Weirich <jweirich@...>
I was following a Java VS Perl discussion on a web board that I read.
DOH!
On Sun, 20 Apr 2003 13:43:59 +0900
> Actually, you shouldn't be, since that seems to (somehow) be the
[#69792] Matrix bug — oinkoink+unet@... (Bret Jolly)
An old bug from ruby 1.6 is still unfixed in the ruby 1.8 preview.
[#69806] ASCII class inheritance tree generator — Simon Vandemoortele <deliriousNOSPAM@...>
I thought I might share this little piece of code that generates a
[#69807] Re: ASCII class inheritance tree generator — "Pe, Botp" <botp@...>
Simon Vandemoortele [mailto:deliriousNOSPAM@atchoo.be] wrote:
[#69818] module_functions are private? — Paul Brannan <pbrannan@...>
I have a piece of code that does something like this:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
On Mon, Apr 21, 2003 at 11:23:54PM +0900, ts wrote:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
[#69825] accessing top-level 'self' — ahoward <ahoward@...>
[#69830] Ruby in a university course — "Chad Fowler" <chadfowler@...>
Maybe this has already been covered here, but I found it interesting =
[#69834] What's the difference between IO and File — Jim Freeze <jim@...>
Hi
[#69866] two-way pipe — vic ismakaev <viclists@...>
Hi!
[#69908] Select() — "Kuros" <kuros@...>
Hi Everyone,
[#69917] DBI/OCI8 & binary data — Ollivier Robert <roberto@...>
Env.: ruby 1.6.8, ruby-dbi 0.18, ruby-oci8 0.1.2.
[#69922] Module inclusion at runtime... — Hadmut Danisch <spamblock@...>
Hi,
[#69931] Ruby.shop — "Hal E. Fulton" <hal9000@...>
Hello, all.
----- Original Message -----
----- Original Message -----
----- Original Message -----
----- Original Message -----
----- Original Message -----
----- Original Message -----
----- Original Message -----
[#69956] grep and regular expressions in ruby — "Krishna Dole" <kpd@...>
I'm quite taken with ruby, but recently I ran into trouble using grep. I
On Thu, Apr 24, 2003 at 08:17:37AM +0900, Bermejo, Rodrigo wrote:
[#69957] two oddities in ruby 1.8.0p2 — davekam@... (Dave)
OK, recently a cool feature has been added to ruby to start assigning
[#69969] Subject: Re: [ANN] Ruby.shop — Jim Weirich <jweirich@...>
On Wed, 2003-04-23 at 18:16, Hal E. Fulton wrote:
[#69977] parsing large file into matrix — "Qubert" <qubert@...>
I work on a lot of flat files containing data with many columns
[#69998] Ruby mode for Emacs... — Stephan K舂per <Stephan.Kaemper@...>
Hi all,
[#70000] Using objects persistence — Pablo Lorenzzoni <spectra@...>
Hello ALL!
[#70015] How to call an object instance's method? — Rene Tschirley <pooh@...>
Dear Ruby Experts,
Robert Klemme wrote:
Hi --
On Fri, Apr 25, 2003 at 01:07:33AM +0900, dblack@superlink.net wrote:
----- Original Message -----
> Yuck!! This is what's wrong with significant whitespace. We are
On Fri, Apr 25, 2003 at 09:54:16PM +0900, Michael Campbell wrote:
[#70017] MathN — Dave Thomas <dave@...>
I'm trying to get to grips with the 'mathn' library. I can see what it
[#70025] Design By Contract. — "Ken Hilton" <kenosis@...>
Several months ago, I made a posting regarding a possible enhancement to
[#70034] block.call vs. yield — "Orion Hunter" <orion2480@...>
I noticed that the use of block/yield differs slightly when a "break" is
Hi,
Hi,
Hi --
Hi,
> In message "Re: block.call vs. yield"
Hi --
Hi,
----- Original Message -----
Hi --
Hi,
On Sunday, April 27, 2003, 1:13:40 AM, dblack wrote:
On Mon, Apr 28, 2003 at 06:06:36PM +0900, Gavin Sinclair wrote:
On Monday, April 28, 2003, 7:17:24 PM, Brian wrote:
[#70039] Accessing Ruby class from C extention — ptkwt@...1.aracnet.com (Phil Tomson)
I know it's possible to write Ruby in C but is it possible to instantiate
[#70042] asynchronous ruby — student_vienna@... (daniel)
hello,
[#70064] Hashes and Enumerable#each_with_index — Ryan Pavlik <rpav@...>
OK, looking at the archives I know this was discussed a few years ago,
Hi,
On Fri, 25 Apr 2003 08:10:04 +0900
[#70144] Parsing C++ with Ruby — Simon Vandemoortele <deliriousNOSPAM@...>
[#70167] yield self — ahoward <ahoward@...>
[#70177] How to get more than 8 colors ? — Simon Vandemoortele <deliriousNOSPAM@...>
Here is a copy of the question I entered on
[#70204] can you guess — ahoward <ahoward@...>
[#70211] How do I change directories? — Daniel Carrera <dcarrera@...>
Hi,
[#70215] XML Parsing the Ruby way. — Aredridel <aredridel@...>
I've been looking at REXML, and I really like the architecture: A very
[#70217] Ruby misfeature? => CONTEST: solve the following problem — Mauricio Fern疣dez <batsman.geo@...>
[#70224] File reading and line continuation with '\' — Jim Freeze <jim@...>
Hi:
This should do it:
[#70243] Regexp and $ — Brian Candler <B.Candler@...>
I seem to remember some discussion about regexps recently, including Perl
[#70265] Generating a DLL file? — "Rich" <rich@...>
Let's start with:=20
I don't know C - or C++... and I'd rather not learn.
--- Rich <rich@lithinos.com> wrote:
----- Original Message -----
> > > I don't know C - or C++... and I'd rather not learn.
[#70268] c++/ruby debugging advices — "Simon Strandgaard" <0bz63fz3m1qt3001@...>
Im embedding ruby into c++ and im having a segfault problem which
[#70289] ANN: FreeRIDE 0.5.0 Final Release — "Curt Hibbs" <curt@...>
The final release of FreeRIDE version 0.5.0 is available for download! For
[#70324] File#split bug? — Jim Freeze <jim@...>
Is this a bug in File#split?
[#70337] Manipulate IE via Ruby? ... — christopher.j.meisenzahl@...
I want to tinker with the concept of Windows Automation as described in chapter
[#70354] Re: ANN: FreeRIDE 0.5.0 Final Release — "Curt Hibbs" <curt@...>
Steve Tuckner wrote:
Curt Hibbs wrote:
[#70358] locking in CGI script — kwatch@... (kwatch)
Hi,
[#70371] Re: Manipulate IE via Ruby? Redux ... — christopher.j.meisenzahl@...
Thanks very much for the MSDN link whoever sent it! I accidentally deleted your
[#70376] Test order in Test::Unit — Takashi & Kayoko Sano <tksano@...3.kcn.ne.jp>
Hi all,
[#70399] Ruby regexp backreferences — Austin Ziegler <austin@...>
I'm doing something that required RLE, and the code that I
[#70405] ugly style variables — saggmannen@... (saggmannen)
I'm new to ruby, and thus far I mostly like what I've seen. But these
[#70422] Pass-by reference VS encapsulation ? — Simon Vandemoortele <deliriousREMOVEUPPERCASETEXTTOREPLY@...>
On Wed, 30 Apr 2003 at 18:07 GMT, Dave Thomas wrote:
Re: using ruby reflection to generate code
In article <20030415132450.A49913@beaver.net>, Doug Beaver <doug@beaver.net> wrote: >On Tue, Apr 15, 2003 at 01:02:05PM +0900, Phil Tomson wrote: >> In article <20030414212552.A46129@beaver.net>, >> Doug Beaver <doug@beaver.net> wrote: >> >> > i think you have to end up using some sort of hint in your ruby >> > code, ruby is too dynamic. >> >> True. I've had similar thoughts for RHDL-> VHDL conversion. >> >> However, Ruby being dynamic and ObjC being dynamic probably means that >> Ruby->ObjC would be a lot easier and would require fewer (if any?) >> hints, no? > >i agree that objc requires fewer hints, but there's still some stuff i >can't look up just by using reflection. for instance, i can use >Method#arity to see how many args my methods take, but i don't know what >the names of the args are. objc's methods are smalltalky, so i end up >doing this, ignoring the types completely and autogenerating the >selectors: > >- (id)meth:(id)val1 arg2:(id)val2 arg3:(id)val3; > >i thought i could set defaults for the args in the definition, but then >arity doesn't work. i remember seeing threads on ruby-talk saying that >this is by design, so i'm trying to figure out other ways to look at >method args. > >def meth(arg1, arg) -> arity returns 2 >def meth(arg1=0, arg2=[]) -> arity returns -1 > >i think with hints, i can at least get the args named and typed >correctly, and just make all the methods return id. or maybe force >myself to declare a return type with a hint, and then overload return to >raise an exception if i attempt to return a value from the method that >doesn't match that type: > >def meth(stack = []) > args :stack, Array > return_type Float > # do some stuff > return false # throw InvalidReturnTypeException >end > >i'm thinking now that i'm going to try to get something working with >hints, and if i get usable code out of it, then i'll try to hook in >NodeDump or something similar so i don't have to use hints at all. >ideally, you would write a bunch of code, load all the classes into the >translation module, and then it would DTRT and generate your objc for >you with no hassles. > >brian candler suggested that i turn the hints into assert calls, which >would be checked at runtime in ruby and compile time in static >languages. that sounds really interesting, i might do that instead. i >love the idea of using assertions for that sort of thing. > >i also noticed after searching for c++ generation on ruby-talk, that bob >calco was working on a framework called RuGen that would let you design >in ruby and generate different output languages. that looks cool! > >> > i might end up writing a ruby extension for the c++ frameworks we >> > use and then use ruby to glue things together, skipping the >> > boilerplate generation altogether. once i had a working product, i >> > would then rip out the ruby code (whose design had been well tested >> > at this point) and replace it with handwritten c++ code when it's >> > time to ship. i'm hoping that having lots of good unit tests will >> > cut down on errors when i port the glue from ruby to c++. i'm >> > interested to hear if anyone else is doing something similar to >> > this... >> >> Swig would probably be good for this. You could use it to develop >> your C++ classes in both C++ and Ruby; sort of rapid prototyping where >> you minimally define your class on the C++ side but then you fill in >> methods on the Ruby side. As you figure out exactly what you want >> your class to do and you have a good idea that things are working the >> way you want, you can define these methods on the C++ side (and >> continue iteratively until you've defined all the methods in C++ if >> that's your goal). As a side benefit you'll be able to unit test your >> C++ code using Ruby and Test::Unit. Your unit tests would be defined >> in Ruby and as you move Ruby code to the C++ side the same tests can >> be used to ensure that things still work the way they did in Ruby. > >this sounds very interesting, i didn't think of involving swig. i >wouldn't be creating that many new c++ classes, just using different >frameworks we already have for creating services, but i think it still >works well. it sounds like that with this method, i'd still have to >check in ruby code for the unit tests, which won't work for me. i think >i could come up with something where i have the ruby tests on my >desktop, create a set of c++ unit tests that attempt to test the same >things, and then run them side by side until i get the same results, >checking in the c++ tests when i'm satisfied. What do you use for C++ unit testing now? I remember trying cppunit and not being able to get it to work which led to using swig and Ruby/Test::Unit (which in turn led to other benefits like being able to script our app in Ruby). > >it makes me feel a little uneasy, though. i wish i could just check >ruby code in. i evangelize ruby at work, but we have hundreds of >developers, and the company has paid for many of them to be trained in >perl, so it's a bit of an uphill battle. i think i can find a niche for >ruby in code generation and developer tools, but first i have to build a >community of people who are reasonably fluent in ruby so that we can >review each other's code. nothing like the little details... :-) Sounds like you'll need to find some allies. If you can demonstrate productivity gains with your approach to prototyping in Ruby and then translating to ObjC/C++ then that could be a win. Phil