140943-141790

140716-143731 subjects 141127-143161

^ mapping an array to a hash?
140943 [nickwoolley ] Can anyone suggest an idiomatic ruby equivalent to this perl snippet?
+ 140946 [vjoel PATH.B] index = Hash.new { |h,f| h[f] = compute_something(f) }
| 140967 [logancapaldo] Wouldn't  it make more sense to put #hashmap in module Enumerable?
| 141119 [vjoel PATH.B] Of course. It would also probably make sense to choose a better name.
+ 140948 [john.carter ] If you want mind bending and obscure, try...
| 140984 [bob.news gmx] "John Carter" <john.carter@tait.co.nz> schrieb im Newsbeitrag
+ 140950 [Ara.T.Howard] index = Hash::new{|h,f| h[f] = compute_something f}

^ Any Rubyists in Oslo?
140949 [glyconis gma] Sometime this summer, we're going to be moving to Oslo.  (We've been
+ 140957 [johans gmail] Hey, I'll probably be moving to Oslo as well around summertime, from
| 140995 [bob.news gmx] Hm, I consider myself a Rubyist and I've also been to Oslo two or three
+ 141002 [kentda pvv.o] Yes, there are some.

^ Re: Pimki 1.7
140968 [assaph gmail] edited back
+ 140970 [assaph gmail] Fix below (watch for line breaks). Will be in CVS tonight.
+ 141001 [rasputnik he] Tried that patch and it works a treat1

^ ANN: RubyInline 3.3.1 Released
140969 [ryand-ruby z] RubyInline version 3.3.1 has been released!

^ classifier lsi and ruby gsl
140971 [w3gat nwlaga] Does anyone have ms-win binaries for gsl so that I can use the lsi
+ 141152 [cameron.mcbr] I don't think they exist.  You might find GSL bindings, but the rb-gsl
+ 141153 [dfayram gmai] Making that build with the rb-gsl might not be trivial, but it's a

^ mod_ruby and Rails configuration files
140978 [andrewarnott] I walked through Curt Hibbs' tutorial
+ 141011 [tobin _do_no] I'm not expert at Apache + Rails, but I've seen enough of the docs to point
+ 141024 [david loudth] You don't want to use mod_ruby. FastCGI is where its at. There's an
  141033 [andrewarnott] I'm following the directions on

^ C Extensions using MingW (invalid address LoadError)
140979 [kianw earthl] I've had some real trouble getting my first C extensions for Ruby to link
+ 140999 [ryand-ruby z] You might want to take a look at RubyInline. Experiment with simple
+ 141034 [steven.jenki] Do you have to use MinGW? I've been able to build an extension using
| 141090 [kianw earthl] I guess I don't... I was under the (apparently erroneous) assumption that
| 141118 [steven.jenki] Yes. The hard part was figuring out (a) what to download, and (b) how to
+ 141569 [nobu.nokada ] Does "configured for MSVC" mean that you use OneClick

^ [ANN] Defaultable 0.0.3
140980 [ng johnwlong] This is the first public release of a very small project I've been

^ [ANN] Updateable 0.0.3
140981 [ng johnwlong] This is the first public release of a very, very small project I've been
141677 [sera fhwang.] Interesting. Is there a particular kind of use that inspired you to

^ rdoc, how is about :br: ?
140982 [bsd.SANSPAM ] # LIST [ACTIVE.TIMES|EXTENSIONS|OVERVIEW.FMT]
+ 140986 [bsd.SANSPAM ] NP, I have done it!
+ 141435 [halostatue g] I don't believe that this would be a good idea. I'm presuming that you

^ Debian: coexistence of debs and gems?
140987 [michael schu] I'm using Debian/Linux and have come upon tough rock while digging for
+ 140998 [spamtrap car] I'm also grappling with this issue.  For now, I'm using gems when the
| 141000 [spoooq gmail] I have not used Debian, but Gentoo packages could simply wrap gems, so
+ 141135 [paulvt debia] A libgems-ruby/rubygems package is currently in preparation (by Daigo
  141175 [michael schu] Thanks for pointing me to this list. I assumed there might exist one,

^ Web spider
140989 [lucas rufy.c] Does anyone know of a web spider built in Ruby?
+ 140990 [bitserf gmai] htmltokenizer (on RAA). Its really domain-specific though, I'm not
+ 140994 [discordantus] It's not a full-blown lib, but seems to be a pretty good tutorial for

^ Re: Inverting a regular expression?
140996 [Harry_Ohlsen] give
140997 [Harry_Ohlsen] complement
141006 [mailing-list] Actually, it's not a very good point, as it isn't quite right.  See my
141013 [djd15 po.cwr] What was wrong with my method? DFAs are required to be fully defined/complete
141014 [mailing-list] I stated this in my initial response as well.

^ rails has_and_belongs_to_many problem
141007 [ianic 4dva.h] I have two classes Album and Korisnik (think about that as user),
141021 [threeve.org ] a = Album.find(1) # find an album
141029 [ianic 4dva.h] Sorry,

^ Ruby Weekly News delayed
141010 [timsuth ihug] The Ruby Weekly News for last week has been delayed. (The edition for
+ 141025 [james graypr] Congratulations!
| 141037 [zdennis mkte] aye, Congratulations!
+ 141039 [belorion gma] Likely excuse ...
+ 141041 [agorilla gma] Congrats!  You're not gonna start charging now that you've gone pro? ;)
+ 141106 [martindemell] That's news enough for this week :) Congratulations.
+ 141131 [surrender_it] congrats! and, well, take your time :)

