16287-16641

16040-16369 subjects 16502-25454

subscribe
16287 [mstephen@fs ] Michael Stephenson <mstephen@fsl.noaa.gov>

Poll results on RubyGarden
16290 [Dave@Pr gm t] The first poll on http://www.RubyGarden.org settled down with 123

RPM .spec for Ruby and friends
16300 [waisun.chia@] ...
16324 [pixel@ma dr ] @@ -129,6 +129,7 @@
16399 [waisun.chia@] Thanks Pixel, I needed that.
16405 [pixel@ma dr ] i don't understand the need of enable-shared. It sure doesn't help normal ruby
16407 [waisun.chia@] When building extensions you need to link with libruby, if you don't
16408 [pixel@ma dr ] gcc -shared  -L/usr/lib/ruby/1.6/i586-linux-gnu -L/usr/lib -L/usr/local/lib -o pcap.so Pcap.o packet.o ip_packet.o tcp_packet.o udp_packet.o icmp_packet.o -lpcap -lc
16417 [waisun.chia@] Three common extensions...

links list
16303 [tobiasreif@p] Send me your links offlist,

libxml2 and libxslt?
16306 [waisun.chia@] I'm currently using XMLparser extension (against James Clark's Expat

-fomit-frame-pointer and segfault
16307 [pixel@ma dr ] When compiling with -fomit-frame-pointer, ruby segfaults with gcc-2.96 and
16315 [matz@ze ab t] I didn't know that.  Thank you for the information.

Strange behaviour of require
16309 [neumann@s- i] 1)
16314 [matz@ze ab t] Hmm, I couldn't reproduce the problem (using Curses though).
16319 [decoux@mo lo] I can confirm
16323 [matz@ze ab t] Thank you.  I found out where tha bug lied.  It will be fixed very soon.

ruby regex
16310 [dthiel@ne pr] How would I do a regex in ruby that expressed "all printable characters"?
16316 [wayne.blair@] Sometimes I chime in with a response that is pretty simplistic, but on the
16317 [decoux@mo lo] character class [:print:]
+ 16318 [Dave@Pr gm t] I thought this was deprecated (which is why we didn't document it).
| + 16321 [matz@ze ab t] No.  It's because I wasn't sure if they would survive in the future
| + 16336 [elderburn@mi] Double play on words, Dave? :-)
+ 16320 [decoux@mo lo] It's easier for me to read C rather than english :-)
  16335 [elderburn@mi] Great point! Sadly, it's not "free speech" :-)

Little bug in the manual
16311 [teespy@bi fo] I think there is a little error in ruby's guide
+ 16312 [huber@al m. ] ^       ^ -- probably meant " ?
+ 16313 [matju@sy pa ] Not only str="abcdefg" is legal and working, but your replacement has
  16348 [hal9000@hy e] release of

Tcl string map lookalike
16325 [wbsoft@xs al] What's the best way to perfomrs a Tcl-like "string map" function.
+ 16334 [kjana@os xa ] Well.... something like following?
| + 16341 [ben_tilly@op] I am working in Perl right now, so I can give a Perl answer
| + 16439 [wbsoft@xs al] something like that.  The problem is that the order of the keys does
|   16440 [decoux@mo lo] '<<' found (in your regexp) before '<'
+ 16349 [decoux@mo lo] You can't do this. If tcl use an array (and not an hash) this is because

Removal of a list of entries from an array
16327 [buter@CW S. ] Is there functionality equivalent to the following in Ruby?

Any Documentation for MySQL-Interface available?
16328 [   ml@sp .d ] Does anybody here know _today_ whether there's documentation
+ 16329 [buter@CW S. ] Try the MySQL documentation, specifically the part on the C API. That's
+ 16330 [Dave@Pr gm t] You can pretty safely use the documentation for the C API that comes
| 16331 [   ml@sp .d ] Also las ich bei Dave Thomas [mailto:Dave@PragmaticProgrammer.com]
+ 16342 [alwagner@tc ] If nothing else works, I connected to MySQL using the Ruby ODBC interface.

Re: What is happening?
16332 [wayne.blair@] connection

Thread deadlock message - what does it mean?
16333 [ptkwt@ar cn ] deadlock 0xd7368: 2:2  - /usr/local/lib/ruby/site_ruby/1.6/drb/drb.rb:95
16353 [decoux@mo lo] The first is the status of the thread with

extension distribution
16337 [sol123@ms .c] ...
16338 [danny@fr uk ] cygwin versions right.
16339 [sol123@ms .c] ...

Lisp vs. Perl Round 3: Operator Associativity and Manipulation
16340 [ken.lacrosse] Thought the list might find this of interest.

