382265-405482

382050-397936 subjects 382483-384379

Bounty Request: small sample autoconf-like app/lib
382265 [luislavena@g] This request might sounds weird, but I'm working on a small project
382270 [b.candler@po] Does it have to be a shell script? Could it be in ruby? Have you looked
382280 [luislavena@g] The idea is that mimics as close as possible what autotools
382289 [b.candler@po] OK. It seems like you're saying you want someone to rewrite autoconf for
382305 [luislavena@g] No, I'm not saying recreate autoconf, that is not the idea. I don't

Help me understand this SIMPLE Ruby code, using puts in a def
382266 [fs_tigre@ho ] I was practicing ruby and accidentally came across something that got me
+ 382267 [sduncan@we a] This is where irb is handy. The short of it is that in your first
+ 382268 [roger@ro er ] The return value of the "puts" method is always nil, not the string it
+ 382269 [cyril_jose@y] => nil
+ 382279 [fs_tigre@ho ] Got it.  Thank you all very much for your help!

Re: [RubyInstaller] Bounty Request: small sample autoconf-like app/lib
382271 [now@bi wi se] I would suggest that you read
382273 [luislavena@g] utomake_libtool
382373 [justincollin] Given your many contributions to the community, I think it's fine if you

Hash pointing to reference of itself!
382284 [crazedcougar] Hey!
382286 [josh.cheek@g] You can't do that, that would require variables being able to point to other

Best Play of Online Soccer Betting  here at All You Bet
382288 [allyoubetspo] Learning how to bet is the basic thing in order to avoid mistakes and

Is everything object ?
382292 [aef1370@gm i] A very important principle in Ruby is that every thing is object.
+ 382293 [roger@ro er ] Methods always belong to a class in Ruby, but they are NOT objects (I
+ 382294 [shyouhei@ru ] °»Or else it doesn't, you know. The name of the song is called °∆Haddocks' Eyes.°«°…
+ 382295 [shortcutter@] That wording does not really make sense.  You probably mean that every
+ 382296 [josh.cheek@g] Those are methods, the Ruby interpreter uses syntactic sugar to make them
| + 382306 [code@ap th o] ",
| | + 382307 [roger@ro er ] I can not completely agree with that. One reason why methods should be
| | | + 382308 [mikaa123@gm ] - Object are tangible things capable of processing -> composed of methods
| | | + 382319 [code@ap th o] Use callbacks for that.  They work great.
| | + 382318 [josh.cheek@g] Sorry, I wasn't very clear, it's a difficult subject to talk about because
| |   382334 [code@ap th o] Oh, you're talking about boolean operators.  I thought you were talking
| |   382347 [josh.cheek@g] I think of operators as methods. Probably the best term for those is
| |   382356 [code@ap th o] Thinking of them as methods is probably a bad idea.  It may lead you to
| |   382361 [josh.cheek@g] Can you be more explicit? They are methods, I don't understand what you
| |   382395 [code@ap th o] Non-method operators are not methods -- by definition.
| |   382416 [josh.cheek@g] That's because methods are invoked by default, as I already stated. You need
| |   382429 [code@ap th o] eed
| |   382431 [code@ap th o] A little elaboration . . .
| |   382433 [josh.cheek@g] I like that distinction, the message is :end_upcase, and the method is the
| |   382440 [code@ap th o] Nah.  The method is an expression -- often a complex expression composed
| |   382444 [mikaa123@gm ] I like Chad's explanation.
| |   + 382445 [dukeofperl@m] I've dabbled with Smalltalk and Self, and so his explanations of the
| |   | 382449 [code@ap th o] Relevant to this, Kent Beck is reputed to have said "I always knew that
| |   | 382453 [dukeofperl@m] Too bad the replacement process can't be speeded a bit.:)
| |   + 382447 [subscription] Well, you can consider that the state of method includes its name =
| |     382450 [code@ap th o] Not really . . .
| |     382451 [subscription] That really comes down to implementation details -- in Smalltalk, name =
| + 382333 [b.candler@po] I think it's reasonable to say that most operators in Ruby are in fact
|   382338 [cmdjackryan@] But they are syntactic sugar for the syntactic sugar (except for "=",
+ 382309 [bbxx789_05ss] I have never found that claim to be important in any language.   Whether
| 382336 [code@ap th o] It seems pretty unimportant until I try to interact with something as an
| 382348 [bbxx789_05ss] (1, 2, 3).send(:ancestors)
| 382357 [code@ap th o] puts.extend Enumerable
+ 382332 [stu@ru yp og] Everything is a sender and receiver in ruby. The operators you list
+ 382363 [justincollin] Actually, "everything is an object" is probably a mantra Rubyists should

Best gem for an existing mysql database
382297 [iainspeed@gm] I've an existing MySql database, and not having used any of the major =
+ 382331 [joelvanderwe] Sequel and AR will both let you drop to the SQL level, if the model
| 382342 [iainspeed@gm] whether the ORM layer supports the schema. IIUC, AR doesn't support =
+ 405482 [lists@ru y- ] Iain

writing csv into file
382298 [marineforlif] lot and just can't see where is the problem..
382301 [shortcutter@] IMHO this is sufficient as XPath: '/*/*[1]/*'

where's the best place to dynamically add singleton method?
382300 [iainspeed@gm] If I've got a simple bit of initialisation code
+ 382303 [shortcutter@] to monkey patch the Blah library) where's the best place to do that? I know=
| 382761 [iainspeed@gm] want to monkey patch the Blah library) where's the best place to do =
| 382773 [shortcutter@] I'm glad to hear that we could help you.  Thank you for letting us know!
+ 382304 [kresimir.boj] I think you can achieve functionality that you desire by using mixins,