^ writing to a file with gsub!
141015 [r_mueller im] i simply want so change an existing file
+ 141018 [joost zeekat] [ ... ]
| 141026 [langstefan g] # open file test for reading
| 141027 [r_mueller im] das haut!
+ 141030 [bob.news gmx] As others have pointed out, reading and writing to the same file at a time
  + 141032 [spamtrap car] This belongs in a ruby one-liner hall of fame.
  + 141035 [r_mueller im] But what about using \1 and \n in the second argument of gsub. Doesn't require \1 single-quotes
    141036 [james graypr] No.  If you want to put \1 in double quotes, just add a backslash.
    141040 [r_mueller im] Great.
    141042 [joost zeekat] You mean you prefer
    141043 [james graypr] perl -pi.bak -e 's/\d+/###/g' your_file
    141047 [joost zeekat] Ack!

^ Hamburg.rb meeting
141017 [Stephan.Kaem] better late than never...

^ [RCR] Object#inside_metaclass?
141023 [Ara.T.Howard] class Object
+ 141028 [ilias lazari] the statement is false.
| 141436 [halostatue g] ...true.
| 141447 [ilias lazari] A "class" is instantiated to 0..n objects.
| 141450 [hal9000 hype] You're thinking of the Singleton pattern, which deals
| + 141451 [hal9000 hype] I was trying to say: does NOT use terms with 100% consistency.
| + 141457 [ilias lazari] => resulting in a "singleton object"
+ 141031 [martindemell] That's a very neat approach. Much more satisfying than string-scraping.
| 141085 [Ara.T.Howard] the only problem is that is doesn't work !! ;-(
| 141088 [chr_mail gmx] I see - thats what you call a meta class - actually you
| 141095 [Ara.T.Howard] def inside_metaclass?
| 141124 [angus quovad] [Ara.T.Howard@noaa.gov, 2005-05-04 20.44 CEST]
| 141134 [Ara.T.Howard] ha!  first i noticed you made a typo (the first two lines are a no-op without
| + 141140 [vjoel PATH.B] Mebbe because #ancestors shows the path that method lookup will follow,
| | 141146 [Ara.T.Howard] makes sense.  bad name then.  should be Class#search_path or someting...
| + 141142 [dblack wobbl] Isn't that the case we talked about before where you clarified that
| | 141147 [Ara.T.Howard] lol.  i've never heard of anyone being retroactively confused - but i'm sure i
| | 141151 [dblack wobbl] Well, I think I may be the dolt, since I always seem to be present
| + 141145 [angus quovad] [Ara.T.Howard@noaa.gov, 2005-05-05 00.15 CEST]
+ 141045 [dblack wobbl] I fear the terminology issue raises its head here.  Is there any
| + 141050 [ilias lazari] "singleton class" has already a meaning within OOP.
| | 141522 [matz ruby-la] According to the Design Pattern book, right?
| | 141533 [ilias lazari] I don't know this book.
| | 141548 [matz ruby-la] Until we find a better term.  I don't think other terms proposed such
| | 141550 [ilias lazari] who is "we"?
| | 141575 [matz ruby-la] This statement implies you think avoiding name conflict is more
| | + 141580 [ilias lazari] Avoiding name conflict is essential for any recognition process.
| | | + 141591 [matz ruby-la] I'm not sure what you meant.  If "singleton class" exists, it has an
| | | | + 141601 [ilias lazari] The [Ruby] "singleton class" has not.
| | | | | + 141607 [jlsysinc all] The answer is really very simple, and much as I loathe to repeat it again
| | | | | + 141658 [matz ruby-la] Ilias,
| | | | |   + 141669 [ruby-ml magi] People have a tendency to find complexity where there is none :)
| | | | |   + 141670 [ilias lazari] My diagramm reflects the current OO-observable implementation of ruby
| | | | |     141676 [matz ruby-la] No.  I will seek for myself.  But to tell the truth, I don't hope
| | | | + 141650 [surrender_it] <snip all>
| | | |   141674 [ilias lazari] Not exactly.
| | | + 141613 [discordantus] This is the only part I want to comment on. You keep using the word
| | |   141614 [ilias lazari] ok
| | + 141600 [halostatue g] Not at all.
| + 141059 [jim weirichh] There is a distinction, although some people blur it.  Those things that
|   + 141067 [dblack wobbl] That's what I mean (in case it wasn't clear): the two terms are not
|   | 141082 [jim weirichh] Then I wasn't clear either.  In answer to your question 'Is there any
|   | + 141084 [chr_mail gmx] Nope - the singleton class of Module is not  a meta_class  but it
|   | | 141093 [jim weirichh] Module is a class (instances of Module are modules).  The singleton class
|   | + 141101 [dblack wobbl] I disagree; I think Ara was using the term "metaclass" to mean
|   |   141107 [Ara.T.Howard] it does - but inadvertently.  the only requirement i have is to determine
|   |   141114 [dblack wobbl] I believe you! :-)  I just extrapolated from that one example and got
|   + 141071 [discordantus] All the more reason to give them a different name... At this point, I
|     141078 [dblack wobbl] Actually one would not want a completely separate name, for the reason
|     141129 [ilias lazari] no, it is not.
+ 141087 [chr_mail gmx] That is plain false (at least in my understanding of what
+ 141091 [florgro gmai] Why? Any real world samples?
  141100 [Ara.T.Howard] This message is in MIME format.  The first part should be readable text,
  141104 [dblack wobbl] (Just out of curiosity: do you mean to depart from the usual C.a here?
  141115 [Ara.T.Howard] - collections are plural

^ HTML Form Elements [was Re: [ANN] traits-0.0.0]
141046 [gavin refine] Allows you to create fields and validation rules around them, render

^ [ANN] HighLine 0.3.0 -- Now with ANSI colors!
141049 [james graypr] =======================

^ Bug or on purpose?
141053 [joaopedrosa ] dewd@heaven:~ $ ruby -v
+ 141056 [bob.news gmx] Dunno...
| + 141063 [joaopedrosa ] dewd@heaven:~ $ ruby -e "def foo s; 'bar'; end; foo = foo('z')"
| + 141065 [discordantus] This looks like it may be the result of a bug in the new proc calling
+ 141058 [halostatue g] This looks like a bug in an on-purpose experimental feature.
  141064 [joevandyk gm] Can someone fill me in on what's going on here?
  141070 [dblack wobbl] It's trying to set a local variable called opa to the result of
  141072 [joevandyk gm] Isn't that illegal?  The name 'opa' has already been defined.
  + 141075 [dblack wobbl] That's exactly what Joao is asking :-)  Up to 1.8.2, at least, it's
  | 141386 [matz ruby-la] It's intentional.  We are in experiment.
  | 141612 [joaopedrosa ] Thank you for answering.
  + 141077 [bob.news gmx] "Joe Van Dyk" <joevandyk@gmail.com> schrieb im Newsbeitrag
    141080 [dblack wobbl] You've hit on one of my pet theories about Ruby discourse and

^ Is there Neural network library in Ruby?
141054 [sinkanti gma] I'm looking for NN lib and can't find one.
141066 [prakash.diby] R u planning to implement Ruby for a NN project or its just for a sake
141073 [mneumann nte] Regards,

^ Fixnum's binary representation
141057 [camsight gma] As far as I know, Ruby's Fixnum is 30-bit signed integer.
+ 141060 [bob.news gmx] Yes.
| 141069 [camsight gma] Thanks, Robert!
| + 141081 [discordantus] IIUC, it's not precisely a "sign bit"; it's more like an entire
| | 141097 [ptkwt aracne] It's 2's complement, isn't it?
| | 141110 [discordantus] (looking it up)
| + 141083 [bob.news gmx] <camsight@gmail.com> schrieb im Newsbeitrag
|   + 141099 [camsight gma] Now I understand what you mean.
|   + 141133 [andrew.balla] Guy's this is very neat and it also brings back some memories.
+ 141089 [Ara.T.Howard] don't deny yourself the joys of printf ;-)
| 141098 [camsight gma] Wow, that's great.
+ 141122 [drbrain segm] $ ruby
  141148 [camsight gma] Hmmm... this is very interesting.

^ [ANN] Pages-BibTeX
141079 [tamc2 cam.ac] I'd like to announce a quick ruby script of relevance to some of you

^ problem using mkmf on redhat 8
141108 [joevandyk gm] I recently upgraded Ruby to 1.8.2 on a RH 8 machine.
141109 [joevandyk gm] Nevermind, figured it out.
141113 [joevandyk gm] % ruby extconf.rb

^ traits (the other ones) vs. mixins
141117 [Ara.T.Howard] - A trait provides a set of methods that implement behaviour
141123 [vjoel PATH.B] The operation of mixing in modules is not commutative.
141126 [naseby gmail] They do; as I have (partially) written up on
+ 141138 [ no spam.com] While on the subject of traits, can someone explain the the last part of
| 141173 [surrender_it] well, I think the basic thing they're talking about is the need to call
+ 141141 [Ara.T.Howard] i apologize for not reading this earlier!  i must agree that this sounds like
  141161 [naseby gmail] <snip />

^ object reference handle (like perl's reference to scalar)
141125 [eric_mahurin] In ruby, is there a way to get a handle of an object reference?
+ 141128 [halostatue g] What are you trying to do? There is no equivalent to what you want
+ 141132 [vjoel PATH.B] irb(main):001:0> a = [1,2,3]
| 141143 [eric_mahurin] I've have various ways I can do what I need.  I just wanted to
| + 141174 [eric_mahurin] Below is what I think is a general purpose solution to making
| | 141248 [florgro gmai] This looks very interesting, if only from the toying standpoint. Any
| | 141252 [eric_mahurin] I just registered this under the name "reference".  I also just
| | + 141253 [tom infoethe] Yup, all three should be good to go.
| | + 141256 [dblack wobbl] This message is in MIME format.  The first part should be readable text,
| |   141263 [eric_mahurin] The original intent was to have a way to modify these
| |   + 141270 [dblack wobbl] Doesn't assignment do that?
| |   | 141284 [eric_mahurin] Of course.  But the code doing this assignment has to know the
| |   | 141298 [dblack wobbl] I don't think I'm confusing it.  variable/attribute/...thingy confuses
| |   | 141332 [dave.burt gm] To me, this looks more Rubyish. Is there some benefit I'm missing in
| |   | 141333 [dblack wobbl] Can someone give me an example of such a time?  I'm still not seeing
| |   | + 141351 [botp delmont] #Below is what I think is a general purpose solution to making
| |   | | 141360 [dave.burt gm] This is not possible, unfortunately.
| |   | + 141356 [dave.burt gm] indirection?
| |   | | 141394 [halostatue g] I disagree. After all, you've had to use map to replace the integers
| |   | | + 141395 [eric_mahurin] This looks nice too.  I haven't looked at DelegateClass yet,
| |   | | | 141397 [dblack wobbl] This is uncomfortably (for me) close to all the symbolic reference
| |   | | + 141425 [dave burt.id] You're right, you know.
| |   | |   141432 [eric_mahurin] Nope.  You need a dereferencing operator/method just like C.
| |   | + 141361 [martindemell] You could have data structures where every member effectively has a
| |   |   141369 [botp delmont] #This is not possible, unfortunately.
| |   |   141423 [dave burt.id] You're welcome.
| |   + 141439 [halostatue g] x, y = y, x
| + 141438 [halostatue g] I'm not sure why.
|   141512 [dave burt.id] Why do you assert these things about any concievable Ref implementation?
|   141513 [halostatue g] I don't recall the problems mentioned, but Ref objects have been
|   141520 [dave burt.id] That's not even difficult.
|   + 141521 [bob.news gmx] "Dave Burt" <dave@burt.id.au> schrieb im Newsbeitrag
|   | + 141531 [eric_mahurin] Where do I get your ref.db?  I saw a link in another post of
|   | | + 141537 [halostatue g] Because no one else is going to write their libraries to check for
|   | | + 141540 [dave burt.id] Sorry, my fault for posting a link that didn't exist yet.
|   | + 141545 [dave burt.id] variable.ref?
|   |   + 141554 [eric_mahurin] I see you modified my example.  This doesn't do what the
|   |   + 141560 [bob.news gmx] "Dave Burt" <dave@burt.id.au> schrieb im Newsbeitrag
|   |   | 141630 [dave burt.id] There are two reasons I like these threads.
|   |   + 141565 [dblack wobbl] It's a bit misleading to call it "passing by reference".  In Ruby, all
|   |     141632 [dave burt.id] I think it's all business as usual for Ruby. It's very similar to passing in
|   |     141640 [dblack wobbl] def m(a); end
|   |     141790 [dave burt.id] David = "David A. Black" <dblack@wobblini.net>
|   + 141535 [halostatue g] If _y were the only place this were an issue, I'd agree with you --
+ 141440 [phurley gmai] a = [1, 2,  3]
  141445 [dblack wobbl] a = b = c = [1,2,3]
  141470 [eric_mahurin] I tried this out and it doesn't seem to do anything.  I did a
  141510 [dave burt.id] # require 'ref'
threads.html
top