Garbage Collection?
16343 [mdavis@se ai] Does anyone understand garbage collection well enough to provide me some
16344 [mdavis@se ai] I forgot to mention that I am running version 1.7.1 (the current snap shot as of early this week) mostly on Windows2000.
16351 [decoux@mo lo] Probably because your variables are always referenced and the GC can

bug?
16347 [nconway@kl m] #...
16350 [decoux@mo lo] methID is not defined and it's resolved as a method call.
+ 16362 [nconway@kl m] Okay, I see why that happens.
+ 16363 [decoux@mo lo] This is what ruby do :-)

[ANN] Ruby/DBI 0.0.5
16352 [neumann@s- i] I am pleased to announce a new and completely rewritten version of Ruby's DBI.
+ 16371 [alwagner@tc ] Thanks for the heads-up, Michael.  I wasn't aware of this project and had
+ 16373 [m_seki@mv .b] I tried Ruby/DBI 0.0.5 with Pg, But my script made a minnor truble...
  16381 [m_seki@mv .b] Sorry, I forgot a quoter.quote().
  16397 [neumann@s- i] Thanks for the bug-fix. I'll include it, and release a patch-version.
  16421 [SAT@MU TI EC] dbd_sybase.c:29: tds.h: No such file or directory
  16422 [SAT@MU TI EC] Please ignore this post. It was easy to configure not to build the sybase

Garbage Collection?
16354 [mdavis@se ai] Here is a test script that is similar to what my btree is doing.  The
16355 [decoux@mo lo] Well, this script
16356 [ben_tilly@op] May I suggest using the Ruby interface to Berkeley DB?  They have
16357 [mdavis@se ai] The method eats memory for as long as it runs.  When it completes all
16358 [mdavis@se ai] I did consider it.  I am using this project to learn Ruby with the intent
16359 [decoux@mo lo] The testing is done *before* it return, i.e.

Garbage Collection?
16360 [mdavis@se ai] I have narrowed the issue down a little further.  It appears to be related
16361 [decoux@mo lo] pigeon% cat b.rb
16364 [mdavis@se ai] Windows 2000 and linux (RedHat 6.2).  I have run these tests on both OSs.
+ 16366 [wjl@mi dl ss] system("ps aux | head -1")
| + 16367 [decoux@mo lo] You have a problem with your system or your version of ruby
| + 16376 [ser@ge ma e-] Same here.
|   16384 [decoux@mo lo] pigeon% ./ruby test.rb
|   16398 [matz@ze ab t] Arrghh!  Sorry..
+ 16368 [decoux@mo lo] I'm using
  16370 [mdavis@se ai] I just grabbed the latest snapshot.  It is still an issue in version ruby

Tk page fault
16365 [ms@ia ta e. ] I was experimenting with Windows this morning and had a problem with

Ruby Jabber
16372 [jray@ja be .] Does anyone know if anyone is working on a library for the jabber protocol?
16374 [hal9000@hy e] protocol?
16375 [avi@be a4 co] It's a very open and well-designed instant-messaging system; it's mainly
16423 [julian-ml@be] Avi directed me to this thread as I haven't been following this mailing list recently (just signed up again).  I have been playing around with Ruby and Jabber though it's certainly nothing I would call a library or anything.  I did a wrapper around the Ruby/XML package to make my life a little easier when dealing with XML streams and I'm playing around with writing some client stuff and services in the hopes of figuring out by using it what I would like a library to look like.
16425 [jray@ja be .] If you want some help, I can help out with it.  I was looking to implement something

