51671-52716

51532-52586 subjects 51815-52972

Question about character input
51671 [icculus@gm s] I am working on an text-based application (no GUI involved) and am
51769 [J.Travnik@sh] on linux (and other unices) you will need to know terminal escape codes
51879 [icculus@gm s] Jakub, I have always considered curses to be a console-oriented windowing

RE:
51691 [mxvera@qw st] 私はルビーを愛する

inherited change?
51693 [chr_news@gm ] why did you change the semantics of  Class.inherited?  I am
+ 51698 [vjoel@PA H. ] Does this perhaps fix the problem discussed in
| 51700 [chr_news@gm ] Well it runs squarely against Guy's argument
+ 51729 [matz@ru y- a] Consistency with Class#new{}, which calls "inherited" *after* the body

New meta class sematics?
51696 [chr_news@gm ] with a cvs change on oct 24 ruby cannot create ``higher order''
51725 [matz@ru y- a] I didn't make any change related to metaclass on Oct 24 last year.
51728 [chr_news@gm ] Sorry for begin my confused self. I miss-read the date

xml-rpc
51699 [stathy.toulo] Does anyone have experience with these modules?  I get a 500 Internal
51702 [james@ja es ] What URL are you trying to call?
51703 [stathy.toulo] Yes, actually I switched parsers to xmlparser and loaded the nqxml

windows xp command prompt
51704 [rsrchstr@ho ] i have installed the activestate perl, python, tcl, and pragmatic
+ 51705 [ianm@Ac iv S] try echo %path% from your command window to verify that your path is
| 51707 [mikkelfj-ant] WS\System32\Wbem
+ 51724 [canyonrat@ma] I don't know much about Windows but on Macs, under tcsh, you either
+ 51739 [alex@iv sc .] Did you install perl, etc. while the command prompt window was open?  try
+ 51899 [davidis@di b] Is it like Win2K, where you have environment variables for 'this user'

New module:  Net::GeoIP...
51713 [sean@ch tt n] New module:   Net::GeoIP

[ANN] SuperHash
51738 [vjoel@PA H. ] OK, it's a corny name, but I'm open to suggestions...

Question regarding character input
51740 [icculus@gm s] I am trying to add the ability to turn echo off for character input through a

'File name' is not recognized as an internal or external command, operable program
51756 [rsrchstr@ho ] problem solved; activestate tcl binary binstallation is the offending
51845 [mikkelfj-ant] Actually that wasn't stated, on the contrary it was hinted that it might

[OT] Re: Is Ruby's grammar LL(k)?
51760 [batsman.geo@] Working on enhancing SRuby? ;-)
51765 [billtj@y. lu] No, no, that is what I *already* have in SRuby :)

Re: Ruby/Tk or mod_ruby or what ?? (ot)
51764 [jon@fr g. rd] I once asked in <something>.java.advocacy if someone could demonstrate a
51792 [mikkelfj-ant] Eclipse isn't painfully slow - it's just painfully large. 18MB compressed

python <=> ruby
51767 [szegedy@t- n] www.cs.washington.edu/homes/kd/courses/pythonruby.pdf
+ 51772 [vjoel@PA H. ] See the thread starting at http://www.ruby-talk.org/blade/37840
| 51783 [szegedy@t- n] Sorry! I was too quick.
+ 51843 [mikkelfj-ant] The above discusses the uniform access of everything is an object and
  51937 [bulatz@in eg] no, it's dealed by overloading mechanism
  51945 [szegedy@no p] OCaml has no overloading. but it would badly need it, I have seen

