194812-196098

194621-195669 subjects 194978-195716

FasterCSV RCR?
194812 [james@gr yp ] I'm considering submitting my first RCR to add FasterCSV to the
+ 194816 [pat.eyler@gm] Sweet.
| 194838 [hal9000@hy e] I'd suggest changing the name to CSV. And possibly defaulting to
| + 194886 [james@gr yp ] FasterCSV looses much of it's speed in compatibility mode.  I think
| + 194890 [matz@ru y- a] I agree.  I don't want to have two independent CSV readers in the
|   + 194954 [james@gr yp ] Alright, let me take another crack at the compatibility mode then.  I
|   | 194955 [nakahiro@sa ] Long time no post.
|   | 194957 [james@gr yp ] Do we have different standpoints?  I hope not too different.  We're
|   | 194958 [nakahiro@sa ] * streaming
|   | 194962 [james@gr yp ] Only if you go through that interface.  The FasterCSV interface is
|   | 195052 [has.sox@gm i] ...
|   | 195058 [logancapaldo] It's not exactly a tutorial, but the examples in the docs [1] should
|   | 195063 [has.sox@gm i] ...
|   | 195064 [james@gr yp ] => true
|   | 195065 [has.sox@gm i] ...
|   + 195254 [james@gr yp ] Alright, I've thought a lot about this and there is really one big
|     + 195255 [ara.t.howard] i know matz is against it, but i really think we should have both.  we have
|     | 195258 [matz@ru y- a] They are the mistakes that I try to avoid making again.
|     + 195601 [james@gr yp ] Those in favor (or against) may wish to vote.
|     + 195774 [nakahiro@sa ] I started thinking that just csv.rb should be faster.
|       195806 [james@gr yp ] My biggest complaint with CSV is that open() behaves "oddly" and thus
|       195860 [nakahiro@sa ] at first, I thought all csv users would do the following when I define
|       195929 [james@gr yp ] That's why we have foreach().  Better to use that and gain all the
|       196023 [nakahiro@sa ] I think I still have not been able to explain well what's the difference
|       196098 [james@gr yp ] Yeah, to me CSV is just another data source I want to read from/write
+ 194822 [djberg96@gm ] It should *replace* the current CSV library. :)
| 194824 [james@gr yp ] I assume we have to keep CSV for backwards compatibility.  We still
+ 194939 [gregory.t.br] I bugged you about doing this off list, which may be why you posted

Fast Fibonacci method
194815 [erlercw@gm i] ...
194820 [erlercw@gm i] ...
194855 [shortcutter@] Other suggesgtions (untested, i.e. unmeasured)
+ 194888 [Nuralanur@ao] ...
| 195015 [erlercw@gm i] ...
+ 195016 [erlercw@gm i] ...
  195038 [Nuralanur@ao] ...
  + 195043 [Nuralanur@ao] ...
  | 195061 [erlercw@gm i] ...
  + 195044 [erlercw@gm i] ...
    195046 [shortcutter@] btw, did you try the iterative approach with results stored in an Array or Hash?
    195054 [erlercw@gm i] ...
    + 195056 [logancapaldo] I don't believe it. Really. Ruby doesn't do tail-call optimization,
    + 195072 [shortcutter@] class Integer  # not thread safe!  @@fib = [0, 1]
      195076 [simon.kroege] like

Rails - Layouts
194818 [paul.kraus@g] ...
194819 [ruby@ph li .] Create app/views/layouts/application.rhtml
194825 [paul.kraus@g] ...
194826 [kevin.clark@] A layout specified in render -> specified in the controller -> default

[ADV][JOB] PROGRAMMERS FOR STARTUP
194821 [mtrier@gm il] PROGRAMMERS FOR STARTUP

dt_textrel problem with ruby module
194834 [jeffm@gh st ] am receiving a warning from ld which may be causing the segfault. Does
194856 [decoux@mo lo] try to add -fPIC when you compile it.
194965 [jeffm@gh st ] The extconf file already contains directive -fPIC
195670 [jeffm@gh st ] Got around to testing this on a Fedora Core 5 box today and there

Rails - Hashes
194840 [paul.kraus@g] ...
194841 [james_b@ne r] What does view|source on the resulting Web page show you?
194842 [paul.kraus@g] ...
194843 [paul.kraus@g] ...

