183692-372326 subjects 184129-185612

Recursive line counter (review?)
183904 [thibaut.barr] I'm practicing ruby everyday on small tools to learn more, could anyone
+ 183916 [chris.hulan@] I like your use of inject.  However, the code you show is not
| 183930 [bob.news@gm ] This doesn't work well with large files and also uses more resources
+ 183929 [bob.news@gm ] You're not properly closing IO's.  Rather do

Broken pack/unpack workaround
183911 [fugalh@xm ss] Array#pack and String#unpack are broken on OS X Tiger's ruby build. This
183933 [pbattley@gm ] broken = (1 == [1].pack('n')[0])
183935 [fugalh@xm ss] tr never occurred to me. That's perfect!

[ANN] Nabaztag 0.1
183913 [pbattley@gm ] I'm pleased to announce the public release of our Nabaztag
+ 183920 [ara.t.howard] may we ask - for what?  ;-)
| 183922 [pbattley@gm ] It performs a couple of announcement functions. First, it reports the
| 183923 [robert.feldt] I find the whole idea of a Ruby library for controlling a little white
| 183927 [charlie@ca t] ...
+ 183926 [vincent.arno] Being French, I particularly appreciated the phonetic translation to
+ 183931 [james.adam@g] Paul, can you bring that to the next LRUG meeting?
+ 184023 [zdennis@mk e] That's pretty sweet Paul. Thanks for sharing!
  184063 [xmlarchitect] ...

183924 [eastcoastcod] I know Rails uses some const_missing magic to automatically require
184065 [benjohn@fy h] I think you want Kernel::autoload( module_name, module_path ), and also

Re: Integer(nil) and checking numericality
183925 [Daniel.Berge] Not exactly.  It normally returns the value that YourObject#to_int would

simple one-liners: last line missing
183934 [tobiasreif@p] Let's say I'd want to modify each line of a file. Here's the dummy
+ 183939 [decoux@mo lo] The replacement string is build when #sub is called
| 183944 [tobiasreif@p] Thanks. I guess my (current) opinion is that it should work.
| 183949 [tobiasreif@p] Now I understand that it can't work.
+ 183942 [ajohnson@cp ] When doing substitutions with a string replacement, you do not get what
+ 183943 [vanek@ac .n ] I think you want,

Passing methods around
183937 [sleepingsqui] I'm a Ruby novice working my way through the pickaxe book, and I've got
+ 183947 [ssmoot@gm il] Haven't tried it, but the "LHS (some_dynamic_method) RHS" syntax does
+ 183950 [jim@we ri hh] [... program elided ...]
  + 183970 [sleepingsqui] OK.  I'm trying to get aquinted with the terminology.  Would we say
  | + 183980 [gene.tani@gm] ...
  | + 184019 [ssmoot@gm il] No, the deal is that '+', '*', etc aren't some special "operator" type
  | + 184031 [acharlieblue] Nah. You're confusing syntax with identity. The token "*" there is not
  + 183990 [sleepingsqui] Just another data point.  It looks like you can also use "method"

Alternate notation for eigenclass
183948 [transfire@gm] Rather then using a specific method for accessing the
+ 183956 [halostatue@g] As long as we don't call it "eigenclass". To pick on your specificproposal, isn't x:foo going to be used for selector namespaces? x!foolooks odd, to me. I'm not opposed to the idea in general, but thenumber of sigils in use in Ruby is already high, and I think I'dprefer a method overall.
| 184020 [ssmoot@gm il] I don't like it. Why do we need special notation? x.eigenclass.foo is
| 184033 [johan.veenst] ...
| 184067 [dblack@wo bl] Or singleton_class, which is what it's called :-)
| 184068 [transfire@gm] Really?
| 184069 [dblack@wo bl] I didn't mean there was such a method (though I hope there will be,
+ 184080 [gwtmp01@ma .] class <<obj; end
  + 184086 [dblack@wo bl] I know it sounds minor but I think with the space it's much clearer
  | + 184148 [wright_gary_] Yes.  My comment regarding expressions after the 'class' keyword
  | | + 184167 [mental@ry ia] The above example illustrates exactly why general expressions aren't
  | | | + 184172 [gwtmp01@ma .] Ah!  Yes.  That funny thing over my head is a light bulb.
  | | | | 184174 [1337p337@gm ] You get APL, the original language of choice for one-liners.
  | | | + 184184 [transfire@gm] That's a good point. But we should be clear. First, this is only
  | | |   184305 [mental@ry ia] Only because you have an a priori idea of what makes sense.
  | | + 184193 [dblack@wo bl] irb(main):001:0> def x; class << String; self; end; end
  | |   184220 [gwtmp01@ma .] A singleton class/end block is parsed and evaluated as an expression.
  | |   184257 [transfire@gm] As I pointed out, there really isn't an ambiguity. BUT that doesn't
  | |   184307 [mental@ry ia] Well, when we're speaking of grammars, "ambiguity" refers to
  | + 184158 [wright_gary_] This has problems also.  Too me it now looks like << is a binary
  |   184195 [dblack@wo bl] and
  |   184197 [matz@ru y- a] It was the original reason.  But I changed my mind.  The only reason
  |   184204 [wilsonb@gm i] We've already got superclasses and subclasses.  I suppose the
  |   + 184221 [vjoel@pa h. ] Underclass??? It's revolting ;)
  |   | 184255 [transfire@gm] No comment on #sig? Oh my, that must be GOOD sign. :-)
  |   + 184296 [mental@ry ia] It's worth noting that "eigenclass" is synonymous with these.
  |     184298 [dblack@wo bl] Not entirely; for example, objects have lots of innate behaviors that
  |     184315 [halostatue@g] #inner_class  #shadow_class
  + 184152 [transfire@gm] That's an interesting view point Gary. Hadn't thouhgt of it that way. I

