162399-166929

162200-164247 subjects 162639-163765

^ RCR: Array#to_h
162399 [xrfang hotma] I have registered 2 accounts for RCRkive, but all failed... So I posted
+ 162401 [marcel verni] Having your proposed to_h accept a block is a nice idea but as it is you can
| + 162412 [xrfang hotma] The block may be useful because you may want to, for example, do some
| + 162669 [steven lumos] => [1, 2, 3, 4, 5]
+ 162406 [nobuyoshi.na] Agreed here, but
| + 162411 [transfire gm] I think the proposal is over specialized. Why should the array elements
| | + 162415 [xrfang hotma] This is actually the useful feature! I already said not everybody need it...
| | + 162421 [nobuyoshi.na] Yes, agreed, and I doubt that there is a solution which
| | + 162468 [dblack wobbl] But then what's the point? :-)
| + 162414 [xrfang hotma] Ok, we may consider Array#to_h as a true reverse operation of Hash#to_a,
|   162417 [transfire gm] module Enumerable
|   162418 [xrfang hotma] I am just reading the PickAxe 2e recently... According to Dave, to_h means a
|   + 162423 [transfire gm] module Enumerable
|   + 162430 [transfire gm] Right. But your reminder provokes me a solution, albiet it's a bit
+ 162428 [matz ruby-la] Rejected.  Proposal Array#to_h(value=nil) does not actually solve the
| + 162429 [daniels pron] Maybe what we're actually after here is the equivalent to map/collect
| + 162435 [xrfang hotma] I don't know what you mean the "problem above"... My purpose is to have a
|   162441 [bob.news gmx] If you just want a fast access to those elements a Set is sufficient - and
|   162453 [xrfang hotma] 1) Set won't work. I am not only test if an element exist or not, I want to
+ 162470 [dblack wobbl] You'll have to give me more details if you want it fixed :-)

^ Re: Array#to_h
162404 [daniels pron] a = [1, 2, 3, 4, 5]
162438 [bob.news gmx] Won't work.  This at least has to be
162444 [Ara.T.Howard] hash = a.inject({}){|h,x| h.update x => x*2}

^ Ruby's GC
162445 [jtregunna bl] I'm curious if someone can point me to a technical description of
162449 [drbrain segm] There might be one in the Ruby Hacking Guide (in Japanese).  Guy
162450 [jtregunna bl] Yeah, I got that bit, was hoping for something a bit more technical in
+ 162454 [matz ruby-la] conservative
| 162455 [jtregunna bl] Thank you.
+ 162474 [no spam.plea] See <http://www.memorymanagement.org/> for more details on

^ Capturing stderr from a shell (WAS: Re: $stderr.reopen bug?)
162446 [drbrain segm] require 'open3'

^ ruby gives different answer for checksum of files on windows and FreeBSD?
162456 [ralph lkjlkj] If I run this code to compute a "checksum" of a file I get a different answer on a windows machine
162460 [matz ruby-la] Try
+ 162485 [ralph lkjlkj] that works. Thanks.
+ 162505 [Ara.T.Howard] this comes up so often - would it make sense to be the default mode on
  + 162517 [matz ruby-la] Unless your program communicates with other programs on Windows, that
  | 162521 [pit capitain] Could someone provide an example for such a program? My Ruby programs
  | 162609 [dooby d10.ka] Notepad.
  | 162611 [sean.ohalpin] It's part of ANSI C for stdio to open files by default in text mode.
  | 162687 [pit capitain] Thanks to you and Daz for the detailed answer. So it seems that the
  + 162519 [michael.camp] I'm guessing here, but my guess is that reading text files with ruby
    162529 [halostatue g] Some. I *always* open files in Ruby with "rb" or "wb" on Windows. Here's

^ Ruby and Eclipse and Rake
162457 [adelle bulle] I recently downloaded and installed RDT

^ ruby for apache2 on windows
162458 [alxjvr.ruby ] could anyone point me to a good resource in setting up rubby for apache2 on
162854 [anibalrojas ] Could you elaborate more your question? What 's the usage you want for
162857 [alxjvr.ruby ] currently, just for R&D. i was planning to convert some of my simple
162872 [drew.robinso] There is an installer for the Apache-specific ruby libraries/modules
163016 [alxjvr.ruby ] thanks guys, i'll dig more into this...

