169082-171160 subjects 169501-171217

^ Syntax checker?
169314 [williamerubi] Ruby doesn't seem to check for class names, function names, and so
+ 169317 [ruby.brian g] That is actually impossible, as the system can not determine which
+ 169318 [pat.eyler gm] I'm not sure I understand your request, but are you looking for ruby -c script?
+ 169323 [pit capitain] if you call the ruby interpreter with the -c command line option, then
  169339 [williamerubi] Thanks for the explanation.  But there certainly could at least be a
  + 169342 [walsha2000 h] I agree. This bites me all the time too. Even old VB had "Option
  + 169343 [tanner.burso] That's the exact scenario that unit tests are great for, finding issues in
  | 169353 [williamerubi] Well sure, but for a quick and dirty one-off script, that you're
  | 169357 [james graypr] Are you sure?  I'm not.
  + 169351 [jamis 37sign] At the risk of sounding pedantic, Test Driven Development really is
  | 169356 [williamerubi] At the risk of repeating myself, it seems to me that for one-off
  | 169370 [jim weirichh] Test Driven Design (TDD, aka Test First Developement) are techniques
  | + 169375 [williamerubi] Thanks! I'll check them out.
  | + 169420 [james graypr] Ron Jefferies is blogging some Test First Development in Ruby for
  | + 169672 [williamerubi] ("That last one" being the "Craftsman").
  |   + 169696 [mental rydia] Yow.  Programming-as-alchemy.
  |   + 169725 [jim weirichh] Remember,
  |   + 169726 [akonsu gmail] this is a test driven learning i suppose. not a development. ;-)
  + 169378 [rosco roscop] # russian roulette
    169668 [williamerubi] You're asking it a question - "does FileUtils exist or not" - that it
    169847 [rosco roscop] Well, I don't see how it could really do that, without executing all code
    170541 [williamerubi] By saying "foo might be undefined at line 2351".

^ small question about ruby -c
169319 [pat.eyler gm] interesting little bug (I think)
+ 169324 [phurley gmai] I can't see your code, but my guess is that the ruby interpreter
+ 169325 [pit capitain] Pat, this isn't a syntax error. The *syntax* is correct. Just define a
+ 169349 [mental rydia] Basically, it's not a syntax error.  It's possible for a script to

^ Ruby newcomer
169326 [b.trapp gmx.] I'm totally new to ruby (and don't have much experience with
+ 169328 [james graypr] What part are you having trouble with?  Dive right in and then just
+ 169330 [peter semant] Firstly you gain ten points for being honest and telling us that you are
+ 169332 [ef alum.mit.] Asking a mailing list to do your homework for you is poor form.  I
| 169335 [b.trapp gmx.] I'm sorry if you felt like i'm trying to get the code from you! That
| + 169338 [leavengood g] As others have said, use Google or whatever materials your teacher has
| + 169433 [M.B.Smillie ] Some slightly different answers besides "google it", that I've given
+ 169384 [ruby.stuff g] ...
  169438 [Paul.McArdle] Have a look at the Ruby Quiz site.
  169606 [chris pine.f] Well, it won't help you with your homework, but if you're looking for

^ Full-time Position Available in CA
169334 [adoughten at] opportunity; please feel free to email me with any questions. If you are

^ Difference between rb_define_module_function and rb_define_singleton_method?
169337 [drjflam gmai] Is there a difference between calling rb_define_module_function and
169341 [decoux moulo] rb_define_module_function() make the 2 calls
+ 169346 [drjflam gmai] Thanks!
+ 169348 [leavengood g] And this allows the given method to be called with both the module as

^ require "../foo"
169345 [boris boris-] lib/foo.rb
169359 [bob.news gmx] I assume, files in settings contain info that is specific to your code in
169454 [boris boris-] These settings are not meant to be used by the user, but by the progammer. I've
169563 [bob.news gmx] The programmer in this case is the user of your lib.

^ Oniguruma -- when?
169354 [rubyhacker g] When does Oniguruma go into Ruby? I thought it
169360 [james graypr] I believe the official story is Ruby 2.0.
169371 [ptkwt aracne] I believe you can use oniguruma now in 1.8.3 if you compile-in the support for
+ 169372 [james graypr] This is true.  You can.  It's just not the default yet.
| 169391 [akonsu gmail] i am sorry, what is oniguruma?
| 169393 [james graypr] A nice Regular Expression engine Ruby can use.  It's more full
+ 169442 [joevandyk gm] I think that's the right approach.  1.8.x releases shouldn't break

^ tutorials on accessing Java from Ruby?
169374 [rdm cfcl.com] There are several substantial Java packages that I'd like to
169398 [rosco roscop] Ross Bamford - rosco@roscopeco.remove.co.uk