Initialize Struct from Hash
382310 [b.candler@po] I just want to check I've not missed something here. Is there a built-in
+ 382311 [jgabrielygal] ruby-1.8.7-p334 :001 > K =3D Struct.new :id,:timestamp
| + 382313 [jgabrielygal] Sorry, I just realized this is not what you want.
| + 382315 [bbxx789_05ss] K1 = Struct.new :foo, :bar
|   382316 [jgabrielygal] Yep, I know. How about this?
+ 382335 [b.candler@po] Thanks for all the feedback, at least I know I hadn't missed something
  382339 [joelvanderwe] Tangentially, I wonder if anything like the following (very rough proof
  + 382369 [shortcutter@] irb(main):004:0> h =3D {:foo =3D> 1, :bar =3D> 2}
  | 382387 [joelvanderwe] That's intended: #structify is supposed to turn a hash into something
  + 382371 [b.candler@po] That's neat. However you'd have to make sure you've set a value for

calling methods, beginner help
382312 [liquid98@gm ] $xarray = [10,10]
+ 382314 [mbj@se ni .n] When you want to add the method #product to the Array class you have to
+ 382317 [bbxx789_05ss] Don't EVER use global variables.  Never, ever, ever, never.
+ 382321 [liquid98@gm ] Thanx for your answers. I know: never use global variables ... and no
| + 382323 [bbxx789_05ss] Whoa, you can use monkey patching if you follow some guidelines.
| + 382324 [mbj@se ni .n] Hola,
| + 382337 [b.candler@po] One way to share common code is using a module, and including it into
+ 382329 [liquid98@gm ] Program background == 4 weeks ruby
+ 382341 [liquid98@gm ] Now I see, this is what i was looking/hoping for...
  382368 [b.candler@po] There are no procedures in Ruby - only methods.
  382375 [liquid98@gm ] 'Proc' is a abbreviation of procedure isn't it?
  + 382391 [b.candler@po] No, it's a Proc :-) A Proc object can either be a block crystallised
  + 382398 [stu@ru yp og] The etymology of Proc and proc is procedure. The word Procedure is

gem list --pre : 404 error?
382330 [rochkind@jh ] rubygems 1.7.2, ruby 1.8.7.
382343 [luislavena@g] gems.rubyonrails.org.

PRAWN- How to give a background color to a bounding_box?
382344 [tatar585@ya ] I am working with Prawn to create pdf files. I am trying to give a
382345 [tatar585@ya ] I am working with Prawn to create pdf files. I am trying to give a

Ruby Beginner Need Help..
382350 [didinna@gm i] I just installed ruby on my ubuntu, I use this following command to install
+ 382351 [stu@ru yp og] ruby has a package manager built in called gem
+ 382352 [bbxx789_05ss] You want to get a text editor that does automatic line indenting.  Then
| 382354 [didinna@gm i] Thank you for all answer.
| + 382358 [stu@ru yp og] I believe that is what your looking for.
| + 382359 [josh.cheek@g] I think that some PHP ideas don't translate directly to Ruby (I don't know
| + 382360 [code@ap th o] There's about a dozen different ways to do that.  The most common is
| | 382364 [didinna@gm i] Thank you for precious answer, I feel increased in my knowledge :).
| | 382390 [bbxx789_05ss] Yes.  Josh Cheek described the difference between php and ruby
| | 382422 [didinna@gm i] Thanks Josh, Justin and 7stud :-)
| + 382362 [justincollin] This depends on how comfortable you are with setting up Apache and what
|   + 382365 [stu@ru yp og] To install rails you will need sqlite3 installed( though you can use
|   | 382370 [didinna@gm i] Over all I have succedeed install rails on my laptop, when I do
|   | 382372 [justincollin] You need to install the sqlite3-dev package via apt-get, then try
|   | 382384 [josh.cheek@g] I seem to recall that Rails didn't work with 1.9.1
|   + 382526 [badlands_200] ...
|     382769 [badlands_200] ...
+ 382464 [bbxx789_05ss] I would use ruby 1.9.2.  There are enough differences that you should

rubygems down ?
382367 [michel@de az] Updating installed gems
+ 382378 [cmdjackryan@] It's not RubyForge that is down, but the server (production.s3.etc)
| 382381 [michel@de az] Thx Phillip.
+ 382382 [luislavena@g] Can you browse rubygems.org and download gems from the browser?
  382442 [michel@de az] Thanks for your help, Luis. I am at home, no proxy.

Need for speed - array operations
382374 [chris.lervag] Im working on a library to decode medical image files, and some of these
+ 382379 [ralf.mueller] You might try narray: http://narray.rubyforge.org/. It's available as a gem.
| 382380 [shortcutter@] em.
+ 382383 [chris.lervag] Robert,
+ 382407 [chris.lervag] Turns out the each_with_index iterator is INSANELY slow on ruby1.8 on
+ 383401 [iamexile@gm ] I'm experience the loss of speed in NArrays. Did you guys tried benching
  383404 [joelvanderwe] It's too simple a benchmark to demonstrate the efficiency of narray.

Beginner - please help me to solve this issue
382385 [naina.sydney] Any idea why DB time is more here? Please help me how can I proceed
382412 [naina.sydney] Okay, found the answer. We are using Solr, and frontend is querying solr

real life audio data transmit & recive
382393 [adn_ami@ya o] i have installed a gnu radio companion in linux ubuntu 10.4 with USRP2
382397 [cmdjackryan@] Phillip Gawlowski
382399 [serialhex@gm] philip!! that fscking rocks!!!
382404 [stu@ru yp og] ...

must "explanation" {.test.} style not working in my unit tests
382394 [vahagnh@gm i] undefined method `must' for StackTest:Class (NoMethodError)
+ 382436 [vahagnh@gm i] Ping...
| 382441 [code@ap th o] I, for one, see your messages to the list -- but I do not use that syntax
+ 382443 [serialhex@gm] are you including that code at the top of your test file? or at least having
+ 382531 [vahagnh@gm i] @Chad: cheers!

How do I read HTTP POST XML sent to CGI?
382401 [aumart@gm il] I am a ruby newbie and tried to use a http client to send the XML HTTP
+ 382402 [bbxx789_05ss] Post a ruby program that is 10 lines or less for which you have the same
+ 382405 [jgabrielygal] Are you using the cgi library from the stdlib?
+ 382408 [aumart@gm il] Thanks all, does that mean if I POST
| 382410 [code@ap th o] Show us an example of how you're posting the data.
+ 382409 [code@ap th o] Use the CGI library.
+ 382417 [aumart@gm il] and simply post Text input with the Method and URL specified only.
| 382418 [bbxx789_05ss] Post your ruby code.
+ 382419 [aumart@gm il] well... i only followed the instruction. trying to see if those
| 382420 [bbxx789_05ss] Post data is sent to the server as name/value pairs.  Maybe your
+ 382423 [aumart@gm il] Sorry about misleading, I think my problem is that I cannot get any POST
  + 382425 [dukeofperl@m] Duke
  + 382430 [code@ap th o] =20
  + 382463 [bbxx789_05ss] Do you have to use that request software?  You can easily test whether

Building extention with multiple classes
382406 [rshinn@mo an] I have been successful at building a ruby extension that contains one
+ 382414 [joelvanderwe] void
+ 382540 [rshinn@mo an] Thank you very much. Most helpful.

[ANN] test-loop 12.0.4
382411 [sunaku@gm il] test-loop - Continuous testing for Ruby with fork/eval

A Code Point's Tale: There and Back Again
382426 [cmhoward@fr ] This is probably obvious in the docs and I'm just missing it, but here
+ 382428 [color.circle] I hope this is what u r looking for
+ 382435 [markus@fi ch] $ irb
+ 382471 [bbxx789_05ss] #encoding: UTF-8
| 382472 [bbxx789_05ss] Someone else blogged in great detail about all the intricacies of ruby
+ 382474 [bbxx789_05ss] Maybe each_char() will work for you?  Take a look at the following code.

Must be my bug, but it looks like Ruby's ... could it be?
382427 [RichardDummy] I know my Subject line looks like heresy in this newsgroup, but I
382437 [mike@st k. a] =3D>
382857 [RichardDummy] , :path =3D>

[ANN] unicorn 3.6.2 and 1.1.7 - OobGC module fix
382432 [normalperson] Unicorn is an HTTP server for Rack applications designed to only serve

EARN 10000 DOLLARS PER MONTH -WITHOUT INVESTMENT - JOIN FREE
382438 [devivithyama] ...

question about working with dates
382439 [sodani@gm il] I have a list (in database) of weekday non-holiday dates that goes
+ 382448 [jakekaiden@y] seems like you could make an array of arrays out of your dates, with the
+ 382455 [bbxx789_05ss] require 'date'
| + 382459 [bbxx789_05ss] today = Date.today
| + 382524 [sodani@gm il] This is very helpful. The only thing is that I'd like to use my
|   382544 [bbxx789_05ss] lol. What do you think the programs I posted do?   Did you look at the
|   382566 [sodani@gm il] Okay thank you for your help.
+ 382457 [bbxx789_05ss] results = []
+ 382458 [bbxx789_05ss] Isn't that just adding 7 days to each of the dates produced by your
+ 382473 [bbxx789_05ss] Multiply by 12 and add that many months (see below)

Why defining a constant in a method is not allowed but using self.class.const_set is allowed?
382452 [ibc@al ax ne] (SyntaxError:: dynamic constant assignment) but I can use
382454 [shortcutter@] You described the difference pretty accurately.  It is quite common for=20
382456 [ibc@al ax ne] Ok. Then one question more: why is not possible to reassing a value to
+ 382460 [bbxx789_05ss] Why do you want to change a *constant*?  ruby has variables for that.
| 382461 [ibc@al ax ne] module M
+ 382465 [cmdicely@gm ] It is possible. As you note, it produces a warning, because more than
  382466 [ibc@al ax ne] Yes, I understand that redeining a constant is not "good" in any
  382467 [cmdjackryan@] It's called a "constant". What would you expect it to be? Ever
  + 382468 [ibc@al ax ne] Humm, yes, having a HASH constant containing a hash is faster than
  | 382486 [shortcutter@] You never mentioned a performance problem you are trying to solve.=20
  | 382495 [ibc@al ax ne] Yes, I know :)
  | 382504 [shortcutter@] ld be
  | 382505 [ibc@al ax ne] My code is thread safe (EventMachine with no threads inside) :)
  + 382501 [joelvanderwe] Ruby programs may operate *on* programs. One program's constant is

Re: Must be my bug, but it looks like Ruby's could it be?
382462 [bbxx789_05ss] I know about ruby's % substitutions, but I can't decipher that line--you
382858 [RichardDummy] Thanks for your response.  As I mentioned to Mike, I had more serious
382883 [bbxx789_05ss] I'm not sure which 'strings' you are talking about?  key? val?  In that
382992 [RichardDummy] he

Win32OLE.const_load -- where to find missing constants
382469 [djlewis@tr a] I just spent a couple of hours tracking this down, so I'm posting it for

[ANN] test-unit-must 0.1.0
382470 [sunaku@gm il] test-unit-must - Selfish "must" assertions for Test::Unit

ClassMethods vs append_features/extend self
382475 [transfire@gm] module Foo
382552 [bbxx789_05ss] 1) I would use included() rather than append_features() because it's a

[ANN] test-unit-must 1.0.0
382476 [sunaku@gm il] test-unit-must - Selfish "must" assertions for Test::Unit

merging 2 csv files and sorting merged file
382477 [tenzancode@g] 1) merging 2 csv files
382482 [tenzancode@g] Here I post the answerI got from japanese mailing list,
382485 [kresimir.boj] Or you can

Understanding Ruby Inside Out
382478 [paranox3@ya ] What makes Ruby work?
+ 382479 [marymean@gm ] I am still relatively new to ruby myself but what helped me a lot until now w=
+ 382480 [cmdjackryan@] You can!
+ 382481 [stu@ru yp og] The low level sort algorithm is written in C. if you need to look at
+ 382487 [paranox3@ya ] Hey, thanks for the rapid response guys.
| + 382491 [cmdjackryan@] Well, the Ruby interpreter is written in whatever host language is
| | 382496 [paranox3@ya ] Very good, I can work with that. Feeling kind of embarassed that the
| + 382510 [josh.cheek@g] Check out the gem pry (get it by going to the command line and typing "gem
| | 382511 [josh.cheek@g] Sorry I hit space or something, and it sent the message before I finished.
| + 382521 [stu@ru yp og] Yukihiro Matsumoto's book is the one you want. Everything else is just
|   382522 [stu@ru yp og] One last thing to try which may help you. If you pass false to
+ 382534 [shortcutter@] That is certainly not true for me; apparently we have different
  382543 [bbxx789_05ss] I second what Robert said.  Dredging up C code is not the way to
threads.html
top