^ ruby-xosd problem: no Japanese unless readline is first called
162459 [gaizin gmail] Using Ruby 1.8.3 with libxosd2-ruby 0.4 (also tried ruby-xosd 1.1.0), I

^ two rails 0.14.1 problems in win
162463 [jlz.3008 gma] I have problems starting with rails.
162489 [se digitale-] are you using 2 versions of Ruby? It looks like it because you use `cat`

^ Simple regex question
162465 [toddkennethb] Sorry to waste your time with this, but I'm new to regular expressions.
+ 162466 [w_a_x_man ya] DATA.read.scan( /id="title">(.*?)</m ) { |s|
| 162473 [toddkennethb] Perfect, thanks!  Didn't know about String.scan.
+ 162479 [ruby.brian g] irb(main):001:0> text = %(<span id="title">Dog Eggs</title>)

^ unsubscribe
162467 [ad.hutchinso] unsubscribe

^ Re: WhyRuby? repository has moved to ruby-doc.org
162471 [clr8.10.rand] Any chance of a (stipped down?) PDF version? I don't have PP nor
+ 162472 [evl tkwsping] OpenOffice (2) opens it perfectly (and should be able to convert it to pdf)
| 162483 [clr8.10.rand] OK, I was able to see the nice presentation, thanks.
+ 162475 [m.fellinger ] charset="iso-8859-1"

^ Gauteng.rb meetup tonight (Tuesday 25 October)
162476 [luke.randall] If there is anyone on the list that hasn't heard about it before now,

^ postgres DBI question
162484 [Chris.Newman] I'm trying to connect to a Postgresql database using the DBI and postgres
+ 162498 [erne powerna] Here's a link to some documentation on the dbi.
+ 162518 [khaines enig] ^^^^^^^^^^^^^^^^^^-- Don't need this line.  DBI will find the right driver and
  162522 [Chris.Newman] That fixed it. Thanks Kirk!

^ searching an array
162488 [ralph lkjlkj] I have an array of classes source[]
+ 162492 [shortcutter ] source.find {|x| x.fname == "foo"}
+ 162513 [bill jrl.org] I like grep eg.
  162528 [bob.news gmx] Unlikely that it works in this case as Ralf seems to have instances of a

^ Frozen @cookies
162504 [warrens actc] I tried to modify the cookies in an action method of ActionController but got the error
162549 [drbrain segm] You'll probably have the most luck and fastest answer by asking the
162555 [james_b neur] I see a trend.
162567 [halostatue g] And maybe something for Hal Fulton to add to his clr FAQ, pointing

^ Re: net-ssh question
162506 [jamis 37sign] What is your local host's OS and SSH version? What is the server's OS
162534 [itsme213 hot] Win-XP (SP-2)
162662 [itsme213 hot] I'll try asking the ISP, but know that they prefer to stick with the
162665 [jamis 37sign] Another possibility--are you doing anything like accessing the SSH

^ Comparing Classes with Case ?
162507 [warrens actc] charset="US-ASCII"
+ 162509 [bob.news gmx] => nil
+ 162511 [christophe.g] Lose the ".class". === automatically looks for the class of the left argument.
  + 162527 [lukfugl gmai] irb(main):001:0> String === "string"
  | 162602 [christophe.g] You're right of course! I keep forgetting that order :( .
  | 162693 [bob.news gmx] If you think about it for a moment you'll see that it's the only
  | 162700 [christophe.g] Of course it is the only reasonable approach. I agree completely with it. But it
  | 162704 [bob.news gmx] Just out of curiosity: which languages are you referring to and what do
  | 162713 [christophe.g] The only languages I've ever used that I know have a switch/case statement are
  | 162715 [bob.news gmx] Interesting to learn.  Note however, that - if my rusty PASCAL doesn't
  + 162536 [ruby.brian g] Just throwing in that it would not be a "BIG LOSS", not even a _big
    + 162552 [drbrain segm] [snip example]
    + 162557 [clr8.10.rand] Well, is the following the rare case of 'nearly never' or just
      162563 [ruby.brian g] One thing that may be bad about this approach is that you can't have
      162603 [clr8.10.rand] Thanks for your thoughts. The above (my approach) fits so nicely with
      162617 [sillewille g] Of course, you asked a Ruby question, so you got a Ruby answer.
      162625 [clr8.10.rand] Actually I am happy that I did not ask a rails specific question,
      + 162626 [ruby.brian g] I can assure that your post sounded completely polite and sensible to
      + 162636 [sillewille g] My response certainly wasn't meant to scold, only to point out that

^ Meta methods to govern meta data?
162516 [duane.johnso] I was intrigued by one of Matz's "Wild and Crazy Ideas" at RubyConf--
+ 162556 [transfire gm] See Facets annotation.rb. And I would urge you to call them annotations
+ 162800 [netghost gma] comment "Doubles the number"
| 162841 [gwtmp01 mac.] It seems to me that if you want to associate annotations with a
| 162856 [transfire gm] It's a plesant notation, but a couple issues with the ideas Gary
| 162869 [gwtmp01 mac.] How about adding methods to Class and Method?
| 162878 [daniels pron] The following is an implementation I just whipped up of annotation.
+ 162868 [dblack wobbl] It seems awkward (even leaving duck-typing issues aside :-) to have a
  163050 [netghost gma] I think the comments example isn't a good one, but there are some other

^ `report_activate_error': Could not find RubyGem activesupport
162523 [hany paycom.] $ruby script/generate controleer Say

^ Re: regular expressions galore
162532 [bob.news gmx] Hm, you said "multiple word chars *or* one of your special chars".  To me
162535 [kballard gma] Yeah, remove the vertical bars in your character class. Those are for
162537 [jcarbaut lap] (file test.rb)
162546 [decoux moulo] This is interpreted as
162558 [jcarbaut lap] Wow! I won't forget that! Thanks.
162560 [hawkman.gelo] it's still not working for me :-(
+ 162698 [decoux moulo] Give an example of what you are trying to match
+ 162701 [w_a_x_man ya] %r{ ^ : ? [ / ' " # $ @ ] + }x
  162739 [hawkman.gelo] got it to work now, in the middle of the night, suddenly realized i really

^ Looking for ruby's regexp syntax
162533 [aurelianocal] I', looking everywhere and I can't find a summary of the ruby's regexp
+ 162564 [steve waits.] I recalled the syntax being PCRE.  Couldn't find anything to support
+ 162575 [doodpants ma] Ruby's regexp syntax is both described and summarized quite nicely in

^ Windows Move/Dir with wildcards ?
162544 [peter.fitzgi] x =3D "./xmloutput/cancellations/*"
+ 162548 [m.fellinger ] charset="utf-8"
+ 162610 [sean.ohalpin] You're passing Ruby style filenames (i.e. with "/") to the DOS command

^ Re: by x,y allowing x,y to be passed as parms
162547 [netghost gma] Read the mailing list long enough and cool little trick inevitabely pop

^ What is Hoodwink'd?
162550 [gaston.garci] Hoodwink'd is?
+ 162554 [james_b neur] Sort of like Web graffiti. A means of adding comments to arbitrary Web
+ 162683 [ruby-talk wh] Also see the hoodwink'd information booth.
| 162779 [gaston.garci] Thanks for the links. I'll investigate.
+ 162782 [toddkennethb] Seems pretty cool to me...

^ having reference problems
162569 [shalperin th] class Foo
+ 162581 [dblack wobbl] OK, you need to clear some cobwebs :-)
+ 162582 [ef alum.mit.] How about this? =20
+ 162583 [halostatue g] This is not necessary and definitely does not do what you want it to do.
+ 162584 [ef alum.mit.] Having read your example more carefully, I think this does what you
+ 162615 [sean.ohalpin] class Foo

^ Redefine minus unary method
162587 [email55555 g] class Integer
162592 [eric_mahurin] Fixnum overrode -@ but not +@.  Redefining the superclass

^ Implicit block argument
162588 [dbatml gmx.d] I would like to propose a shortcut for block arguments (the magic block
+ 162591 [halostatue g] No, thank you. I don't think it helps anything.
+ 162594 [ef alum.mit.] =20
  162623 [discordantus] Which has already been fully discussed (disgust?) in the (in)famous

^ Lazy Streams and Other Functional Goodies
162589 [louis.j.scor] Hey all;
162593 [rdm cfcl.com] I asked MJD about the idea of doing a "Higher Order Ruby" book.  He
+ 162620 [ptkwt aracne] Or how about a webpage somewhere where we could put Ruby translations with
| 162680 [surrender_it] +1, actually I was doing this. Maybe we could just use a wiki section?
| 162725 [louis.j.scor] On 10/26/05, gabriele renzi
+ 163255 [mjd plover.c] Really it's more that I know Ruby badly enough to be confident of
  163721 [steve waits.] Classic example of this: Numerical Recipes in _________
  163723 [ruby.brian g] I expect you mean C <- FORTRAN, or is this the same confusion as with

^ String parsing?
162590 [mzanis purdu] I am new to ruby but have an okay background in perl.  I am trying to parse
+ 162595 [james graypr] => ["(", "foo", "0.05", ",", "bar", "0.115", ")", ";"]
+ 162597 [eric_mahurin] You can build a lexer (what you want) and/or a parser with ruby

^ Weird thing with "sub" and "rjust"
162596 [ricpelo gmai] string.sub(/(\d+)/, '\1'.rjust(3, '0'))
+ 162598 [drbrain segm] .sub(/(\d+)/) { $1.rjust 3, '0' }
+ 162601 [ef alum.mit.] The rjust is being evaluated before the sub call, so what you've

^ Re: narray and the stdlib
162600 [ptkwt aracne] Well, perhaps we could build Hal's Ruby number questionaire into the Ruby
+ 162604 [Ara.T.Howard] what did you do?  mine suports read/write mmap so an narray can be backed by a
| + 162618 [ptkwt aracne] I wanted to treat an NArray as an N-dimensional point so that I could find
| | 162634 [Ara.T.Howard] hmmm. what were you doing?  sounds interesting.  any chance you could post
| | 162685 [ptkwt aracne] I'm using a Particle Swarm Optimizer (PSO) that I've written in Ruby to
| + 162703 [cameron.mcbr] btw, this sounds like a fun hack.  this anywhere public?  (yes, I'm
+ 162702 [cameron.mcbr] Yeah, me too.
  + 162706 [martindemell] Actually, the only popular compilerless platform today is Windows, so
  | 162727 [cameron.mcbr] a great point, Windows is the primary concern.
  | 162732 [curt.hibbs g] Actually, it turns our that the one-click installer "team" has only *one*
  | + 162734 [cameron.mcbr] To be clear, I didn't mean that as a dig.  It's a great project.  Keep
  | | 162737 [curt.hibbs g] Not to worry, I didn't take it as one. I'm just using every excuse I can
  | + 162748 [ed.howland g] Curt, is it possible/easy to remaster the One Click Installer? The
  |   162750 [curt.hibbs g] Yes and no -- depends on how you you wanted to do it.
  + 162746 [Ara.T.Howard] i personally think this is because no one understands how to use it...  once

^ Re: Ruby's GC
162605 [matz ruby-la] It's not faster than expected.  I will try again when YARV has come.
162679 [surrender_it] Ah, I see thanks

^ Installing ruby-odbc
162606 [brad.daily g] Having a problem when installing ruby-odbc on one of my servers. When I

^ [ANN] rttool-1.0.0
162614 [rubikitch ru] == Abstract

^ The "perfect" ORM?
162635 [hal9000 hype] For many weeks I have had this at the back of my mind.
+ 162642 [james_b neur] What do you mean by 'metadata'? The data types of your object's state?
| 162785 [rubyhacker g] Basically, yes.
+ 162645 [lyndon.samso] Ideally you'd be more generic than an ORM.
| 162786 [rubyhacker g] True, but I'd want to walk before I run, so to speak.
+ 162648 [ruby-ml magi] I greatly specify code defining the database (Og)
| 162790 [rubyhacker g] Yes. The latter problem is worse than the former, I think. And
+ 162651 [kevin.jackso] I've spent a fair bit of time with Hibernate and I can safely say that
| 162797 [rubyhacker g] Thanks for this lengthy and informative post.
| 162914 [itsme213 hot] What would be wrong with using re-opening classes for the mapping e.g.
| 162980 [george.mosch] FYI, the development version of Og also supports this :)
+ 162655 [transfire gm] I think Og has a very good _outward_ design. I'm trying to get George
+ 162657 [jim weirichh] Hahahaha ... oh, that's a good one :)
| + 162668 [kevin.jackso] Actually re-thinking this again,
| | 162799 [rubyhacker g] Welll... I don't really understand DI (sorry, Jamis) and I am not
| + 162796 [rubyhacker g] Very discouraging, Jim. :)  Read my post from five mins ago and
+ 162658 [duane.johnso] charset=US-ASCII;
| + 162747 [hutch recurs] This guys stuff is very good. I've not used dybase, but I have used
| | 162751 [Alexander.J.] Why didn't anyone mention Cayenne. As a comparison it seems closer to
| | 162804 [rubyhacker g] I've never heard of it, but I will add it to my
| | 162840 [zimba.tm gma] def Person
| + 162803 [rubyhacker g] The classic ODBMS has some implementation and usage problems. It's
+ 162674 [khaines enig] charset="iso-8859-1"
| 162808 [rubyhacker g] [snip snip snip]
+ 162721 [the.mindstor] #: Hal Fulton changed the world a bit at a time by saying on  10/26/2005 2:11 AM :#
| 162811 [rubyhacker g] That sounds good so far.
| 162829 [the.mindstor] #: rubyhacker@gmail.com changed the world a bit at a time by saying on  10/26/2005 9:52 PM :#
+ 162726 [hutch recurs] Do you want an ORM? or do you want a way to persist classes in a non-
| 162815 [rubyhacker g] Hshs... I really want the latter, but I am considering implementing
+ 162839 [mail adamvan] I'm not sure if this is relevant but in my opinion the perfect ORM is
| 162845 [james_b neur] Looks like Og.  Except you can leave out the inheritance part
+ 162910 [george.mosch] FYI, the development release of Og includes a KirbyBase wrapper.
| 162985 [rubyhacker g] That is interesting.
| + 163003 [james_b neur] Here's a Devil's Advocate argument.  It may have actual merit; I'm not
| | + 163008 [gwtmp01 mac.] The failure modes are radically different also.  If you don't design/
| | + 163015 [jeremy bitsw] You hit the nail on the head here, James.  Persisting objects to a
| |   + 163017 [hal9000 hype] If I understand you right, that is the way I want to do it.
| |   + 163177 [george.mosch] Ehm, Og does that.
| + 163009 [khaines enig] This is a hard thing to deal with, though.  A relational database has to use
| | 163216 [rubyhacker g] Yes, but that's just giving different names to the same things, isn't
| | + 163221 [james graypr] I just have to say first that I've really enjoyed reading these
| | | 163302 [hal9000 hype] Not a dumb question at all. And I wouldn't dignify my ideas as a "vision"
| | | 163369 [dave burt.id] So Marshalled objects plus indexes?
| | | 163792 [duane.johnso] Nice summary, Dave.  If this is indeed what Hal is talking about, it
| | | + 163852 [jeff opendbm] There is a package called DyBase out there, it's somewhat dated and unmaintained, but it
| | | + 163860 [hal9000 hype] I guess I never replied to this one. I'm not sure that this is the
| | + 163227 [khaines enig] Well, yeah. :)
| |   163305 [hal9000 hype] I think I am definitely object-driven.
| |   163310 [daniel danie] I think it's easy to underestimate the value of being able to pass
| + 163175 [george.mosch] The metadata is stored in the object class not the actual instances.
|   163220 [rubyhacker g] Yes, I realize that.
+ 163252 [daniel.amela] (Someone teased me at the
+ 166929 [jhouchin cab] I don't know if you've seen this one or not.
threads.html
top