Test::Unit mixup
183963 [warrens@ac c] ...
183969 [pit@ca it in] normally the assert methods are accessible in subclasses of

Recall: Test::Unit mixup
183964 [warrens@ac c] ...

Wrapping XML document in Class
183966 [aaronbecker1] I would like to use Ruby and REXML to wrap an XML document and allow
+ 183979 [aaronbecker1] I found this blog entry on a XmlStringBuffer class in Ruby.  I
+ 183983 [jim@we ri hh] [... example elided ...]
+ 183985 [SimonKroeger] class Xmltree
  183996 [benjohn@fy h] Last time I was doing playing with XML, I wanted to be able to,

how do I post to a form (http) in Ruby 1.8.2?
183968 [dandante@da ] How do I do the equivalent of Net::HTTP.post_form() in Ruby 1.8.2? (This

Re: Wrapping XML document in Class (Ruby Source Filters?)
183988 [aaronbecker1] Awesome!  That is better than I ever imagined.
183989 [aaronbecker1] I found a couple links on source filters for Ruby.

Posting to an http server using pre-1.8.2 Ruby
183993 [dandante@gm ] How do I send data to an http server using POST and basic

Soon I will have teh 64-bit words
183999 [ayZIG0106@qa] I'm starting work - at last!  Time to put together than Athlon 64 X2 3800+

Soon I will have teh 64-bit words
184000 [ayZIG0106@qa] I'm starting work - at last!  Time to put together than Athlon 64 X2 3800+

Rake best practices for managing multi-directory project?
184003 [stuart.hunge] I'm currently working on a project with a number of "modules"

Looking for Rake C code building examples with multiple platforms, versions...
184004 [stuart.hunge] I'm currently using Rake to manage the building of a smallish

Instiki on shared host?
184006 [grrr@to o. a] Anyone ever attempted this? My host is shared *nix style with ruby 1.8.2.
184310 [ abc@de .g i] I have instiki-ar(beta1), running somewhat correctly on apache 2 with
184322 [grrr@to o. a] I am asking because I have no idea how to do it. I am used to apt-getting
184725 [ abc@de .g i] is how I did things, but in addition i had to clean out the vendors

formatting dates and times
184008 [rtilley@vt e] In Python, I do this to format date and time in a certain fashion.
+ 184009 [zakak@fa tm ] Time.now.strftime('%Y-%m-%d')
| 184011 [rtilley@vt e] Thanks... I came across the answer soon after posting. I should research
+ 184010 [dharple@ge e] Time.new.strftime('%Y-%m-%d') -> "2006-03-14"
+ 184012 [cyclists@nc ] ri Time#strftime

Trying to install win32-service gem
184016 [waterbowl@gm] I'm trying to install the rubygem for win32-service but can't get it to

install rmagick in win32,but no work
184018 [yangfreecode] i use instantRails 1.0 on winxp.download
184046 [rmagick@gm i] Did you run the postinstall.rb script?
184047 [yangfreecode] yes,
184082 [rmagick@gm i] Did you set up the RubyGems environment?
184182 [yangfreecode] irb(main):001:0> require 'rubygems'
+ 184185 [cyclists@nc ] The 'false' return value from require is meaningless when you're using
+ 184186 [dharple@ge e] Try using it -- just because require returns false does not mean it
+ 184205 [jim@we ri hh] Require returning 'false' does not mean that it has failed.  It just
  184225 [yangfreecode] require 'rubygems'

[QUIZ.SOLUTION] Constraint Processing
184021 [matthew.moss] I had to give this a couple tries before I just broke down and went
184103 [sillito@gm i] I didn't write this for the quiz, but here is a simple csp library

Writing Good #each Methods?
184024 [james.herdma] I'm working my way through The Ruby Course slides at the moment and am
+ 184030 [farrel.lifso] I think an each method should have the following properties
| + 184035 [pbattley@gm ] I'd also add
| | + 184036 [bob.news@gm ] And another one
| | + 184038 [g_ogata@op u] You don't need to -- just yield the array.
| | | 184039 [pbattley@gm ] Oops. You are, of course, correct. If it is just an array, that
| | | + 184040 [pit@ca it in] hash.inject([]){ |acc, (key, value)| ... }
| | | + 184041 [g_ogata@op u] hash.inject([]){ |acc, (key, value)| ... }
| | |   184042 [pbattley@gm ] Thanks! I hadn't thought to try that before. It's definitely going to
| | + 184092 [james.herdma] I'm a little confused by this.  As I understand it, "arity" is the
| | + 184101 [logancapaldo] ...
| + 184093 [james.herdma] Concerning ordered elements, what is the best way to ascertain the
+ 184137 [james.herdma] I've had a few people write me asking about the Ruby Course slides.

Newbie Questions: How to set the proxy to download files by ftp protocol?
184026 [eric.python@] I want to download a log file from the remote server, and I'm outside of

Re: CFD code input preparation form
184028 [julian.kamil] Bil, looking at the linked page, it seems quite obvious to me that the
184096 [Bil.Kleb@NA ] Yes.
184447 [julian.kamil] Sorry for the delay on the reply, Bil, I was tied up with other things

Formatted output for numbers with comma's?
184032 [wink@sa il e] I was looking for a routine to convert a Number to a string with
+ 184034 [gene.tani@gm] ...
+ 184057 [james@gr yp ] def commify( number )
  + 184188 [caldridge@gm] This would be a nice (ruby builtin) method :-)
  | 184851 [steve@as la ] +1 vote as I've needed it quite a bit.
  + 184854 [halostatue@g] ...it's significantly harder to do it completely *right*, though.

