16502-25454

16287-16641 subjects 16683-25628

Playing with Ruby Syntax (was: Initial thoughts about Ruby From a Smalltalk Programmer)
16502 [jweirich@on ] Yes, I agree that I have occasionally wished for the ability to easily
+ 16504 [Dave@Pr gm t] When keyword arguments are introduced, it's possible that we might be
| + 16506 [mirian@co mi] This may be a bit of a tangent, but I've recently noticed that Ruby's
| + 16512 [matju@sy pa ] If I know how those keyword arguments actually work (vaguely like "=>"
|   16513 [Dave@Pr gm t] However, adding keyword arguments to the call will allow the
|   16514 [gnhurst@hu s] 1) why not also have block->proc conversion without keywords args?
|   16515 [Dave@Pr gm t] It just seems slightly tidier with them.
|   16518 [gnhurst@hu s] hmm.
+ 16517 [s3225202@st ] I'm -extremely- greatful you brought this up. I realise now why it was

walking the ruby_frame list
16503 [victor@fn rd] I have a question about the frame list.  I am working on implementing
16537 [matz@ze ab t] I'm not really sure what you want.  Do you want the object that invoke
16545 [victor@fn rd] I am looking for the object that invoked the method.  Walking back up
16588 [matz@ze ab t] Does RCR#U015 "replace 'caller' with 'call_stack'" seem to help you?
16597 [victor@fn rd] Yes, that would help me out. Making the objects on the call stack explicitly
16614 [matz@ze ab t] You're not wrong.  Yes.  Yes.
16626 [victor@fn rd] Cool.  I will keep an eye on the changelogs for future releases, then, and

Smalltalk vs. Ruby
16505 [SAT@MU TI EC] ...
+ 16507 [glen@en bl d] A syntax that does not appear to come from a foreign planet. ;-)
| 16508 [ser@ge ma e-] Here, here.  Syntax is one of the most important aspects of a language for
+ 16516 [s3225202@st ] ...
  16519 [wayne.blair@] ...
  16521 [avi@be a4 co] Well, how about
  16522 [wayne.blair@] points again. Syntax!
  16524 [avi@be a4 co] Well, sure, but I thought
  16525 [wayne.blair@] Humourously enough, I wasn't even talking pseudo-smalltalk.  I just like it
  16530 [hal9000@hy e] Precisely.

SV:  Smalltalk vs. Ruby
16509 [hvrosen@wo l] I'd love to hear Ron comment on this one!

forking server
16510 [joe@vp p. et] Does anyone have any example code for a forking server?
+ 16511 [joe@vp p. et] thanks,
+ 16520 [joe@vp p. et] Here's a stab at a forking server.  The problem is that it exits
  16523 [joe@vp p. et] Ah, I see the problem... I thought that the "trap" was working in the

alarm()
16526 [joe@vp p. et] Is there a way to schedule a SIGALRM in ruby?
16527 [Dave@Pr gm t] Thread.new do
16531 [pit@ca it in] FYI, I tried Dave's example on Win NT and ruby 1.6.2 (2000-12-18)
16543 [hal9000@hy e] I have seen this same behavior in the past.

why only nil and false are regarded as false?
16528 [steven@ha ya] I would appreciate some explanation on why Ruby behaves like
16529 [Dave@Pr gm t] I suspect because the alternatives in other languages were error
+ 16532 [steven@ha ya] # if string s is empty
| 16533 [gnhurst@hu s] if s.empty?  then .... end  # assumes you know s is a string
+ 16534 [chjr@gm .n t] Well I do have an example for this,
+ 16536 [matz@ze ab t] Yes.  Plus I wanted performance in boolean tests.  Current boolean
| + 16539 [WYS@he bl ng] too bad we got two. One would have been enough!
| + 16571 [in6x059@pu l] Ah, performance is the key.
+ 16544 [jweirich@on ] I am reminded of a thread on the python list a while back.  They were

Trapping method defs
16540 [feldt@ce ch ] Is there some simple way to be notified (with method and class ids)
+ 16541 [decoux@mo lo] This is self, i.e.
| 16575 [feldt@ce ch ] Of course, thanks. I worked too long on this to see the obvious. Thanks
+ 16542 [matju@sy pa ] If your "id" here is Symbol, then I say a Symbol is not enough to identify
  16579 [feldt@ce ch ] Ok. Matz?
  16580 [feldt@ce ch ] But it won't work since we wont be notified if singleton_method_added is

[ruby-cvs] lib/metaruby/lib: Heavy modifications. (fwd)
16546 [matju@sy pa ] Let's call this the next version (0.2) of RubyAST. (That's "1.3" in the

Just another test
16547 [Dave@Pr gm t] But with a reason...

