210917-214802

210711-212798 subjects 211112-234936

Free Interactive Ruby Lessons
210917 [ashishkulkar] Dear all,

{Spam?} [ANN] PatchServer 0.2a
210924 [zoso@fo on e] Do you write patches for different programs? Don't you know where to put
211008 [interfecus@g] I find it quite amusing that you ask people to send their patches for

[SOLUTION][QUIZ] DayRange (#92)
210925 [SimonKroeger] This is one of the problems that looks easier than it is
+ 210956 [llasram@gm i] ...
+ 210957 [roerd@ar or ] this is the first solution I submit. It doesn't do much more than what

Keep track of all instances of a class without losing GC?
210931 [jezstephens@] I want to be able to keep track of all instances of a class using
+ 210934 [kbloom@gm il] Have a look at weakref.rb. Either use that directly, or copy ideas from
+ 210935 [ara.t.howard] require 'weakref'
+ 210936 [tomasz.wegrz] ObjectSpace.each_object(Thing) {|x| print x}
+ 210944 [listbox@ju i] weakref might be of help indeed, you also can use lookups (3 extra

[ANN] IndiaOnRails
210933 [pratiknaik@g] ...

Re: [QUIZ] [SOLUTION] DayRange (#92)
210940 [m_goldberg@a] It wasn't difficult because I could call on Array, Hash, Range,
+ 210945 [gthiesfeld@s] Here's my solution with unit tests (I'm trying to get into the habit).
| 210993 [gthiesfeld@g] I forgot to mention that I got the Array#collapse_ranges method here
| 211000 [ml.morus.wal] I don't like the suggested interface (though I used and didn't work out an
| + 211181 [james@gr yp ] Well, if you allow the custom day names and control that with an
| + 211203 [kbloom@gm il] (which helped, because I rarely remember inject)
+ 211219 [adXam.puTbli] Here is my solution. I'm a RubyNuby but I thought this one was easy so

Fwd: Ruby Quiz Submission
210949 [james@gr yp ] ...

Fwd: Please Forward: Ruby Quiz Submission
210950 [james@gr yp ] ...

Passing blocks around in a C extension
210958 [andre@di ir ] I'm trying to wrap up a library, and one of its functions accepts a
210962 [decoux@mo lo] In ruby, this can be seen like this
210964 [andre@di ir ] Thanks Guy!
211078 [decoux@mo lo] Well, I must see the source but if the proc is called after the end of the

[SOLUTION] [QUIZ] DayRange (#92)
210960 [mike@st k. a] ...

Re: Drb through NAT/firewall problem
210969 [philippe.lan] charset="us-ascii"

Sql Server 2005
210985 [johnhoge@se ] I'm trying to follow the "rolling with ruby on rails"

Defining a method with default arguments in C
210991 [brian.takita] ...
211001 [TimHunter@nc] rb_define_method(myclass, "method_name", meth_fnc, -1);
211043 [TimHunter@nc] My earlier post was incomplete. I should've explained that you should

Pros/Cons of Turbogears/Rails?
210998 [kenneth.m.mc] First, I don't intend this to be a flame war, please. Python
+ 211003 [james@gr yp ] I'm also not trying to attack Turbogears, as I know nothing about
| 211056 [ml.chibbs@gm] MasterView is a ruby/rails optimized HTML/XHTML friendly template engine.
+ 211007 [hal9000@hy e] Kenneth -- a few comments below...
+ 211009 [david@va ln ] Just output the encoded / compressed byte stream the image manipulation
+ 211045 [jarrod.rober] Looks like you mixing comparisons.
| + 211046 [chiology@gm ] Python itself predates Ruby only three years.
| + 211050 [nseckar@gm i] ...
| + 211055 [snacktime@gm] Huh?  You might not like the documentation, but it's actually quite
| + 211067 [ray_usenet@y] But at least in most developers' perception, it is (not necessarily in
| | + 211070 [chiology@gm ] Well, sorry, we were responding to Ken who acknowledges both Ruby and
| | + 211071 [kevin.clark@] I think the original poster is getting Rails and Ruby confused a fair
| | + 211094 [paul@bo di .] Version numbers are a fairly useless general metric of project
| | | + 211266 [ray_usenet@y] Well depends on "counts" in what sense. Counts as in the managers up
| | | + 211759 [jarrod.rober] But 1.0 releases do mean something, it means the DEVELOPER of the
| | |   + 211765 [paul@bo di .] In various open source circles, the mere usage of 1.0 may indicate some
| | |   | 211884 [jarrod.rober] nope in GENERAL usage, 1.x means that the developer is designating a
| | |   | + 211940 [rimantas@gm ] Another point is that Rails were EXTRACTED from WORKING application, namely
| | |   | + 211953 [paul@bo di .] Please note the distinction between "stable" and "mature" - these are
| | |   + 211767 [sybrenUSE@YO] ["Followup-To:" header set to comp.lang.python.]
| | + 211764 [jarrod.rober] nobody is talking about perception
| + 211154 [ssmoot@gm il] Wow that's a lot of FUD, especially since you're beating up on Rails
|   + 211158 [james.britt@] It's http://ruby-doc.org
|   + 211885 [jarrod.rober] I got my facts straight, Ruby is not tested in production environments.
|     211888 [ssmoot@gm il] That's odd... it's running bank websites, credit-card processing, high
|     211923 [chiology@gm ] Don't bother... it's probably not mature: how many 13-year-olds do you
|     212103 [znmeb@ce ma ] +2^32 - 1
+ 211082 [onurb@xi ud ] Then avoid crossposting to both c.l.ruby and c.l.python !-)
+ 211103 [greg.kujawa@] As I read in another post on this thread, do some initial scoping out
+ 211160 [ajones1@gm i] In my understanding, which relies completely on the judgements of
+ 211744 [hipertracker] Rails has ActiveRecord ORM, which IMO has nicer and simpler
| + 211748 [james@gr yp ] The name of the virtual machine that runs Ruby 1.9 and up, is YARV
| | + 211768 [jeremy@ch os] I ran the YARV benchmarks and several of them showed a 10x or more
| | + 211835 [imobachgs@gm] I ran the YARV's benchmarks and got an 5x increase in speed[1]. Anyway, those
| + 211750 [jgodoy@gm il] TG supports SQL Alchemy as well.  With SQL Alchemy I believe you'll have a
| | + 211753 [jeff.barczew] Just to complete the comparison, Rails can also use a variety of
| | + 211779 [hipertracker] I would not be so sure. I have tried to work with SQL Alchemy (using
| + 211756 [ajones1@gm i] I don't really see TG sticking with SQLObject. In moving to SQLAlchemy
| | 211783 [hipertracker] What is the advantage of Data Mapper? I cannot find..
| + 211758 [chris.cavala] Google doesn't find YARM and so, YARM does not exist. Care to provide an
| | 211760 [jeff.barczew] I believe he was referring to YARV (yet another ruby virtual machine)
| + 212064 [david@va ln ] *adding oil to the flames*
+ 211968 [rphillips@en] I've found that familiarity with Windows in the Ruby/Rails community is

[ANN] Ruby In Steel Manual now online
210999 [huw@DE TH SB] Ruby In Steel users may like to know that we have now put together all the

Detecting when an object's instance variables are modified
211006 [34993@do ge ] I have a whole load of objects which I would like to periodically dump
+ 211012 [david@va ln ] For the more "magical" way, you could play around with set_trace_func to
| + 211014 [dblack@wo bl] I was thinking of something similar, but using Observable -- but the
| + 211015 [jeremy@bi sw] ...
+ 211022 [dblack@wo bl] I don't know whether this will be of practical use to you, but your
+ 211032 [transfire@gm] You can take a snapshot of the object and then do a comparsion later to
+ 211034 [alex@de et m] module InstanceVariableSnapshooter

Weird string problem
211011 [peter@no no ] I've got some weird string problem that in the end causes an error in
211013 [wccrawford@g] I'm new to Ruby, so forgive me if I'm saying something ignorant, but...
211035 [kbloom@gm il] Using #{} to include a string in another string should propagate taint.

Re: Weird string problem (cause in SOAP4R)
211018 [peter@no no ] I finally found what is different from the string read from file and the
211389 [nakahiro@sa ] Sorry for late reply.
211708 [peter@no no ] I don't think so. But can't this if statement simply return the string

Re: {Spam?} PatchServer 0.2a
211019 [eero.saynatk] Well, merits of email patches versus direct repository patching

Re: Detecting when an object's instance variables are modifi
211021 [34993@do ge ] I appreciate all of the help so far. I had considered the possibility of
211068 [logancapaldo] class A

Readline and StringIO
211023 [eero.saynatk] It is currently not possible to substitute $stdout or
211026 [shortcutter@] Um, I don't understand why you would want to do that.  You are talking
211027 [eero.saynatk] Unit-testing a program that is supposed to be
211028 [eero.saynatk] Come to think of it, might make such input redirection
211080 [shortcutter@] You can use fork with a temporary file that is used as input.  Even more
211128 [eero.saynatk] Not sure if expect will work on output streams (though
211140 [david@va ln ] Change the check and see if there is a reason?
+ 211148 [eero.saynatk] I am actually trying to test output which is also not possible.
+ 211149 [robert.dober] ...

[Solution][QUIZ] DayRange (#92)
211029 [bulliver@ba ] charset="iso-8859-1"
211065 [jason.merril] This solution does more or less the absolute minimum required by the
211069 [boris.prinz@] [Solution][QUIZ] DayRange (#92)
211170 [adam.shelly@] On the opposite end, I've been thinking about codegolf too much.

Mem leak without add_heap()?
211031 [khaines@en g] Okay.  I went and did a little simple hacking on a 1.8.4 instance of Ruby
211037 [khaines@en g] ==31968== 21,364 bytes in 871 blocks are possibly lost in loss record 23

Fwd: Please Forward: Ruby Quiz Submission
211038 [james@gr yp ] ...

Fwd: Please Forward: Ruby Quiz Submission
211039 [james@gr yp ] ...

constants and const_get
211044 [TimHunter@nc] Given
211047 [logancapaldo] #constants is getting the constants directly. (What you want is the
211051 [TimHunter@nc] ri says that Module#constants returns an array of constant names. For
211053 [logancapaldo] [snip brilliant through the looking glass quote]
211171 [robert.dober] ...

Re: Progress Reports?
211052 [transfire@gm] Nice work gabriele.

[ANN] Ruby-VPI 6.3.0
211054 [skurapat@uc ] Version 6.3.0 (2006-08-27)

asymmetric encryption options
211058 [snacktime@gm] Without going into too much detail, I've run into a roadblock using
+ 211073 [jan.svitok@g] 1. You can try larger key, though I don't think it's a good idea.
+ 211077 [dido.sevilla] Well, ElGamal (basically a variation on Diffie-Hellman key agreement),
  211182 [snacktime@gm] The openssl implementation won't encrypt a block larger then the size
  + 211204 [garbagecat10] What you're doing is definitely the standard approach. Most people
  + 211293 [dido.sevilla] Well, a common problem with asymmetric ciphers is that they tend to be
    211302 [snacktime@gm] What would be a good envelope to put all that in?  I'm not sure what
    211310 [garbagecat10] To decide on the storage container you have to ask how transportable
    211364 [snacktime@gm] The encrypted data is for our own applications only.  We have used a

Rescue http Bad File Descriptor error (EBADF)
211059 [horacio.sans] ...
211130 [eero.saynatk] Did you try this?
211254 [horacio.sans] ...

Reformat Ruby source code in vim?
211061 [drjflam@gm i] I'm in the process of converting to vim from emacs to help save my
+ 211062 [ksruby@gm il] ggVG=
| + 211063 [drjflam@gm i] Awesome. Thanks, Kent!
| + 211076 [bruno@ex el ] gg=G works too, and it's shorter :)
|   211150 [drjflam@gm i] Ah yes - I'm still learning about motions, as well as visual mode. Now
|   211156 [rretzbach@go] It would be interesting to see how textmate does this, cause I can't
|   211157 [james@gr yp ] def foo.method_name... is always a singleton class method, isn't it?  ;)
|   211166 [robert.dober] ...
|   211174 [james@gr yp ] => nil
|   211177 [robert.dober] ...
|   211183 [james@gr yp ] Not at all.  That's why I said "singleton class" in the first place.
|   211192 [robert.dober] ...
|   211199 [james@gr yp ] I'm not sure I understood you here.  What I was saying is, whenever
+ 211173 [jmg3000@gm i] To save my hands, I switched to using the dvorak layout and also to

rinda and ruby numbers
211064 [ifxa3a@ya oo] 1. is there any way to pre-allocate memory used by tuplespace, or is the
211072 [interfecus@g] Memory allocation is not your concern unless you are using the C API.
211411 [ifxa3a@ya oo] i am trying to control the behaviour of my tuplespace items (objects put
211654 [drbrain@se m] A Fixnum is always a Fixnum, and a Bignum is always a Bignum.  If you

[ANN] Rails Workshop in Pune, Sept 1-2, 2006
211075 [pratiknaik@g] You might be interested in attenting this upcoming Rails workshop on the 1st

Ruby + SSH + Sudo
211081 [mr.damien@ho] I am developping and application that connect through ssh to a host and
+ 211138 [ron.reidy@gm] ...
| 211152 [ben@bl yt in] The problem is that his script is waiting for the sudo password, not the
+ 211155 [brabuhr@gm i] The host is waiting for the ssh password or the sudo password?  It may not
  211161 [mr.damien@ho] Thanks for your answers. The script was waiting for the sudo  password.
  213244 [mattrose@fo ] there is a way to pass the password in using sudo.  I forget the
  + 213378 [mr.damien@ho] I am still curious =)
  + 213381 [rick.denatal] FWIW, I can't for the life of me find any options in man sudo (on an
  | 213407 [ron.reidy@gm] ...
  + 213419 [aledonne.lis] On my system, according to man sudo, -S causes sudo to read the
    213580 [rick.denatal] Yep, missed that one.
    + 213581 [rick.denatal] s/ssh/sudo/
    + 214611 [notpublic@no] And hope no one does a ps -a at the time and get account pwd.
      214674 [rick.denatal] Except this was [implicitly] in the context of executing the command
      + 214800 [notpublic@no] Sry, was really a backbone answer without thought.
      + 214801 [notpublic@no] Sry, was really a backbone answer without thought.
      + 214802 [notpublic@no] Sry, was really a backbone answer without thought.

Mailing list Software
211088 [herbstwc@gm ] Not Ruby related but i would like to know what Mailing list software

Version Check in C Extension
211091 [elias.athana] How can I check for the Ruby version inside a C extension? I found some
+ 211092 [decoux@mo lo] Try to avoid to test the ruby version, but rather test the functionality
| 211095 [elias.athana] Right. This is the problem I have to deal with. My extension uses
| 211097 [decoux@mo lo] This is bdb
| + 211098 [elias.athana] Thanx!
| + 211102 [elias.athana] elathan@velka:/usr/lib/ruby/1.9/i486-linux> find . | xargs grep HAVE_RB
|   + 211104 [decoux@mo lo] Part of extconf.rb for bdb
|   + 211131 [nobu@ru y- a] have_func does it.
|     211133 [decoux@mo lo] yes, but create_header must be called
|     211252 [nobu@ru y- a] have_func stores the macros in $defs, and they are directly
+ 211096 [sastph@sa .c] In your extconf.rb file construct a -D option from the RUBY_VERSION

[ANN] South East Michigan Ruby Brigade Meeting
211099 [phurley@gm i] 1. RubyMI*Conf Recap

[OT] Thanks for the info Bill!
211101 [coder68@ya o] Bill, Very cool history! I really learned a lot from your post and was

Re: Which Frontend Technology for an Online Game of Risk? SV
211105 [drnicwilliam] Ajax Risk (not in Rails)

Newbie : assign a value to a variable...
211106 [slainer68@gm] This is really a newbie question...
+ 211107 [dblack@wo bl] per_page = @params[:per_page] || 20
| + 211111 [hhausman@gm ] I think you've got to be careful about your precedence there...
| | + 211113 [james@gr yp ] IRb and Ruby treat this the same, but David didn't use "or" so the
| | | 211116 [hhausman@gm ] holycrap.
| | | + 211119 [dblack@wo bl] Only precedence, as far as I know.
| | | + 211121 [james@gr yp ] "and" and "or" have much lower precedence than "&&" and "||", mostly
| | + 211117 [dblack@wo bl] No, it's just "or", which I didn't use.  (Look more closely at my code
| + 211118 [slainer68@gm] Thanks for the trick.
|   + 211122 [khaines@en g] In that case, use the trinary operator.  Call to_i on @params[:per_page]
|   | 211124 [slainer68@gm] Thanks!
|   | 211132 [khaines@en g] ???
|   + 211123 [jan.svitok@g] per_page = @params[:per_page] || 20 # default
|     211146 [simon.kroege] per_page = @params.fetch(:per_page, 0).nonzero? || 20
+ 211108 [hhausman@gm ] per_page = (@params[:per_page] or 20)
+ 211109 [maikonaraujo] per_page = @params[:per_page] || 20
+ 211110 [chris.hulan@] The usual idiom is
| 211125 [luc@ho k- on] per_page = @params.fetch(:per_page, 20)
| 211129 [gwtmp01@ma .] Thanks for that.  I've been oblivious to the default and block
+ 211127 [robert.dober] ...
+ 211134 [david@va ln ] The original way works.
  211142 [slainer68@gm] Thank you very much for all your answers...
threads.html
top