46357-47516

46130-47617 subjects 46553-47644

Compiling Ruby to Native Code?
46357 [web2ed@ya oo] Having looked at OCaml, after following a post to this group, one
+ 46366 [mikkelfj-ant] Actually one of Ocaml's strengths is its byte code compiler. The bytecode
+ 46368 [alan@di ik t] Doesn't gcj (http://gcc.gnu.org/java/) compile to native code as an
+ 46486 [dido@im er u] I don't think dynamic typing is the problem.  We've had an Objective-C
| + 46488 [robert.calco] %% > Game over, if Java or Ruby provides native compilation; it won't make
| | + 46702 [mikkelfj-ant] I did look briefly at mozart. I don't recall the details but I think it
| | | 47090 [robert.calco] Mozart isn't abandoned, there's just a really, really small, tightly-knit
| | + 47020 [charleshixsn] The problem that I have with many of those paradigms, is that they don't easily support the idea of data files.  Particularly of data files that may be looked at and changed in some other language.  This seems endemic in the functional languages, though, of course, the object oriented languages have their problems with it also (as you know if you have ever tried to keep a relational database in sync with a object oriented program).  This is why marshalling was invented, and it's far from perfect.  Only the procedural languages seem to have solved this one, and that largely by not directly representing the kind of structures that cause problems.
| |   47089 [robert.calco] [In RE: multiparadigm programming, some thoughts relevant to your remarks
| |   47505 [charleshixsn] I have some things I want to do (quite a large number, actually) that can be
| |   47516 [mikkelfj-ant] be
| + 46575 [llothar@we .] Dynamic typing is the one and only problems !
|   46689 [dido@im er u] gcc -x objective-c -o test test.m -lobjc
|   46690 [alwagner@tc ] What no one seems to have mentioned about Obj-C is that:  Yes, it is compiled
|   46722 [matju@sy pa ] Well, who wants to use a language without its standard runtime package ? I
|   46727 [pbrannan@at ] I can link statically against libc and libstdc++.  I would be surprised
+ 46508 [romstad@ma h] Not at all.  There has been excellent, optimizing Common Lisp
  46576 [llothar@we .] I also must repeat myself here. There are only two ways to get good
  46618 [romstad@ma h] You are right here, of course.  In order to achieve C-like
  46703 [mikkelfj-ant] Ruby is a mutating monster so you have to look up functions in a hash.

Question about Marshal.dump behavior
46361 [james@ja es ] I had gotten the impression that the third parameter to Marshal.dump acted
46381 [matz@ru y- a] Yes.  It's to avoid (almost) inifinite dump loop.  I didn't want
46384 [james@ja es ] Oh, OK; so, code to pass an expected value for the object depth, and if dump

FXRuby - FXPopup owner error creating FXComboBox
46375 [transami@tr ] i am trying to create a FXComboBox. it also happens trying to create a
46418 [lyle@us rs s] Are you creating this new FXComboBox (or FXListBox) sometime after

RE: More questions on automation from naiveWindows user.
46383 [james@ja es ] The lookups aren't done by Ruby, but by the COM objects being referenced.

Writing a method that's added to both Fixnum and Bignum
46393 [harryo@zi .c] A mate of mine just asked me an interesting question.  He had written a method
+ 46394 [hal9000@hy e] method
+ 46395 [transami@tr ] they both inherit from integer. can you put it there?
| 46411 [justinj@mo i] Or if you don't want to put it in Integer put your method into a module and
+ 46399 [flori@ni e. ] module Fred

ActiveScriptRuby and ASP
46400 [henry@be ca ] Does anyone use ActiveScriptRuby from within ASP successfully?

REPOST:  Seeking "Coroutines for Ruby" module
46404 [ljz@as as .c] [ This is a repost of a recent message of mine.  I'm not sure whether

Re: Super-iterator?
46409 [jerickson@ey] ...
46435 [g_ogata@op u] If you wanted to generalize it further, you could feed it a block

诚邀代理业务,利润可达40%!全新jsp asp.net php虚拟主机
46410 [     g@g. om] <!-- saved from url=(0022)http://internet.e-mail -->

Is It Safe to Return C Pointer in Fixnum?
46412 [billtj@z. lu] Is it safe to return a C pointer from an extension to the user by using
46421 [matz@ru y- a] Fixnum only preserves 31 bits, so that it is safe to use NUM2INT().

Is there a Math function of pow(x,y) in Ruby?
46415 [yxw@cy re s.] I am writing a Ruby script to do some computation. I need a function
46416 [decoux@mo lo] Something like this ?
46417 [yxw@cy re s.] That's what I want. Thank you very much.

emacs' ruby-mode, irb and line numbers
46420 [bn@st an ed ] I'm using Emacs' ruby-mode together with irb as inferior ruby, but the
46507 [bn@st an ed ] ruby-mode 1.58

Getting column types with DBI
46423 [meier@me st ] does DBI support getting the column types for row? I digged the source
46444 [transami@tr ] ...

Distributing Ruby apps
46424 [peter@oo s. ] I'm sorry if this is a common question, but I haven't been able to find

Is There an Inverse of 'rb_define_method'?
46426 [billtj@z. lu] Using "rb_define_method", we can associate a method string with a function
46432 [g_ogata@op u] I think this is similar to trying to get the name of a variable referring
46544 [billtj@z. lu] I don't think it is similar to get the name of a variable.  When Ruby
+ 46659 [g_ogata@op u] Oops.
+ 46660 [nobu.nokada@] Instead, these may be possible.
  46666 [billtj@z. lu] I'm sorry, but I cannot find the definition of "rb_method_call" by
  46684 [nobu.nokada@] Wmm, they are not defined yet both, just *candidates* for new
  46711 [billtj@z. lu] In this case, then, instead of "rb_obj_method" which returns a VALUE, can
  46801 [nobu.nokada@] And also, how can you know about the arguments?
  47037 [billtj@z. lu] Well, I have not digged too deep into the Ruby C source code; however, to
  47182 [nobu.nokada@] It's done at compile time, but not run time.  Only you can be
  47219 [billtj@z. lu] Agreed.
  + 47220 [decoux@mo lo] It was previously explained, it *don't* exist a function pointer for user
  | 47230 [billtj@z. lu] Thanks.  A concise, precise, answer like this is what I am looking
  + 47221 [billtj@z. lu] I am sorry, but when I reread the entire thread, probably now I should

performance about "..." and '...'
46427 [tran55555@ya] I do not like to check the source code to see what exactly happend.
46433 [g_ogata@op u] g0@spud:~$ time ruby -e "5000000.times {'This is a String.'}"
46509 [kentda@st d.] But they aren't identical.
+ 46515 [pit@ca it in] I also used this style to distinguish between 'constant' strings and
+ 46533 [g_ogata@op u] are

Re: Unicode in Ruby now?(ppc)
46437 [ontologist_2] Ladies and Gentlemen,

COM on Unix?
46442 [gehlker@fa t] As part of my crusade to make Ruby an automation language I read up a little
+ 46446 [cbbrowne@ac ] If you need "analagous to COM," for mostly-in-the-same-process
| + 46450 [hal9000@hy e] (snip large informative section with 5 URLs)
| | + 46456 [jjenning@st ] security?
| | + 46465 [cbbrowne@ac ] Yes, and that "hypothetical something" would presumably be CORBA.
| | + 46493 [gehlker@fa t] The entireX package seems to be free and fairly complete.
| |   46498 [cbbrowne@ac ] a) The package is only free for noncommercial use;
| |   46556 [gehlker@fa t] Good point.
| + 46901 [steven_shaw@] Don't forget UNO - Universal Network Objects from the OpenOffice.org
|   46910 [gehlker@fa t] Hot damn! I went to openoffice.org and searched around but somehow I missed
+ 46585 [ianm@ac iv s] here is an old link from 1997 when it looked like Microsoft was
  46597 [cbbrowne@ac ] The "ActiveX everywhere" thing got soundly booed out as a result of

Dup and Clone
46443 [justinj@mo i] Could anyone kindly point out the difference between 'dup' and 'clone'?
+ 46449 [paul@fl or a] official
| 46458 [patrick.benn] Agreed.  There's also the problem that ruby doesn't seem to have a
| + 46467 [tom@li ux ri] Can't you deep copy using Marshal?
| | + 46469 [patrick.benn] I guess(?)  It seems like a pretty major hack though.  It really should
| | | 46478 [vjoel@PA H. ] I agree it seems hackish to generate strings just to deep-copy objects,
| | | 46479 [patrick.benn] Good point.  I guess I would (well, me at leats) probably just add a
| | | + 46484 [justinj@mo i] I can't think of a good reason that there isn't a deep copy supplied.  The
| | | + 46504 [tom@li ux ri] I think that's because there are cases when Marshal won't work. Adding a
| | + 46505 [tsiivola@cc ] a) It's ugly.
| + 46503 [decoux@mo lo] This is not a problem, this is a feature. Try to think about RCO before
+ 46485 [lyle@kn lo y] As has been noted in other responses, they're both kinds of "shallow"
  46490 [vjoel@PA H. ] By golly, you're right. A good thing to remember.
  46511 [kentda@st d.] The freeze big I kinda understand, the instance variables, however, I
  46524 [lyle@us rs s] Hmmm... I see the same changed in behavior here when going from Ruby
  + 46526 [decoux@mo lo] The change is intentional.
  + 46528 [dblack@ca dl] * string.c (rb_str_dup): uses DUPSETUP.  now properly copies

