2823-3055 subjects 3190-4066
3016 [Dave@th ma e] I'm probably just confused (again), but while trying to track down
3019 [matz@ne la .] which is CONFIG in mkmf, contains unexpanded values.
3021 [Dave@th ma e] Run 'ruby Makefile.RB' in eruby (I used 0.0.7), and the resulting
3026 [matz@ne la .] Thank you. eRuby author Shugo told me that he's going to check it
3029 [Dave@Th ma e] You might let him know that the same thing happens with mod_ruby.
Final for World Series: Python vs Ruby
3023 [thucdat@ho m] Perl and Tcl seem to eliminate themselves from the play-off round.
3024 [excalibor@de] I'd take that notice with many grains of salt... I've looked for the original USENet post this was supposed to come from and deja.com found nothing...
3028 [thucdat@ho m] Is he really doing that?
+ 3030 [excalibor@de] "In a shock usenet post yesterday, Larry Wall announced a halt..." by MikeGTN <firstname.lastname@example.org> at the above address...
| 3031 [aleksi.nieme] Usually there's some stories ripped from segfault.org, it's so popular and
| 3032 [decoux@mo lo] There is undocumented feature in 5.6.0 but this is certainly not the
+ 3033 [gnhurst@hu s] This is from clicking on the [Author Info] link, then clicking on the
3034 [excalibor@de] But they are cute names, aren't they? very perlish :)
+ 3038 [DDouthitt@cu] ...
| 3039 [thucdat@ho m] Almost throw all my Perl books away!
+ 3044 [matz@ne la .] 1.6.0 will be out somewhere around the end of June.
3054 [aleksi.nieme] class Array; alias append :push; end # critical to be able to add new
Re: mismatched quotes
3027 [hfulton@au t] ...
rb_thread_wait_for / rb_thread_schedule
3035 [decoux@mo lo] I need, for an extension, to use rb_thread_wait_for() and
3043 [matz@ne la .] Yes. They are functions which should be moved to ruby.h.
3036 [DDouthitt@cu] ...
Thread.new vs. Thread.start
3046 [Dave@th ma e] From a programer's perspective, what is the difference between
+ 3047 [thucdat@ho m] Create a new Thread.
+ 3050 [matz@ne la .] They are almost identical. Both create and start new thread.
eruby security problem?
3048 [Andy@To ls e] Can anyone think of a danger in installing the eruby binary in
3051 [matz@ne la .] I believe so.
FYI: Python Development Team Moves to BeOpen.com
3052 [schneiker@ju] This is another in an occasional series of posts of (*real*) news concerning
3053 [matz@ne la .] I was amazed that Guido made this great work for side project.
3065 [schneiker@ju] BeOpen.com"
Bug in HTTP close
3056 [Andy@To ls e] I think I have found a couple of small problems in the network code.
3066 [aamine@dp u-] I think this as feature. Because it is natural that closing
3057 [aleksi.nieme] The "online html"-version didn't work.
3069 [aleksi.nieme] Just a random note.
3071 [Dave@th ma e] Thanks - that's a typographic thing that slipped through the filter -
3082 [rrt@pe se ho] That's very bad TeX; you should use $-$, to get a proper math minus.
3121 [aleksi.nieme] contains few errors.
3130 [Dave@th ma e] Thanks
3058 [aleksi.nieme] We recommend that predicate methods (those whose name ends with a question
3061 [hfulton@au t] This seems like a good idea to me...
3062 [Dave@th ma e] In an abstract sense it sounds like a good idea -- you could
3063 [quinn@en y. ] Well, since failure is a fundamental concept common to almost all methods, we
3064 [Dave@th ma e] I got the impression that this failure return was supposed to be
+ 3067 [aleksi.nieme] Dave, your proposal is perfectly fine. I hardly dare to announce my Ruby
| 3068 [aleksi.nieme] I like to add that while I think Ruby's current compromise is very good
| 3072 [Dave@th ma e] In C, non-zero is true, so you'd better be really sure of your
| 3075 [aleksi.nieme] Dang, you're too good :).
| 3078 [Dave@th ma e] Dave
| 3079 [aleksi.nieme] Yup, my point was that if you don't want to display what is "inherited" from
+ 3077 [quinn@ma k. ] Sorry, that was just my facetious off-the-cuff reaction :) Obviously,
3085 [matz@ne la .] I use `nil's for light failures, and exceptions for heavier failures.
3059 [Dave@th ma e] c1 = 0
3083 [matz@ne la .] No, there was a bug. But when the bug is fixed this program hangs,
3084 [Dave@th ma e] Thread.current.priority = 2
3088 [matz@ne la .] c1 = 0
3089 [Dave@th ma e] That's great. Thanks.
class variable (Re: Re: dev.rubycentral.com)
3060 [matz@ne la .] We now have class variables in 1.5, so "pseudo class variable hack" is
3070 [aleksi.nieme] Good to know. Thanks.
3073 [Dave@th ma e] 6.2 Are there class variables?
3074 [aleksi.nieme] Uh, I don't understand. I loaded and reloaded
3076 [Dave@th ma e] Sorry, you must of missed the post I made a while back.
3080 [DDouthitt@cu] ...
Glade/Ruby: some idea for API
3081 [yashi@ya hi ] I was just thinking about changing API for Glade/ruby last night.
3086 [Dave@th ma e] I've got a stack-backtrace for that mod_ruby segv. Right now its with
Exceptions documented where?
3087 [jesse@cs un ] require 'net/http'
Bug or feature?
3090 [Dave@th ma e] [ 1, 2, 1 ] - [ 1 ] # -> 
3092 [Dave@th ma e] And then I said - heh Dave, why not read this telephone-directory
3093 [hfulton@au t] We'll forgive you, as that stuff very hard to remember.
Re: mod_ruby problem solved
3091 [Dave@th ma e] Well, I finally tracked it down. I feel kind of silly not to find it
3094 [decoux@mo lo] Corrected in mod_ruby-0.18
+ 3095 [Dave@th ma e] I'll look for it in the CVS tree.
+ 3096 [decoux@mo lo] No,
+ 3097 [Dave@th ma e] dave[ruby/mod_ruby 1:01:02] grep VERSION mod_ruby.h
+ 3098 [decoux@mo lo] aestivum% head -1 Makefile.RB
ANNOUNCE : bdb
3099 [decoux@mo lo] Documentation : http://moulon.inra.fr/ruby/bdb.html
Anyone using pack/unpack with uuencoding
3100 [Dave@th ma e] I've started writing a RubyUnit test suite for the built-in Ruby
3103 [decoux@mo lo] pigeon% cat b.rb
3101 [shayman@un s] Tried twice to compile 1.4.4 under Rhat 6.2 .
+ 3102 [matz@ne la .] No message at all? Could you show me EXACT input/output to find out
+ 3104 [shayman@un s] Here is the output of " make test >> out.txt "
3105 [matz@ne la .] Oh... You have to type 'make' then 'make test'.
3126 [jesse@cs un ] As "test:" depends on "miniruby$(EXEEXT)" and the later is build by
3138 [matz@ne la .] Making "test" depend on "all" solved the problem. Thank you for the idea.
3106 [shayman@un s] Okay
3107 [Dave@th ma e] Currently Dir.foreach returns a (closed) Dir object.
3108 [matz@ne la .] Yeah, right.
Is divmod dangerous?
3109 [Dave@th ma e] In (say) Python, the modulus operator (%) is actually a remainder
+ 3111 [aleksi.nieme] I surely do expect something. But not as you suspected. I would guess divmod
+ 3114 [matju@CA .O ] the name "divmod" says it all: the second return value is a modulo. I also
+ 3116 [rrt@pe se ho] Another perspective on this is that of Forth, where we talk about doing
+ 3117 [matz@ne la .] Ruby basicly follows R5RS of Scheme. / works as quotient, % works as
3125 [Dave@th ma e] It seems as if changing division so that 13/-4 -> -4 is a popular
3131 [gotoken@ma h] At first, [a/b, a/%] (== a.divmod) can be considered equivalent to
3133 [Dave@th ma e] I guess it might just be me that was surprised to find that
3136 [gotoken@ma h] Oh, I misunderstood :-( Even in C, div(x,y) satisfies
3137 [matz@ne la .] So, you mean making modulo and reminder be same? Python way?
3139 [Dave@th ma e] How about a compromise?
+ 3140 [Dave@th ma e] btw. Andy tells me that this is horrible.
| 3143 [schneik@au t] (1) why it was done the way it was done, (2) what the less-obvious
| + 3144 [aleksi.nieme] or
| + 3145 [rpg@xs al .n] I happen to have an opinion about this issue. For a fixed modulus m
| 3151 [andy@To ls e] I do not like the idea of including modules that change basic
+ 3180 [matju@CA .O ] This leads to either inflexible code or the default division operator to
my wish list for Ruby
3110 [matju@CA .O ] Ruby seems to me a very promising language, from the vague knowledge I
+ 3112 [matz@ne la .] Ian once proposed such event loop before. I haven't get the image of
| 3255 [matju@CA .O ] I will eventually come up with such a thing while fiddling with XLib and
+ 3115 [matz@ne la .] * local variable scope by blocks. e.g.
Min and max?
3113 [aleksi.nieme] Should we have min and max routines somewhere in the core Ruby (additionally
+ 3118 [matju@CA .O ] I fully agree that Comparable is the right place for that. (I notice I
| 3119 [decoux@mo lo] Something like apply (in scheme) ?
| + 3120 [schneik@us i] Aleksi writes,
| | + 3123 [Dave@th ma e] If you're going this route, a more Ruby-ish alternative might be to
| | + 3128 [kjana@os xa ] Well, below is not sufficient?
| | 3142 [schneik@au t] Sure, that is sufficient, but Perl is sufficient too. :-) Also people tend to
| + 3124 [Dave@th ma e] 'inject' is documented in the FAQ.
| | + 3127 [aleksi.nieme] I like this. It's easier to write new sorting orders. Could you guess how
| | + 3179 [matju@CA .O ] In what book? btw the FAQ has already "the" general version with a
| + 3177 [matju@CA .O ] well, the first Scheme reference manual i found on the net (MIT's) says
| 3178 [Dave@th ma e] Although I'm sure this is lacking the subtleties of the Scheme
+ 3135 [gotoken@ma h] What do you think about putting mathfunc.rb including function
Newbie question: tk problems
3122 [feldt@ce ch ] Recently downloaded Ruby and I'm really impressed so far. Want to try out
3141 [schneik@au t] Unfortunately I never got this stuff working correctly either (on either
Re: my wish list for Ruby - dRuby
3129 [Dave@th ma e] We have a some information and examples dRuby in the book. Here's the
3132 [m_seki@mv .b] drb-1.2 has just been released.
B,U.I,L.D ,Y.O,U.R, .O,W.N, C-A-B-L,E -T-V DE-S-C-R-A-M-B-L-E-R.,.,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,.,.,.,,,,,,,.,.,.,.,.,.,,.,.,..,.,..,,.,.,.,.,.,.,,,.,,, 5942
3134 [lbgjdc@as hf] L.EGAL C.A.B.L.E TV DE-S.C.R.A.M.B.L.E.R
RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!
3146 [schneiker@ju] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!
Ruby -- A better OO Perl than Perl? Python 3000 features available now?
3147 [schneiker@ju] Well, at least _some_ people regard Ruby as a better OO Perl than Perl or as
+ 3150 [schneik@us i] I just realized that for benefit of ruby-talk ML readers, I should have
+ 3196 [embed@NO PA ] Is there a windows-based installer (self extracting EXE) of Ruby? A .tar.gz
3199 [Dave@th ma e] There's an older version available with a self-installer, look for
FYI (comp.lang.python): Re: Clifford Algebra
3148 [schneiker@ju] I'm reposting this from comp.lang.python in case any Ruby mathematicians or
Retrieving the hostname and port in net/http
3149 [jesse@cs un ] I have an URL I want to access in a ruby program with the addition of
+ 3153 [Dave@Th ma e] require 'net/http'
| 3155 [jesse@cs un ] Ok, the point to apache's multi views was already made be email. But
+ 3157 [matz@ne la .] You can retrieve base url by
3161 [Dave@th ma e] One of the problems is that HTTP#get throws an exception on a 301, so
+ 3173 [matz@ne la .] Oops. I think Ninero Aoki the author of net/http will fix this soon.
+ 3175 [aamine@dp u-] Yes, that's right. I agree that "get" method is OUT OF USE for
3176 [Dave@th ma e] Either that, or possibly include the header information in the
3217 [Dave@Th ma e] And, just to show how responsive the Ruby developers are, less than 24
3218 [jesse@cs un ] Is there support for retrieving the current port number from the http
3219 [Dave@Th ma e] The current port number is available in the Net::Http object
3460 [jesse@cs un ] Not that bad of an idea. ;) But if "head = h.get()" fails and raises
about sample "dualstack-fetch.rb"
3152 [dominique.cr] I use ruby-1.4.4 on WinNT and get an error message when executing the sample
3158 [matz@ne la .] Could you show me EXACT error message?
3186 [dominique.cr] I have downloaded the package
3191 [matz@ne la .] Well, I'm not DOS/Windows guru, but I think rbdj144, which is compiled
3154 [hgs@dm .a .u] Is there an idiom for 3-dimensional arrays in Ruby? I see that
+ 3160 [Dave@th ma e] a = [
| 3187 [hgs@dm .a .u] That is what I am going to hit, I think. And I have a possible
| 3194 [Dave@th ma e] You can overload  (and =, to provide your own array referencing
| 3201 [hgs@dm .a .u] That does the job very nicely, thank you. Easier to type than [i][j][k]
+ 3249 [matz@ne la .] There're extensions to provide n-dimentional array.
Network Setup Person Needed
3156 [troychin@wh ] I'm an intern with eCommunities LLC and we're in need of a tech person who
Bug in Time
3159 [Andy@To ls e] While doing the regression tests for class Time (RubyUnit is
+ 3183 [matju@CA .O ] crossforwarded the thing to i don't know how many people saying "hey, this
+ 3246 [matz@ne la .] Oops, I forgot to support daylight saving time.
3310 [andy@To ls e] mktime(3) only handles localtime. I'll fix it to calculate time based
FixNum => BigNum transition
3162 [feldt@ce ch ] Dear Ruby-friends,
+ 3163 [feldt@ce ch ] Ok, forget this one. Kind of obvious... ;-) I have to take a break from
+ 3248 [matz@ne la .] I'm afraid there's no easy way to work with uint32 directly in Ruby.
Doing CGI with Ruby & Apache
3164 [jilanik@ti .] I am a new comer to Ruby World and I ask how to write a minimal web
3165 [Dave@th ma e] Well, an absolutely minimal web application would just involve putting
3166 [jilanik@ti .] I have written this simple example:#!/usr/local/bin/ruby
3169 [Dave@th ma e] I assume that inthe real file your have 'content-type'.
3171 [jilanik@ti .] Yes.
3172 [Dave@th ma e] You'll only run CGIs out of nominated cgi directories (such as
3182 [jilanik@ti .] ./simple.rb =>No such file or directory!
3192 [matz@ne la .] I guess the problem is in #! line. Check where the path points.
ruby.h needed to compile Interbase module
3167 [jilanik@ti .] I have tried to compile Interbase Ruby module but I have I received the
3168 [Dave@th ma e] You'll need to get the Ruby source for this.
+ 3170 [jilanik@ti .] Ok. I found it. I have modified Makefile and I run "make". Now I have
| 3174 [matz@ne la .] If you've followed proper compilation steps (ruby extconf.rb; make),
+ 3184 [matju@CA .O ] a nice addition would be a separate tarball containing only the header
3247 [matz@ne la .] In fact, Ruby installation process copies ruby.h etc. into
Ruby and Interbase
3181 [jilanik@ti .] could somebody please give me a little example how to access to
Problems to connect to InterBase
3185 [jilanik@ti .] #!usr/local/bin/ruby
Ruby and Interbase
3188 [jilanik@ti .] #!usr/local/bin/ruby
BUG or something?
3189 [phasis@ma l.] I tested following code.
3236 [matju@CA .O ] This is called a compromise.
+ 3240 [phasis@ma l.] I just wanted temporary insensitive string comparison without any side
| 3241 [eban@os ri .] cfg.rehash
| 3252 [matju@CA .O ] Question, how does Hash computes the hash value of a String? or of any
| + 3253 [decoux@mo lo] See the method hash
| + 3265 [matz@ne la .] By invoking `hash' method of key object.
| 3339 [matju@CA .O ] "hash" is called directly on a String, just like "ts" said. If it wasn't a
+ 3271 [wscott@ic ip] I am new to Ruby and this brings up a question I have had lately. Why
+ 3272 [wscott@ic ip] [resent because I think the last copy failed...]
+ 3274 [matz@ne la .] They are tricks for short programs; usage of these magic variables is
+ 3275 [matju@CA .O ] As a Perl programmer, I'm trained not to use those variables for any large
3277 [aleksi.nieme] I was considering how the magic global variables work too. Immediately I
3281 [Dave@th ma e] Actually, it's even worse than that. With $;, the person invoking the
+ 3283 [hgs@dm .a .u] Would it be possible to have a test for "when calling this code, it
| + 3284 [Dave@th ma e] def local(*syms)
| | 3286 [hgs@dm .a .u] This looks good to me.
| | 3288 [Dave@th ma e] The 'eval' in the local method would restore the value of the local
| | 3290 [hgs@dm .a .u] Hmm. I will have to play with that I think! I'm not sure
| + 3287 [wscott@ic ip] As I mentioned. In perl it is possible to use dynamic scoping to
| + 3289 [Dave@th ma e] That freezes the object referenced by the $/ variable. Variables
| + 3291 [decoux@mo lo] The object is frozen
| + 3294 [Dave@th ma e] Yes - the default is frozen.
| + 3295 [decoux@mo lo] rb_str_setter can test if the object is frozen ($ global or not)
| 3301 [Dave@th ma e] That would be a totally different semantic for freeze,
| 3313 [wscott@ic ip] Sorry. I was not trying to suggest a syntax. I was just wondering if
| 3316 [Dave@th ma e] For normal assignments, you could implement read-only globals using
+ 3340 [matz@ne la .] Let me think about this idea. It sounds nice.