garbage collection with rb_eval_string
16548 [wjl@mi dl ss] Hey folks!
16554 [decoux@mo lo] Well, it depend what you are doing but generally you don't need to do

Test
16549 [other@th ma ] Sorry to be a pain. I'm

Tk problems
16550 [hal9000@hy e] Trying to figure out what's going on here.
16555 [decoux@mo lo] The syntax is 'padx' => '1c'
16569 [ms@ia ta e. ] [Guy Decoux]

Re: Commenting code
16551 [spamtrap@li ] You mean like setting an appropriate followup when you complain about
16640 [asegura@fa i] [a bit OT]
+ 16642 [wclodius@la ] In Spain the names you retain are your paternal names.
| 16733 [je@br gh on ] What my wife and I decided to do was give boys my surname and give girls
+ 16676 [tt@mi .j u. ] Well you still have it easy compared to (most) Indonesians, who don't
  16694 [luigi.ballab] Or the case of Iceland, where, if I'm not mistaken, the analog of the last
  16719 [bobgus@mc .c] Awhile ago in New Delhi, I was introduced to K. R. Jayaraman's brother

Mail/news gateway
16552 [Dave@Pr gm t] Well, as it looked like the original mail/news gateway was not going
16560 [jimm@er s. o] Dave,
+ 16564 [Dave@Pr gm t] Done (I hope :)
| 16574 [hal9000@hy e] Here's another idea you may or may not like.
| 16578 [Dave@Pr gm t] Instead I've added it as a X-ruby-talk: dddd  header in the
+ 16584 [schneiker@ju] Especially me.  :-)  I'm sure there are many more. Thanks much!

Re: comp.patterns  ?
16553 [panu@wa .c m] One traditional  technique of 'patterns movement' is to produce high quality

Method overloading - How?
16556 [Uwe.Lammers@] I understand that a weakly-typed language like Ruby cannot
16557 [decoux@mo lo] No, it can and it's easy to implement it, but it has several problems and

Mod_Ruby - CGI - requested url
16558 [s3225202@st ] Recently I've been toying around with the mod_ruby and eRuby stuff.
+ 16559 [s3225202@st ] Sorry, with a little bit more investigation I've come up with the answer
+ 16742 [shugo@ru y- ] You can get same values by the environment variable PATH_INFO.

Re: programming ruby the book
16561 [pras_patel@y] Dave thanks for "programming ruby" , but i can't find the link to the
+ 16563 [Dave@Pr gm t] Dave
+ 16585 [pras_patel@y] I meant the "pragmatic programmer" link i could only get the source code links.

UNSUBSCRIBE
16562 [teich@no ed ] ...

Configuration file parsing
16565 [anders@ig it] I'm currently writing an application in Ruby, which needs a
+ 16566 [Dave@Pr gm t] A cheap way that works in some circumstances is to write the
| 16573 [hotfusionman] If you can use Windows .ini file format, you may want to look at
+ 16570 [anders@ig it] It may prove to be an effective solution, however, I am having trouble
  + 16576 [vjoel@pa h. ] ...
  + 16577 [Dave@Pr gm t] Here's an example of something similar.
  + 16582 [anders@ig it] Neat. Thank you.
    16586 [WYS@he bl ng] Why don't you use xml?

[TOY] reversed regexp
16567 [decoux@mo lo] It's a toy and *totally* useless but it's normal because it was inpired by

Bug in tktext.rb (?)
16568 [niklas@ka i.] tag bind ...

Having an announcement to make, but no space on a server...
16572 [dennisdecker] Nice to see comp.lang.ruby restored again! Thanks!

ANN: Ruby TestCollector (RUnit & Lapidary)
16581 [dennisdecker] I uploaded a TestCollector to the code snippets library at sourceforge.

Two (or more) dimensional arrays?
16583 [klowery@wt .] After reading my way through various documentation, I didn't find any
16587 [niklas@ka i.] A ruby Array can hold any kind of object. To make a multidimensional
16592 [kirk@le in r] Of course! That is what is so attractive about Ruby. Simple and elegant.
16596 [matju@sy pa ] it's easier even to do it in Perl, because accessing arrays and hashes

Bris RUG
16589 [robert_dawso] The Brisbane Ruby User Group has a home :)

Bris RUG
16590 [robert_dawso] The Brisbane Ruby User Group has a home :)