HT delete all files in a directory...
46452 [keuler@po ta] ...
+ 46457 [charleshixsn] That should do the job.  Are you sure that's what you want?  (The
| 46460 [michael_s_ca] This won't work on Windows w/o cygwin (or similar) installed.  Too,
+ 46459 [list@NO PA c] require 'find'
  46461 [patrick.benn] unlink won't delete read-only files either (at least on windows it

How to define a record delimitter for IO.foreach....
46454 [keuler@po ta] IO.foreach("./control/packages.txt") { |x|
+ 46455 [dblack@ca dl] Change the value of the global variable $/ .
+ 46462 [dsafari@pa a] IO.readlines( filename, sepString=$/ ) -> anArray

DBC in Ruby.
46464 [kenosis@at b] Has anyone attempted to implement design by contract primitives in Ruby and
46471 [justinj@mo i] Andy Hunt and I have been discussing such a language extension.  DBC will
46491 [matz@ru y- a] Pretty interesting.  Let's discuss before the chance we take different
46549 [kenosis@at b] And I would also like to discuss the trade offs between pre/post/invariant

STDOUT and $stdout
46466 [alex@pr ss r] I've been using for Ruby for a bit now, but I've never felt happy that I've
46527 [pbrannan@at ] There's been some discussion

sort problem
46468 [ian@ca ib n.] ina1
+ 46473 [dblack@ca dl] It's because <=> returns -1, 0, or 1, all of which are true in
| 46477 [ian@ca ib n.] And, of course, I know about those values not returning truth in Ruby,
+ 46474 [phasis@ko ne] $/ = nil
| 46476 [dblack@ca dl] It's odd (to me) that #nonzero? doesn't return true or false, a fact I
+ 46494 [eban@os ri .] How about Array#<=> ?
  + 46496 [ian@ca ib n.] Ah, very elegant indeed! Thanks for this idiom.
  + 46536 [gotoken@no w] And Ruby 1.7 has Array#sort_by.
    46541 [dblack@ca dl] s/\|i\|/\|a\|/g # :-)
    46542 [hal9000@hy e] puts "Looks like we're becoming a forum"
    46564 [gotoken@no w] =begin

Very ineficient regular expression match
46472 [briqueabraqu] The following code is supposed to print multiple regular expression
46492 [vjoel@PA H. ] Why not use scan?
46512 [mauricio.ant] You're right, I didn't know it.
46513 [nobu.nokada@] See the thread from [ruby-talk:42596].

Named paramters again
46475 [justinj@mo i] obj.my_method( height: 10, width: 20, name: "foo" )
+ 46534 [gsinclair@so] and
| + 46537 [rich@in oe h] so
| | + 46554 [justinj@mo i] I see your point.
| | + 46573 [dblack@ca dl] I'm completely GUI-programming ignorance, but I'll accept on faith
| | | + 46577 [jacekpodkans] I remember from Amiga days so called TagList It was an array of pais NAME,
| | | + 46580 [rich@in oe h] Response at bottom
| | |   46625 [nobu.nokada@] I don't guess that it's good habit to instance_eval block
| | |   46645 [rich@in oe h] This is an excellent point Nobu...thank you for pointing it out.
| | |   46647 [transami@tr ] i agree.
| | + 46620 [justinj@mo i] I see your point.
| | | 46626 [transami@tr ] Viewing Hash and Array as instances of "Container" leads
| | | 46635 [dblack@ca dl] Hash keys are string, and Array keys are Integer
| | | 46642 [transami@tr ] yes, it is from Perl 6 RFC. but the general notion is indifferent to
| | + 46627 [justinj@mo i] I see your point.
| | + 46629 [justinj@mo i] I see your point.
| | + 46633 [justinj@mo i] I apologize for the multiple postings again.
| | + 46638 [justinj@mo i] I apologize for the multiple postings again.
| | + 46640 [justinj@mo i] I apologize for the multiple postings again.
| |   46641 [djberge@qw s] It's deja vu all over again! :-P
| + 46545 [kentda@st d.] [ lots of clever stuff I agree with ]
|   + 46561 [transami@tr ] aliasing the paramters seems like a good idea. how would you implement
|   + 46617 [scobianchi@r] class Array
|     46622 [gsinclair@so] Sorry if I'm being closed-minded, but why is "insertElement" preferable to
|     46628 [scobianchi@r] method name I can more or less know what the method does and what kind
|     46631 [gsinclair@so] Hmm... interesting.  I wouldn't mind playing with some of this good stuff.
+ 46630 [scobianchi@r] This is not totally true: in the example you made above, there *is* a method

-proto- functions in Ruby
46481 [djberge@at b] Are there plans to add any of the proto functions to Ruby in the near future?
46489 [matz@ru y- a] Sorry for ignorance, but what is the "proto functions"?
+ 46516 [djberge@qw s] Sorry - I meant to provide at least one example of what I meant!  I'm
+ 46517 [kjana@dm la ] /etc/protocols and related functions?  If my guess is right, they are
  46518 [djberge@qw s] That was my feeling.  There's no real relationship between "socket" and the

PATCH: PageTemplate [%include file %] tag
46487 [waisun.chia@] ...

[ANN] Radiuslib for Ruby 0.5
46495 [airboss@no e] I'm releasing Radiuslib into the wild today. Radiuslib is a complete

Re: PATCH: PageTemplate [134537664nclude file %] tag
46506 [meier@me st ] =20

problem with an iterator using yield
46510 [CK1@ww te h.] I've got a problem implementing an iterator. I'm writing a server
46514 [decoux@mo lo] #accept don't take a block as arguments.
46543 [CK1@ww te h.] Uhm. I'm sorry :/

Something that corresponds to Perl's -T and -B tests?
46520 [ljz@as as .c] I've searched the Ruby documentation, and I can't find descriptions of
46521 [decoux@mo lo] See [ruby-talk:44936]
46529 [ljz@as as .c] Thank you very much.
46864 [ljz@as as .c] I've written an extension to File::Stat which adds a textfile? and
46867 [nobu.nokada@] Why not File::textfile? and so on?
46868 [ljz@as as .c] Well, to me, the textfile? and binaryfile? methods seem closer in
46872 [nobu.nokada@] It's true certainly in particular system but not in many

XHTML output
46523 [fgoret@up 1.] I would like to have CGI.rb outputs XHTML 1.0 code. Anybody did it already ?
+ 46559 [wakou@ru y- ] I am testing it.
| 46582 [x@ic im nk .] I love all this-- especially the validation against the DTD! Is it
+ 46601 [dido@im er u] What I do to make XHTML 1.0-compliant output in CGI scripts would be to

Re: Coding challenge (on Ruby Garden) [long]
46530 [g_ogata@op u] Those tests weren't necessarily representative of the "average" case.  What is the
46568 [chr_news@gm ] What is the
+ 46571 [transami@tr ] speaking of which, turned out there was a bad bug in my script and after
| 46579 [david.naseby] Not too dramatically, and incidentally, failing cases are sped up a lot in
+ 46584 [billk@ct .c ] Whoops, I don't seem to have Array#any? and Array#all?.  :)  New
  46621 [chr_news@gm ] Yup, they are a generalization of  && and || to Enumerables.
  46650 [billk@ct .c ] Thanks!
  46668 [chr_news@gm ] Sorry, for my editing mistakes - I'll (hopefully) corrected them.
  46682 [billk@ct .c ] items = [ 1,2,2 ]
  46712 [chr_news@gm ] Hm, these units tests are moving targets;-). I changed the
  46749 [billk@ct .c ] Congrats!  It passes all the tests... for now!!!  ;-)

