264242-265820 subjects 264647-266084
^ Returning argument as a number problem
264424 [h4z3 the-c0r] def random(len)
+ 264426 [stefano.croc] No, $1 will always be a string: the $1.. variables are set to the part of
| + 264428 [h4z3 the-c0r] Oh sweet that works perfect, thanks alot
| + 264429 [stefano.croc] I forgot you also need to change the beginning of the random method. Since len
+ 264427 [sepp2k googl] Are you aware that if len is a number this will always be true (and it would
264430 [h4z3 the-c0r] Yeah i realized that after i got it working, Wasn't thinking straight,
^ ruby to C to .so executable
264442 [Reid.Thompso] I am trying to revisit something that I'd found on line last September,
264447 [Reid.Thompso] Found it -- ruby2cext
^ Why don't Ruby libraries share memory?
264445 [matt teamdaw] This paragraph is motivation. While my question is not Rails-specific, I am
+ 264446 [wayneeseguin] charset=US-ASCII;
+ 264448 [jan.svitok g] I suppose the main problem is that Rails (or ActiveRecord, I don't
| + 264449 [jan.svitok g] And one more note: you can save a bit of memory, if you put the thread
| + 264455 [gregory.t.br] It's actually what Wayne mentioned. Since all Ruby classes can be
| + 264463 [matt teamdaw] Thanks for your reply; but I am still wondering about a more general
| | + 264485 [overlord gmx] C-libraries have 2 nice features: They are read only, and ready to use
| | + 264499 [dan-ml dan42] The problem goes further than that. Even if you were to load your libs
| | + 264514 [vjoel path.b] What does 1.9 do differently?
| | + 264530 [drbrain segm] For .so files, no, for .rb files, yes.
| + 264572 [khaines enig] This is not the issue, really, when talking about issues of throughput
+ 264503 [drbrain segm] You'll get closer to the behavior you expect if you use Kernel#fork
^ confused by back refs in gsub
264450 [pbailey bna.] Can someone tell me why, in my code below, I'm getting part of the
+ 264451 [jan.svitok g] require 'test/unit'
| 264454 [pbailey bna.] Thank you, Jano. Yes, this worked for me now.
| 264476 [overlord gmx] Please note that regular expressions aren't a very good way to parse
+ 264453 [fwmailinglis] charset="US-ASCII"
264459 [pbailey bna.] I don't quite understand your suggestion, Felix. Yes, I believe my
+ 264460 [stefano.croc] What Felix is suggesting is that, if the source is valid XML, then it will
+ 264462 [fwmailinglis] charset="US-ASCII"
264477 [overlord gmx] As well as any substring "registrantName>". And well-formed XML won't
264548 [pbailey bna.] Thank you, everyone. Yes, my XML is well-formed, but, it's also pretty
^ TCPSocket select method
264456 [rogerpack200] class TCPSocket
+ 264498 [globyy3000 h] The kernel select method -
+ 264513 [sylvain.joye] It cannot use IO.select since IO.select is a singleton method of IO and a
264529 [drbrain segm] They are.
264620 [rogerpack200] class TCPSocket
264629 [thomas.mackl] Enumerable#select takes no args... perhaps you have an array of IOs
^ accessing SOAP::Mapping::Object
264461 [patrick.hoog] I just started with SOAP and Ruby and after one day trying to get it
264464 [dejan.dimic ] You should send your question to http://groups.google.com/group/soap4r
264518 [patrick.hoog] I just did, thank you
^ Working with classname that is stored in a string
264466 [damnbigman g] I'm trying to DRY my latest Rails project and have run into a problem for
+ 264470 [sepp2k googl] I believe you are looking for const_get.
| 264472 [damnbigman g] Thanks!
| 264473 [gavin.kistne] In the Rails world (or ActiveSupport in general), see also the more
+ 264471 [bryan.duxbur] One thing you can do is not use a string at all, but pass the class name
^ Ruby Chart
264475 [amslonewolf ] I am a total Ruby Noob, so anyhelp would be much appreciated. I am sure
264628 [rgkaufman gm] relies on RMagick, which some find tricky to install.
264656 [dangerwillro] Tim Hunter released a script that installs RMagick and ImageMagick
^ [ANN] rubyforge 0.4.4 Released
264481 [ryand-ruby z] rubyforge version 0.4.4 has been released!
^ [ANN] hoe 1.3.0 Released
264482 [ryand-ruby z] hoe version 1.3.0 has been released!
^ [ANN] rubyhitsquad's vlad 1.0.0 Released
264484 [ryand-ruby z] vlad version 1.0.0 has been released!
+ 264505 [Bil.Kleb NAS] LOL.
| 264507 [phlip2005 gm] That explains the line from the Beastie Boys that rhymes that with
+ 264776 [vjoel path.b] Since you're using the external ssh program, you might consider using
+ 264806 [wilsonb gmai] We considered this, but there's a bug in the current version of svn
+ 264807 [drbrain segm] We're letting people set this per-host with their ~/.ssh/ssh_config.
^ Can a lambda or Proc object yield a value to a block?
264492 [mick.macamhl] I've searched quite a bit on the web and through "Programming Ruby - the
+ 264494 [logancapaldo] Short answer, no, not yet. (You can in 1.9 by using the & syntax)
| 264658 [mick.macamhl] Thanks for the reply Logan. Obviously I'll have to study Ruby's scope
| 264667 [logancapaldo] class Stepper
+ 264504 [lojicdotcom ] On Aug 13, 9:11 pm, Mick Macamhlaoibh <mick.macamhlao...@gmail.com>
^ [ANN] memcache-client 1.5.0 Released
264495 [drbrain segm] memcache-client version 1.5.0 has been released!
^ [ANN] Sphincter 1.1.0 Released
264500 [drbrain segm] Sphincter version 1.1.0 has been released!
^ Why is rake really slow?
264508 [richpoirier ] Is rake supposed to be really slow?
+ 264510 [ryand-ruby z] no, not that it is supposed to be really fast... but it isn't what
+ 264645 [jim weirichh] Rake in and of itself is quite fast. There are two types of things that
264676 [richpoirier ] Thanks for the replies. Yes I'm working with rails. I think you are
264813 [richpoirier ] Ok I've narrowed down the environment part of the problem. What's
+ 264823 [gethemant gm] Its normally a good idea to take out actual db connections when
| + 264849 [d_rems yahoo] Could this be your problem too.
| | 264891 [richpoirier ] I'm just connecting to my local db, that post has to do with
| + 264890 [richpoirier ] I'm running rails tests though. Don't most rails tests require a db
+ 264893 [ news jay.fm] On my 3GHz dual-core Athlon, under either Cygwin or virtualized Ubuntu,
+ 264904 [alexey.verkh] Err... is it to run One-Click Installer Ruby instead of Cygwin?
+ 264930 [richpoirier ] That's really interesting Jay. I'm running RoR on my HP dual core AMD
264989 [richpoirier ] Ok here's an easy way to compare performance. I decided to see if it
^ Re: rubyhitsquad's vlad 1.0.0 Released
264515 [ciconia gmai] Congrats! looks really nice.
^ what is "dynamic constant assignment"
264516 [seanliugm gm] class C
264519 [kanellopoulo] Variable AB is a contant, because it starts with a capital letter.
264520 [stefano.croc] That's not true. You can assign a value to a constant more than once, even if
264535 [logancapaldo] And the work around is
264536 [shevegen lin] Ruby does not allow redefinitions of constants
^ [1.9/12928] problem with -r debug
264517 [keltia gmail] I'm running 1.9 from svn (revision 12928) on OS X. I appreciate that
^ [C ext to Ruby] how to output a octal coded number ???
264522 [yvon.thorava] i write a C extension to Ruby, some methods are dealing with octal
+ 264531 [drbrain segm] The easiest way will probably be to use sprintf. From C, use
+ 264566 [tim.pease gm] Ruby displays integers in base 10 format. I do not believe there is a
+ 264580 [overlord gmx] A integer in ruby is a numeric value, it's not octal or decimal.
^ Symbols and strings
264523 [magnus.hacke] as a long-term perl user just recently converted to ruby, I'm curious
+ 264525 [robert.dober] This question is asked very frequently, please search the archives for
| 264527 [magnus.hacke] Thanks, that cleared a few things for me.
| 264547 [TimHunter nc] Don't make more out of this than there is. A symbol is a kind of literal
| 264550 [phlip2005 gm] So if you add a method to one :foo, can anyone who invokes :foo access
| 264553 [dblack rubyp] $ ruby -ve 'class << :abc; end'
+ 264526 [stefano.croc] Symbols and strings are two different things. There are several situations in
^ Does an Array#apply make any sense at all?
264532 [nikolai.weib] I wanted to write a simple method for comparing two paths on a Windows
+ 264533 [drbrain segm] Is there something wrong with Pathname#==?
| 264549 [nikolai.weib] Yes, not that it can't be fixed, but the current definition is sort of
| 264605 [drbrain segm] Could you file a bug on the Ruby tracker? (Or has it been fixed?)
| 264685 [nikolai.weib] Well, the documentation is pretty clear about what it does. Even
| + 264688 [shortcutter ] I dislike this kind of automation behind the scenes because there may
| + 264746 [mday mac.com] Seems like a bad idea to me. Case sensitivity is not a property of
+ 264552 [shortcutter ] Your method should be called "apply!" because it's destructive. I'd
| + 264554 [nikolai.weib] On Aug 14, 1:51 pm, "Robert Klemme" <shortcut...@googlemail.com>
| + 264555 [dblack rubyp] I could be wrong, but I think the convention (at least in core Ruby)
| | + 264569 [nikolai.weib] Ugh. This was so NOT about whether to call the method Array#apply or
| | | 264571 [dblack rubyp] I know -- I was just replying to a tangential point that Robert
| | | 264686 [nikolai.weib] Ah, OK. Yeah, I suppose that's true. Still, my second suggestion for
| | + 264570 [overlord gmx] That is true for Array#delete. delete is always destructive, there is no
| + 264558 [nikolai.weib] On Aug 14, 1:51 pm, "Robert Klemme" <shortcut...@googlemail.com>
| + 264762 [w_a_x_man ya] On Aug 14, 6:51 am, "Robert Klemme" <shortcut...@googlemail.com>
| 264886 [nikolai.weib] Very nice.
+ 264556 [transfire gm] On Aug 14, 2:40 am, "nikolai.weib...@gmail.com"
264568 [nikolai.weib] It's not about the line count but about executing the same set of
264626 [SimonKroeger] def normalize path
^ Exchanging the extension in a filename
264534 [ronald.fisch] I have a string representing the name of a java file. I would
+ 264539 [logancapaldo] sub is pretty elegant.
+ 264579 [overlord gmx] I'd match the point too, not everything that ends with "java" is java
| 264861 [ronald.fisch] In general, yes, but in my case I *know* that the file ends in .java
+ 264602 [w_a_x_man ya] On Aug 14, 5:05 am, "Ronald Fischer" <ronald.fisc...@venyon.com>
| + 264859 [ronald.fisch] Thanks - this is a nice alternative (for the case I actually
| + 264899 [shortcutter ] I'd rather include the dot to avoid renaming files called "foo.notjava"
+ 264929 [jim weirichh] require 'rake' # NOTE: Not running rake, just using its library.
^ Need help cleaning up a model method
264541 [ruby-forum g] I need a little help cleaning up the method below. In my .NET days I
+ 264542 [ruby-forum g] Apologies, I meant to post this in the Rails group.
+ 264543 [jan.svitok g] what about this?
+ 264546 [logancapaldo] sum should be zero for no vehicles though, shouldn't it?
264599 [ruby-forum g] Thanks to you both for your help
^ Any Muslims around?
264551 [kyrreny broa] Just wondering if any Muslims have gotten around to making a Ruby script
+ 264557 [ronald.fisch] I guess time for prayer is at certain times per day? You could
| 264563 [jmettraux op] sudo gem install openwferu-scheduler
| 264777 [kyrreny broa] Some awesome suggestions here, but I think it's a bit more complex
| 264863 [ronald.fisch] But you have the timezone for each location, right? If you use the
| 264900 [kbloom gmail] I prefer the tzfile gem for dealing with timezones.
+ 264573 [kbloom gmail] Would this help? I use it as part of a suite of scripts for computing
264775 [kyrreny broa] Thanks a lot Ken, and the same to you guys, Ronald and John.
^ Re: how to output a octal coded number ???
264561 [yvon.thorava] OK, thanks, but i don't want to print it just have it as a return
+ 264584 [yvon.thorava] OK thanks
| 264700 [overlord gmx] I don't quite understand the purpose of your extension. Normally you do
+ 264593 [phrogz mac.c] Despite the name, sprintf does not actually print the value to stdout.
+ 264607 [drbrain segm] sprintf returns a String. You can print it with puts if you want, or
^ Convert a n binary number to /n
264574 [z4n9ief gmai] If my number is 1111, I would like to had 0000.
264576 [fxn hashref.] irb(main):003:0> "0011".tr("01", "10")
264646 [ snk gna.org] Or, if you're working with integers (as opposed to strings), then you
264648 [z4n9ief gmai] Thanks :)
264664 [promos burch] sprintf("%04d", 1111- 1111) -> 0000
^ ! semantics (was: Re: Does an Array#apply make any sense at all?)
264577 [dblack rubyp] And push, pop, <<, concat, replace, clear.... There's definitely no
264699 [overlord gmx] Which all have to be modifying. With the exception of concat. (The Unix
264703 [dblack rubyp] ! does not mean modifying; it means "dangerous".
+ 264794 [logancapaldo] Just thought that I'd mention the usual example of the difference is exit
| 264811 [drbrain segm] Instead of modifying anything, #exit! doesn't clean up after itself
+ 264803 [overlord gmx] Most methods flagged with a ! are dangerous because they modify their
264805 [dblack rubyp] Many of them are, but there's no cause-and-effect between modifying
265025 [overlord gmx] You are hitting a strawman.
265027 [dblack rubyp] It's all there, just spread out between the email address and the
^ JRuby and Netbeans Matisse GUI builder
264578 [leslieviljoe] Netbeans 6 adds some excellent Ruby/JRuby support and it's quite easy to
264582 [kyleaschmitt] Is it out of beta? I'm using NB6 beta for my home-ruby projects, and
264600 [leslieviljoe] No it's at Milestone 10. I am getting a bit ahead of myself in the
264616 [jamesthepipe] Do those milestones mean anything to anyone? I just download the
264687 [leslieviljoe] Good to know! Do you just keep downloading the Ruby modules?
264690 [charles.nutt] There's some discussion on using the "cluster" bits from the Hudson
264727 [jamesthepipe] I always take the full IDE - I figure NetBeans is changing everywhere,
^ change of Symbol to respond to intern?
264583 [thomas.mackl] def foo(sym_or_str)
+ 264585 [ccthiel gmai] Not sure of the differences (if any) between #intern and #to_sym, but
+ 264594 [CHubas7 gmai] irb(main):005:0> :FOO.to_sym
+ 264596 [rmagick gmai] Symbol responds to #to_sym, as does String. Will that do?
+ 264597 [coder68 yaho] irb(main):001:0> class Symbol; alias_method :intern, :to_sym; end
+ 264624 [thomas.mackl] I knew about overloading Symbol, but I think we can all agree that's
264742 [overlord gmx] But probably want to do the to_s anyway, because that doesn't pollute
^ [ANN] RubyCocoa 0.12.0
264587 [laurent.sans] I am honored to announce the immediate release of RubyCocoa 0.12.0.
^ Re: RubyCocoa 0.12.0
264589 [yvon.thorava] On 14 aoû¹, 18:04, "Laurent Sansonetti" <laurent.sansone...@gmail.com>
264592 [laurent.sans] Thanks, I just forgot to update the website, now it's done :)
^ BackgrounDRb: Re-call do_work or non blocking methods?
264595 [ruby-forum m] I've been trying to use BackgrounDRb for a couple of weeks now and have
^ Can ri distinguish core methods from 3rd party methods? [was: Non Existent Method Dir.empty? Description via "ri"]
264601 [djberg96 gma] On Aug 14, 11:33 am, "Wolfgang NáÅasi-donner" <ed.oda...@wonado.de>
+ 264606 [james.britt ] I believe this is a known problem. (Known, at least, on the ruby-doc
+ 264608 [phrogz mac.c] I think that's a hack solution to the problem. It might be a good idea
| 264612 [james.britt ] Quite true. Every so often people write to me to complain/inquire about
+ 264610 [drbrain segm] ri --system
264618 [ed.odanow wo] It helps in this case, but if some parts of the standard library change
264604 [zhihang108 h] shoes369 supply all kinds of shoes .popular and fashion,clothes
^ How to parse the "next" button on yahoo resultpages?
264611 [kls4f345m_fo] I'm new to ruby and I really like it. But I'm standing in front of a
264654 [dangerwillro] At some point you simply have to look at the html generated by Yahoo
^ image_science .so being called from my home dir - help
264613 [mikeisgreat ] Anyone seen this before?
^ Is there a thread safe implementation of a priority queue?
264614 [lolz.llolz g] I could only find a class called Queue in RDoc. Is there no (thread
264627 [vjoel path.b] vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
^ attr_* position in a class and their results
264615 [jub sowenga.] class Vartest_before
+ 264619 [stefano.croc] In the case of Vartest_before, when you call
+ 264621 [sepp2k googl] This defines a method instance_variable
264622 [jub sowenga.] Ok, I'm must be tired because I was expecting just the opposite, which
264631 [shortcutter ] Maybe it was even caused by using a different order in class definition
^ post xml over https connection
264625 [byte8bits gm] Has anyone posted xml data over a https connection? We have a vendor
+ 264633 [shortcutter ] Just like with HTTP: set the content type to "text/xml" and send (post)
| 264716 [byte8bits gm] nex = Net::HTTP.new("https://127.0.0.1", port)
| 264720 [keith audiob] (Not sure that 'data' is set correctly above...)
| 264728 [byte8bits gm] That was silly of me. Thank you for the example and the doc pointer. I
+ 264659 [fwmailinglis] charset="US-ASCII"
^ Class Instantiation
264637 [b3.pwns goog] I have a few questions about class instantiation.
+ 264639 [dougal.s gma] names.each do |n|
| 264641 [dblack rubyp] 1.times do
| 264642 [b3.pwns goog] This was going to be my next question.
+ 264640 [promos burch] You can, but it might be better to do something like this if you have
^ Ruby Paypal library uninitialized constant error
264643 [killertoaste] I'm trying to use the paypal library for ruby but im getting an error on
264725 [killertoaste] i managed to fix this by adding require 'money' into the