396275-396840

396086-397471 subjects 396485-411955

number printing like in my spreadsheet
396275 [wybo@xs al .] When I need to print numbers without knowing how large or small they may

Cannot run a ruby 1.8.7 web-app with ruby 1.9.3
396276 [lists@ru y- ] This is on fedore 17, standard installation.
396277 [shortcutter@] As far as I can see you only showed how installation of gettext/gci
396280 [lists@ru y- ] thanks for the immediate reply.
396283 [shortcutter@] Hm, did you create a simple test case to see whether it works at all?
396285 [lists@ru y- ] command dispatcher: that is an excellent idea, I will follow that.
396294 [lists@ru y- ] after converting the dispatcher as you suggested, the HTML coding is

Ruby networking, cuts off at new line?
396281 [lists@ru y- ] I have been trying to figure this out without any luck, maybe someone
396282 [lists@ru y- ] Ah stupid me, gets and puts of course cut off on new line. I changed to

Unsubscribe
396284 [ustc.flyingf] ...

Problem with storing timestamp as datetime object
396287 [lists@ru y- ] I am storing timestamp of a file as "datetime" object in a DB, now when
+ 396288 [lists@ru y- ] You should use the built-in method to get the mtime of a file rather
+ 396289 [lists@ru y- ] Thanks for the reply. But i see a problem here
| + 396290 [ryand-ruby@z] It isn't a matter of utc vs 0800... Those are completely different times and=
| + 396292 [lists@ru y- ] No, the Time object does not compare the strings (this wouldn't make any
|   396293 [lists@ru y- ] Sorry, I meant *add* 8 hours.
+ 396291 [lists@ru y- ] Im sorry , reposting it again to avoid confusion

Ruby API sub and gsub error?
396296 [lists@ru y- ] So I am looking at the Ruby API for sub and gsub.
+ 396297 [lists@ru y- ] "hello".sub(%r/[aeiou]/, '*')
+ 396306 [lists@ru y- ] So this means there is an error in the API?
  396308 [hassan.schro] Where exactly did you copy this broken example from?
  396309 [lists@ru y- ] sub and gsub are methods of String, not of Regexp.
  396310 [hassan.schro] ? There's nothing like that in the email I'm looking at, hence my

file write is not the same file read, some encoding issue?
396304 [lists@ru y- ] I know I must be doing something wrong but I don't know what and I can't
396305 [lists@ru y- ] ah crap puts got me again :(.
396313 [lists@ru y- ] Also, for a completely lossless copy even under Windows, use "rb" and

[ANN] Gotham Ruby Conference registration ends June 14: 11:59pm
396311 [beholdthepan] Hey Guys.

Class variables and self
396312 [lists@ru y- ] I'm currently reading The Well-Grounded Rubyist.  In the section about
+ 396314 [lists@ru y- ] self.class is (obviously) the class of self, so in this case it's Car.
+ 396315 [billpaulson@] Since total_count is a method of class Car, inside the initialize method of an instance you can refer to class Car as self.class. It would seem simpler to say Car::total_count in this particular case.
+ 396316 [lists@ru y- ] so is self.total_count equal to self.class.total_count?
  + 396320 [lists@ru y- ] No, of course not. self refers to the particular instance of Car,
  + 396321 [rubytalk2dav] Nope.  Assuming that "self" at that time is an individual Car,
  + 396323 [hmaddocks@me] It depends where they are called. You need to know what self is at the point where the call is made. Going back to your sample code...
    396325 [lists@ru y- ] No, they are never the same object. self.class in the context of Car is
    396326 [hmaddocks@me] ...

[ANN] Lone Star Ruby Conference 6 - Call for Speakers
396317 [jimfreeze@gm] Lone Star Ruby Conference 6

URI encode and param lost
396319 [lists@ru y- ] I have an url: http://foo.com/posts?id=30&limit=#time=1305298413
396332 [shortcutter@] 413

Accessing Variables from Within a Module
396322 [lists@ru y- ] #!/usr/bin/ruby
396324 [lists@ru y- ] This doesn't make sense. The module and the top level are two completely
396327 [lists@ru y- ] In the actual configuration that I am contemplating, the code that I
396328 [lists@ru y- ] From the description I'm guessing you want to use the module as a mixin
396329 [lists@ru y- ] I don't think that I want to use a mixin.  My understanding of a mixin
+ 396330 [lists@ru y- ] You could wrap the mixin module into another module. Then you'll have
+ 396331 [shortcutter@] Please do.  From what I have read so far in the thread it is totally
  396339 [lists@ru y- ] YES!!! This is the solution to my problem! Strangely, I came up with the
  396351 [shortcutter@] Good.

Is "a,b=c,d" atomic? or do I need a Mutex?
396333 [ibc@al ax ne] def method1 object
396334 [ibc@al ax ne] def test a,b ;  $a, $b = a, b ;  end
396335 [matma.rex@gm] It is atomic on MRI. It may or may not be on other interpreters, if
+ 396336 [tony.arcieri] Appending to an array from many threads in an unsynchronized manner can
+ 396337 [ibc@al ax ne] Thanks, so I've no problem since I'm coding for MRI.
| 396352 [shortcutter@] Sorry, but I think this is the wrong attitude.  Even MRI's
| 396353 [ibc@al ax ne] In my case #method2 is private and is just called by the library and
| 396363 [tony.arcieri] Note that Array#<< isn't atomic, it's just that the GIL prevents contention
| 396365 [ibc@al ax ne] Well, since I'm coding a C extension for Ruby 1.9 MRI, I assume I can
+ 396840 [headius@he d] I would not bet on it being atomic, since Ruby's context-switch

How to define a private module function in C?
396338 [ibc@al ax ne] method, do I miss something?

Beginner question: Bubble sort using array.each_index
396340 [lists@ru y- ] I'm a beginner going through Chris Pine's online book & exercises.
+ 396342 [lists@ru y- ] You misunderstand the code. "first" and "second" aren't fixed values.
+ 396343 [lists@ru y- ] Thank you for clearing that up.
  396345 [lists@ru y- ] Well, you can use *any* sorting algorithm. You may also stick to the one

OpenSSL: Determining initialization vector (IV) created using OpenSSL::Cipher::Cipher#pkcs5_keyivgen with one argument
396341 [tty0pts@gm i] I am attempting to understand some legacy Ruby code that I must write a
396344 [martin.bossl] salt is initialized as null, but later set in the line
396346 [tty0pts@gm i] salt =3D (unsigned char *)RSTRING_PTR(vsalt);

Unsubscribe
396349 [prathamesh_m] ...

Unsubscribe
396350 [qaloo@ya oo ] ...

cgi class prints garbage in HTML output
396354 [lists@ru y- ] I am trying to bring an Web App up in ruby 1.9.3 which worked flawlessly
+ 396356 [lists@ru y- ] the correct (i.e. the code which creates the requested HTML code) ruby
+ 396366 [lists@ru y- ] Hmm. You need it to be an Array?
| 396392 [lists@ru y- ] not absolutely: finally, I need  valid HTML code, nothing more.
+ 396394 [lists@ru y- ] On a side note: You should definitely think about using HTML templates

ffi - Popping image on top of the screen
396357 [lists@ru y- ] Ey guys, how are you? I`m developing an application in Ruby, using
+ 396362 [lists@ru y- ] 15 seconds to load juts sounds broken to me.  Maybe you could/should
+ 396379 [lists@ru y- ] 14 of the 15 seconds is to require the gem 'fox16', is heavy...
+ 396398 [colinb2r@go ] If it's OK to use a Microsoft Windows MsgBox which a user will have to
+ 396439 [lists@ru y- ] Thanks for answer but that's not what I want, I just want a "loading.."
+ 396478 [lists@ru y- ] I'm back with this trouble, I'm stuck. I've installed 'wxruby' gem just
+ 396521 [lists@ru y- ] with this: "tcs-ruby 1.9.3p28 (2012-01-28, TCS patched 2012-01-30)
| 396522 [matma.rex@gm] Merely requiring the newest version of fxruby takes almost 20 seconds
+ 396532 [lists@ru y- ] That's strange. I have posted a topic in the FXRuby bug report just for
| 396554 [matma.rex@gm] So now there's an answer on GitHub and a prerelease version that fixes
+ 396558 [lists@ru y- ] Yes

NEED ROR DEVELOPERS..
396358 [lists@ru y- ] I am Siva from DUCOM SYSTEMS INC.,
396381 [ryand-ruby@z] If you need a "Large Number" of developers, you're probably doing it wrong.
396382 [sophrinix@gm] The op said Developer. So clearly the op is trying to find a single
396384 [code@ap th o] Maybe it's a temp agency for Rails devs.
+ 396385 [thiagown@gm ] If the hourly rate is >$40 and you guys accept remote(from another
+ 396386 [thiagown@gm ] If the hourly rate is >$30 and you guys accept remote, e-mail me.

[ANN] nokogiri 1.5.4 Released
396359 [mike.dalessi] nokogiri version 1.5.4 has been released!

Chris Pine "Learning Programming" Question
396360 [lists@ru y- ] I'm still going through Chris Pine's book on Ruby programming and came
+ 396364 [sto.mar@we .] irb(main):001:0> 99/100
+ 396367 [lists@ru y- ] "QUESTION 2: The second part of this code is just plain confusing me,
| 396372 [sto.mar@we .] The example is from a (very nice) book for programming novices
+ 396369 [lists@ru y- ] When you divide two integers in Ruby, you get an integer division rather

Is resolv.rb broken in 1.9.3 due to encodings?
396368 [space.ship.t] I'm trying to work through some issues using 1.9.3 for my project RubyDNS,
396371 [space.ship.t] Okay, so I just did a bit more testing and found that at least I get an

[C ext] segmentfault in vfprintf() when using fprintf() from a Ruby thread without GVL
396370 [ibc@al ax ne] I've added a TRACE C macro to my C functions. Some of those functions

Why should I learn ruby?
396373 [lists@ru y- ] I have wondered whether I should learn ruby or python hence they are
+ 396374 [lists@ru y- ] I was faced with the same decision a few years ago. The reason I chose
+ 396375 [tomar.arun@g] ...
+ 396376 [code@ap th o] It's largely a matter of taste, though I know some Pythonistas who would
| 396399 [lists@ru y- ] Although on the flip side, Python's official web documentation is 100
+ 396377 [lists@ru y- ] Thanks everyone :)
+ 396387 [lists@ru y- ] I think if you just want to learn a scripting language, Ruby is nice.
+ 396420 [josh.cheek@g] For someone with no programming experience, I would recommend learning
| 396427 [code@ap th o] I disagree.  The languages I have had the best luck picking up quickly
| 396450 [lists@ru y- ] Isn't that array handling, regular expressions, command line argument
| 396454 [lists@ru y- ] Well, standard JavaScript only runs in the browser and doesn't have
| 396456 [paul@aw .c m] I agree. JavaScript is not a great learning language because the runtime
| 396466 [lists@ru y- ] With Ruby, you have to install it in the system.  With JavaScript, it is
+ 396559 [lists@ru y- ] matz.
| 396561 [matt@te hn r] Yeah, but he does all his programming in C....
+ 396565 [darkintent@g] I taught myself the basics with Ruby before I started college.  For me

Escaping ie wait runtime error in ruby
396378 [lists@ru y- ] As ruby script waits by its own for the browser to load and throws a

[ANN] zenweb 3.0.0.b2 Released
396380 [ryand-ruby@z] zenweb version 3.0.0.b2 has been released!

[C exten] is it possible to create a Proc from C?
396383 [ibc@al ax ne] def self.method1

Re: Remove HTML from String? --> a better method
396390 [lists@ru y- ] I hate regex.  I've written some ruby functions to remove html tags in
396434 [shortcutter@] What a mess.  This is extremely inefficient.  You create new strings

i'm having trouble with EOF
396391 [lists@ru y- ] So I have a client server program, or at least that is what I am working
396393 [eule@sp ce c] Closing down socket connections usually helps - your server #recv will

Non-Oniguruma script matching
396395 [sylvester.ke] Dear all,

Popping image on top of the screen
396396 [lists@ru y- ] I've found a way to do this with 'ffi' gem using windows gdi32.dll

[ANN] cod 0.5.0
396397 [eule@sp ce c] cod is a library for really simple IPC. And inter thread communication.

Ruby is faster than ... make Ruby look better on the benchmarks game
396400 [igouy2@ya oo] In the past couple of weeks there's been some blogging about the timings of Ruby programs shown on the benchmarks game website.

Question on If @Instance Statements
396401 [lists@ru y- ] I have another Chris Pine "Learning Programming" Question.  I'm almost
396402 [lists@ru y- ] I'm not quite sure what you mean by "if @asleep = false". Anyway, you

Need simple Reg exp
396404 [lists@ru y- ] i have a string,
396405 [drbrain@se m] URI can do this.
396415 [cczona@gm il] str.match /afp:\/\/[A-Z]{3}/

[ANN] Rails version 3.2.6 has been released.
396406 [tenderlove@r] Good news everyone!  Rails version 3.2.6 has been released.

[ANN] Rails version 3.1.6 has been released!
396407 [tenderlove@r] Good news everyone!  Rails version 3.1.6 has been released.

[ANN] Rails version 3.0.14 has been released!
396408 [tenderlove@r] Good news everyone!  Rails version 3.0.14 has been released.

How can i get the value from a simple html form using ruby?
396412 [lists@ru y- ] It's running ~/public_html/runwebrick.rb=>
+ 396414 [lists@ru y- ] As we tried to tell you in IRC, you are making this way too hard.
+ 396416 [lists@ru y- ] What does cinatra or other framework do to get the value in this format?
| 396419 [josh.cheek@g] Ultimately, it all boils down to text messages being passed across the web.
+ 396417 [lists@ru y- ] Ah! To the meat of the problem.

Problem with reg exp
396418 [lists@ru y- ] I need to match
+ 396423 [matthew@ke w] 1. how are you actually getting those substrings? I'm pretty sure you
+ 396424 [paul@aw .c m] That is a pretty confusing way to use split. Normally split is used with
+ 396425 [matthew@ke w] Sorry, I realise I should have probably given some code to exemplify
| + 396426 [lists@ru y- ] You can also look at String#scan, if a single string contains multiple
| + 396455 [paul@aw .c m] "ABC13B2013KEYWORD".split(/([a-zA-Z]+)(.*)(KEYWORD?)/)
+ 396429 [lists@ru y- ] The problem is that you're throwing together two different solutions for
+ 396467 [lists@ru y- ] Thanks for the suggestions.

Scraping with Nokogiri for dynamic page(?)
396421 [lists@ru y- ] Ruby 1.9
+ 396447 [matma.rex@gm] Have you looked at the file?
+ 396477 [lists@ru y- ] thanks, that was simple.

require_relative? why didn't we "relative do"
396422 [transfire@gm] ...
+ 396444 [jam@ja an be] whole `#require_relative` thing. Instead of a special require method, we =
| + 396448 [matma.rex@gm] What for? This is needlessly munging a global variable. Also, if one
| | 396460 [transfire@gm] ...
| + 396461 [transfire@gm] ...
+ 396449 [lists@ru y- ] try this
+ 396474 [drbrain@se m] whole `#require_relative` thing. Instead of a special require method, we =

[ANN] markdown - Markdown Engine Wrapper - Use Your Markdown Library of Choice
396428 [gerald.bauer] I've created markdown - a gem that lets you use your markdown

Unsubscribe me
396430 [mondinid@ya ] ...
+ 396431 [tony.arcieri] Are you unable to complete the unsolvable puzzle of how to unsubscribe
+ 396435 [narkoz.2008@] You have been successfully unsubscribed from this mailing list.
+ 396446 [mfzerocool15] ...
  + 396451 [mcpierce@gm ] You have to unsubscribe yourself. There's nobody who can do it for
  + 396452 [ixti@me be .] In the headers of mails sent by mailing list, there's one header, with

string.chars.to_a question
396436 [lists@ru y- ] Is there a way to capture " (quotation marks) when you use the
+ 396437 [lists@ru y- ] Are you sure? When I write
+ 396440 [mcpierce@gm ] There's nothing special about letters verses punctuation in the above
+ 396494 [lists@ru y- ] Have you escaped the double-quotation mark " with a back-splash like "I
| 396515 [code@ap th o] It's called a "backslash".
+ 396513 [lists@ru y- ] A few comments...

What's different about defind class method?
396438 [lists@ru y- ] A.class_eval(<<-EOF, __FILE__, __LINE__)
396442 [lists@ru y- ] __FILE__ and __LINE__ are magic constants. They point to the file/line
396443 [lists@ru y- ] Greate, Thank you.

How to edit particular element value from list of xml elements using ruby
396441 [lists@ru y- ] I want to edit for particular elementin xml file.Am using rexml
396445 [lists@ru y- ] //event[@name="birthday"]
396457 [lists@ru y- ] actually i need to read xml file.you have taken as xmlstring.anyway it's
396463 [lists@ru y- ] Well, after you've edited the XML node, you call the "write" method to

For those who want to subscrbe/unsubscribe to/from this mailing list
396453 [ixti@me be .] There were too much noise about "unsubscribe me" in this list,

[C exten] is there a C function for creating a instance of a given class by passing N arguments?
396458 [ibc@al ax ne] VALUE object = rb_new_instance(VALUE klass, int num_args, ...)
396473 [drbrain@se m] rb_class_new_instance()=
396488 [ibc@al ax ne] Great, thanks a lot.

Best practice of writing Rails code
396459 [lists@ru y- ] I'm dealing with some issue about best practice of how to use Rails
+ 396465 [lists@ru y- ] Rails questions should be raised on a Rails mailing list, but the
+ 396468 [lists@ru y- ] Thank you very much for the explanation!

Pausing one thread from within another thread
396462 [lists@ru y- ] I'm improving a music playing script I've written; I want to add a
+ 396464 [tony.arcieri] If mpg123 is what's actually playing the music, then that's what you need
+ 396813 [lists@ru y- ] Thanks for that; it turns out that IO.popen worked slightly better but

Calling methods, getting string and adding them
396469 [lists@ru y- ] I was wondering why this is not being accepted?  I get an error stating
396470 [sduncan@we a] Please post your class, or even better the entire code =]
396471 [paul@aw .c m] And the actual error... most likely your function isn't returning a
396476 [ryand-ruby@z] No. The easiest fix is to use string interpolation.
396480 [paul@aw .c m] Easiest is subjective - but yes, I think string interpolation is in
396481 [ryand-ruby@z] It is measurable by the number of methods called and the number of =
396482 [ryand-ruby@z] garbage objects created.
396511 [paul@aw .c m] Thank you for the tracer analysis. I did some time benchmarks and it

(none)
396472 [adambilbroug] ...

[ANN] minitest 3.1.0 Released
396475 [ryand-ruby@z] minitest version 3.1.0 has been released!

sort of rational numbers
396479 [lists@ru y- ] I was a bit surprised when I ran the following

Re: sqrt of rational numbers
396483 [lists@ru y- ] No. You broke it. Read the Rational() docs.
396484 [matthew@ke w] I'm only butting in here because I'm genuinely interested; how
396502 [lists@ru y- ] Hmmm.....
396508 [lists@ru y- ] Looking at mathn.rb was instructive.
threads.html
top