184129-185612 subjects 184518-413780

Rails and J2EE middleware (threading/servers)
184325 [berlin.brown] A lot of applications have a middleware layer.  In some ways,
184328 [zdennis@mk e] I take the code I need to run separate from rails and set it up as a system daemon. I put all of these in my lib/standalone/
184354 [berlin.brown] That is interesting.  I like that approach.  How does the ruby client
185640 [zdennis@mk e] The client just opens a Socket connection to the server, and sends it instructions. The server takes the instructions, and the

HTTPS with ruby 1.8.4 on Windows?
184326 [axel.friedri] does anybody know, what to do to get HTTPS working with ruby 1.8.4 on
+ 184432 [vanek@ac .n ] This probably doesn't help you much but your code ran for me
+ 186706 [robert.cowha] I got the same problem, same error, works with 1.8.2 doesn't with 1.8.4
  186711 [axel.friedri] Unfortunately, no.

csv nil check and update
184332 [samekh@gm il] Greetings!
+ 184338 [james@gr yp ] csv_filldown.rb data.csv
| + 184341 [samekh@gm il] That does give me some ideas... thanks!
| | 184345 [samekh@gm il] Got it, nevermind!
| + 184375 [samekh@gm il] Ok, obiously I'm doing something wrong again. I am new to both
|   + 184383 [james@gr yp ] newFile = CSV.open(...)
|   + 184385 [chris.hulan@] Do you close the file?
|   | 184424 [james@gr yp ] All open files are closed when the Ruby interpreter exits normally.
|   + 184433 [jeff@sc wa c] Do you need to preserve the redundant quotes in the output?  If not,
|     184449 [samekh@gm il] Sweet... that's certainly an improvement, but as you mention I do need
|     184461 [samekh@gm il] Also, another thing that this should do eventually is to do this for
+ 184346 [chris.hulan@] You have an answer, but since I spent some time on it, here's mine! 9^)
  184374 [samekh@gm il] Thanks, I appreciate it. For some reason the output is the same as the
  184423 [chris.hulan@] It occurred to me this morning (what else am I going to think about on

Using const_missing to do automatic require
184335 [eastcoastcod] I'd like to def const_missing to require the appropriate file, without
184350 [transfire@gm] It's already built into Ruby. Try 'ri autoload'.
184353 [james@gr yp ] Holy cow, I never knew that.  Thanks for the info!
184783 [eastcoastcod] Sorry - that's something else.

Compile Ruby 1.8.4 on HP-UX 11
184363 [CMcDevitt@aa] ...
184421 [vanek@ac .n ] try,

Large, existing database for RoR
184367 [johntwinn@gm] My organisation has a relatively large legacy database that has a java
+ 184369 [julian@co et] Yes, you can specify what the id is.
+ 184370 [lukfugl@gm i] Yes, this is definitely possible. Check out the API docs on
  184371 [johntwinn@gm] that is great Julain and Jacob!! I will have a go and get back if i

Question about return and access control
184368 [fegolac@gm i] I'm reading PickAxe book and just finished reading chapter 3, which
184391 [gmurray@cl u] return <value>  and puts  <value> are distinctly different.

inet_aton / inet_ntoa
184373 [fbettag@qs h] i have a big problem with ruby + inet_aton.
+ 184377 [ara.t.howard] maybe this will work
+ 184397 [cjeker@di ha] require "ipaddr"
  184403 [fbettag@qs h] Thanks to both of you! :)

