203238-411313

202993-203888 subjects 203448-206907

Ruby on Handhelds (was: Re: One-Click Installer: MinGW? or VC2005?)
203238 [znmeb@ce ma ] I don't really like this idea. I find "live handheld programming" a
+ 203240 [hal9000@hy e] I see your point. (I had the 200LX, by the way. What a sweet machine.)
| 203242 [znmeb@ce ma ] I have to assume Ruby will run on the Zaurus, since gcc can build for
| 203270 [greg.kujawa@] app that used Ruby and Qt/Embedded bindings. It was a nice result.
| 203327 [znmeb@ce ma ] Sharp hasn't *abandoned* the Zaurus in the western world. They've simply
| 203332 [greg.kujawa@] True. There is a wince subdirectory in the Ruby source going back
| 203347 [Nuralanur@ao] ...
+ 203244 [schapht@gm i] Geek factor
  + 203245 [znmeb@ce ma ] *young* geek factor. Us elderly geeks need large print PDAs and
  + 203253 [guido@so ne ] Fine. Then use something like Lua instead. Am doing that exactly now.

rmagick: animated gif resize returns corrupted
203260 [isengoi@gm i] Hopefully this is the the right place to ask. I'm sorry if not.
411313 [lists@ru y- ] I have same problem... Any solutions?

Please help install DBI on a Windows systems...
203261 [ihatespam@ro] I'm very frustrated because I've just spent the past few hours in the
+ 204294 [patrick@pk p] There???s a good tutorial, including installation instructions located
| 204618 [tesla.nicoli] ...
| 205004 [tesla.nicoli] ...
| 205005 [djberg96@gm ] Regards,
+ 205009 [ml.chibbs@gm] On 7/22/06, Just Another Victim of the Ambient Morality

Assigning blame?
203271 [transhumanis] 'allo
+ 203274 [alex@bl ck e] Not quite what you're after, but it has the same effect:  make sellSoul
+ 203280 [transfire@gm] Some might argue that you can't do thi, b/c in reality what you want to
  203701 [transhumanis] Thankyou for the code - but would you explain to me why it's "flawed

Question about a regular expression
203272 [diegoami@we ] I don't understand this regular expression
+ 203275 [decoux@mo lo] Well the format for a line is
+ 203279 [M.B.Smillie@] In this case, the '<' is just a character.  So, it's looking for a

dbus bindings
203273 [eyal.oren@de] I'd like to use dbus from ruby, I found dbus-ruby [1] but it seems old
+ 203487 [alexg@ku cr ] I had a look at this a few weeks ago and yes the dbus api seems to
+ 235310 [kristoffer.l] I'm also looking for a way to use dbus from Ruby. Since a lot of

predefined variables and constants question
203283 [simonharriso] variables/constants, execution environment variables, standard objects
203286 [ara.t.howard] but that woudn't be global then would it ;-)
203290 [simonharriso] Not sure I follow. Class Object is available at all times throughout a

when I say method_defined? I mean it!
203285 [transfire@gm] I've been bitten by this way too many times now. And I'm just plain
203311 [erikveen@gm ] Replace "unless method_defined?( sym )" with "unless
203317 [transfire@gm] Tha won't work b/c it would be looking at the module or classes
203360 [Dymaio@gm il] I think Mr. Veenstra's approach is fine--either allow the exception
203365 [transfire@gm] I think my point is being missed. Forget my last example, it has
203376 [Dymaio@gm il] Tempting as it is to respond to Dr. Seuss, I think it makes more
203402 [transfire@gm] are #methods and #instance_methods. Here's my Dr. Seuss analogy
203495 [Dymaio@gm il] A quick test I did in irb suggests that methods(),

H- Undefined Method?
203292 [comprug@gm i] I know you can use the method h() to HTMLEdit varible, but ruby doesn't
203293 [james.britt@] Ruby does not have a built-in 'h' method.     Are you using an
+ 203296 [comprug@gm i] Sorry, yes, Rails. What method could I use instead? Not really familliar
| 203298 [james.britt@] 1.  I think that method works only in helper code or in views, but not
+ 203304 [rimantas@gm ] 'h' method comes from ERB::Util
  203310 [comprug@gm i] Thanks, I'm not used to having to call additional modules or classes