FSDB to turn file systems into applications
184037 [i.script@gm ] In search for a simple database system that's also an an universal
184118 [matti.georgi] Generally method_missing magic may lead to infinite recursion loops,

SimpleDelegator vs. simple variable ?
184043 [peter.fitzgi] ...
184058 [james@gr yp ] library.  We tried and tried, but only ever came up with one semi-
+ 184070 [peter.fitzgi] ...
+ 184119 [cohen.jeff@g] Are there ever opportunities for removing features in the library that
+ 184122 [shortcutter@] I'm not so sure about that.  I've certainly used delegator several
  + 184130 [james@gr yp ] We didn't call Delegator a seldom used feature with little purpose.
  + 185012 [peter.fitzgi] ...
    185058 [bob.news@gm ] The difference is whether you have a single instance (which you then
    185107 [peter.fitzgi] ...
    185113 [bob.news@gm ] You're welcome.  The concept is so ubiquitous that any decent book on OO

RDoc Doesn't like quoted symbols
184045 [transfire@gm] When running rdoc against Facets it reports a number of mesages like

Newbie question about the # symbol
184048 [gotascii@gm ] I have just started learning Ruby and I am going through as much
+ 184050 [rmagick@gm i] # is not Ruby syntax, it's a documentation convention that denotes
| 184054 [james@gr yp ] ri even seems to favor this notation.
+ 184051 [rforum@gm il] Basically it means "the instance method kind_of? implemented by the
| 184056 [gotascii@gm ] Ahh ok, excellent thank you that was confusing me quite a bit.
+ 184055 [james@gr yp ] Actually, all the Kernel methods are instance methods, so they can be

Ruby Include Dirs for libs
184049 [madbang@we .] does anybody know which are the default dirs for ruby to search its
+ 184052 [elven@sw rd ] elven@avariel ~ $ ruby -e 'puts $:'
| 184104 [madbang@we .] Ah, nice to know.
+ 184064 [jim@we ri hh] If it is in your gems directory, make sure you require rubygems before

executing a block in the context of receiver
184079 [r.mark.volkm] In the following code the do_this instance method of the foo object
184084 [rossrt@ro co] class Foo
+ 184339 [eastcoastcod] Also,
+ 184343 [dblack@wo bl] But only if you yield self from do_this (just to clarify).  And
  184357 [rossrt@ro co] (Oops, overzealous cut/paste job :) )
  184359 [dblack@wo bl] Interesting -- definitely relevant, too, in the sense that my