Method <=> Proc
51768 [szegedy@t- n] Perhaps this is a faq, but I stil don't understand
+ 51870 [chr_news@gm ] As far as I can tell the only real difference is in the creation
| 51874 [szegedy@t- n] Interesting, I have not seen the bind and unbind method
| 51884 [sdate@kc rr ] What is even more interesting ...
| + 51893 [chr_news@gm ] I used the term ``rebind''  in a colloquial sense,. It is not
| | 51908 [gsinclair@so] The main point is, however, that 'ri' doesn't know about 'bind' or 'unbind'.
| + 51904 [rich@in oe h] unbind and bind are new to 1.7.
|   51909 [gsinclair@so] I beg to differ.  I'm using 1.6.5 on Cygwin and followed Christoph's very
|   51952 [rich@in oe h] -rich
+ 51930 [bulatz@in eg] question for another big discussion :)  ruby have three (!) procedure
  51934 [matz@ru y- a] Ruby's closure is a proc.  Probably you meant continuation.
  51939 [bulatz@in eg] Best regards,
  51948 [matz@ru y- a] It's a matter of terms.  I call it a block (because it's not closed yet).

[ANN] xmlscan-0.1.0rc1 released
51774 [unnie@bl e. ] xmlscan-0.1.0rc1 has been released.

alias versus method_missing
51775 [lyle@kn lo y] All,
+ 51776 [billtj@y. lu] How about starting with the great-great-grandchild, and then 'eval'ing the
| 51797 [lyle@us rs s] OK, I am too dense to understand what you're suggesting ;) Could you
| 51801 [billtj@y. lu] This is just an example; I am sure you can improve it further according to
+ 51780 [vjoel@PA H. ] Derived.new.bar     # ==> inside Derived#foo
| 51798 [lyle@us rs s] Ah, this is an interesting consequence I hadn't thought of. For my
+ 51786 [vjoel@PA H. ] class Base
  + 51787 [dblack@ca dl] I get two #foo's with 1.6.7.
  | 51803 [vjoel@PA H. ] But whose #foo's are they?
  | + 51804 [dblack@ca dl] Whoops, I meant to say: two Derived's.
  | + 51834 [decoux@mo lo] No, it has an effect but when ::inherited is called Derived#foo not yet
  + 51799 [lyle@us rs s] Perhaps less efficient than an alias, but certainly more efficient than

Ruby 1.7 Win32 socket bug fix
51778 [danny@fr uk ] After quite some debugging, I found the trouble with the Win32 socket
51785 [usa@os .a t.] Thank you for your report.

gsub can't add a single backslash?
51781 [pmak@aa ni e] I want to escape a string such that all occurances of '&' become '\&'.
51784 [pmak@aa ni e] Never mind, I was just reading it wrong. "\\&" is actually '\&'; it's