Showing part of an array....
203295 [lists@ro in ] colors = ["black","white","red","yellow","green"]
+ 203297 [Nuralanur@ao] ...
| 203302 [lists@ro in ] Thanks, Axel
+ 203300 [xicheng@gm i] def print_color(colors)
+ 203305 [daniel.schie] puts "#{colors[0, 2].join(', ')}#{'...' if colors.length > 3}"
| + 203307 [Nuralanur@ao] ...
| | 203309 [lists@ro in ] Thank you for the explanation! That helped me understand what's going on
| + 203308 [lists@ro in ] That's what I thought, but this is actually being passed as an argument
+ 203335 [Dymaio@gm il] I think this example is asking for the ternary op.
  203367 [lists@ro in ] Thank you! Thank you! Thank you!  Yes, that's exactly what it needs!

Self, looking for a good summary explanation
203299 [sambient@gm ] Sorry, because I have the books and have / continuing to  read, just
+ 203343 [gwtmp01@ma .] Objects aren't really 'named' by the variables that reference them.
+ 203351 [allergic-to-] self is not a variable name - It's a key word that refers to the current

*_eval
203301 [erikveen@gm ] Can somebody explain me, in detail, the differences between
+ 203320 [decoux@mo lo] Well, when you use keywords (like `def' 'alias') ruby use the
| 203325 [erikveen@gm ] I never heard of this "current" before... Interesting... So,
| + 203329 [erikveen@gm ] It's really only true for keyword stuff. define_method works as
| + 203389 [decoux@mo lo] Well, I hope that you have seen that at toplevel (where self is an
|   203399 [transfire@gm] I've often wondered why it wasn't an instance of Module with an extend
+ 203344 [Dymaio@gm il] I think inspect() and object_id() confuse the issue, and trying to use

class declaration syntax error
203312 [junkone@ro e] Class SymbolObject
+ 203313 [erikveen@gm ] It's "class", not "Class".
| 203314 [junkone@ro e] Thanks a million
+ 203315 [logancapaldo] class should be lowercase. class SymbolObject not Class SymbolObject

Im a newb so please help!
203319 [krazyk_91@ho] Okay so i just got a book call 'Learn to Program' by Chris Pine.
+ 203321 [erikveen@gm ] Where dit you enter "ruby calc.rb"? In "Start/Run Command"?
+ 203322 [brabuhr@gm i] "go to run and type in", so you're on some version of Windows?  Then,
  203326 [krazyk_91@ho] ok thanks it worked!
  203328 [simonharriso] gets

Ruby compiling/interpreting itself (was Re: One-Click Installer: MinGW? or VC2005?)
203323 [znmeb@ce ma ] I think there are large chunks of this available in various packages,

Ruby Tk "on top"
203330 [expiation@de] Hey
203361 [m_goldberg@a] I've only played around with Ruby Tk on OS X only a little, but my
203460 [expiation@de] I think the guys did a good job integrating Tk with the OS X GUI, the

Infinity
203333 [h.wickham@gm] irb(main):084:0> (-1.0/0.0)
+ 203334 [marcel@ve ni] Infinity = 1.0/0
| + 203336 [h.wickham@gm] But it will everywhere that supports the IEEE floating point standard?
| + 203355 [vikkous@gm i] Does anyone know a definition for Infinity that does work on all
+ 203340 [robert.dober] ...
+ 203353 [interfecus@g] Others have answered the main question here but it's worth noting for
  + 203380 [h.wickham@gm] Yes, but a lot of languages provide some way of accessing the
  | 203386 [znmeb@ce ma ] I think Matz vetoed anything that required IEEE floating point a little
  | 203396 [h.wickham@gm] Thanks for that explanation, although it does worry me a little, I
  | 203434 [znmeb@ce ma ] Which is *precisely* why dozens of hard core applied mathematicians and
  | 203439 [akr@fs j. rg] Some time ago, I installed Ruby on NetBSD/vax on SIMH.
  + 203401 [transfire@gm] Facets has Infinity (actaully it was deprecated for a while until I
    203406 [h.wickham@gm] That's great!  Thanks.
    203421 [transfire@gm] Nice, that was helpful. I added some query methods to Numeric, eg.
    203437 [h.wickham@gm] Great.  Note that (NaN == NaN) == False, but I think the rest of the

Symbols vs. strings as hash_keys - interchangeable or not?
203338 [weyus@at .n ] All,
+ 203339 [ezmobius@gm ] Wes-
| 203342 [cameron.math] Hey,
+ 203345 [transfire@gm] As Ezra points out they are not the same in Ruby. A hash key can be any
  203403 [sean.ohalpin] h1 = { {:a => 1} => 'nope'}
  203412 [transfire@gm] Huh? I didn't know that. Why isn't one hash "eql?" to another that has
  203456 [sean.ohalpin] Because Hash#hash == Hash#object_id and st_lookup() uses this and eql?

Re: Symbols vs. strings as hash_keys - interchangeable or no
203341 [weyus@at .n ] Ezra,
203374 [rubytalk@ea ] ...
203423 [weyus@at .n ] Not to be dense, but why would you use a hash as a hash key in the first

Adding custom behaviors to a text_field?
203346 [doolittle@gm] default value of a textbox with the field title, and then when you

Newbie question - variables and memory
203350 [comprug@gm i] I may be wrong, but I might have read somewhere that there's a need to
203364 [hanumizzle@g] In normal usage, no. Ruby supports garbage collection, meaning that

Set an instance variable before and after initialize
203352 [martialis@bi] If possible, I would like to set a instance variable in an object before
+ 203358 [Dymaio@gm il] The initialize() method, the constructor, is the earliest point at
+ 203363 [transfire@gm] class Klass
| + 203373 [martialis@bi] This break the chain of inheritance. You would have to reimplement all
| + 203379 [erikveen@gm ] That won't work: initialize is private. And it might better to
|   203400 [transfire@gm] Damn! You guys are sticklers! You want complete, universally
|   203407 [erikveen@gm ] Write once.
+ 203414 [ara.t.howard] module BeforeAfterInit
  203943 [ben@ia u. et] I have a couple of questions...
  203947 [ara.t.howard] it says: return whatever super used to.  it's just good form when you wrap a
  203949 [ben@ia u. et] Oh, I did that too. My point is that there is no 'before' and 'after' the
  204042 [ara.t.howard] hmmm.  you can actually do it with my first impl by including the module

Function for integers to displayed with same number of digit
203354 [fraiha@ch rt] Is there or a function, or anyone know of a hack without using if else
+ 203356 [Dymaio@gm il] Here's what I've done.  Numeric formatting for output is most natural
+ 203357 [_mwryder@wo ] irb(main):001:0> "%04d" % 1
  203359 [Dymaio@gm il] Well, thanks a lot!  Don't I feel like a jackass now?  I didn't know

Re: Function for integers to displayed with same number of d
203368 [fraiha@ch rt] Hey, thanks to both of you for your help. I had no idea Modulus acted
203370 [_mwryder@wo ] It's the first Instance method for the String class in the Pickaxe book.

Showing similar values in a table
203369 [raffir@gm il] I'm working on a project in which Accounts belong to a User.
203388 [jan.svitok@g] You're missing second 'each' here
+ 203424 [raffir@gm il] Unfortunately, while it's now showing accounts, it's now showing every
+ 203425 [raffir@gm il] Fixed it!
+ 203452 [raffir@gm il] Mysteriously stopped working again.

[ANN] Ruby-VPI 0.7
203371 [skurapat@uc ] Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create
203375 [rubyfan@gm i] It's great to see more EDA tools based on Ruby and it looks like
203458 [skurapat@uc ] Thanks for the encouragement. :)

strip tags?
203372 [moore.joseph] Is there an easy way to strip html tags from strings?
+ 203378 [hhausman@gm ] How about using Lynx?
+ 203382 [stesch@no sp] A regex isn't always the _best_ way to deal with markup
  203383 [danielbaird@] ...
  203385 [f@an re s- .] This is no correct HTML, < and > have to be encoded as entities.
  + 203391 [danielbaird@] ...
  | 203428 [moore.joseph] Thanks for the quick replys.
  | 203441 [schapht@gm i] For sanitizing input, just escaping might be a better idea because it
  | 203451 [moore.joseph] Thanks for the help everybody.
  + 203430 [chneukirchen] $ echo '<bar quux="foo>bar" />' | xmllint -
    203507 [w_a_x_man@ya] re = %r{
    203713 [chneukirchen] <foo bar='"quux"' />
    203816 [w_a_x_man@ya] re = %r{

Getting My Documents Folder
203377 [daverubie@gm] ...
+ 203381 [hhausman@gm ] How's about?
+ 203387 [jan.svitok@g] Install windows-pr gem from win32 utils
+ 203409 [djberg96@gm ] require 'win32/dir'

converting a text file into an "insert into ..." file
203384 [kublaikhan55] I have a csv delimited file that I'd like to 'insert into some_table
+ 203390 [jan.svitok@g] In case you need escaping there is a module for parsing CSV in stdlib.
| 203453 [kublaikhan55] This one-liner works for me very well. Thank you.
+ 203392 [erikveen@gm ] Something like this?
| 203435 [kublaikhan55] This is great! Thank you for your input.
+ 203445 [dblack@wo bl] Assuming you don't have to do any massaging or escaping of the values,

micro authoritative dns server
203393 [xan2@on .c m] I'm new in ruby. I know that there is a class called Resolv.rb for
+ 203643 [xan2@on .c m] - Domserv is the authoritative dns server
+ 204796 [drbrain@se m] resolv.rb is for writing clients.  It is documented on the HEAD

Dividing inside iterations?
203394 [dominicson@g] Learning Ruby.
203395 [rubytalk@ea ] ...
+ 203397 [dominicson@g] Thanks for your quick reply Joey.
+ 203398 [dblack@wo bl] h.each do |num|
  203408 [rubytalk@ea ] ...
  203417 [dblack@wo bl] puts [40,20,50,200].map {|num| num/24 }

problem using open-uri for loading from host:8080
203410 [stephen.bann] open-uri (and the libraries it builds on) don't seem to be able to

[ANN] Composite Primary Keys for ActiveRecord 0.3.2
203411 [drnicwilliam] [Cross-posting from Ruby on Rails forum]
203517 [software617r] Thanks, Nic, for crossposting!
203521 [drnicwilliam] No problems :)

xml builder not able to create namespaced elements w/attributes??
203413 [stephen.bann] <sailuserdata:ESession xmi:version="2.0" xmlns:xmi="http://
203415 [dblack@wo bl] You have to treat the hash { "key" => "123" } as a second method

Introduction to Foreign Keys?
203432 [raffir@gm il] I'm relatively new to Rails and SQL. I've been working on an
203442 [schapht@gm i] It's hard to say just how low level you should start.  But the Agile

problem building ruby-audio-0.1.1 on OSX 10.4.7
203433 [samesimilar@] I'm trying to install ruby-audio on OS X. The instructions for
203555 [fugalh@xm ss] You're right, the linker isn't finding the narray lib. It would help if
203616 [samesimilar@] Thanks for responding!
203626 [fugalh@xm ss] Odd. As I'm running tiger (10.4.7) as well and it works fine, I think
203761 [samesimilar@] Interesting - what does your compilation command look like?
203768 [samesimilar@] Actually, never mind. It's working now, I just realized that I have to
203793 [fugalh@xm ss] I'm interested in seeing portaudio wrapped, yes. I have a few other

Yadda yadda yadda operator
203438 [sonoflilit@g] ...
+ 203440 [rubytalk@ea ] ...
+ 203443 [schapht@gm i] This strikes me as a little comical.  I think the raise solution is
+ 203444 [transfire@gm] Well, I guess the question is: how does one insert code later? If you
| 203474 [fred@la av .] Well, I'm sure it's possible to do something that would react like
+ 203446 [dblack@wo bl] # ...
  + 203447 [dblack@wo bl] I think I misunderstood the original thing (namely, that it's supposed
  | 203449 [SimonKroeger] but can we really live on, knowing that perl has a "yadda yadda" operator and
  | + 203454 [rimantas@gm ] I have a theory that programming languages die with version 6.
  | | 203455 [usenet@ze v.] Only a theory, or anecdotical proof as well ? :)
  | | 203459 [rimantas@gm ] This very much depends on how you define "death" of programming language.
  | | + 203464 [sonoflilit@g] ...
  | | | 203466 [rimantas@gm ] Well, you can use raise "Yadda ...your comment here" and grep will
  | | | 203470 [burtadsit@sb] Interesting... I thought that only I had been adversely affected by the
  | | + 203490 [znmeb@ce ma ] Yeah ... but Java 5 is really Java 1.5. :)
  | |   203502 [schapht@gm i] I think it's actually Java2 1.5 SE rev 5.... plus alpha.  turbo.
  | |   + 203508 [znmeb@ce ma ] I wouldn't know ... never driven it at night.
  | |   | 203520 [sonoflilit@g] ...
  | |   + 203524 [errant.thoug] I think that's the version that Capcom is using to write Street Fighter
  | |     203538 [rubytalk@ea ] ...
  | + 203457 [dblack@wo bl] ...
  | + 203489 [znmeb@ce ma ] yabba dabba don't
  + 203558 [drnicwilliam] # TODO
    + 203565 [alex@bl ck e] module YabbaDabbaDo
    + 203574 [sonoflilit@g] ...
threads.html
top