[SOLUTION] Constraint Processing (#70)
184376 [email55555@g] Just finish my solution, I run out of time to provide an example ...

Printing ruby code
184381 [z4k4ri4@gm i] What is the best way/tools to printing ruby code to a piece of paper
+ 184382 [wilsonb@gm i] I've had good luck with a2ps.
+ 184386 [vjoel@pa h. ] I don't know how this compares with the a2ps version, but here's
+ 184388 [lists@ka am ] This is just off the top of my head, so it may not suit your needs
| 184389 [ken@me as il] That's kind of what I was going to recommend. I use a Drupal blog
+ 184395 [james.herdma] I can't quite help you with your question directly (I just print from
+ 184429 [gk@cu co y. ] Take a closer look, i find it useful!
+ 184616 [phurley@gm i] scite -p <fname>

Chess engine in ruby?
184384 [devlists-rub] I'm a beginning chess player and a beginning Ruby developer :-)  I was
184392 [hal9000@hy e] I don't know of one, but the idea is interesting.
+ 184393 [m.fellinger@] Hey Jeff,
| 184452 [cohen.jeff@g] Thanks for the links.  Unfortunately the ruby quizzes were for
| 184459 [james@gr yp ] I for one would be very interested to see what you could come up with.
+ 184436 [ghalsey@ya o] calculations per second(speed) is a major factor in creating a powerful

add to words syntaxes
184396 [dan@me as .h] Still have a question: I have a txt file with words, seperated with
+ 184398 [Nuralanur@ao] ...
| 184399 [Nuralanur@ao] ...
+ 184400 [rossrt@ro co] Perhaps it's me not being awake properly, but it doesn't seem very clear
  184404 [dan@me as .h] Thanks, for the answers, but didnt worked. I try to clear my problem,
  184406 [angus@qu va ] Well, before you start to loop to fill the "mezo" tags, extract the
  184409 [dan@me as .h] outfile = ARGV.shift
  184411 [angus@qu va ] Why the quotes here? The string is everything between the line following
  184419 [dan@me as .h] Thanks for ALL your support, especially for Carlos. now it works fine!
  + 184438 [dan@me as .h] Thanks for ALL your support, especially for Carlos. now it works fine!
  + 184439 [angus@qu va ] # Set the "input record delimiter" to "paragraph". This is
    184543 [dan@me as .h] ...
    184564 [rossrt@ro co] If I had to do this quickly (and without too much thought) I'd do

RubyCocoa crash
184401 [dt015a1979@m] I am trying to implement a delegate method of NSSpeechSynthesizer as
184412 [jp-www@dc .g] Please report it as a bug on the sourceforge tracker for RubyCocoa. Also,

Re: Constraint Processing (#70)
184407 [chrisgparker] Here is my CSP language.  I have actually been doing this for a class,
+ 184420 [jim@we ri hh] I've been having a lot of fun with this quiz.  Pit Capitain sent me a
| 184428 [james@gr yp ] Oh sure, you would do that after I summarized the trickier version.  ;)
| 184435 [jim@we ri hh] ;)
+ 184430 [james@gr yp ] This is a great glimpse at a more robust solution.  Thanks for

