210917-214802

210711-212798 subjects 211112-234936

^ Free Interactive Ruby Lessons
210917 [ashishkulkar] Dear all,

^ {Spam?} [ANN] PatchServer 0.2a
210924 [zoso foton.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 gmai] My solution ended up being something of an ode to the Enumerable#inject method
+ 210957 [roerd arcor.] 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 gmail] 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 juli] weakref might be of help indeed, you also can use lookups (3 extra

^ [ANN] IndiaOnRails
210933 [pratiknaik g] Announcing the launch of IndiaonRails, a community for Rails developers in

^ 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 graypr] Well, if you allow the custom day names and control that with an
| + 211203 [kbloom gmail] (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 graypr] charset=US-ASCII;

^ Fwd: Please Forward: Ruby Quiz Submission
210950 [james graypr] ...

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

^ [SOLUTION] [QUIZ] DayRange (#92)
210960 [mike stok.ca] charset=UTF-8;

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

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

^ Defining a method with default arguments in C
210991 [brian.takita] How can I define a default argument value such as the following in c?
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 graypr] 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 hype] Kenneth -- a few comments below...
+ 211009 [david vallne] Just output the encoded / compressed byte stream the image manipulation
+ 211045 [jarrod.rober] Looks like you mixing comparisons.
| + 211046 [chiology gma] Python itself predates Ruby only three years.
| + 211050 [nseckar gmai] Where 'good' means 'shifted left once?' (2 years -- 93 vs 95)
| + 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 gma] 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 boddie.] 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 boddie.] 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 gma] Another point is that Rails were EXTRACTED from WORKING application, namely
| | |   | + 211953 [paul boddie.] 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 gmail] 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 gmail] That's odd... it's running bank websites, credit-card processing, high
|     211923 [chiology gma] Don't bother... it's probably not mature: how many 13-year-olds do you
|     212103 [znmeb cesmai] +2^32 - 1
+ 211082 [onurb xiludo] 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 gmai] In my understanding, which relies completely on the judgements of
+ 211744 [hipertracker] Rails has ActiveRecord ORM, which IMO has nicer and simpler
| + 211748 [james graypr] The name of the virtual machine that runs Ruby 1.9 and up, is YARV
| | + 211768 [jeremy chaos] I ran the YARV benchmarks and several of them showed a 10x or more
| | + 211835 [imobachgs gm] El Jueves, 31 de Agosto de 2006 15:41, James Edward Gray II escribióº
| + 211750 [jgodoy gmail] 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 gmai] 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 vallne] *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 DELTHISB] 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 dodgei] I have a whole load of objects which I would like to periodically dump
+ 211012 [david vallne] For the more "magical" way, you could play around with set_trace_func to
| + 211014 [dblack wobbl] I was thinking of something similar, but using Observable -- but the
| + 211015 [jeremy bitsw] This works if you .freeze the ivar returned by attr_reader to prevent
+ 211022 [dblack wobbl] 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 deletem] module InstanceVariableSnapshooter

^ Weird string problem
211011 [peter no-non] 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 gmail] Using #{} to include a string in another string should propagate taint.

^ Re: Weird string problem (cause in SOAP4R)
211018 [peter no-non] I finally found what is different from the string read from file and the
211389 [nakahiro sar] Sorry for late reply.
211708 [peter no-non] 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 dodgei] 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 vallne] 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] I am afraid that this comes from the difficulties to automate testing at

^ [Solution][QUIZ] DayRange (#92)
211029 [bulliver bad] 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 enig] Okay.  I went and did a little simple hacking on a 1.8.4 instance of Ruby
211037 [khaines enig] ==31968== 21,364 bytes in 871 blocks are possibly lost in loss record 23

^ Fwd: Please Forward: Ruby Quiz Submission
211038 [james graypr] charset=US-ASCII;

^ Fwd: Please Forward: Ruby Quiz Submission
211039 [james graypr] ...

^ 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] 'Would you tell me, please, which way I ought to go from here?''

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

^ [ANN] Ruby-VPI 6.3.0
211054 [skurapat ucs] 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] I have a little web spider that scraps several web pages. Sometimes the
211130 [eero.saynatk] Did you try this?
211254 [horacio.sans] I think I did try...  but will try again. now I have to wait until the error

^ Reformat Ruby source code in vim?
211061 [drjflam gmai] I'm in the process of converting to vim from emacs to help save my
+ 211062 [ksruby gmail] ggVG=
| + 211063 [drjflam gmai] Awesome. Thanks, Kent!
| + 211076 [bruno exceli] gg=G works too, and it's shorter :)
|   211150 [drjflam gmai] 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 graypr] def foo.method_name... is always a singleton class method, isn't it?  ;)
|   211166 [robert.dober] I am afraid it might be a class method
|   211174 [james graypr] => nil
|   211177 [robert.dober] lucky escape ;)
|   211183 [james graypr] Not at all.  That's why I said "singleton class" in the first place.
|   211192 [robert.dober] Sorry explanation below...
|   211199 [james graypr] I'm not sure I understood you here.  What I was saying is, whenever
+ 211173 [jmg3000 gmai] To save my hands, I switched to using the dvorak layout and also to

^ rinda and ruby numbers
211064 [ifxa3a yahoo] 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 yahoo] i am trying to control the behaviour of my tuplespace items (objects put
211654 [drbrain segm] 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] Damien,
| 211152 [ben bleythin] The problem is that his script is waiting for the sudo password, not the
+ 211155 [brabuhr gmai] 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 fol] 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] You can use a here document to pass the password, or use expect.
  + 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 gma] 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 moulo] 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 moulo] 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 moulo] Part of extconf.rb for bdb
|   + 211131 [nobu ruby-la] have_func does it.
|     211133 [decoux moulo] yes, but create_header must be called
|     211252 [nobu ruby-la] have_func stores the macros in $defs, and they are directly
+ 211096 [sastph sas.c] In your extconf.rb file construct a -D option from the RUBY_VERSION

^ [ANN] South East Michigan Ruby Brigade Meeting
211099 [phurley gmai] 1. RubyMI*Conf Recap

^ [OT] Thanks for the info Bill!
211101 [coder68 yaho] 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 wobbl] per_page = @params[:per_page] || 20
| + 211111 [hhausman gma] I think you've got to be careful about your precedence there...
| | + 211113 [james graypr] IRb and Ruby treat this the same, but David didn't use "or" so the
| | | 211116 [hhausman gma] holycrap.
| | | + 211119 [dblack wobbl] Only precedence, as far as I know.
| | | + 211121 [james graypr] "and" and "or" have much lower precedence than "&&" and "||", mostly
| | + 211117 [dblack wobbl] 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 enig] In that case, use the trinary operator.  Call to_i on @params[:per_page]
|   | 211124 [slainer68 gm] Thanks!
|   | 211132 [khaines enig] ???
|   + 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 gma] per_page = (@params[:per_page] or 20)
+ 211109 [maikonaraujo] per_page = @params[:per_page] || 20
+ 211110 [chris.hulan ] The usual idiom is
| 211125 [luc honk-hon] per_page = @params.fetch(:per_page, 20)
| 211129 [gwtmp01 mac.] Thanks for that.  I've been oblivious to the default and block
+ 211127 [robert.dober] You got very bright answers from very good people, or was it the other way
+ 211134 [david vallne] The original way works.
  211142 [slainer68 gm] Thank you very much for all your answers...
threads.html
top