Class hierarchy... for data
46532 [tom@li ux ri] Hey,
46538 [gsinclair@so] Style only: @hash = hash || {}
46546 [tom@li ux ri] Heh. Just hoping I was missing a nicer way to do it - because once I've
46552 [STUCKNER@MU ] I have wanted to do what you talked about. Here is my solution. Please ruby

A very small challenge
46539 [hal9000@hy e] This is a very minor piece of code,
+ 46540 [Dave@Pr gm t] Possibly that's what's causing you a problem. Perhaps the concept of a
+ 46589 [wheelerwjx9@] Surely, there is now "right" way, but the way you look at the decision
+ 46594 [Dave@Pr gm t] I've played with the idea of recording the winner in a Round
  + 46605 [hal9000@hy e] (some snips)
  + 46611 [hal9000@hy e] Replying again on this one.

[OT] GUI's and the Rouge, Part IV
46550 [kero@ch ll .] But the only code I know of is for the so-called Gamma part of Rouge
+ 46551 [hal9000@hy e] Maybe his energy can be used on your project,
+ 46567 [transami@tr ] well, both rich and i have some code. check the cvs on gutopia's
+ 46572 [transami@tr ] quick question for you kero (cool name by the way),
| + 46588 [lyle@kn lo y] Could you maybe defer the construction of the actual FOX widget until it's
| | 46612 [transami@tr ] i thought about this, breifly. i will consider it some more.
| | + 46613 [hal9000@hy e] it's
| | | 46616 [transami@tr ] not a bad notion. could do all of them that way and only bring them in
| | + 46643 [lyle@us rs s] To be sure you're clear about what I meant by deferring construction of
| + 46673 [kero@ch ll .] nil-parent causes the window to be top-level, as for Ruby/Tk.
+ 46609 [transami@tr ] hey kero,
  46674 [kero@ch ll .] run from the parent directory of wise.
threads.html
top