219330-220970

219075-280469 subjects 219560-236211

IO.readint ?
219330 [funkaster@gm] I'm parsing a binary file, and need to read an integer, something I
+ 219337 [tim.pease@gm] class IO
| + 219346 [invalid@gm .] Yet you cannot be sure that sizeof(int) is 4.
| | + 219361 [funkaster@gm] no, but in my case works just fine. it will always be a 4 byte unsigned integer.
| | | 219441 [hal9000@hy e] rolando -- [[ knowledge is empty, fill it ]] --
| | + 219514 [shortcutter@] class IO
| |   + 219516 [invalid@gm .] Hey, only now I learnt that sizeof(int) is 4 even on my amd64 machine. I had to
| |   + 219586 [tim.pease@gm] Ooooo ... clever!
| |     + 219615 [shortcutter@] Yes, most likely.  No new object is created.
| |     + 219667 [rossrt@ro co] I thought that 'N' was _always_ a 32-bit in network byte order?
| + 219363 [funkaster@gm] Thanks a lot, I'll try that!!!
|   219364 [tim.pease@gm] No problem. Take a look at bit-struct if you find yourself needing to
|   219367 [ara.t.howard] have you been using this for your stuff tim?
|   219369 [tim.pease@gm] No, we've just been parsing very large pixel images.  No complex data
|   219371 [ara.t.howard] have you looked into using narray?  then you can mask the entire image at
+ 219353 [rossrt@ro co] (dta = File.read('ints.bin')).unpack('I' * (dta.length / 4))

rb-appscript 0.1.2 update
219354 [has.temp3@vi] This release fixes a bug where enumerator values returned by

Unsubscribe
219357 [Mohammed.Maj] Unsubscribe please!
219482 [markonlinux@] Who me? ;-)
219484 [matz@ru y- a] I did unsubscribe him.

Re: Ron 0.1.0 Released
219368 [transfire@gm] I agree, interesting. I would recommend howerver using something other

Multiple values for the same key in a Hash
219370 [dominicson@g] I simply want multiple iteams (etc, price, quantity, and name) appended
+ 219372 [dpenney@gm i] Just add the items as an array or another container object.
+ 219373 [robert.head@] Uh... Wouldn't a hash of hashes do the trick?
| 219375 [dominicson@g] Yes, i was thinking your later suggestion, but how do i iterate through
| 219377 [gavin.kistne] It isn't so.
+ 219513 [shortcutter@] Like this?
  219616 [shortcutter@] robert