SOAP4R: problems in wsdl2ruby generator
184408 [vshepelev@im] ignored element: {http://www.w3.org/2001/XMLSchema}list

184413 [fbettag@qs h] uhm how to fetch out a RecordNotFound?
184414 [michael.gors] begin
+ 184415 [fbettag@qs h] aaah! Thanks a lot!
+ 184425 [james@gr yp ] rescue ActiveRecord::RecordNotFound

Variant types
184416 [styrmis@go g] My languages lecturer is a fan of a feature called 'variant' in a model
+ 184418 [dblack@wo bl] You're right to call your variable classes, rather than types.  In
+ 184422 [jim@we ri hh] If I understand correctly, it sounds very much like a static lanugage
  184437 [styrmis@go g] Can't a little restriction be healthy? In the lecture last week I could
  184444 [dblack@wo bl] That's a bit like asking whether having strings is a weakness because

TupleSpace#read_all blocks ?
184417 [lapitsky@gm ] Have anyone encountered blocking behaviour of read_all method in

[SUMMARY] Constraint Processing (#70)
184426 [james@gr yp ] Constraint processing is a form of declarative programming which, in the words

Re: RubyCorner a meeting place for the Ruby blogging communi
184431 [jesusrubsyou] As I mentioned in a comment on the RubyCorner blog, some sort of
184505 [anibalrojas@] Yes Pistos we saw your comment at RubyCorner's blog, and we are

[ADV] Next Beta of Rails Recipes available
184448 [dave@pr gp o] The fourth beta of Rails Recipes, Chad Fowler's book or writing real-

ERB question
184453 [rob@la es e.] Can anyone tell me what the difference is in these two statements?  Yes,
+ 184454 [news@wo co .] h is a short form for is a short form for the method html_escape.
| 184456 [rob@la es e.] OK, I guess that's clear enough... but it doesn't actually seem to make
| 184458 [james@gr yp ] <%= h "< & >" %>
+ 184455 [dharple@ge e] RoR has it's own mailing list: http://rubyonrails.com/community

Evaluating the string in a variable to use as a method name
184460 [lists@na bl ] This may be a more generic Ruby question, so I'm going to ask on the Ruby
184463 [bob.news@gm ] You cannot use @attr, @attr is reserved for instance variables.  Also, it's
184469 [lists@na bl ] Gotcha there, I wasn't planning to, it was more to make the variable more
184535 [bob.news@gm ] It's generally preferred to use pieces of code that are syntactically
184585 [lists@na bl ] Thanks, I will do so in the future.  Sorry about confusion that I may have

build 3x3 table from one array
184462 [forest@ni or] I am new to ruby and still haven't got my mind around iterators although
+ 184465 [jesusrubsyou] *snip*
| 184470 [w_a_x_man@ya] puts %w(1 2 3 4 5 6 7 8 9).map{|x| "<td>" + x + "</td>" }.
+ 184466 [james@gr yp ] => [1, 2, 3, 4, 5, 6, 7, 8, 9]
  + 184467 [Daniel.Berge] require 'html/table'
  + 184471 [forest@ni or] Thanks all. The each_slice solution I think will work the best for my
  | 288886 [leonidk@sv t] cass) -
  + 184485 [matthew.moss] Is this standard library?
    184487 [timothy.s.be] Yes, enumerator is part of the standard library.  Go to http://ruby-

Re: rb_gc_mark()
184468 [ericrchr@gm ] I did not have a symbol file available, but I caught an access
185151 [ericrchr@gm ] There is a very strong correlation between this fault and using an

Efficiency vs. simplicity
184472 [noone@no he ] In passing along event objects down a ui hierarchy, I can either modify the

specify a mandatory block parameter
184474 [ null@vo d. ] I think I know the answer to this already, but...
+ 184476 [dblack@wo bl] puts p_str
+ 184477 [jeff@sc wa c] Do you mean something like this?
| 184479 [dblack@wo bl] I think you mean "raise" :-)
| 184490 [jeff@sc wa c] I reiterate:  D'oh!
+ 184559 [ null@vo d. ] "I know, I could just raise my own exception if p_block == nil, just
  184568 [jeff@sc wa c] That's not the same thing.  If you use block_given? as David Black and I
  184915 [ null@vo d. ] I am not saying it *should*, but just curious why specifying a block,
  184917 [dblack@wo bl] It's hard for me to answer, because I don't understand why one would
  185159 [one.three@gm] Blocks are actually objects of class Proc, so if you need to enforce
  185431 [emschwar@fc ] Are you sure?  I did a lot of reading up on blocks lately, and from
  + 185432 [dblack@wo bl] That's correct; the block is a syntactic construct (like argument
  + 185550 [one.three@gm] I'm not sure how blocks are treated internally by Ruby (if some expert
    + 185553 [dblack@wo bl] a.each {|b| puts b.capitalize }
    + 185554 [bob.news@gm ] Actually Eric is right.  They are only objects if you request them to be.

mapping table column primary key in the model file
184475 [ai@em lo ee ] I'm very new to RoR, and am trying to test out the scaffolding bit. I
184478 [cardologist@] This should really be psted on the Rails mailing