RCR: Enumerable: every() and none()
16591 [hgs@dm .a .u] Enumerable should have functions every and none to complement find_all
+ 16593 [matju@sy pa ] def all? ; each {|x| return false if not yield x }; true ; end
| 16594 [pete@vi ya p] ^                       ^
| 16595 [dennisdecker] Yes, it is right.
| + 16599 [ben_tilly@op] Personally I would use detect (or equivalently find) with a not
| | 16601 [spwhite@ch r] In the spirit of incremental improvement...
| | 16602 [avi@be a4 co] def every
| | 16603 [matju@sy pa ] I don't know about your machine, but on mine, using Ruby 1.6.2, doing
| + 16600 [matju@sy pa ] No, it's not! ;-)
|   16618 [hgs@dm .a .u] I have taken the liberty of editing #U004 on the Wiki RCR page to refer to
+ 16615 [matz@ze ab t] In 1.7, we have "Enumerable#all?" and "Enumerable#any?".
  + 16619 [hgs@dm .a .u] Excellent! :-)  (There must be more to Timezones than I suspected: you
  + 16622 [mike@le to .] Should it be {|x| x > 0} and {|x| x == 2} or is this syntax allowed in
    16644 [matz@ze ab t] Oops, of course {|x| x > 0} and {|x| x == 2}.

Re: http question
16598 [mattias.wahl] I don't understand your problem. The path you should request is simply '

Creating arrays
16604 [ugly-daemon@] array = []
16605 [Dave@Pr gm t] Except... :)
16606 [ugly-daemon@] Ah. Well to be honest that kinda sucks :). I was trying to write a method to
16609 [Dave@Pr gm t] fred[i] ||= []

[ANN] NQXML v1.0.0 released
16607 [jimm@er s. o] NQXML is a pure Ruby implementation of a non-validating XML processor. It

A commercial Ruby tutorial!
16608 [Dave@Pr gm t] I'm not sure if this is the first, but I'm pretty pumped up about

Silly Questions
16611 [oe-sven@on i] Is it possible to make stand alone application for windows from ruby, have
+ 16612 [mike@le to .] have
+ 16613 [oe-sven@on i] "Mike" <mike@lepton.fr> skrev i melding

ruby is beauty
16620 [jobeicus@ho ] i saw this snippet of code in a post on google from last year and it