ruby bug in tight loops?  (was: Re: Matz, if you're reading, please scan this email)
51796 [sean@ch tt n] Good catch, I fixed this in the CVS version, however this is a
51825 [decoux@mo lo] pigeon% tests.rb -n xml_parser4
51826 [sean@ch tt n] Yup, that's right.  Now add -i 0 to the argument list and watch it
51831 [decoux@mo lo] I can't reproduce, sorry
52024 [sean@ch tt n] [ I've had this email open for two day strait now, I should probably
+ 52064 [matz@ru y- a] Unfortunately this runs forever on my machine without dumping core.
| + 52065 [akr@m1 n. rg] I use following suppression file to suppress such reports.
| | 52129 [lyle@us rs s] <... valgrind suppression file for Ruby snipped ...>
| + 52078 [sean@ch tt n] I was on a gentoo system and it seemed to core about 50% of the time
+ 52120 [decoux@mo lo] Not really convincted that this is a bug in ruby.
| 52165 [sean@ch tt n] And it wasn't either.  :) I'll gladly explain to anyone in detail what
| 52230 [decoux@mo lo] A last point : try to forget Data_Wrap_Struct(). You are in a case where
+ 52137 [decoux@mo lo] Sorry to say that but you have a bug in your extension.

[OT] -1 (was python <=> ruby)
51800 [batsman.geo@] Just joking :-)

thoughts on typelessness
51809 [dblack@ca dl] The on-going discussion of explicit typing and Ruby has whetted my
+ 51810 [billtj@y. lu] Your exposition is very wide and deep.  I will try to respond to just one
| 51877 [canyonrat@ma] What about ObjC? Seems intuitively to be about 60-70% of the easiness
| 51963 [billtj@z. lu] Based on my first impression of scanning the comp.lang.objective-c, it
| + 51972 [alwagner@tc ] Try Portable Object Compiler(POC).  An Obj-C that has a choice of Boehm or
| + 51987 [mgushee@ha e] I thought it was very NeXTStep-oriented. So maybe we should just call it
| | + 51988 [alwagner@tc ] This is true only for the GNU version.
| | + 52076 [bulatz@in eg] mac os x)
| + 51993 [batsman.geo@] AFAIK Objective-C is used to develop on OSX, but saying it is
| | 52002 [comp.lang.ru] - - If you like Ruby, I think Objective-C is the most natural
| + 52068 [bulatz@in eg] reverse - OC was used in nextstep, which itself is base of new aplle's
|   52083 [canyonrat@ma] I'm sure these guys, http://www.gnustep.org/, these guys,
|   52103 [ahumphr@ZA g] I'm sure Brad Cox, a frequent poster here, will also be somewhat
|   + 52127 [billtj@y. lu] Really?  Can you give me a pointer on where this discussion is?
|   + 52153 [canyonrat@ma] He'll probably be heartbroken ;-)
+ 51811 [gsinclair@so] Good words, David.  My responses are interleaved below.
| + 51814 [mgushee@ha e] I'm not sure I disagree, and being a self-taught programmer who is just
| + 51817 [dossy@pa op ] Computers require explicit instructions.  Humans aren't necessarily
| + 51850 [qrczak@kn .o] You might as well say that exceptions are a redundant mechanism
|   + 51854 [qrczak@kn .o] Ruby is not typeless. Every Ruby object has a well-defined type.
|   | 51867 [dblack@ca dl] Well, actually it looks like C to me :-)  But still, I'm the first to
|   + 51859 [dossy@pa op ] You're right.  I might as well just say that, and sometimes, I actually
|   | 51876 [jason@jv eg ] To characterize the abundant, thorough, and indeed necessary research
|   + 51894 [qrczak@kn .o] Covering 100% of code with tests is not a silver bullet. What if code
+ 51824 [decoux@mo lo] Why do you think that I've added module in the signature (see
| + 51829 [gsinclair@so] This is questionable; depends what you mean.  An Enumerable also responds to
| | 51836 [decoux@mo lo] Bad reference, change your reference :-)
| + 51865 [chr_news@gm ] You answered this yourself already - to kill the whole idea;-)
|   51943 [decoux@mo lo] This was one way to say it, the other way is to say that ruby has modules
+ 51838 [mikkelfj-ant] This also very much indicate the fragility of the method.
| 51901 [dblack@ca dl] I guess my instinct is that there's much to learn and gain from Ruby's
+ 51847 [list@NO PA c] Do you really want your method to go on even if `thing' doesn't
| + 51855 [dblack@ca dl] Yes, I don't think all my examples are synonymous with each other.
| | 51883 [chr_news@gm ] If I remember correctly there was a science story floating
| + 51872 [bryan@te ra ] That's interesting and I like it.  With a little tweaking it should be
|   51906 [gsinclair@so] Ruby's mixins have similar features to Java interfaces, but they are more
|   + 51911 [jweirich@on ] Interesting ... I've always considered Ruby mixins to be the exact
|   | 51920 [gsinclair@so] And a very fair point of view it is too.  But there are some similarities to
|   + 52055 [bryan@te ra ] While I understand your point, I do have to disagree and say that Mixins
|     + 52056 [gsinclair@so] need
|     | 52061 [bryan@te ra ] Yeah, and I think that gets to the core issue why everybody keeps
|     | 52069 [gsinclair@so] that
|     | 52123 [billtj@y. lu] But how about making declaring type *optional*?  Even the referenced web
|     | 52131 [alwagner@tc ] In that I already have a reputation on this list as being somewhat of a loose
|     | + 52133 [bulatz@in eg] eiffel too? :)  untyped variables is common for
|     | + 52138 [billtj@y. lu] Totally agree.  As in one of my previous posts, I will do the "shortcut
|     + 52059 [canyonrat@ma] You lost me there, Bryan, perhaps because the only languages that I've
|     | 52062 [bryan@te ra ] You're taking me way too literally.  Had I dwelled in horrendous detail
|     | 52081 [canyonrat@ma] OK, I plead guilty. I've noticed that *some* people want "an easy and
|     | 52126 [billtj@y. lu] For me, it is because I assume that my code user (sometimes including
|     | + 52130 [Dave@Pr gm t] Ruby types are not releated to classes. They're related to object
|     | | + 52132 [bulatz@in eg] there is tradeoff between flexibility and reliability. especially for
|     | | | 52189 [n1k0@ro er .] Bignum? AFAIK, it works just like Fixnum only with larger numbers
|     | | | 52218 [bulatz@in eg] yes, yes, but fixnum used for representing numbers wich are small by
|     | | + 52140 [billtj@y. lu] I think in my application it is probably enough to check for classes.  For
|     | | | + 52141 [Dave@Pr gm t] def my_method(rate, delay, ...)
|     | | | | + 52147 [billtj@y. lu] It seems like a good idea and I think I learn some new Ruby paradigm. :)
|     | | | | | 52150 [Dave@Pr gm t] I've always thought this was a bug in the libraries  :)
|     | | | | | + 52151 [gotoken@no w] But we have Float("a string") which raises ArgumentError :)
|     | | | | | | 52154 [pbrannan@at ] But Float(xyz) is not easily overridable for new types.  I think I'd
|     | | | | | | + 52156 [gotoken@no w] Hmm, the name to_flt looks to be called by "%f" % obj.  How about
|     | | | | | | | + 52163 [pbrannan@at ] A grep for to_flt in the Ruby source comes up empty.  Where are you
|     | | | | | | | | 52166 [gotoken@no w] Sorry for my unclear English.
|     | | | | | | | | 52169 [pbrannan@at ] Ruby doesn't have implicit conversion, and I think this is a good thing.
|     | | | | | | | | 52174 [gotoken@no w] I think "%s" % obj is a kind of implicit conversion.
|     | | | | | | | | + 52193 [chr_news@gm ] The "print String"  conversion seems to follow non obvious
|     | | | | | | | | | 52196 [gotoken@no w] Interesting.  But I did not think so deep.  Maybe I picked up a
|     | | | | | | | | + 52198 [pbrannan@at ] Hmm, I almost see what you mean.
|     | | | | | | | |   52199 [gotoken@no w] I don't think that is explicit conversion because we couldn't know
|     | | | | | | | |   + 52241 [pbrannan@at ] I see how this would be confusing.
|     | | | | | | | |   + 52257 [chr_news@gm ] Well at least you are not alone in your surprise ...
|     | | | | | | | + 52202 [billtj@y. lu] Is this syntax '"%f" % obj' new to Ruby?  This is something that is
|     | | | | | | |   52203 [gotoken@no w] Yes, it is.
|     | | | | | | |   52240 [billtj@z. lu] As Ruby already has "sprintf", is this new syntax just a shortcut for
|     | | | | | | |   52246 [gotoken@no w] class String
|     | | | | | | + 52215 [bulatz@in eg] def Float
|     | | | | | |   52242 [pbrannan@at ] This does not look like valid Ruby code?
|     | | | | | |   52244 [bulatz@in eg] yes. in current ruby way to define an explicit conversion is a bit tricky :)
|     | | | | | |   52258 [chr_news@gm ] I am wondering if you intended to write
|     | | | | | |   52330 [bulatz@in eg] yes, i think about Float.new(arg). lack of operator() is one of ruby
|     | | | | | + 52185 [hal9000@hy e] I'm so used to it now it almost seems
|     | | | | |   52250 [michael_s_ca] it is.  Perl's automatic background string-to-number context
|     | | | | |   52251 [Dave@Pr gm t] And this is a good thing because....  :)
|     | | | | |   52256 [michael_s_ca] I didn't assert that.
|     | | | | + 52217 [bulatz@in eg] Yes! integers may be used too. but on the other hand, ruby don't
|     | | | + 52148 [rich@in oe h] Not that this discussion is about refactoring...but...
|     | | | | 52157 [billtj@y. lu] Thanks a lot for the very good idea.  I just have to weigh, which
|     | | | + 52216 [bulatz@in eg] 1) i think that
|     | | | | 52237 [billtj@z. lu] Thanks for the suggestion.  I think using the hash arguments will
|     | | | + 52253 [comp.lang.ru] - - Ah ha, at last some code. First of all there is a huge code
|     | | |   52281 [billtj@y. lu] Exactly, Booker.  I grew up in Fortran and C/C++, and I think most of the
|     | | |   52510 [comp.lang.ru] - - IMHO, if you aren't willing to change the way you think about
|     | | + 52186 [hal9000@hy e] Fixnum
|     | | | 52192 [matz@ru y- a] Forget about #type.  It was there because we couldn't use "class" for
|     | | | + 52195 [gsinclair@so] It should be deprecated then.  I've only been on this list for a few months,
|     | | | + 52201 [billtj@y. lu] It is very good, because I have overridden the #type method in all of my
|     | | | + 52205 [hal9000@hy e] That is very interesting. I never knew that.
|     | | |   52207 [billtj@y. lu] This discussion made me realize that in Ruby, the keywords are not very
|     | | |   + 52210 [hal9000@hy e] I've never known if there was a simple rule
|     | | |   + 52211 [matz@ru y- a] They are *not* special right after a dot and the keyword "def".
|     | | |   | 52239 [billtj@z. lu] The rule below is not a complete one, is it?  As it seems that they are
|     | | |   | 52254 [matz@ru y- a] "$if" is not a keyword at all, just like "_if" or "aif" is not a keyword.
|     | | |   | 52298 [billtj@y. lu] Then I don't understand why
|     | | |   + 52213 [vjoel@PA H. ] x = "foo"
|     | | |     52238 [billtj@z. lu] This is because of the Ruby syntax property to "continue" to the next line
|     | | + 52562 [rking@pa op ] I can see how type checks like the above would be restrictive,
|     | |   + 52564 [dossy@pa op ] "Duck Typing", AFAIK, is the idea that if it looks like a duck, if it
|     | |   + 52565 [kentda@st d.] I take it they mean the old saying "If it walks like a duck, talks like
|     | |     52716 [batsman.geo@] =================
|     | + 52597 [list@NO PA c] William, what about this?
|     + 52066 [alan@di ik t] I don't think that Mixins are equivalent to language checked
|       52125 [billtj@y. lu] I totally agree with the statement below; I think so far Ruby results in
|       52181 [alan@di ik t] Personally, I'm not interested in that tradeoff. If I want higher
|       + 52182 [billtj@y. lu] I don't know, Alan; just like Java, probably some typing is currently the
|       | 52194 [alan@di ik t] My whole point was that you might want to consider exploring
|       | 52200 [billtj@y. lu] All your idea below seems good, but has anything like that been done
|       | + 52209 [alan@di ik t] In parts I know it's been done, but I don't know if its been
|       | + 52296 [batsman.geo@] There's a very interesting working example for a language closely related to
|       |   52301 [billtj@y. lu] Hmmm... fast?  That immediately lures my appetite :)  I will check
|       |   52303 [batsman.geo@] I knew it ;-)
|       |   52326 [billtj@y. lu] My goodness!  It looks that they are already doing (or finishing) *the*
|       |   52362 [batsman.geo@] It may be hard to achieve, but it is in theory possible.
|       + 52234 [justinj@mo i] Maybe you guys should have a look at Suns Self language.
+ 51873 [szegedy@t- n] If you create only objects and extend them, you can test
+ 51888 [alwagner@tc ] Just curious... Is there a strongly typed language that does NOT have the
| 51902 [jweirich@on ] Depending upon your exact definition of cast and void pointer, Eiffel
+ 51890 [pit@ca it in] When you announced dbdbd I quickly browsed through the code. I
| + 51900 [dblack@ca dl] Whoops :-)
| + 51907 [gsinclair@so] Dave's method: use :-, catch exception
+ 51891 [meier@me st ] I the NameError acutally might be thrown _inside_ @sort_key.- , because
+ 51895 [qrczak@kn .o] Depending on what you mean by "have" (do non-standard library
threads.html
top