14422-15986 subjects 14797-15505

^ plruby compile truble.
14634 [noborus Zeta] I'm trying plruby compile.

^ access to $_ for methods we write
14635 [gnhurst hurs] def foo(x=$_)
14639 [Dave Pragmat] def foo(x=eval("$_", TOPLEVEL_BINDING))

^ Yet another "About private methods" question
14636 [jacoboni uni] I'm still trying to figure out the semantics of private methods in Ruby.
14638 [Dave Pragmat] It's a philosophical thing. 'private' is an indication that you're not
+ 14650 [jaco teaser.] Yes, of course... We can't avoid someone to alter the code and remove
+ 14655 [jaco teaser.] Yes, of course... We can't avoid someone to alter the code and remove
  14656 [Dave Pragmat] What form would strict privacy take?
  14661 [jaco teaser.] A form where strict private method would be unreachable outside the
  14662 [Dave Pragmat] fact that it was private. Even if it couldn't be called outside the
  14681 [jaco teaser.] thing in Ruby...

^ Database abstraction and GUI IDE's
14648 [shawn thekom] This is a bit of an introduction, and some possible promotion.  My company
14739 [shawn thekom] I wanted to fix one point that I made.  The free editor we will be making
14751 [schneik us.i] # This is a bit of an introduction, and some possible promotion.  ...
14754 [luigi.ballab] Just curious: are we talking MacOS X or MacOS 9 here?
14761 [shawn thekom] both

^ to be local or not to be local [was Re: Arggg Bitten by the block var scope feature!!!]
14649 [raja cs.indi] This issue has been a couple of times thru the cycle on this list.
14653 [johannh ucli] Well, the most common way I use something like this is as a way to tell
14693 [raja cs.indi] <snip interesting usage code>
14700 [johannh ucli] Well, to be honest, I agree with you.  I'd prefer if it were the other

^ I can't use -w because of date.rb
14652 [wscott bitmo] Let's try something less controversial...
14756 [buter CWTS.L] I am seeing the same thing here. Anyone has a suggestion how to solve it?
14759 [matz zetabit] This might solve it.  Probably more general "||=" solution is better,

^ Re: bizarre eval hangs
14659 [ptkwt shell1] srchStr = "!(/Error Count = [1-9]/ || /Abort/ || /[1-9] error/ || /fatal/)"

^ Re: plruby compile trouble.
14660 [noborus Zeta] Sorry...

^ Vote for anime character
14663 [Gudrun.Heinr] I vote for a modern friendly symbol clearly associated with japan, the anim
14664 [glen enabled] How about Hachiko? Not only does nearly every Japanese know the story of
+ 14665 [Dave Pragmat] Kind of a mournful mascot...
| 14672 [glen enabled] True... but beloved and respected much for his integrity...
+ 14706 [oliver faker] Basically unimportant, bu it's Shibuya Station, where he still waits for