pickaxe: socket example on win
16621 [tobiasreif@p] should this Pickaxe example work on win?
+ 16623 [Dave@Pr gm t] I just ran this on my NT box (with 1.6.2 -- I've overwritten my
| 16631 [tobiasreif@p] Dave,
+ 16630 [ljohnson@re ] I apologize for doing a "me too" post without investigating the problem any
+ 25433 [ljohnson@re ] I apologize for doing a "me too" post without investigating the problem any

[ANN] NQXML v1.0.1 (DOCTYPE output fix)
16624 [jimm@er s. o] NQXML v1.0.1 addes a method missing to the Doctype tag that prevented it

unit testing Tk applications
16625 [marick@te ti] I will shortly begin writing a small Tk application. I want to write tests

TCPSocket & Win2k: Further News
16632 [seanacarley@] . . . :in `new': Invalid argument - "connect(2)" (Errno::EINVAL)
16633 [Dave@Pr gm t] Is there a way to find out if this is a known cygwin bug?
16636 [will.sobel@B] ...

mascot
16634 [arm3@in i. e] The Ruby Crowned Kinglet is perfect!!!
16635 [siigron@si .] Personally, I must say I definatly favor the manga girl.
+ 16637 [s3225202@st ] I agree. Besides, OO is about letting you write code that better
| + 16639 [ugly-daemon@] And I still say the gem is perfect :) Here we go again.
| + 16647 [tobiasreif@p] I like the bird; manga-style leaves too many out that are not into it.
+ 16643 [waisun.chia@] I agree whole-heartedly. So that future generations of Rubyists will
  16645 [ruby@ja es r] It isn't at all clear to me *why* a programming language needs a mascot, though I can see the value in "branding", much as the

Re: Ruby/X11 version 0.3
16638 [matju@sy pa ] Announcing Ruby/X11 version 0.3. I release this code so that I have a

Serial Communications
16646 [waisun.chia@] 1. How do I set up the serial port to communicate with another serial
+ 16656 [Dave@Pr gm t] What operating system are you using?
| 16675 [waisun.chia@] Redhat.
+ 16660 [matju@sy pa ] You are looking for <termios.h>. Unfortunately that interface is much more
  16700 [kjana@os xa ] FYI there's already termios extension library by Akira YAMADA

cjust?
16648 [feldt@ce ch ] class String
16649 [decoux@mo lo] This ?
16684 [feldt@ce ch ] You see, already too many features/methods for my little brain... ;-)

stable snapshot and snapshot are older than the release version?!
16650 [tammo.freese] After compiling the stable snapshot of ruby,
+ 16653 [bombadil@wa ] 1.7.x is, like Linux kernel, inestable by definition.
+ 16654 [matz@ze ab t] Probably something is wrong with mirroring configuration.  Let us

newbee question about dbm in Ruby
16651 [YuriLeikind@] I am relatively new to Ruby, so I am sorry
16652 [decoux@mo lo] See
16655 [YuriLeikind@] Thanks a lot, this is just what I've been looking for.

bag difference
16657 [hgs@dm .a .u] Is there an elegant way to do a bag diffeence between 2 arrays, rather
+ 16658 [niklas@ka i.] Don't know if this is the most elegant solution, but it is the first
+ 16671 [harryo@zi wo] I plan to read this carefully when I have time, but here's what I came up
+ 25438 [harryo@zi wo] I plan to read this carefully when I have time, but here's what I came up
  16706 [hgs@dm .a .u] Thank you.  I was a bit confused by the other solution too, but it seemed
  16711 [niklas@ka i.] The idea was to use something similar to a "Schwartzian transform" to allow us

Problem with threading example from pickaxe book
16659 [rpriem@no ra] I just tried the example from page 118 of "Programming Ruby". It doesn't

Problem running irb with Ruby 1.6.4 under FreeBSD 4.0
16661 [balexander@r] I've installed Ruby 1.6.4 on a FreeBSD 4.0 machine, and get the
16677 [matz@ze ab t] nkf.so does not depend on any other dynamic library, so that it's hard
16785 [balexander@r] As you suspected,
16839 [matz@ze ab t] In dln.c, we have the compile condition that add "_" if the value of
16919 [balexander@r] I compiled it myself -- the usual ./configure; make; make install routine. I think this is
16922 [matz@ru y- a] That's the cause.  Could anybody who is FreeBSD guru tell me how to
16924 [mirian@co mi] If you type at the shell
16926 [green@Fr eB ] #define __FreeBSD_version 430000
16945 [matz@ru y- a] Hmm, does this due to improper gcc configuration on Bob's box, or else?
17048 [bobalex@ho e] The FreeBSD device I am using is produced by my company, and the gcc
17051 [matz@ru y- a] Here's the patch for your problem.

installation option
16662 [hubert@cs ny] I am trying to install the Ruby 1.6 version  on the machine
16663 [Dave@Pr gm t] A couple of years back I reorganized my machine so I no longer need
+ 16666 [hubert@cs ny] Done. Works and happy as ever. :)
+ 16678 [hipster@xs a] or, for multi-user machines where one cannot write /, create a ~/usr,
  16682 [matju@sy pa ] I personally set it to plain $HOME.
  16690 [hipster@xs a] By prefixing usr, a regular ~/usr/{bin,include,lib,share} &c hierarchy

cgi.rb cookie access
16664 [harryo@zi wo] I recently began playing with mod_ruby, eruby and cgi.rb, which are all

standard for embeded-documentation.
16665 [guillaume.ru] There is some standards in the ruby-programmers comunity in the way to

Win32 EventLog
16667 [mark@io .c m] Are there any Ruby applications similar to the Win32 modules in Perl?

how to call super from singleton method?
16669 [viisi@ch ll ] from a singleton method i want to call the
+ 16698 [decoux@mo lo] field ? It give me errors. ]]
+ 16709 [viisi@ch ll ] cluttering rb_cHash's globally visible namespace for
+ 25452 [viisi@ch ll ] cluttering rb_cHash's globally visible namespace for
  + 16710 [decoux@mo lo] rb_cHash was not modified
  + 16712 [decoux@mo lo] OK, I've finally understood what you want, sorry for the previous
  + 16725 [viisi@ch ll ] spiffy! that's what i'd seeked for.
  + 25454 [viisi@ch ll ] spiffy! that's what i'd seeked for.

Net::ProtoRetriableError: 302 Found
16673 [atsang@hk li] I try to retrieve some data from an internet site using

WWW.RUBYCONF.COM
16674 [return@tr ff] ...

RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-05-26)
16679 [schneiker@ju] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-05-26)

embedding C++
16680 [   ml@sp .d ] One Question:  Does anybody here have experience embedding
16681 [WYS@he bl ng] Have you tried using SWIG?
+ 16685 [   ml@sp .d ] Also las ich bei Wyss Clemens [mailto:WYS@helbling.ch]
| + 16687 [buter@CW S. ] Actually, it does. And it is *really* simple once you get the hang of it!
| | 16697 [chris@at es ] Others have mentioned swig, and we've been using that successfully
| | 16702 [   ml@sp .d ] Also las ich bei Chris Uzdavinis [mailto:chris@atdesk.com]
| | 16705 [chris@at es ] In reality, I think that just creating "local" variables on the heap
| | 16707 [szegedy@or u] You can reraise it, can't you?
| + 16784 [gc@ma dr ke ] Yes, nice piece of software... I just upgraded it in Mandrake so it
+ 16713 [pbrannan@at ] Swig seems to work really well, but you need to make sure you have Swig
threads.html
top