[ANN] Pre-RubyConf Gathering
219376 [tim.pease@gm] A small gathering is being planned for the RubyConf early arrivals. If
+ 219400 [ben@bl yt in] What does transportation from DEN (or the conference hotel) to there
| + 219401 [gavin.kistne] (The drop off point is quite close to Southern Sun.)
| | + 219403 [james@gr yp ] I lived in Denver for almost 10 years and I can tell you that the RTD
| | + 219414 [ara.t.howard] and leaves __straight__ from the airport...
| + 219413 [ara.t.howard] the bus system is really great.  if people are into it tim and i will post
|   219415 [matt@te hn r] I'll be driving to RubyConf from Austin.  If anyone would like to ride
+ 219432 [Bil.Kleb@NA ] Cool. I'll be there; I'll have a rental car; I'm planning
+ 220308 [tim.pease@gm] In light of the GeekBeer announcement (http://geekbeer.info) from
  220329 [ben@bl yt in] Will you and Ara be joining us?
  + 220330 [ara.t.howard] i'm going to try, but bil kleb may be visiting in boulder, i got a wife and
  + 220331 [tim.pease@gm] I'll have to decline.  Wife, kid, work, RubyConf -- it's a busy week.
    220382 [paul@ic no l] At least three of those can be dumped straight off. RubyConf is all

New to ruby questions
219382 [its_conebred] I am still new to ruby and programming itself. This is my first
+ 219385 [amos.l.king@] Start by placing your class defs at the top of the file.  There are
+ 219388 [matt@ti bi s] Order is kinda crucial. Declaration of class Game must precede its use.
+ 219392 [sastph@sa .c] Welcome to Ruby, Jeremy!
| + 219393 [gavin.kistne] while game.get_player_command != 'quit'
| + 219394 [santiago.lun] Welcome Jeremy,
+ 219398 [cohen.jeff@g] Welcome to Ruby, Jeremy!
  219399 [its_conebred] Thanks man. It does help. I will be asking plenty of other questions,
  219409 [its_conebred] I do have another question. I want to do something to set the point
  219412 [gavin.kistne] def points
  219509 [amos.l.king@] With the ace all you have to do is check to see if the total hand

Mission statement: Ruby application for Windows
219389 [vshepelev@im] The following text is something like "what I'd want to see". I'm going to do
+ 220833 [hramrach@ce ] So what you want is a hacked ruby interpreter that can read some stuff
| 220941 [vshepelev@im] Yeah, I know. I just have no time to do it now :(
+ 220970 [rtilley@vt e] Rubyscript2exe is the best approach to this right now. One day, there

Ruby to Applescript
219390 [devaulw@on b] I thought this might be of interest to list readers.  I used to do some
219448 [matt@ti bi s] You can use it *anywhere* you would have used AppleScript. That's the
219489 [has.temp3@vi] Yes, rb-appscript lets you use Ruby anywhere you'd use AppleScript...

Trying to understand JavaScript from Ruby's view
219396 [sam.s.kong@g] I have a question which is not directly about ruby but about other
219492 [pseudo.meta@] It would be implementation specific. In Rhino, they are Classes (ref

myspace meets tucows and planetsourcecode?
219404 [usenet_daugh] Is there a myspace type site that is a place for programmers to post
+ 219406 [ben@bl yt in] RubyForge for Ruby-specific stuff: http://rubyforge.org
+ 219438 [PeateyK@gm i] common-lisp.net
  219723 [logancapaldo] I'm guessing this reply means this message was cross-posted. Joy.

Ruby expressions vs. values (like Perl?)
219405 [jmg3000@gm i] Does Ruby use the same terminology as Perl with regard to expressions
219416 [comp.lang.ru] This is what many people dislike about perl. In Ruby, the
219439 [jmg3000@gm i] On 10/12/06, Booker C. Bense
+ 219444 [alexg@eb .a ] Someone with better understanding of Ruby internals will need to
| 219533 [rick.denatal] Yep, that's exactly what seems to be happening.
| 219544 [jmg3000@gm i] Ah. Of course. Thanks.
+ 219521 [comp.lang.ru] Yes. For good or ill, Ruby has various syntactic sugar bits

[ADV] New Agile Web Development with Rails beta
219410 [dave@pr gp o] I've uploaded the B1.14 version of AWDwR.
220588 [bealach@gm i] Dave,
220618 [dave@pr gp o] You'll need to ask the core team. Right now, they're hot on REST, and

Ruby equivalent of assemble RE?
219417 [newhoggy@gm ] Is there a ruby equivalent of this?
219456 [james@gr yp ] I'm not aware of one, though we did play with the idea a little in a
219477 [kenneth.m.mc] If what you want is a way to easily assemble and use regular
219479 [newhoggy@gm ] Sounds interesting, can I have a look at the source code?  I may just

GeekBeer @ RubyConf
219418 [dpp@pr je ts] Howdy,
+ 219422 [james.britt@] Oh no!  Pre-Conf conflict!
| 219430 [mguterl@gm i] ...
+ 219434 [Bil.Kleb@NA ] Hmmm... drinking, and no driving?  Nice plan.  May have
+ 219442 [matz@ru y- a] I will be arriving at the airport around 19:30.  I think I will be
| 219452 [matt@te hn r] How about root beer?  No alcohol & no caffeine.
+ 219443 [nicksieger@g] ...
+ 219464 [ezmobius@gm ] I'll be there around 7 or 8. I'd love to go our to the other bar as

[ANN] RubyInline 3.6.2 Released
219421 [ryand-ruby@z] RubyInline version 3.6.2 has been released! This is a quick patch for

Can't get ActiveSupport::Multibyte going
219424 [tbray@te tu ] I've tried a few options but none of them have worked. Rather than

Ruby Regexp vs Perl and C#
219425 [chrismmeyers] I am having trouble with the Ruby regexp engine and don't know if it is
+ 219447 [matt@ti bi s] gsub
| 219449 [matt@ti bi s] "banana".gsub(/(an)*/) {
+ 219455 [james@gr yp ] "banana".scan { puts "#{$`}<<#{$&}>>#{$'}" }
+ 219796 [verno@ma li ] It's a bit tricky but still doable!
  220060 [chrismmeyers] Thank you Verno, that is what I needed.  By using the block syntax I am
  220174 [martindemell] Also, if you do a

Hash & keys...
219427 [sebwautelet@] I'm having some trouble understanding how hashes work in Ruby. Consider
+ 219431 [TimHunter@nc] It's not enough that they have the same hash value or that obj1 == obj2.
| 219467 [kenneth.m.mc] Testing reveals that they don't. but that strikes me as a bug in the
+ 219433 [rabbitblue@g] Hash keys can be any object. So your hash, h, has one key, the object v.
+ 219437 [rabbitblue@g] Yes, v and v2 are equal. But that is irrelevant with regards to your
  219475 [gavin@re in ] I think it is relevant, given that the Vector class is designed to be
  219542 [rick.denatal] class Vector
  219559 [gavin.kistne] LOL, nice find. I was ri'ing Vector and was wondering what eqn? was for.

Any way to get lists to throw exceptions on incorrect accesses?
219429 [kenneth.m.mc] I'm slowly doing more in Ruby (in addition to what I do in Python), as I
+ 219445 [jcribbs@ne p] Array#fetch will raise an exception if the index does not exist.
| 219454 [kenneth.m.mc] Thanks. Too bad I can't use the [] indexing notation, though.
| 219458 [kevin.olbric] On Oct 12, 11:07 pm, Kenneth McDonald
| 219462 [kenneth.m.mc] Yep, got that one. Unfortunately, there's no equivalent for lists.
| 219506 [james@gr yp ] => [[], {}]
| 219614 [kenneth.m.mc] Sorry, shoulda phrased more clearly; there's no solution that checks
+ 219459 [ruby-ml@ki t] =20
  219468 [kenneth.m.mc] Certainly possible. I'm not uncomfortable with new ways of doing things
  219473 [ara.t.howard] it's not that hard if you want, and you only need modify the array's you desire

attr_reader + attr_writer?
219435 [joeat303@ya ] Is there a class method that combines attr_reader and attr_writer? I
+ 219436 [khaines@en g] class Foo
+ 219440 [its_conebred] I'm still new to this whole ruby and programming stuff, but doesn't
  + 219490 [v.discharge@] attr_accessor defines both a writer and a reader
  | 219500 [dblack@wo bl] Ruby doesn't have any cattr_* methods, though.  Also, if you write a
  | 219554 [transfire@gm] To be clear cattr methods create both instance level and class level
  + 219501 [shevegen@li ] yes, attr_accessor does this.

Rails/Ajax/File::Tail?
219446 [caldridge@gm] I'm using File::Tail for a few projects and.. would like to

Silent out-of-index problems--how much of a problem are they really?
219463 [kenneth.m.mc] As a Python user starting to mess around with Ruby, one of my biggest
+ 219470 [ruby-ml@ki t] =20
+ 219471 [james.britt@] Is it *failing*, or simply returning a value that does not map to your
+ 219472 [gavin@re in ] I personally haven't had trouble with this. I thought I'd point out
+ 219474 [vjoel@pa h. ] In general, ruby encourages you to use iterators more than indexing
+ 219476 [hal9000@hy e] Truthfully, I'm not sure I've ever had one.
+ 219507 [james@gr yp ] As has been shown, Array does include a fetch() method that throws
+ 219530 [comp.lang.ru] If you use the Ruby error handling methodology, it's generally

Large File Reading and Writing
219480 [has.sox@gm i] ...
219481 [vjoel@pa h. ] Something like this maybe...
219483 [has.sox@gm i] ...
219485 [vjoel@pa h. ] Instead of the line
219642 [has.sox@gm i] ...

setup.rb test
219486 [alexg@ku cr ] I seem to be having a Friday afternoon brain-fade. I'm trying to get
219517 [transfire@gm] You're using Test::Unit::TestCase in test.rb? If we could see a snip of
219660 [alexg@eb .a ] Strange, I had included test.rb, but the newsgroup gateway seemed to

Trouble delecting UNC file on window 1.8.4
219487 [cgraff@ch ts] I have a problem delecting a file that has a UNC path. I am using 1.8.4
+ 219567 [wilsonb@gm i] Are you sure you really have the permissions you need to delete that file?
+ 219572 [nobu@ru y- a] I don't think it is related to UNC.
  + 219580 [cgraff@ch ts] Well thanks for both respnses but they "seem" to be somewhat in
  + 219581 [cgraff@ch ts] Do you think it is becuase you are going between two different boxes and
    219589 [cgraff@ch ts] Thanks to the bvoth of you for tryin gto resolve this for me. Turns out

[rubyconf] coffee shops in the area?
219488 [rsanheim@gm ] Can any locals recommend good coffee shops w/i walking distance of

[QUIZ] A* (#98)
219502 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 219505 [james@gr yp ] Just FYI, the summary for this quiz will be a little early.  I will
+ 219525 [tibbettj@ve ] Step #5 is missing. Should it be '???' or 'Profit!'?
| 219531 [james@gr yp ] Oops.  That's my fault.  I consolidated two of the steps in the
+ 219526 [pseudo.meta@] Slight concern- aren't you actually here giving us a solution to a
| + 219535 [lukfugl@gm i] Actually, the basic algorithm he explained isn't quite A-star (I'm
| | 219549 [sander.land@] Isn't he just explaining a greedy search without backtracking?
| | 219571 [lukfugl@gm i] 1) use a priority queue (prioritized by estimated cost)
| | 219573 [james@gr yp ] The priority queue is the major aspect not really touched on by the
| + 219541 [benjohn@fy h] Well, A* is a _dreadful_ algorithm for route finding, so there's plenty
| | + 219547 [pseudo.meta@] written in Matlab. :(
| | + 219550 [benjohn@fy h] If no one minds too much, I'd like to reject what I said about 20
| + 219553 [james@gr yp ] I do encourage quiz creators to do this, yes.  It's being done here
+ 219718 [martin@sn wp] No you can't.  A* works IF AND ONLY IF the estimation function is
+ 219875 [hungrylist@g] Here's my solution, first submission to ruby quiz, I hope is not 100%
| + 219918 [Glen.F.Panko] ...
| | 220010 [martin@sn wp] As with most other solutions posted so far, this solution fails on
| + 219946 [martin@sn wp] Unfortunately, the A* algorithm depends on the fact that the estimate
|   219961 [hungrylist@g] The problem of my *1 version is how the choice among tiles with the
+ 220117 [louis.j.scor] #!/usr/bin/env ruby

Passing the data from a tkEntry widgit to a variable
219510 [merrua@ya oo] I'm a bit confused about this,
219545 [merrua@ya oo] Ok.
219641 [nagai@ai ky ] mytext = @mytext = TkVariable.new('hi this is a test')
220025 [merrua@ya oo] Trying your examples and think I understand them and what
220103 [m_goldberg@a] Bind 'ButtonRelease-1' and its action to your button widget.

Re: Presenting a fully automated DVD authoring rakefile
219511 [richard.conr] Might be worth posting to http://www.doom9.org

YART - Yet Another Ruby Tutorial!!!
219512 [paul.barry@i] [James Edward Gray II suggested I send this email to the list, as he
+ 219534 [amos.l.king@] I think you've done a great job.
+ 219546 [richard.conr] You should cross post to the emerging Ruby-Ireland mailing list too.
| 219612 [paul.barry@i] I've no problems making the OpenOffice.org IMPRESS files available on my
+ 219640 [satish.talim] ...

My Fellow Geeks
219518 [james@gr yp ] Seems pretty timely with RubyConf on the horizon.
219548 [nicksieger@g] ...

Re: Posix Pangrams (#97)
219520 [interfecus@g] Here's my solution to the problem. I'm not quite sure why it doesn't

Why does 'chroot' interfere with 'system'?
219522 [sy1234@gm il] This always fails.
+ 219523 [mike@st k. a] Once you have chrooted where do you expect to get the external
+ 219524 [alibby@ta ge] When you chroot to an area on the file system, that area/
| 219529 [pseudo.meta@] The odd thing is, that seems like the obvious answer. However, if you
| + 219536 [decoux@mo lo] ruby will try to exec /bin/sh, but it can't find it.
| + 219537 [jan.svitok@g] As the previous posters said: do you have your shell in the chrooted dir?
| | 219543 [pseudo.meta@] No, but that doesn't normally matter as you're running chrooted in a
| + 219538 [mike@st k. a] Where do you get the shell from?
| + 219540 [ruby@ml ic m] Well, it's true and it's not...
| + 219555 [nospam@no it] Yes, it's tree, "echo " is built into most shells, but after changing roots,
|   219557 [pseudo.meta@] That makes sense.
|   219564 [sy1234@gm il] Thanks everyone.  I wanted to restrict activity to a certain branch on
+ 219528 [mike@st k. a] If you don't use external utilities would you be happier e.g.

Pernisssion denied when trying to delete or mv file
219539 [cgraff@ch ts] I have a problem deleting a file (or move a file) that has a UNC path. I

EBNF for Ruby?
219551 [sam.s.kong@g] I heard from somebody that Ruby cannot be completely expressed in EBNF.
219715 [logancapaldo] Check out parse.y (the yacc grammar for ruby) and see for yourself.

How do I round off a float to x decimal places
219552 [jatinder.sau] ...
219558 [pseudo.meta@] It rather depends on which of the 14-or-so regulalrly used rounding
+ 219556 [pseudo.meta@] But, to answer your original question: if you want a number to three
+ 219562 [transfire@gm] Look for the round_* methods.
  219565 [gavin.kistne] To get the result as a number (which, due to floating point precision,
threads.html
top