203271-235310
203012-205009 subjects 203469-206907
^ Assigning blame?
203271 [transhumanis] 'allo
+ 203274 [alex blackke] 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 web] I don't understand this regular expression
+ 203275 [decoux moulo] 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 kuicr.] 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 gma] 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 gmail] 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 gmail] 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 gmail] A quick test I did in irb suggests that methods(),
^ H- Undefined Method?
203292 [comprug gmai] 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 gmai] 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 gma] 'h' method comes from ERB::Util
203310 [comprug gmai] Thanks, I'm not used to having to call additional modules or classes
^ Showing part of an array....
203295 [lists rosina] colors = ["black","white","red","yellow","green"]
+ 203297 [Nuralanur ao] class Array
| 203302 [lists rosina] Thanks, Axel
+ 203300 [xicheng gmai] def print_color(colors)
+ 203305 [daniel.schie] puts "#{colors[0, 2].join(', ')}#{'...' if colors.length > 3}"
| + 203307 [Nuralanur ao] Rosina,
| | 203309 [lists rosina] Thank you for the explanation! That helped me understand what's going on
| + 203308 [lists rosina] That's what I thought, but this is actually being passed as an argument
+ 203335 [Dymaio gmail] I think this example is asking for the ternary op.
203367 [lists rosina] Thank you! Thank you! Thank you! Yes, that's exactly what it needs!
^ Self, looking for a good summary explanation
203299 [sambient gma] Sorry, because I have the books and have / continuing to read, just
+ 203343 [gwtmp01 mac.] 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 gma] Can somebody explain me, in detail, the differences between
+ 203320 [decoux moulo] Well, when you use keywords (like `def' 'alias') ruby use the
| 203325 [erikveen gma] I never heard of this "current" before... Interesting... So,
| + 203329 [erikveen gma] It's really only true for keyword stuff. define_method works as
| + 203389 [decoux moulo] 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 gmail] I think inspect() and object_id() confuse the issue, and trying to use
^ class declaration syntax error
203312 [junkone roge] Class SymbolObject
+ 203313 [erikveen gma] It's "class", not "Class".
| 203314 [junkone roge] 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 gma] Where dit you enter "ruby calc.rb"? In "Start/Run Command"?
+ 203322 [brabuhr gmai] "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 cesmai] 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 verni] Infinity = 1.0/0
| + 203336 [h.wickham gm] But it will everywhere that supports the IEEE floating point standard?
| + 203355 [vikkous gmai] Does anyone know a definition for Infinity that does work on all
+ 203340 [robert.dober] InfinityClass =3D Class.new
+ 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 cesmai] 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 cesmai] Which is *precisely* why dozens of hard core applied mathematicians and
| 203439 [akr fsij.org] 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 att.ne] All,
+ 203339 [ezmobius gma] 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 att.ne] Ezra,
203374 [rubytalk eac] Yes, :symbols use less memory than "Strings", but
203423 [weyus att.ne] 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 gmai] 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 gmail] 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 gma] 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 gma] Write once.
+ 203414 [ara.t.howard] module BeforeAfterInit
203943 [ben iagu.net] 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 iagu.net] 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 chart] Is there or a function, or anyone know of a hack without using if else
+ 203356 [Dymaio gmail] Here's what I've done. Numeric formatting for output is most natural
+ 203357 [_mwryder wor] irb(main):001:0> "%04d" % 1
203359 [Dymaio gmail] 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 chart] Hey, thanks to both of you for your help. I had no idea Modulus acted
203370 [_mwryder wor] It's the first Instance method for the String class in the Pickaxe book.
^ Showing similar values in a table
203369 [raffir gmail] 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 gmail] Unfortunately, while it's now showing accounts, it's now showing every
+ 203425 [raffir gmail] Fixed it!
+ 203452 [raffir gmail] Mysteriously stopped working again.
^ [ANN] Ruby-VPI 0.7
203371 [skurapat ucs] Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create
203375 [rubyfan gmai] It's great to see more EDA tools based on Ruby and it looks like
203458 [skurapat ucs] Thanks for the encouragement. :)
^ strip tags?
203372 [moore.joseph] Is there an easy way to strip html tags from strings?
+ 203378 [hhausman gma] How about using Lynx?
+ 203382 [stesch no-sp] A regex isn't always the _best_ way to deal with markup
203383 [danielbaird ] the problem is, it's not always the _correct_ way.
203385 [f andreas-s.] This is no correct HTML, < and > have to be encoded as entities.
+ 203391 [danielbaird ] That is true.. if the original poster has the luxury of only dealing with
| 203428 [moore.joseph] Thanks for the quick replys.
| 203441 [schapht gmai] 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] I'm trying to find the my documents folder for the current user in
+ 203381 [hhausman gma] How's about?
+ 203387 [jan.svitok g] Install windows-pr gem from win32 utils
+ 203409 [djberg96 gma] 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 gma] Something like this?
| 203435 [kublaikhan55] This is great! Thank you for your input.
+ 203445 [dblack wobbl] Assuming you don't have to do any massaging or escaping of the values,
^ micro authoritative dns server
203393 [xan2 ono.com] I'm new in ruby. I know that there is a class called Resolv.rb for
+ 203643 [xan2 ono.com] - Domserv is the authoritative dns server
+ 204796 [drbrain segm] resolv.rb is for writing clients. It is documented on the HEAD
^ Dividing inside iterations?
203394 [dominicson g] Learning Ruby.
203395 [rubytalk eac] Yes, but in assignement the variable goes on the left.
+ 203397 [dominicson g] Thanks for your quick reply Joey.
+ 203398 [dblack wobbl] h.each do |num|
203408 [rubytalk eac] h = [40,20,50,200]
203417 [dblack wobbl] 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 wobbl] You have to treat the hash { "key" => "123" } as a second method
^ Introduction to Foreign Keys?
203432 [raffir gmail] I'm relatively new to Rails and SQL. I've been working on an
203442 [schapht gmai] 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 xmiss] You're right, the linker isn't finding the narray lib. It would help if
203616 [samesimilar ] Thanks for responding!
203626 [fugalh xmiss] 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 xmiss] I'm interested in seeing portaudio wrapped, yes. I have a few other
^ Yadda yadda yadda operator
203438 [sonoflilit g] I was reading about perl6 on wikipedia for amusement today and I came upon
+ 203440 [rubytalk eac] To be frank, no.
+ 203443 [schapht gmai] 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 lacave.] Well, I'm sure it's possible to do something that would react like
+ 203446 [dblack wobbl] # ...
+ 203447 [dblack wobbl] 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 gma] I have a theory that programming languages die with version 6.
| | 203455 [usenet zevv.] Only a theory, or anecdotical proof as well ? :)
| | 203459 [rimantas gma] This very much depends on how you define "death" of programming language.
| | + 203464 [sonoflilit g] yadda operators are not supposed to stay till production.
| | | 203466 [rimantas gma] 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 cesmai] Yeah ... but Java 5 is really Java 1.5. :)
| | 203502 [schapht gmai] I think it's actually Java2 1.5 SE rev 5.... plus alpha. turbo.
| | + 203508 [znmeb cesmai] I wouldn't know ... never driven it at night.
| | | 203520 [sonoflilit g] In the perl 6 wikipedia page there are many coe snippets that are familiar
| | + 203524 [errant.thoug] I think that's the version that Capcom is using to write Street Fighter
| | 203538 [rubytalk eac] Street Fighter Alpha 3 rocked!
| + 203457 [dblack wobbl] This message is in MIME format. The first part should be readable text,
| + 203489 [znmeb cesmai] yabba dabba don't
+ 203558 [drnicwilliam] # TODO
+ 203565 [alex blackke] module YabbaDabbaDo
+ 203574 [sonoflilit g] #TODO if should_do?
^ get caller of method
203448 [thomas.coopm] Does there exist a method to get the object or type of object that calls this method?
+ 203450 [work ashleym] Thomas
| + 203462 [thomas.coopm] Thanks for the quick answer, I didn't think about do.
| + 203465 [erikveen gma] I didn't know about this b=binding trick.
| + 203468 [sean.ohalpin] It's not clear to me what you're doing with the binding. You don't
| 203952 [work ashleym] < SNIP bit that shows me up as clueless :) >
| 203960 [sean.ohalpin] Don't take it so hard - we're all still learning :)
| 203963 [pit capitain] And some actually enjoy it :)
| 203971 [work ashleym] Thanks for the replies people
+ 203461 [m_goldberg a] Although others may suggest fancier techniques, I suggest a very
+ 203472 [transfire gm] The same question was asked just a few days ago. It's generally a good
^ Metaprogramming problems
203463 [leslieviljoe] I am pretty new to metaprogramming, this is my first shot. I want to
203477 [alex deletem] You can do the kind of thing you want using eval, but there's easier ways in Ruby.
203513 [leslieviljoe] Holy macaroni that's cool.
threads.html
top