Ruby Threads...
194844 [me@yo rh me ] What is the reason why Ruby doesn't use native threads...at least on
194845 [hal9000@hy e] Green threads are the most portable, as threads differ
194854 [shortcutter@] Yuck.  And I believe Solaris is even another beast.
194862 [garbagecat10] ...
+ 194863 [me@yo rh me ] But the problem is that it doesn't take advantage of these new
| + 194866 [garbagecat10] ...
| | + 194875 [gwtmp01@ma .] Have you investigated or played around with the concurrency model
| | | + 194876 [mtrier@gm il] Francis, you should consider writing a book on advanced programming
| | | + 194903 [vjoel@pa h. ] Agree in general, but in the case of ruby, note that forking a ruby
| | | | 194904 [gwtmp01@ma .] Interesting, thanks for the pointer.
| | | + 194922 [rubyfan@gm i] And perhaps also the fact that we've been stuck with the Von Neumann
| | |   194934 [chneukirchen] Shouldn't we know that since 1977?  What is everyone doing?
| | + 194921 [rubyfan@gm i] Is this because Python uses native threads?
| + 194882 [ara.t.howard] it's a small problem.  here is some code which starts two processes, three if
|   + 194905 [cremes.devli] cremes$ gem list -b |grep slave
|   | + 194906 [ezmobius@gm ] -Ezra
|   | + 194930 [ara.t.howard] it's here
|   + 194913 [garbagecat10] ...
|   | + 194926 [rubyfan@gm i] Yes, it's happening pretty quickly.
|   | + 194933 [ara.t.howard] i agree totally.
|   | + 194963 [me@yo rh me ] This may work well on Linux, but multiprocesses are very heavy on
|   |   + 194966 [wilsonb@gm i] This is an excellent thread, full of good thoughts.
|   |   | + 194971 [vjoel@pa h. ] In a perfect world, that url points to cr.yp.to, but Ed Lee is pretty
|   |   | + 195008 [garbagecat10] ...
|   |   |   195042 [znmeb@ce ma ] I've been looking for a place to jump into this -- er -- thread -- and this looks like as good a place as any. Let me take a meta position here, as someone who's been in computing, mostly scientific, for over 40 years.
|   |   + 195006 [garbagecat10] ...
|   |     + 195007 [me@yo rh me ] I'm not sure what you are getting at here , but Windows scales fines for
|   |     | 195010 [garbagecat10] ...
|   |     + 195017 [ara.t.howard] in fact, in my particular situation, it really does.  a task may task 1 hour
|   |     + 195073 [xiaofeng.li@] Windows threads are pretty scalable in a SMP system. Was better than
|   + 194925 [rubyfan@gm i] Is your Slave code available?  (perhaps someone asked later; I miss
|   | 194931 [ara.t.howard] slave doesn't use it, but
|   + 194935 [logancapaldo] Dammit! I was about to write this library!
|     + 194936 [vjoel@pa h. ] What about
|     | 194938 [logancapaldo] Well I see I'm redundant ;)
|     + 194941 [ara.t.howard] build your Task on top of Slave and send me a patch.  i'll incorporate it and
|       194943 [logancapaldo] Ok.
+ 194902 [vjoel@pa h. ] You probably mean "Thread.critical" or "Thread.exclusive", and not
| 194912 [garbagecat10] ...
+ 194910 [halostatue@g] Almost true. In Solaris 8, you can link with liblwp to get lightweight

Extend self?
194846 [donaldluo@gm] I am a newbie to Ruby. I've found some code in the file dependencies.rb
194848 [m.fellinger@] That's quite simple, it saves you some typing :)
194851 [donaldluo@gm] Really thanks to the quick response, but it seems that the two ways of
194858 [florgro@gm i] Module functions are not transfered by include by default. You could do

[ANN] DBrb 0.1.0
194865 [a2800276@gm ] I'm happy to announce the initial release of DBrb. DBrb is a minimal

Generating a list of cells in a range
194867 [devlists-rub] Here's a simple problem that seems like a good Ruby exercise.
+ 194872 [ara.t.howard] class ExcelRange < ::Array
+ 194880 [peerler@gm i] How about this one?
| 194883 [toalett@gm i] ["C5", "C6", "C7", "C8", "C9", "D0", "D1", "D2", "D3", "D4", "D5",
+ 194884 [james@gr yp ] => "C5:E8"
  194924 [kevin.olbric] James' solution gets points for style, but a's is the most complete.
  194928 [kevin.olbric] Here's a variation of James' solution that covers the other cases and is
  + 194929 [djberg96@gm ] Nice.  I may have to add this to the spreadsheet package. :)
  + 194946 [kevin.olbric] def excelrange(r)

[ANN] RbYAML-0.1: Pure Ruby YAML parser and emitter.
194868 [Ola.Bini@ki ] Announcing version 0.1 of RbYAML

Ruby under XXAMP on WinXP machine
194869 [val@va er eb] This may be really dumb (my armor is on)...  but,
194919 [schapht@gm i] XAMPP (I think you mean) probably doesn't include ruby or rails cause
195020 [val@va er eb] Mat,
195027 [mtrier@gm il] InstantRails gives you the whole package.

Class Variable
194887 [paul.kraus@g] ...
+ 194889 [madan.manoha] ...
| 194893 [dblack@wo bl] You're describing protected methods, not private methods.  (See my
+ 194892 [dblack@wo bl] 'self' is the default object, a role that rotates among different

Accessing a class method from within a base class
194891 [mr.nicholas.] When I run the code at the end of the message it all works as expected
194895 [gwtmp01@ma .] if (!self.class.isMatch(input))
194900 [mr.nicholas.] Gary,

object.reference_count
194894 [rosejn@gm il] Is there a way to get the current reference count for an object?
194896 [rmagick@gm i] AFAIK Ruby doesn't keep track of the reference count. If you're coming
194916 [rosejn@gm il] Aha.  Didn't think about that.  Are there callbacks or anything you can
194923 [TimHunter@nc] Why don't you describe what it is you're trying to do?
194927 [rosejn@gm il] Just wondering...
194968 [gene.tani@gm] if you're using google groups you need to search the archives of
194983 [rosejn@gm il] Huh?  I'm on the mailing list, and in googling around I didn't find
+ 194990 [benjohn@fy h] When I first came to Ruby, I'd been using C++'s Boost library, and
| 195018 [erlercw@gm i] ...
| 195021 [rosejn@gm il] Aha.  This isn't what I was looking for, but I think it gets you the
| 195174 [minkoo.seo@g] ...
+ 194998 [shortcutter@] You don't need that in Ruby.  GC will automatically take care of

Observer pattern ...
194899 [madan.manoha] ...

Basic ruby looping question
194908 [marston@ma s] I'm trying to do something regarding looping through an array, but only
+ 194911 [toalett@gm i] for row in @large_row_array.select{ |row| row.element == "something" }
+ 194914 [vjoel@pa h. ] I'm not sure if it's always more efficient, but you can use grep in some
| 194915 [vjoel@pa h. ] In your case, grep may not be so useful after all. You would have to
+ 194918 [daniel.schie] @array.select{|row| row.element == "something"}.each do |row|
| 194920 [marston@ma s] Thanks everyone, I this was exactly what I needed.
+ 194964 [dave@bu t. d] You can use array.select as the others have mentioned, or you can use

[Summer of Code] Give me your poor, your hungry, your Rakefiles
194917 [kevin.clark@] So lets get this summer of code thing started.
+ 195033 [kevin.clark@] I've gotten a few good examples. Keep em coming folks. Rakefiles in
+ 195998 [ mfp@ac .o g] You could maybe have a look at Rant: it seems[1] much more powerful when it
  196014 [kevin.clark@] Thanks Mauricio, I'll take a look.

ri broken
194940 [warrens@ac c] ...
195037 [minkoo.seo@g] ...

Annotated Exception (a la Ruby Treasures)
194944 [transfire@gm] Anyone remember Ruby Treasures? Well I was browsing thru some old Ruby

modularizing class methods [LONG]
194956 [vjoel@pa h. ] Suppose you have a base class that defines some class methods, and that
194959 [transfire@gm] Interesting approach. It's a little bit of a misnomer mind you, becasue
194960 [vjoel@pa h. ] True, but the parallel with the following is just so appealing, that I

Pathname
194961 [transfire@gm] store a path as an Array instead of a String. It appears to be about
+ 195005 [matz@ru y- a] akr-san is responsible for pathname library.
+ 195150 [akr@ni ai t.] I don't like it.  A pathname may have different structure on
  195158 [transfire@gm] I won't disagree with you there. So if that's in the works than no
  195159 [djberg96@gm ] The pathname2 package already does this (although you use '+' instead of
  195160 [djberg96@gm ] Well, I would have stolen it, except that I forgot that there's no way
  195199 [logancapaldo] Well, is this close enough?
  + 195200 [Daniel.Berge] Hm, I suppose I could do that. :)
  + 195214 [transfire@gm] Although you just end up doing this
    195267 [nobu@ru y- a] class << Pathname

String segfault with wide character function, Windows
194967 [djberg96@gm ] Ruby 1.8.4 (one click)
195059 [djberg96@gm ] The solution was found by Heesob, which I have pasted below (taken from

What's wrong with Windows? (Was: Re: String segfault with wide character functi)
194969 [Nuralanur@ao] ...
195013 [djberg96@gm ] I don't think the bug I posted (which now appears to be sporadic, btw)

I need to be able to send simple "Cookie:" header with Net::HTTP request
194972 [xeno@es im .] Documentation I've been able to find is very unspecific about headers, which are

Crazy thought -- Rubyish type conversion?
194973 [daniel.schie] Now, I'm sure you'll all hate this, but I just had to post it.
+ 194975 [daniel.schie] I even got an implementation, although it obviously differs a lot from
| 194982 [transfire@gm] Just playing out loud....
| + 194985 [rossrt@ro co] require 'facet/binding'
| | 194989 [daniel.schie] That's very interesting. Would it be better if class objects were given
| | 194992 [rossrt@ro co] Good point :) The way it's written, you can do that already, since the
| | 194993 [daniel.schie] I don't think that'll work with "nested" constants, i.e. A::B::C. I
| | + 194995 [rossrt@ro co] Actually, the classes aren't handling the conversion - it's just calling
| | | 194997 [daniel.schie] I know; but it's always fun to deconstruct an implementation :)
| | + 194996 [daniel.schie] require 'facet/binding'
| + 194987 [daniel.schie] This seems like the most easily achievable way, although I'd still like
+ 194976 [farrel.lifso] It will make catching exception on type 'conversion' a bit hard. How
| 194980 [daniel.schie] I'm not sure where you're getting at -- there should be raised either a
+ 194994 [florgro@gm i] I have implemented this in ruby-contract. Please see
| + 194999 [daniel.schie] Nice, although a bit verbose as a general-usage implementation.
| | 195000 [florgro@gm i] Hm, hard to make it any shorter without changing Ruby itself.
| | + 195001 [daniel.schie] Hmmm, I'm not too fond of the use of classes -- I'd like to use the
| | | 195002 [florgro@gm i] Nope, not at all. ruby-contract uses the same adaption routes that Ruby
| | | 195004 [daniel.schie] That's exactly what I think is the problem; you have to tell Ruby how to
| | | 195022 [transfire@gm] That's interesting. Is this data accessable via pure Ruby code? I was
| | | 195029 [florgro@gm i] ruby-contract's API for providing adaptions is pretty simple. adaption()
| | + 195023 [transfire@gm] That's pretty close really. If you can do this (w/o Binding.of_caller
| |   195032 [florgro@gm i] Disagreed. I think the signature information should be available before
| + 195024 [transfire@gm] Interesting library. Would like to see a tutorial on how to use it.
|   195031 [florgro@gm i] Please have a look at the test cases and the documentation for now.
+ 195009 [dblack@wo bl] It sounds like you're talking about class, rather than type, or
  195012 [daniel.schie] No, I don't mean class -- I think of "type" as the context of an object,
  195049 [dblack@wo bl] But that's a different matter from either the class or the type of
  195067 [daniel.schie] Is behavior not relevant to type?
  195068 [dblack@wo bl] I think I'm not understanding what you mean by the context of an
  195074 [daniel.schie] "Context" here is the knowledge that certain methods are not only

foxGUIb GUI and code separation question
194974 [Nuralanur@ao] ...
195045 [meinrad.rech] ...
threads.html
top