^ Ruby and Web Applications
14666 [monty astuti] Greetings from a newbie,
+ 14727 [comp.lang.ru] I suspect the language is not yet established enough to have been used
+ 14772 [jim freeze.o] I am also extremely interested in sites that have been built
| + 14774 [gnhurst hurs] I converted a site using mysql from PHP to Ruby, and it was
| + 14776 [armin approx] as you said.. it depends a lot of what you end up doing in that web-project.
| + 14790 [comp.lang.ru] If you're talking about moving from php to an embedded ruby, you're
|   + 14791 [gnhurst hurs] Of course - many of us are :-)
|   | + 14794 [ndrsbngtssn ] Interesting! What kind of approach are you using, then?
|   | | 14799 [chadfowler y] What we've been thinking about is something very
|   | | + 14804 [avi beta4.co] Chad, this sounds great - I'd be happy to help with that "port" once you
|   | | | 14806 [armin approx] yeah. sounds impressive.
|   | | + 14812 [comp.lang.ru] Here's an interesting question: is request-response really relevant to
|   | | | + 14815 [ben_tilly op] I have heard mixed reports on whether there is a speed difference.
|   | | | + 14817 [chadfowler y] This would be an attempt to really do Request/Response
|   | | |   14821 [gnhurst hurs] Yes, I am working on that part of it, too.
|   | | |   14834 [avi beta4.co] I don't know what the differences are between ruby 1.4 and the current stable snapshot, but if upgrading to something more recent is impossible for you I'm happy to try to figure out what's necessary to make it work, including working without Apache...
|   | | + 14849 [ndrsbngtssn ] This sounds really good!
|   | + 14801 [comp.lang.ru] I am aware of IOWA, but it seems not to work with older rubies (yeah,
|   |   14807 [avi beta4.co] No, it's not, and no, that's not how IOWA works.  I now regret having
|   |   + 14836 [hal9000 hype] [large snip]
|   |   | 14837 [avi beta4.co] Oops.
|   |   | + 14840 [jim freeze.o] When using PHP, I found (at least for myself) that the cleanest way to
|   |   | | 14848 [buter CWTS.L] But unfortunately, string concatenation is not _that_ fast (about 1 ms on
|   |   | + 14861 [comp.lang.ru] This sounds like a really good idea.  If I can get ruby working
|   |   |   14875 [avi beta4.co] Sounds good... I guess I'll subscribe to it. ;-)
|   |   + 14874 [fcy enteract] Have you looked at Zope Page Templates? [1]  I think they're onto
|   + 14865 [max malva.co] What about Zope?
|   | 14867 [comp.lang.ru] Well, leaving aside the language mixing inefficiencies and the reasons
|   + 14880 [toddg linux1] Would you mind explaining *why* you expect an order-of-magnitude
|     14886 [comp.lang.ru] You're missing the overheads from the compilation and lack of caching.
|     14887 [toddg linux1] Umm.. no.  Overhead from compiliation is in my little table, under
|     + 14906 [ben_tilly op] (ObNote: Can we tone it down a little?)
|     | 14933 [usenet.2001-] startup vs. at script access time.  The loss of Apache::Registry really
|     | 14979 [markj cloake] OK, I'll include most of the message.  At least, the bits which are
|     + 14927 [toddg linux1] Ah.  Then we are using different terms.  I use 'embedded' with regards to
+ 14785 [as646 FreeNe] Other than www.ruby-lang.org (the home of Ruby) which runs on Apache, Debian
  14838 [jweirich one] Ok, its not really a ruby-based site, but the event calender of the

^ Ruby documentation
14668 [ddublanc fre] Interested in Ruby, I am looking for documentation...
14676 [gsemones tre] This is a multi-part message in MIME format.

^ Re: bizarre eval hangs(fatal memory allocation error)
14669 [ptkwt shell1] OK, I ran the above code on Win2K.  It ran for 40 iterations and then

^ Windows Installer for 1.6.3 Beta
14671 [andy toolshe] Sorry for the delay, but I've got the stable Ruby 1.6.3 ready to go in
14720 [rashworth ma] Please send me a copy of the file. Thanks.  Bob Ashworth

^ US$5000
14673 [carol_j aust] ????????????????? :=

^ Problems with Ruby/GtkGLArea, help wanted
14678 [jeremy chaos] /usr/local/src/ruby-gtkglarea-0.9.0/examples/gtkglarea_demo.rb:3:in `require': No such file to load -- opengl (LoadError)
14680 [ljohnson res] `require': No such file to load -- opengl (LoadError)
14738 [jeremy chaos] Thanks for the links!  I'll make sure to check the RAA in future.

^ Class refresher please.
14683 [jkaurin home] class B
+ 14685 [knu iDaemons] `p a1' in B#b1, because `a1' returns nil which `p "A$a1"' returns.
| 14697 [jkaurin home] As Homer would say: DOH!!!
+ 14702 [dave_dunkin ] Ruby is a dynamic language and code is evaluated at run time. A super
  14750 [cclee promet] Though my question could go to a separate thread but since we're on the
  14752 [matz zetabit] I'm sorry to tell you that you're right.  Probably it's time for

^ bizarre eval resource problem solved
14684 [ptkwt shell1] (sorry, I should have continued the previous thread I started, but my
14686 [dgjs acm.org] Wouldn't it be easier to compile the regular expression once before you
+ 14687 [gnhurst hurs] I noticed other people suggesting these kinds of improvements also, but
| 14696 [Dave Pragmat] No, but we can suggest he do it differently :)
| 14796 [ptkwt shell1] Please do: anything you can suggest to speed this thing up would be good!
| 14798 [Dave Pragmat] Have a look at the source in lib/eregex.rb. It adds the ability to
+ 14695 [ptkwt shell1] I'll try this, but I'm not hopeful that it'll work since

^ ranges
14689 [joe vpop.net] Is there a way to construct an array out of a range such
+ 14691 [gnhurst hurs] arr = (0..9).to_a + ('A'..'Z').to_a + ['-']
| 14755 [luigi.ballab] Nope. If you look at Joseph's code, you'll see the result he meant was
+ 14711 [sma 3plus4.d] You could use
+ 14763 [  ddj kmd.dk] arr = [0..9,"A".."Z","-"].map{ |r| r.to_a }.flatten

^ US$5000
14692 [carol_j aust] ????????????????? :=

^ local/nonlocal block vars
14699 [hal9000 hype] Well, I don't think I ever put in my (full) two cents...
+ 14704 [gnhurst hurs] Actually, I think the problem, from matz's point of view,
| + 14709 [lists.ruby-t] Well, this has been a long thread, but it certainly has been an
| + 14732 [hfulton aust] OK... I'm not sure why that's a problem, though.
+ 14705 [kentda stud.] I hope Ruby won't be one of those languages that start out darn near

^ Ruby Cookbook Improvements (was Ruby code: the lost generation)
14703 [colin webg2.] [Forking this thread off the Ruby Code: TLG thread]
14745 [in6x059 publ] I do not think so. As far as I observ, TOS' and licences are really not

^ Ruby on AIX?
14707 [ser germane-] It has been a LONG time since I've done any C programming, and I'm looking
14753 [schneik us.i] # So I tried to compile Ruby on the AIX box, and got all the way

^ Commas
14708 [ser germane-] Why commas?

^ Why's Ruby so slow in this case?
14710 [sma 3plus4.d] Sure, Ruby, being interpreted, is slower than a compiled language.
+ 14713 [joe vpop.net] That's an interesting idea.  I'm curious what Matz thinks of it.
+ 14714 [dgjs acm.org] It seems to me that your code is spending most of its time in the
| + 14716 [matju sympat] Yes, it does spend alot of time, but most of it is yielding; only about
| + 14717 [sma 3plus4.d] Unfortunately, this doesn't have any measurable effect.
+ 14715 [matju sympat] From what I've seen of your code, you've always ran your code with the
  14746 [sma 3plus4.d] Mathieu,
  + 14747 [aleksi hex.f] The Ruby interpreter isn't as fast as it probably could be. I'm not
  + 14805 [matju sympat] When you *do* remove the profiler, then case/when should become much more

^ SV:  Why's Ruby so slow in this case?
14718 [dennisdecker] Yes.
+ 14719 [dennisdecker] SV:  Why's Ruby so slow in this case?
+ 14748 [sma 3plus4.d] Obviously, it's not that slow :-)  Things will further improve once
  14757 [paulp Active] In fairness, if you change your code to use range() in Python it will go

^ Rubydoc?
14721 [jj5412 earth] Is there an existing implementation of Javadoc like comments for Ruby code?
14728 [dsafari para] I'm working on it. I have done a basic proof of concept for myself
14730 [Dave Pragmat] Oops - I've got one too - it uses the irb parser to extract all the
14733 [max malva.co] Have you seen the doxygen (www.doxygen.org)?

^ How do I alias a class method?
14722 [colin webg2.] Subject says it all... How do I alias a class method?
14723 [gnhurst hurs] class <<Foo
+ 14724 [colin webg2.] Thanks for your followup, Guy.  This makes me wonder, though... class
| + 14725 [ ericb eb.to] Why not   Class.instance_eval()  ?
| | 14726 [colin webg2.] Yikes!  As it's sometimes said here in the US, "If that was a snake,
| + 14736 [matz zetabit] class_eval/module_eval would work, if you feel them more intuitive.
+ 14872 [ser germane-] This should be "alias_method", shouldn't it?
  14877 [matju sympat] possibly; but "alias" is not only a name that is different, it is not

^ have I messed up my setup, or are these real irb problems?
14740 [Dave Pragmat] I have some pretty strange Ruby installation directories, so it's very
+ 14741 [matz zetabit] They are bugs, reported also in [ruby-list:29521].  Keiju should/would
| + 14758 [matz zetabit] With his report, it's found out to be MY bug. ;-<
| + 14764 [gnhurst hurs] What about the following?
|   14851 [keiju ishits] messed up my setup, or are these real irb problems? ", on May/07
+ 14742 [ms iastate.e] What is --tracer for?  I'm okay without it.

^ ANTLR rules for Ruby
14743 [matz zetabit] I'm investigating ANTLR these days.  I vaguely remember somebody
14744 [Dave Pragmat] was then a fairly long thread on ANTLR.
14885 [juanca-l sui] I worked plenty with YACC while I was a student, and learned how difficult
+ 14891 [hal9000 hype] parser
+ 14893 [matz zetabit] I personally don't prefer meta approach (a language written by
  14895 [Dave Pragmat] I'm not agreeing or disagreeing, but just curious. What would be wrong
  + 14899 [matz zetabit] I'm not agreeing or disagreeing with reference implementation.  But I
  | 14951 [g24ever hotm] Is the complete syntax of Ruby available somewhere?
  | 14962 [matz zetabit] See parse.y in the source.  It's written in yacc rules (with C code
  + 15031 [matju sympat] Dave, here, you really, really understand what I want.

^ Ruby/Tk with win98
14749 [werner.penno] I'm working with Ruby since 2 weeks on aWindows 98 System.
14766 [jj5412 earth] Be sure x:\ruby\tcl\bin is in your path. (where x: is your Ruby drive)

^ skipping arguments
14762 [stillflame g] this is going to be a stream of thought, not really one coherant question.  i am sorry(or 'you are welcome', in some cases).
+ 14765 [Dave Pragmat] Some future Ruby will support keyword arguments, which means you could
| 14769 [  ddj kmd.dk] of
| + 14782 [luigi.ballab] Well, maybe one reason is that it would be very difficult then to tell Ruby
| + 14835 [hal9000 hype] My guess is that this would make parsing more difficult. After all, an
|   14873 [ser germane-] Unless it makes the statement more ambiguous, it wouldn't make parsing more
|   14889 [hal9000 hype] more
|   14902 [kentda stud.] I belive removing the need for commas or making them optional would also
|   + 14903 [matz zetabit] I'm glad you've noticed the secret of language design. ;-)
|   + 14909 [jj5412 earth] Omission of commas makes the language too ambiguous (IMHO). If you think of
+ 14778 [jj5412 earth] def test(a, b, *more_args)

^ SimpleDelegator assymetry
14768 [feldt ce.cha] Can someone explain the "assymetry" in the behavior of the code below?
+ 14770 [WYS helbling] The Ruby "delegate" implementation takes the object from the constructor
| 14773 [feldt ce.cha] Is this the behavior we want?
+ 14771 [Dave Pragmat] It looks like SimpleDelegator only sets up the list of methods to
  14775 [feldt ce.cha] Me too. RCR?
  14779 [Dave Pragmat] I'd vote for it. Matz?
  + 14786 [WYS helbling] Robert, looks like this was meant by the comment in delegate.rb!
  + 14788 [matz zetabit] It's OK for me to make it RCR.  But I feel this behavior can be a

^ Completely freaky behavior
14777 [jj5412 earth] @author = nil
+ 14787 [jj5412 earth] Funny how you post and then find the solution. Thanks to Dave!
| 14826 [matz zetabit] Could you tell me what happened?  Share your experience, please.
| 14832 [jj5412 earth] case line
+ 14789 [matz zetabit] Send me the whole thingy, with information required to reproduce your

^ AW:  Re: SimpleDelegator assymetry
14780 [WYS helbling] ...does your solution remove obsolete methods?
+ 14781 [feldt ce.cha] No because I couldn't think of a tried-and-tested way of undef'ing
| 14783 [Dave Pragmat] In fact, if we're going to do this, it would be a good idea to
+ 14784 [Dave Pragmat] This will have a different behavior to the original delegate.rb. This

^ Integer division oddness
14792 [mtm csoft.ne] My father pointed out this oddity.
+ 14802 [mtm csoft.ne] In partial answer to my own post, I just found this
| + 14809 [ben_tilly op] It depends.
| | + 14820 [mtm csoft.ne] Ok, I think I understand now.  But to clarify, when you mention
| | + 14822 [matju sympat] which is pretty much pointless for an interpreter, which spends most of
| + 14814 [matju sympat] Please see [ruby-talk:3114] (
| | 14816 [gunnar mail.] <table width="500"><tr><td><font size="" style="" color="">>It still seems wrong to me.  Which is right? -1 or -2?<br>>I guess it boils down to whether or not you believe<br>>that the modulus can be negative.<br>><br>>" -10 / 9<br>>" <br>>" For ruby, python and tcl you get: -2!<br>>" For java, c and gforth you get:   -1<br><br>This is pretty much off topic but the question seems to be if Ruby "does the<br>right thing or not" so I'll let it live a little longer.<br><br>Consider binary arithmetic and it makes sense.  When you have reached the<br>answer with as many whole bits as possible, remaining "non-whole bits" are<br>rounded off downwards.  The negative value is in two's complement format <br>so rounding the last bit downwards makes the result more negative than <br>the "real answer" would be.  <br><br>Contrast that to a positive number, where rounding a bit downward makes <br>the number smaller.<br><br>Coincidentally, it is also true for the relationship between<br>divisio!
| | 14818 [gunnar mail.] Sorry to spam you with HTML garbage.
| | 14819 [gunnar mail.] Sorry to spam you with HTML garbage.
| + 14823 [raja cs.indi] As has been pointed out earlier by Ben, it depends.
|   14827 [ben_tilly op] I am talking the remainder as a floating point once you divide by
|   14829 [Dave Pragmat] I'm no expert on this, and writing those couple of pages for class
|   14860 [ben_tilly op] In which case that answer is not a bug.
+ 14813 [johann physi] IMHO, the ruby and python result is the correct one, although I still
  14866 [kjana os.xax] require "mathn" and you have not only Rational but Complex :-)
  14878 [johann physi] The problem with this is that it would break all other modules which

^ Polymorphic methods
14793 [jj5412 earth] In C++ you can have polymorphic methods such as
+ 14800 [ljohnson res] In short, nope. That's how to get overloaded functions in Ruby (or Python,
| 14803 [Dave Pragmat] Or use double dispatch...
| 14808 [ben_tilly op] Yes.  Two solutions.
| 14864 [neumann s-di] class StaticPoly
+ 14828 [chris atdesk] That's not polymorphism, that's function overloading.  :)
| + 14831 [jj5412 earth] Uh, yeah, polymethodism, that's what I meant :-)
| | 14853 [kentda stud.] Actually, beware of fanatic C++ users, since they'll claim that it is
| + 14850 [pixel mandra] Polymorphism
|   14854 [   xm w3d.ru] libdir = #{$libdir.sub(drive, '')}#{target_prefix}
|   14859 [ben_tilly op] I am not sure what you want to be possible.  The way I
|   + 14862 [Dave Pragmat] I think that might be a little absolute :)  Wasn't it you who posted
|   + 14863 [chris atdesk] I agree, the type still must be checked in any case since it's not
+ 14868 [jj5412 earth] If anyone is interested, I've written a mixin that will give you
| 14869 [ben_tilly op] In the paragraph before the snippet you show, I said explicit
| 14870 [Dave Pragmat] Absolutely. There is always going to be some kind of dispatch
| 14911 [ben_tilly op] In this case I think that it is worse to roll your own case
+ 14936 [wys helbling] Why not make Guy Decoux's (ts) 'generic methods' (see [ruby-talk:10424]) a
+ 14940 [decoux moulo] Not a good idea, for me
  14963 [matz zetabit] <grin>