^ running ruby within jEdit
169380 [davemontalvo] is this possible? i've got the ruby plugin installed and I want to be
169564 [ffsnoopy gma] You can use the console plugin to execute your ruby scripts and all
169571 [davemontalvo] thanks mitchell. works pretty well.

^ Newer to Ruby
169386 [bedeviledme ] trying to learn as fast as I can.
+ 169389 [james graypr] => [5, 6, 1, 2, 5, 4, 7, 1, 1]
| + 169394 [caleb aei-te] ( [rand(6)+1] + Array.new(8) { rand(10) }).to_s.to_i
| + 169396 [bedeviledme ] Thanks a lot.  This will more than do.
+ 169390 [ dez mac.com] rand(700000000)
| 169405 [dblack wobbl] That won't always give you a nine-digit number (I'm assuming that
+ 169411 [jeff.darklig] number =3D ( rand( 599999999 ) + 100000000 )
| 169413 [jeff.darklig] heh. sorry d.black didn't see you'd already posted it.
+ 169480 [rcoder gmail] Just out of curiousity, what is the basic test case for this? I only
+ 169486 [rcoder gmail] Just out of curiousity, what is the basic test case for this? I only
  170629 [bedeviledme ] That is exactly what I need to use it for.  The site I am supposed to

^ Problem (probably newbie) with install (openssl)
169392 [andrew acook] Please can someone help.  I'm trying to install Ruby (1.8.3, just
169395 [andrew acook] ../configure
169402 [andrew acook] ok, i needed to explicitly set --with-openssl-dir=....