popen broken in win32?
184085 [ null@vo d. ] IO.popen("devenv my_solution.sln /rebuild 'release Win32'") do | pipe |
184095 [ null@vo d. ] l_cmd = "devenv my_solution.sln /rebuild 'release Win32'"
184097 [ null@vo d. ] l_cmd = "devenv my_solution.sln /rebuild 'release Win32'"

Vim autoindenting broken?
184099 [progressions] Does anyone else find gVim 6.4 a bit unstable on Windows XP?  It's
+ 184128 [ null@vo d. ] I have not tried 6.4, but I can say 6.3 is fine on XP.  There hasn't
+ 184284 [fugalh@xm ss] I don't know about your situation, but the latter is what it does for me
+ 184694 [pfharlock@ya] I use vim 6.4 all day at work and haven't noticed anything strange, the
  + 184695 [pfharlock@ya] PS, this probably doesn't matter, but I always insert those lines at the
  + 184700 [orotone@gm i] I generally prefer vim to gvim, but on dos I do go to gvim as it can be
    184718 [progressions] Thanks all,

Build for Windows Mobile Failed
184102 [daniel@vo lk] Dear Readers,
184141 [greg.kujawa@] Join the club. I have tried building a WinCE version against Ruby
184169 [daniel@vo lk] Thanks. I googled your tries. It is a bit frustrating as this option is
184201 [greg.kujawa@] As for the sources, from what I've read there was a version of Ruby
184227 [daniel@vo lk] First I'll give the CVS version a try. If this fails I use the cygwin /
184228 [daniel@vo lk] Oh it is going on. By your hint, I searched for PocketRuby and patch and
184252 [greg.kujawa@] I would try Babelfish, although the translations that I try for

Re: Constraint Processing
184105 [jim@we ri hh] Here's some more puzzle solutions using Amb.  This one is the one

Small optimization tips
184106 [vfoleybourgo] I was working on a little script earlier, which I thought was too slow
+ 184107 [charlie@ca t] ...
| + 184109 [james@gr yp ] The Set library is a standard library that comes with Ruby.  I
| | + 184112 [charlie@ca t] ...
| | + 184115 [ara.t.howard] when, oh when, will rbtree be in the core...  sigh.
| |   + 184121 [vjoel@pa h. ] and it would be nice for it to have some more methods, like #slice! (a
| |   + 184126 [james@gr yp ] Isn't it the library someone was complaining is broken in Ruby
| |     184133 [vjoel@pa h. ] Did you mean ruby-talk:183166 ? I've been using rbtree happily on 1.8.4.
| |     184136 [james@gr yp ] Oops, yeah, my memory was poor on that one.  It looks like it might
| + 184113 [vfoley@gm il] and I was using Date.strptime.  Switching to Time.gm increased the
+ 184124 [shortcutter@] ... if it's too slow.
| 184131 [ null@vo d. ] Just clarification: you are saying in-place is faster right?
| 184256 [bob.news@gm ] Right.  But not applicable everywhere (i.e. if you're not allowed to modify
+ 184160 [john.carter@] instead of this...
+ 184249 [vfoley@gm il] I have something else that is probably common knowledge: if you can
  184253 [james@gr yp ] However, if you can replace a few Ruby operations with one

Net::HTML#post_form with ASP
184110 [mksm.sama@gm] I've been trying to use Net::HTML.post_form to POST to a .asp file.
+ 184111 [mksm.sama@gm] Just a note: The Poster class is a Net::HTTP subclass. I was using it
+ 184135 [james@gr yp ] I suspect the fix in that thread will get you going again.
| 184142 [mksm.sama@gm] The fix did not work.I still get the same error. There is some bug here.
+ 184187 [tirado.carlo] The problem is that the receiving end seems to be expecting id in the

Why's Poignant Guide site down?
184117 [r.mark.volkm] Why's Poignant Guide has been unavailable for at least the last couple
+ 184120 [doodpants@ma] That's weird... I've been reading the Guide in the past few days. I
| 184123 [hawkman.gelo] ...
| 184145 [mental@ry ia] As far as I can tell, it's a general server problem.
+ 184132 [Bil.Kleb@NA ] I've been having DNS problems with his sites for the last month
  184151 [mikshir@gm i] I've been wondering why I haven't been able to access this in the past
  184219 [hawkman.gelo] ...

Understanding Variable Naming in Ruby
184125 [rtilley@vt e] I'm trying to better understand how variables are named in Ruby...
+ 184127 [greg.kujawa@] Constants typically are in all upper case characters. Then local
+ 184138 [greg.kujawa@] Here is a nonsensical class that uses class, instance, and local