other ways to create class instance?
16377 [samantha@ob ] I was fooling around with object persistence ideas in Ruby and
16378 [mirian@co mi] Possibly the marshalling support in Ruby is what you're after.  It
+ 16379 [hal9000@hy e] Yes... also check out the PStore library.
+ 16388 [mirian@co mi] After thinking about the question Samantha raised (creating class
+ 16389 [decoux@mo lo] "bless" just associate a STASH with a variable
  + 16390 [mirian@co mi] It's tempting, but unfortunately it does not work in the general case.
  + 16391 [decoux@mo lo] Use #send like in your example.
  + 16394 [samantha@ob ] The problem with this is that I want to be able to transparently

Method objects fail equivalence
16380 [mirian@co mi] def foo
16403 [matz@ze ab t] Yes.  Method objects are created each time you invoke "method".
16409 [mirian@co mi] Okay.  I thought that == was supposed to be for logical equivalence,
+ 16410 [Dave@Pr gm t] I'm not sure the semantics are that clear. For example, would this be
| 16416 [mirian@co mi] Intuitively, I would expect it to be the implementation of the method.
+ 16412 [matz@ze ab t] Well, == is for equivalence, which default behavior is equal
  16418 [matju@sy pa ] For unbound methods: my idea on it is that one def is one method, so if

Huffman algorithm
16382 [hal9000@hy e] Well, a couple of days ago I was taking some
16402 [luigi.ballab] Better yet, you could use a tree instead of an array - once implemented, it

Symbolic Computation
16383 [matju@sy pa ] I don't remember whether the following has been done in Ruby yet, but I

Re: [ruby-cvs] rubicon, rubicon/builtin, rubicon/language: Add all the 1.6.4 sample/test.rb tests to Rubicon, and integrate the
16385 [knu@iD em ns] Great work!!  Why don't we put this into /src/ruby some day in the

Ruby source
16386 [aleksei.guze] I've compiled 1.6.4 for mswin32 almost succefully. Microsoft's compiler
16457 [aleksei.guze] First, I like Intel's compiler, 'cause it really uses the power of two

Symbolic Computation II
16387 [matju@sy pa ] Take the source of [ruby-talk:16383] and append the following to it. It

yield to list?
16392 [mirian@co mi] def numstrings x, y
16393 [Dave@Pr gm t] For your given problem, of course, you could use

Ruby on Mac OS X?
16395 [fgp@ph o. rg] Is anyone working on a "native" version of ruby for mac os x?
16396 [deleeuw@st t] ...

Symbolic Computation III
16400 [matju@sy pa ] This third installment departs from the former two [ruby-talk:16383],
+ 16401 [wayne.blair@] Very interesting.  I checked out the source you sent, and if I understand
| 16404 [matju@sy pa ] Yes.
| 16411 [wayne.blair@] most
| 16420 [matju@sy pa ] RubyAST aims to be a spec for an interchange format between
| 16424 [matju@sy pa ] First question, in the process of making RubyAST.rb into real runnable
| + 16427 [feldt@ce ch ] Could you briefly summarize the benefits from having these MetaTypes? Is
| | 16436 [matju@sy pa ] "*this* goes *there*".
| + 16430 [spwhite@ch r] I don't really understand what the choices, unions, lists and tuples are
|   + 16434 [matju@sy pa ] They are not doing anything, they are just there. They could be used for
|   | 16438 [spwhite@ch r] ChoiceTypes?
|   | 16461 [matju@sy pa ] Well, the caching is, sorry. What's more important is that two equally
|   + 16441 [bobgus@mc .c] A nice run-through of the syntax possibilities. I hope it catches on.
+ 16414 [feldt@ce ch ] I heartily agree with all of this. In Rockit:examples/ruby there is a

An introduction and kudos
16406 [jbulley@be e] Just thought I'd announce myself. I Just started tinkering with Ruby

Anniversary thanks and rockit
16413 [feldt@ce ch ] Last week was my Ruby one.year anniversary; I've now been a happy Ruby
16449 [feldt@ce ch ] The place for rockit is now rockit.sourceforge.net (and oh what a

Ruby - Objective C - GNUstep
16415 [Laurent.Jull] - Discovered Ruby 6 months ago after 8 years of Perl. Liked it a lot
16426 [avi@be a4 co] I started a quick proof of concept of this, but it needs some work before
+ 16428 [julian-ml@be] whoa man... what's Meta Ruby?
| 16429 [julian-ml@be] Hmm... that's embarrassing... for some reason that didn't match my filter rule for the mailing list and since it happened to be from someone I knew, I thought it was directly to me... only when it showed up on the mailing list did I realize where my reply went.  Now I understand why I didn't know what the hell the message was about.
+ 16444 [Laurent.Jull] That's interesting.
  16445 [avi@be a4 co] No... those three classes are actually "class clusters" - the superclasses

Fw: Newsgroup mirroring problem alert!
16419 [schneiker@ju] pain

Inital Q's on Ruby grammar
16431 [feldt@ce ch ] * Can you give a regexp for tDXSTRING? If not can you give a context-free
16432 [matz@ze ab t] tD* are something with #{} inside of it, so tDSTRING is a tSTRING with
16433 [decoux@mo lo] tDXSTRING correspond to the node NODE_DXSTR i.e. ``
16435 [feldt@ce ch ] Thanks for your answers (both Guy and Matz). Reason I ask instead of
16437 [matju@sy pa ] QRegexp = tuple([:pattern,QString|IString],[:flags,String])
16446 [feldt@ce ch ] Yes, thats reasonable.


16442 [s.unsworth@v] ...
16443 [Dave@Pr gm t] Absolutely. If you're currently using an IDE to build your
16459 [cbroult@sa i] ...

regex: all but one
16447 [tobiasreif@p] "all possible characters, including newlines and carriage returns, but
+ 16448 [tobiasreif@p] .*|\n*
| + 16450 [wayne.blair@] /[^"]+/m
| | 16453 [tobiasreif@p] /[^"]+/
| | 16456 [wbsoft@xs al] For example, when you want to match a specific character class, like
| + 16452 [tobiasreif@p] please excuse me for sending too many messages.
+ 16451 [wjl@mi dl ss] ([^"]|\n|\r)*

xmlrpc4r ... does this work for anyone?
16454 [ser@ge ma e-] I've been trying to get any XML-RPC code working with the xmlrpc4r library.
16455 [ser@ge ma e-] usual (for me) my brain was being selectively blind to the obvious.

C extension questions
16458 [szegedy@or u] I currently write an linked-list extension for Ruby, not
16460 [matz@ze ab t] Basically yes.  Even though you can do something else, I strongly

Opinion sought: parsing non-regular languages
16462 [feldt@ce ch ] (This is a bit long...)
16463 [decoux@mo lo] You are on the road of a P language with this, and there is some madness
16464 [feldt@ce ch ] Thanks for the pointer.
+ 16465 [decoux@mo lo] mad in itself.
| 16466 [feldt@ce ch ] I feared that answer... ;-)
+ 16471 [matz@ze ab t] It's too nasty for me. ;-)
  16482 [ben_tilly@op] languages"
  16483 [matz@ze ab t] Well, I didn't mean regular expressions themselves, but meant regex

Ruby regexp bug ?
16467 [   xm@w3 .r ] That's me again with a possible bug in regexp implementation.
16468 [decoux@mo lo] pigeon% ruby -e 'print "123\n456" =~ /\A456/, "\n"'
16469 [   xm@w3 .r ] hmm ... then why '^' works like that ? ;)
16470 [decoux@mo lo] because it's consistent with $

Re: Opinion sought: parsing non-regula`r languages
16472 [Dave@Pr gm t] I know next to nothing about parsing and lexing, but it seems to me
16473 [feldt@ce ch ] Yes, sounds reasonable.
16474 [derek@di it ] Not to interrupt this thread, but what is rockit?  I've seen that a couple
16475 [feldt@ce ch ] Its a compiler construction toolkit. Not part of Ruby but implemented in
16477 [derek@di it ] Thanks a lot Robert.

C-extension question
16476 [szegedy@ad c] ...
16484 [matz@ze ab t] There's no difference in Ruby between passing three values and passing

Re: Newsgroup mirroring problem alert!
16478 [schneiker@ju] [snip, snip, snip]
16480 [Dave@Pr gm t] I posted to the Japanese list this morning, and Matz followed up

Confusion about alias and alias_method
16479 [srussell@rh ] I programmed myself into a corner and thought of a fix involving
16490 [decoux@mo lo] Why ?
+ 16500 [ser@ge ma e-] I don't quite understand this.
+ 16535 [decoux@mo lo] In page 252 of the book, id.inspect is used in an eval (i.e. in a string)

FXDocument part of some MVC?
16481 [dsafari@pa a] I'm using FXRuby for an application and getting to a stage where it

Test - please ignore
16485 [Dave@Pr gm t] Just testing

Initial thoughts about Ruby From a Smalltalk Programmer
16486 [s3225202@st ] I have to say I'm utterly fascinated by Ruby and I'm really getting

FEATURE REQUEST: Smalltalk ^ for return
16487 [s3225202@st ] Is there a hope at all of getting ^ in to the language as an alias for
16488 [luigi.ballab] Michael,
16491 [aleksei.guze] class Fixnum
16492 [luigi.ballab] Of course. But that was before my morning coffee :)
16493 [luigi.ballab] Oh, now I remember. I also wanted to show that the value of an "if"

Verify correct lexing of delimited strings
16489 [feldt@ce ch ] Could someone knowledgeable in Ruby's parse.y please verify the correct
16494 [Dave@Pr gm t] I'm not a parse.y pro, but I believe you need to take into account
16495 [feldt@ce ch ] I knew I'd missed something. Thanks!
+ 16496 [decoux@mo lo] I know nothing about parse.y but
| 16497 [feldt@ce ch ] Thanks!
| 16501 [Dave@Pr gm t] The table on 203 and an example on 204 shows this, but we don't
+ 16498 [matz@ze ab t] Besides the points Dave and Guy pointed out, regexp takes trailing

Class Var question
16499 [SAT@MU TI EC] ...
16538 [matz@ze ab t] Cool down and re-think what you want.  Your program did not describe
16610 [SAT@MU TI EC] What I want to do is have some "meta" information about an object's members.
+ 16616 [matz@ze ab t] Is the following code close to what you want?
+ 16617 [matju@sy pa ] class Address # this is the class
  16627 [SAT@MU TI EC] Thanks, I think this will do the trick! Unfortunately it just brings up more
  + 16628 [SAT@MU TI EC] This worked when put into the class itself but not when using "extend"? Any
  | 16641 [matju@sy pa ] module UserClass
  + 16629 [Dave@Pr gm t] None - they just belong to a different object :)
threads.html
top