^ DRb connection issues
169399 [blargity gma] This is not a DRb problem, so much as a system configuration problem.  I know
169448 [drbrain segm] Your ping host names and druby URI host names do not match.  Try ping
169621 [blargity gma] Thanks for the reply!
169774 [drbrain segm] localhost.localdomain localhost
+ 169777 [caldridge gm] root# hostname --fqdn
| + 169832 [blargity gma] This is before the modifications that Eric so kindly gave that I will try
| + 169890 [blargity gma] Ok, for others following this thread, the problem was Firestarter.  I had a
+ 169888 [blargity gma] That is exactly the content of both /etc/hosts files (with some ipv6 stuff and

^ What's your opinion? ArachnoRuby, Komodo, Eclipse/RDT, RadRails, etc.
169400 [curt.hibbs g] There's been a couple really good threads that are still ongoing about Ruby
+ 169403 [Daniel.Berge] Komodo Pros:  Very nice UI, with intellisense, code folding, good (if
| 169406 [jeff.darklig] Big plus for Arachno... I LOVE it's multithreading debugger ... it's nice t=
| 169407 [jeff.darklig] All meaning Eclipse/RDT , KOMODO, & Arachno ... ( plus I use xemacs on linu=
| 169408 [curt.hibbs g] This reminds me of one more thing... Let me know what platform you are
| 169409 [jeff.darklig] the other platforms ... meaning ?  *nix, bsd, etc ? or xp/nt/2k ( i know no=
+ 169415 [steve waits.] I messed with RDT, but, Eclipse has been ugly bloatware (this thread is
+ 169436 [rosco roscop] So far I've stuck with Eclipse, I used Java / C++ tooling previously so
+ 169659 [rob.02004 gm] I use the jEdit Ruby Editor Plugin (http://www.jedit.org/ruby/) for
+ 169678 [gene.tani gm] OK, promoting OS X snobbery, but i think of the (small) group of
  169682 [curt.hibbs g] Actually, I'd say that ArachnoRuby throws up a lot of colors. Komodo is
  169691 [gene.tani gm] i use the dark background Komodo default, the white background default

^ RubyScript
169410 [dpersik gmai] I have done some searching on the web and have found very little about
+ 169414 [dandiebolt y] RubyScript. Any browsers support this?
| + 169416 [batkins57 gm] Of course, this will only work if the user has RubyScript installed on
| + 169419 [lukfugl gmai] I tried it in IE6 (Version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519),
|   169421 [dandiebolt y] That is the exact version of IE6 I have so there must be another issue at play.
|   169430 [lukfugl gmai] Possibly you already have some RubyScript plugin installed?
|   169435 [dandiebolt y] Of course you have to install it - you only get VBScript and JavaScript functionality out of the IE box.
|   169447 [lukfugl gmai] Well, I think that's what the OP was referring to, whether any
|   + 169461 [dandiebolt y] In all practical terms you are stuck with JavaScript on the client.
|   | 169465 [logancapaldo] I think he was pointing out that javascript is actually quite a
|   + 169464 [tsumeruby ts] I disagree with being stuck with javascript. People are stuck with javascript
|   | 169535 [blargity gma] There is a difference though.  PHP is server side, so migrating away from it
|   | 169580 [perrin apoth] four words: code that degrades gracefully
|   + 169478 [james_b neur] The poorly-named Prototype.js helps hide developer interaction with
|   + 172185 [dpersik gmai] Maybe a replacement to JavaScript is what Google had in mind when
+ 169456 [james_b neur] JavaScript may be sweeter than you know.

^ Rails and PostgreSQL
169422 [colinfreas g] I'm trying to get Rails up and running using a PostgreSQL database, and
+ 169424 [batkins57 gm] What output do you get when you run "free" in a shell?
+ 169426 [joevandyk gm] Rails-specific questions should go on the Rails mailing list.
  169511 [colinfreas g] Roger that, Joe.
  169513 [jeremy bitsw] gem install postgres
  169596 [robby.lists ] Same here!

^ Standard Library questions
169423 [joevandyk gm] I'm spending an hour or two today going through Ruby's standard
+ 169427 [joevandyk gm] Also, there's hardly any documentation for Tracer.  Had to look it up
| + 169431 [james graypr] James Edward Gray II
| + 169437 [kyosuke sezn] What about this? ;-)
| | 169439 [batkins57 gm] Yeah, I think no documentation for any of the methods would certainly
| + 169443 [gregory.t.br] [olympic]$ irb
| | 169463 [james graypr] I already answered this question once in this thread.  ;)  Here's
| | 169507 [gregory.t.br] I saw this, read this, some how skipped to the wrong page, and said,
| + 169449 [drbrain segm] Get a CVS checkout of HEAD and add the documentation to the
| + 169458 [james_b neur] Hang out on ruby-doc or ruby-core  mailing list; I believe you can post
+ 169428 [jeremy bitsw] Consider a cache whose entries are ok to be garbage collected.
+ 169429 [james graypr] That's one of my favorite pass times.  Are we uber geeks or what?  ;)
  169434 [joevandyk gm] Ah, ok.  That info could go in the RDoc.

^ code execution from file?
169440 [akonsu gmail] i have a text field in a database table (a text file, generally
+ 169441 [akonsu gmail] please forgive the term "class with a static method", i meant "class
| 169490 [rcoder gmail] There are a number of mechanisms to "lock down" the execution for a
| 169661 [akonsu gmail] is there a way in ruby to set up a hook that would intercept calls to
| 169856 [vanek acd.ne] The Facets library has a lot of cool methods,
+ 169460 [ara.t.howard] def run file, vars = {}
  169482 [akonsu gmail] thank you very much for your help.
  169498 [ara.t.howard] but what if the user code creates one?  it's the only way to isolate $SAFE and
  169536 [akonsu gmail] putting aside security issues i think i was able to isolate my
  169608 [ara.t.howard] this still leaves things like Object in scope.  to truely isolate yourself
  169656 [akonsu gmail] i understand abouth threads. i think i am just researching the problem

^ Re: What's your opinion? ArachnoRuby, Komodo, Eclipse/RDT, R
169451 [janchrister.] I've tried the following on Win XP
169453 [jeff.darklig] uh ... as far as "he is offering the same stuff for perl, php, and python"
169455 [janchrister.] ...checking the web site. Yes, you are right. In that case I think he

^ They say I write Ruby like Perl
169466 [slitt earthl] (http://www.troubleshooters.com/projects/Node.rb/index.htm), and I've been
+ 169469 [slitt earthl] ./testnode_parse < test.otl | less
| + 169477 [mike stok.co] def setAttributes(attribs) @attribs = attribs; end
| + 169479 [djberg96 gma] * No need to subclass Object.  All classes inherit from Object
| + 169600 [daniel.schie] Notice that I've substituted your tabs with two spaces and that I've
|   + 169602 [mental rydia] Well, that's one to be careful about.  If you omit the parenthesis
|   + 169635 [clr10.10.ran] #!/opt/ruby/1.8/bin/ruby -w
|     169663 [elf drizzle.] So the wording is "Variables are created when they're first
|     169734 [penryu saiyi] Perl takes this a bit farther, and calls it autovivification.
+ 169470 [logancapaldo] Well with merely skimming your code, I would suggest replacing
+ 169474 [dblack wobbl] For style things (avoiding camelCase for methods and local variables,
+ 169484 [leavengood g] This definitely doesn't look like idiomatic Ruby, and here are a few
| + 169530 [penryu saiyi] This recurring label "CamelCase" (or sometimes "camelCase")
| | + 169534 [penryu saiyi] Nor for method names.
| | + 169537 [blargity gma] Why?  CamelCase simply refers to the humps that appear in the middle of words
| | | + 169548 [dandiebolt y] I Variables and methods should be written in snake_case
| | | + 169649 [penryu saiyi] Ah. Now it all makes sense.  Thanks!
| | |   169730 [mreed theree] Yeah, the term "camelCase" doesn't have anything to do with Perl, and I don't
| | |   169826 [francois bag] when in Ruby do as the Rubyists do, or don't if it bugs you.
| | |   169851 [slitt earthl] Yes, and I'd like to thank everyone who gave me their ideas. Most of the ideas
| | |   170197 [gwtmp01 mac.] Just capture the blocks into Proc objects and use Proc#call to invoke
| | + 169539 [dandiebolt y] Yahoo! Shopping
| | + 169561 [slitt earthl] [clip]
| |   169568 [snowzone5 ho] the o'reilly "programming perl" book features a camel on the front.
| |   169650 [penryu saiyi] Yeah.  And it's commonly called "the camel book".  Also,
| + 169570 [chrisgame ex] Who says? Just a style/convention issue surely. Readability doesn't
|   + 169573 [dblack wobbl] "Just"? :-)  You're right, though, in the sense that the parser
|   + 169577 [james graypr] It's not a syntax rule of Ruby, no.  But part of learning a language
|   | 169582 [rjseagraves ] I'd be interested to know *why* it is a language convention, and more
|   | + 169584 [perrin apoth] More to the point, from my point of view, it's easier to type without
|   | | 169592 [joevandyk gm] Don't see how using lowerCamelCase uses less keystrokes than
|   | | 169598 [francois bag] lower<shift>camel<shift>case
|   | | + 169601 [joevandyk gm] doh, you're right.  i need my coffee.
|   | | + 169622 [perrin apoth] Thanks for saving me the extra typing.
|   | |   169628 [dblack wobbl] Definitely.  "Readability", in my opinion, has turned out to be a
|   | |   169633 [perrin apoth] Well . . . there are some pretty much objective measures of readability.
|   | + 169589 [francois bag] conventions make it easier for collaboration. If you are not interested
|   | + 169590 [james graypr] We feel exactly the opposite.  That's your *why*.  ;)
|   | | + 169697 [ezra yakimah] I have also heard that the underscore_name technique is easier for
|   | | | + 169701 [rdm cfcl.com] Taking things a bit further, is there any reason why one shouldn't
|   | | | | + 169707 [dblack wobbl] Underscores are allowed in constant names, but they're usually used
|   | | | | + 169736 [perrin apoth] Probably not, but it would confuse the heck out of my fingers.
|   | | | | + 169836 [chneukirchen] It would remind people too much of Ada.
|   | | | + 169731 [mreed theree] I'd say, rather,
|   | | + 169781 [Mail Jonas-H] I share this, and I think ruby capable editors could be told to gray out underscores within variable and method names. (so that they are visible but can be easily ignored while reading).
|   | | | 169843 [kero chello.] raise BrainDamagedException(Java)
|   | | + 169784 [rdm cfcl.com] *  Code is written once, but may be read many times.
|   | + 169627 [dblack wobbl] When using Ruby, it's best to think of yourself as "raised with Ruby".
|   | + 169737 [penryu saiyi] As Ezra stated elsewhere (and as frequently stated in the Perl
|   | | 169739 [rjseagraves ] I didn't think about that.  I suppose Ruby's multi-lingual origins and
|   | + 170283 [eeklund gmai] I'll say why I tend to insist on it: Because more or less any
|   | + 170286 [jim.mcfarlan] I was "raised" on C and then went to Java and am now learning Ruby, so
|   + 169583 [agorilla gma] Personally, I think readability does suffer.  The wordier it gets, the
|     169597 [slitt earthl] This is a special case of the Node.pm/Node.py/Node.rb tool. I wanted the
|     169625 [perrin apoth] "If you ever want to really understand a problem domain, one way is
|     169645 [slitt earthl] None at all -- use it in good health, as long as others are also allowed to
+ 169491 [ara.t.howard] class Node < Object
+ 169504 [rampant gmai] def rvExit(checker, level)

^ How to capture PrettyPrint output to string?
169485 [listrecv gma] I'd like to capture the output of pp (PrettyPrint) as a string, as
+ 169487 [leavengood g] require 'pp'
+ 169492 [nobuyoshi.na] dump = PP.pp(myvar, "")
| 169499 [ara.t.howard] i usually use
+ 169497 [gsinclair gm] want.  You can examine the implementation on the website.