Card tricks with Ruby
184480 [grrr@to o. a] So suppose you have a deck of cards, that might have some number of cards.
+ 184481 [james@gr yp ] => ["A", "2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K",
| + 184500 [benjohn@fy h] ...
| + 184546 [francisramme] How does this work??
|   + 184549 [jim@we ri hh] cards.sort { |a, b|
|   + 184550 [farrel.lifso] I think you're confusing the <=> operator needed to mixin Enumerable.
|     184572 [james@gr yp ] Technically, the only method required by Enumerable is each().  You
|     184577 [farrel.lifso] My bad I meant comparable.
+ 184482 [cardologist@] class Array
+ 184483 [dblack@wo bl] def shuffle
+ 184484 [matthew.moss] deck = (1..52).to_a
| 184523 [steve@wa ts ] I find myself constantly pointing this out too.. is anyone else bothered
| + 184548 [dblack@wo bl] Maybe I need more caffeine, but what exactly is the problem you're
| + 184562 [geoffrey.par] dots
| | 184567 [dblack@wo bl] Yes, that's right.
| + 184573 [matthew.moss] I point it out to people who I think may not have seen it before, just
| | 184603 [steve@wa ts ] Well, it's definitely one of the (very) few things that has bothered me
| | 184610 [dblack@wo bl] Can you really stand to look at that?  It gives me the same feeling as
| | + 184613 [matthew.moss] As part-mathematician, I whole-heartedly say, "Yes!"  It's a compact,
| | + 184702 [steve@wa ts ] That you had to invent that mnemonic device just to remember what they
| + 184678 [benjohn@fy h] I like being able to express either. I often don't remember which is
|   + 184698 [jim@we ri hh] The dots *do* go a bit further ... far enough to push the last value
|   + 184716 [cyclists@nc ] "When you see that third dot, imagine opening the accordion slightly.
|     184745 [danielbaird@] ...
|     399484 [lists@ru y- ] I googled "we'll let the sky eat it" to see where else on the internet
+ 184486 [wilsonb@gm i] How about this as a starting point?
+ 184553 [dblack@wo bl] I have to say, it only dawned on me just now that it's kind of funny

Full Time Ruby Position in Provo, UT
184489 [pat.eyler@gm] FamilyLearn, the developer of exciting family and personal history

Delayed File I/O & ZLIB - Any help would be appreciated
184491 [bcorrigan78@] Folks,
184501 [jeff@sc wa c] Are you sure that's not printing anything?  It should be print exactly
184575 [bcorrigan78@] hey Jeffrey,
184578 [bcorrigan78@] Ok, well I figured out part of the issue.  The CSV file isn't being
184581 [aglarond@gm ] The CSV::Writer::generate doesn't implicity close the file you've

Re: Programming challenge: wildcard exclusion in cartesian products
184493 [sa-spamnotha] cp[2;3;,0 -1 1]
+ 184604 [cretin@de .a] That one goes a long way as a proof of eg evolution theory, you know,
+ 184727 [wkehowski@co] "This is where K starts to set itself from apart from most of the
  184748 [jo@du ch ol ] Doesn't sound too different from what closures do. Or lazy parameter

Ruby 1.8.4 binaries for Win32 are available here
184494 [nospam@no pa] * File: ruby-1.8.4-i386-mswin32.zip (6,950KB)
+ 184515 [ml.chibbs@gm] This used to be true, but start with 1.8.4, the one-click installer
| + 184829 [znmeb@ce ma ] Speaking of Ruby/Rails and Windows, what are the chances of getting a
| | 184833 [ml.chibbs@gm] That's (pretty much) what Instant Rails is, (http://instant
| + 186077 [znmeb@ce ma ] Speaking of Ruby/Rails and Windows, what are the chances of getting a
+ 188376 [jamies@di it] Can I use these to upgrade my 1.8.4?
  188396 [logancapaldo] ...

csv updater
184497 [samekh@gm il] Greetings!
184517 [james@gr yp ] csv_filldown.rb test_data.csv
184621 [samekh@gm il] Cool, the puts command works, but when I tweak it to output this to a
184630 [james@gr yp ] If you go back and look at my last message, I used the puts version
184634 [samekh@gm il] to create a file (using redirection).  That's a pretty flexible
184635 [james@gr yp ] ruby csv_filldown.rb  # <= this just prints to the screen

rake rules question
184499 [itsme213@ho ] I am using RMagick to do multi-stage processing of some images.
184511 [jim@we ri hh] It will work.  The attached Rakefile will demonstrate the principle.
+ 184512 [jim@we ri hh] [... Rakefile example elided ...]
+ 184627 [itsme213@ho ] Thanks, Jim!

ANN: Third Drop of RubyCLR
184506 [drjflam@gm i] ...
+ 184507 [transfire@gm] Sound like this is really coming along. I wonder does the project have
| + 184508 [drjflam@gm i] ...
| + 184531 [thibaut.barr] a .NET assembly is what you get when you compile a .NET (C#, VB.Net...)
|   184540 [transfire@gm] Thanks Thibaut. So they are like DLLs.
+ 184510 [cohen.jeff@g] Sounds great, John.  I can't wait to start playing with it this weekend.
| 184526 [robert.feldt] John, does this address my earlier comments about being able to create
| 184569 [drjflam@gm i] ...
| 184571 [robert.feldt] Ok, I will take a look. Any you are using Komodo for all this dev?
| 184582 [drjflam@gm i] ...
+ 184586 [daniel@vo lk] As .NET should be portable (I never tried it), are there any chances to
| 184602 [drjflam@gm i] ...
| 184631 [daniel@vo lk] I don't have any experience but I'll try tomorrow (uuh, the big trial
| 184720 [daniel@vo lk] *g* Oooh yes, I've no experience. The package is cool and works as
+ 184685 [hal9000@hy e] Very interesting. Thanks for your hard work.
| 184778 [drjflam@gm i] ...
+ 184733 [ssmoot@gm il] This is very, very cool! Thanks!

removing diacritical marks
184513 [mail@pa lb r] ...

Re: Small optimization tips - gcc-4.1 ruby1.9 -O3
184514 [john.carter@] Use ruby-1.9 it is faster.
+ 184563 [pat.eyler@gm] There was a good article on using profiling information to optimize GCC
+ 187740 [drbrain@se m] 7660]