280779-282747

280565-281424 subjects 280930-282761

Easy way for a Nuub to get link-element from a html-source
280779 [marcus.strub] im very new to ruby and im not sure how to do this the easiest way in
+ 280791 [kbrust@ba ds] How about hpricot?
+ 280795 [peter@ru yr ] ==========================================

Re: Easy way for a Nuub to get link-element from a html-sour
280788 [ljjarvis@gm ] Check out hpricot.
280793 [marcus.strub] ok, hpricot then.
280803 [marcus.strub] That looks good. That looks good. Thank you!
280806 [peter@ru yr ] Hm yeah, but the downside (as of the recent version - it'll be fixed in

Parsing XML file
280792 [martin@an le] I have created a Buffer class with read, write and print methods. Now i
280810 [phrogz@ma .c] ...
+ 280986 [fox@ns l. su] and that's all I'm gonna write.
+ 280990 [MonkeeSage@g] Heh, yeah. But I can sympathize, because I also wish that other people

Re: Is this pattern current?
280799 [sylvain.joye] AFAIK this is called #returning in both facets and activesupport. There

Detecting active windows process
280802 [dannyhiemstr] Is there a way to detect if a specified program e.g. firefox.exe is
+ 280804 [jari.william] One way is to use the GetForegroundWindow() Windows API. In case the
| 280808 [dannyhiemstr] On 26 nov, 14:44, Jari Williamsson
+ 280835 [djberg96@gm ] require 'sys/proctable'

[ANN] CGIExt 0.0.2 released - a re-implementation of cgi.rb in C  extension
280807 [kwa@ku at -l] I have released CGIExt 0.0.2.

Escape character is strings
280814 [deepu.damoda] I'm very new to Ruby. My problem is simply to search for '\' character
+ 280816 [cvonkleist@g] In a quoted expression, the backslash escapes the following character,
+ 280817 [caduceass@gm] Your irb line 5 is just fine.  It's the line 4 that seems wrong.  To
+ 280844 [jacob.dunphy] You can use the integer equivalent of the character as well.

Removing duplicates and substrings from an array
280818 [slarbi@gm il] ...
+ 280819 [s.korteling@] ["Bob", "John", "Bobby", "John"].uniq!
+ 280820 [shairon.tole] You tried to use the method uniq?
+ 280821 [cvonkleist@g] You can use Array.uniq to remove duplicates.  For removing words that
| 280822 [shevegen@li ] I think there could also be a .map solution but I cant figure it out
+ 280831 [yermej@gm il] arr = ["Bob", "John", "Bobby", "John"]
  280832 [lionel-subsc] You'll have surprises if there's a "." element...
  + 280833 [lionel-subsc] It should be b.index(a) (I rejected the superstrings instead of the
  + 280834 [sepp2k@go gl] I'd make that index into include? because you don't really care about the
  | 280838 [lionel-subsc] I agree, the code is then easier to read too.
  | 281271 [slarbi@gm il] ...
  + 280836 [yermej@gm il] On Nov 26, 11:20 am, Lionel Bouton <lionel-subscript...@bouton.name>

Problems with GServer not accepting connections (resolved)
280826 [cvonkleist@g] This weekend I had some trouble with a GServer-based server when my

How to map XML attributes
280827 [transfire@gm] I'm working on a DSL that maps XML <=> Object, and I'm stuck on where
+ 280841 [JAMES.T.MCLA] charset="us-ascii"
+ 280862 [phrogz@ma .c] I don't share your opinion on xmlns implying the latter. All
  + 280897 [transfire@gm] Thanks guys,
  + 280906 [paradisaeida] This is such a good article.

Has the soap/soap4r module changed recently?
280828 [davew33@gm i] I'm taking babysteps learning ruby. The following snippet of code

[ANN] WNY Ruby Group, first meeting
280829 [wayneeseguin] ( http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=227+Delaware+Ave,+Buffalo,+Erie,+New+York+14202,+United+States&sll=42.890586,-78.876839&sspn=0.05886,0.090294&ie=UTF8&z=17&iwloc=addr&om=1
280885 [ryand-ruby@z] congrats!

Re: European Ruby Conference 2008 in Prague, Czech Republic?
280839 [jacqui@br gh] I think it would be pretty cool to have it in September and thus allow

Re: one-liner for checking platform?
280842 [marcel@ve ni] marcel
280843 [shevegen@li ] Use the constant RUBY_PLATFORM
280845 [fxn@ha hr f.] RUBY_PLATFORM.include?('darwin')

Ruby 1.8.6 patchlevel 111 on Ubuntu 7.10 -  How?
280863 [kimrithlim@g] The ruby from Ubuntu's repository is 1.8.6 patch 36.
280929 [luislavena@g] 1st: uninstall the ruby version that came with ubuntu. This is
+ 280941 [kimrithlim@g] Thank you. It works now.
+ 281058 [wyrd@co e- n] This looks helpful.  One thing I can't help but wonder is what

[JOB] Full-Time Developer in Vancouver, BC (Smalltalk + Seaside)
280864 [bpopov@gm il] I'm pleased to announce that we are looking for another full-time
280874 [xcampanoli@g] I'd be happy to come up there to work if you can get me a visa.

[ANN] Rucola 0.0.2 released.
280865 [eloy.de.enig] ...
280872 [eloy.de.enig] ...

ANN: Sequel 0.4.1 Released
280868 [ciconia@gm i] Sequel version 0.4.1 has just been released. This release includes
280878 [gerardo.sant] Thanks Sharon. I'll give this a try and let you know.

Fwd: Please Forward: Ruby Quiz Submission - Stock Portfolios
280869 [james@gr yp ] ...

Re: gem install issue - possibly RubyForge?
280871 [fxn@ha hr f.] sudo gem install Platform
280955 [fxn@ha hr f.] I noticed the capital "P" in the download page at RubyForge, the .rb

[ANN] North Florida Ruby Brigade Formed
280877 [scaudill@gm ] Announcing the North Florida Ruby Brigade.

Re: "Why I Program In Ruby (And Maybe Why You Shouldn't)"
280879 [kyleaschmitt] After suppressing the urge to rant and scream troll subsided, there
+ 280883 [mark@ma kr s] These are the sorts of growing pains that most languages hit as
| 281030 [MonkeeSage@g] Since no-one has brought up ruby's "blank-space is meaningful" cousin
+ 280888 [robert.dober] The trollish tendencies were obvious, too obvious IMHO, anyway the
+ 280899 [fedzor@gm il] Excellent post!
  280913 [znmeb@ce ma ] We (and lots of other open source projects) do have a smaller-scale
  + 280916 [lloyd@2l ve ] Well, I think that it is overstating things to say that it will *never*
  | 280947 [raulparolari] If you feel down (I did) after reading this intelligent but depressing
  | 281019 [richard.conr] Damn right. I don't listen much to podcasts, but I am listening to *this*
  | 281031 [trollenlord@] ...
  | 281035 [MonkeeSage@g] 1.) Tk has an extension called Tile [1], which should be part of the
  | + 281037 [mental@ry ia] Let's not forget the option of using Java GUI toolkits like Swing or
  | | + 281046 [MonkeeSage@g] Good catch! And on that note, an app people may be familiar with is
  | | | + 281051 [mental@ry ia] In terms of look and feel, Swing is at least as "native" as Gtk is; both
  | | | | 281057 [MonkeeSage@g] Nice. I've only played a little bit with JRuby, no GUI stuff, just
  | | | | 281068 [mental@ry ia] There are a lot of niceties to JRuby's Java integration -- for
  | | | | 281076 [MonkeeSage@g] A bit off-topic, but how does JRuby resolve that (i.e., the
  | | | | 281083 [mental@ry ia] It uses the Java reflection API to enumerate methods on Java classes
  | | | + 281062 [trollenlord@] ...
  | | + 281049 [jari.william] So which of these GUIs should be included in the standard Ruby
  | |   281052 [mental@ry ia] I'm not sure any of them need to be in the standard distribution
  | |   281064 [trollenlord@] ...
  | |   281075 [mental@ry ia] That's what I'm getting at.  For the most part, today, users have to
  | + 281044 [jari.william] I believe QT would be a no-no in the default Ruby distribution, due to
  | | + 281050 [MonkeeSage@g] On Nov 27, 1:38 pm, Jari Williamsson
  | | + 281063 [gerardo.sant] On Nov 27, 2007 1:38 PM, Jari Williamsson
  | + 281060 [trollenlord@] ...
  | | 281070 [MonkeeSage@g] But you are complaining about the general state of affairs; not
  | | 281074 [trollenlord@] ...
  | | + 281079 [MonkeeSage@g] You might be interested in XULRunner [1] from the Mozilla foundation
  | | | + 281085 [mental@ry ia] Personally, I don't think XUL does a very good job of speparating
  | | | + 281087 [trollenlord@] ...
  | | + 281081 [MonkeeSage@g] It actually would, since Cairo is full bitmap rendering suite...it
  | |   + 281086 [mental@ry ia] The Shoes drawing stuff doesn't expose cairo directly, however.  In
  | |   + 281088 [trollenlord@] ...
  | |   + 281089 [shevegen@li ] "THAT is state of the art and would make defining most of the GUIs a
  | |     281193 [trollenlord@] ...
  | + 281189 [luc@ho k- on] Calling all these libraries "native look and feel toolkits" is just
  + 281045 [lojicdotcom@] On Nov 26, 8:35 pm, "M. Edward (Ed) Borasky" <zn...@cesmail.net>

Ruby DBI Help Needed
280881 [mitra@cs ut ] We have MySQL database version 4.1.7 and we recently installed

About a regular expression
280882 [t5in9tao@gm ] I really don't unserstand why my regular expression don't scan a string.
+ 280884 [t5in9tao@gm ] result variable.
+ 280891 [yermej@gm il] Since your first "\." is inside a double-quoted string, it being put
  280895 [t5in9tao@gm ] Thank you. But I belive that don't work yet, even if I update the code
  280898 [phrogz@ma .c] domain_name =3D /[a-zA-Z0-9-]{1,63}\.(?:aero|biz|com|org)/
  280903 [t5in9tao@gm ] Thank you Gavin Kistner! That's working perfectly.

A plea to all RubyForge maintainers
280886 [ news@ja .f ] Please remember that there are a number of people who read the global
+ 280918 [ryand-ruby@z] HAHAHA!!! I dunno how many times I've bitched about that... thank you.
| 280945 [ news@ja .f ] If they were all as well-writen and up-to-date as the rest of the articles,
+ 281282 [steven@lu os] And it's not just the RSS--it's the RubyForge front page!
  281304 [tom@in oe he] Yup, but those get filtered... only about a third of the news items

Most elegant way to do this?
280901 [rbysamppi@gm] Are there any more elegant, concise, pithy, and more Rubyish ways of
+ 280902 [alex@bl ck e] def roll(number_of_dice)
| + 280946 [phrogz@ma .c] You missed the +1 needed to take rand(5) to 1..6 instead of 0..5.
| | + 280964 [shortcutter@] And everybody apparently missed 6 because rand(5) will yield *5*
| | | + 280965 [shortcutter@] Of course I wanted to say that it /practically/ saves addition efforts
| | | + 280967 [alex@bl ck e] Nobody said dice have to be cubic...
| | | + 280995 [phrogz@ma .c] Oh crimeny...oops. :p
| | + 280966 [alex@bl ck e] Oops :-)
| + 281227 [cjs@cy ic ne] If you're interested in pursuing the study of elegance this direction,
+ 280904 [JC@sp mt st ] I don't think there's really anything you can do to it, but I would
+ 280972 [phasis@gm il] If you want the dice number, you should use rand(6).
+ 280976 [w_a_x_man@ya] def sum *x
| 280985 [lojicdotcom@] Clever, but 3 times slower than the original (after correcting it).
| 281095 [w_a_x_man@ya] What so-called correction did you imagine that you had to make?
| 281105 [lojicdotcom@] Sorry for the ambiguity; "it" referred to the original - see other
+ 280989 [lojicdotcom@] As others have pointed out, you need rand(6).next to get (1..6);
| + 280991 [lojicdotcom@] Actually make that ~12% faster with the following - just explain with
| | 280999 [lojicdotcom@] Why be satisfied with a 10-12% increase in speed when we can have an
| | + 281003 [eeklund@gm i] If you're going to do overkill, do overkill.  You've got an extra
| | | + 281011 [cameron.mcbr] hah!  overkill not only on method, but also in worry.  biased Nd6?
| | | + 281040 [lojicdotcom@] I assume you're just having fun, but even so, if your compiler doesn't
| | + 281098 [w_a_x_man@ya] The original poster didn't ask for the fastest possible
| |   281182 [lloyd@2l ve ] OOOOO!  I know this one!
| |   + 281188 [lojicdotcom@] You do realize that the C code I embedded in the Ruby program actually
| |   + 281198 [w_a_x_man@ya] Glad you liked it.  It strikes me as bizarre that so many Ruby
| |     281244 [eeklund@gm i] I would guess because more people know C than Pascal, and it is easier
| |     281275 [w_a_x_man@ya] In C, in order to call by reference, you have to pass the address
| + 281021 [shortcutter@] def roll num_dice
|   281041 [lojicdotcom@] No apology necessary, I beat you to it :) (I assume you meant sum =
|   281043 [shortcutter@] Yes, of course.  Copy & paste...
+ 281059 [fred@la av .] class Fixnum

Bizarre Floating point errors in Ruby? Serious bug?
280905 [space.ship.t] I've come across a strange bug in ruby (running 1.8.6 on Linux, but
+ 280907 [cameron.mcbr] Samuel,
| 280911 [space.ship.t] Ah, that makes sense. I kind of suspected it may be something like
| 280915 [cameron.mcbr] On 11/26/07, space.ship.traveller@gmail.com
| 280922 [space.ship.t] I understand this is not a problem for just Ruby, but in this case the
| 280926 [MonkeeSage@g] Float#to_s is doing the formatting. If you want it like python, do it
| 280954 [space.ship.t] Thanks for this useful information. After further investigation,
| + 280963 [shortcutter@] You can save yourself the effort. No computational machine that uses
| + 280968 [alex@bl ck e] #to_i doesn't round, it truncates.  If you want to round, use #round.
| + 281261 [ shot@ho .p ] Why isn=E2=80=99t it? I might have learned basic math years ago, but to
|   281264 [mental@ry ia] This comes up a lot, and I guess the thing that most people have a
|   + 281306 [gwtmp01@ma .] That and the fact that internally numbers are represented in base 2
|   | 281310 [MonkeeSage@g] I think the OP understands about bases (if I may presume a bit here!).
|   + 281497 [ shot@ho .p ] as
|     281503 [hramrach@ce ] ROTFL
+ 280908 [alex@bl ck e] irb(main):007:0> sprintf("%0.12f" % (-140.14 * 100))

Object Oriented Help
280909 [matt_watir@h] We have been using Ruby/Watir for quite some time now.  It is a useful
281013 [aledonne.lis] This is precisely what an ORM (Object Relational Mapper) does, mostly
281146 [shortcutter@] Adding to that: Matt, first of all you should separate persistence

FEATURE SUGGESTION: Accept default value for to_f and to_i
280921 [gazmcgheesub] I suggest that to_i() and to_f() have an optional parameter added with
+ 280924 [matz@ru y- a] I think Float(astring) that raises an exception for invalid string can
| 280933 [gazmcgheesub] Thankyou for replying matz. I very much like the existing to_i and to_f
| 280934 [ara.t.howard] but, unless you use #to_i exactly as it is now that is still the
| + 280935 [MonkeeSage@g] Why not opts.fetch('base', 10)? Does getopt do something fancy?
| + 280942 [gazmcgheesub] Of course if you were chaining class-specific methods like abs you would
|   + 280949 [MonkeeSage@g] I could be dense; well, I probably am. No, I'm sure about it. ;) But
|   | + 280984 [shortcutter@] Another point you did not mention (as far as I can see): optimizing
|   | + 281106 [gazmcgheesub] Wow, thanks for doing the numbers Jordan.
|   |   281413 [MonkeeSage@g] NP. I was curious about the performance penalty myself. Might I
|   + 280951 [matz@ru y- a] Argument for String#to_i is already taken for base specification, i.e.
|   + 281417 [daniels@pr n] =20
+ 280994 [transfire@gm] if (num = astring.to_f) == 0

Ruby on OLPC??
280923 [znmeb@ce ma ] I've been seriously considering the One Laptop Per Child Give One Get
+ 280957 [ryand-ruby@z] well, I was going to chime in with support / info, but not after that...
| + 281005 [znmeb@ce ma ] I've loaded Squeak three times on my Linux boxes. I've bought both
| + 281849 [brabuhr@gm i] IIRC, the restriction was on what could be used for a core component of
| | 282082 [charles.nutt] If it can run Java, it oughta be able to run JRuby just fine.
| | 282087 [stephen.bann] It can run Java but it is not part of the core install. The storage is limited and the current Java licensing doesn't allow distribution of a truncated version.
| + 282679 [znmeb@ce ma ] Well ... both the full-sized Squeak and the eToys version packaged in
|   282692 [hramrach@ce ] It is generally developed that way - you have a piece of hardware, and
|   282747 [znmeb@ce ma ] Since it's an open project, nearly all of the development history,
+ 281134 [joshua.cearl] There's also the eeePC by Asus and the Nokia N800 if you want some
| 281300 [znmeb@ce ma ] I have a Zaurus 6000, but I haven't gotten a chance to try the
| 281390 [steven@lu os] Hmmm.  That's not strictly true.  Reading the list through Gmane, I
| 281595 [joshua.cearl] That's the part that bothers me. Exporting technology resulting from a
| + 281623 [znmeb@ce ma ] Please ... if you want to debate OLPC politics, take it to the mailing
| | 281651 [why@ru y- an] Wait, Ruby is taught in US schools.  Parkrose Middle in Portland added
| | 281661 [znmeb@ce ma ] Well ... I've spent most of the past few days immersing myself in the
| + 282096 [yermej@gm il] On Dec 1, 8:34 am, Joshua Cearley <joshua.cearleyNOS...@gmail.com>
+ 281177 [aglarond@gm ] Go for it!  The price is extremely reasonable, and it's for a good
+ 281286 [steven@lu os] I was going to say "tough luck".  Was the original 2 week limit just
  + 281289 [TimHunter@nc] Interesting. I just got confirmation that I'll be receiving mine. I
  | 281302 [znmeb@ce ma ] Probably ... I downloaded one a couple of months ago and it came up fine
  + 281301 [znmeb@ce ma ] It's been extended to the end of December. It's still only available in
    281854 [yermej@gm il] On Nov 28, 9:13 pm, "M. Edward (Ed) Borasky" <zn...@cesmail.net>
    281982 [znmeb@ce ma ] Common Music and David Cope's algorithmic composition software. Some of

SOAP attachments and WSDL
280928 [mikisvaz@ya ] I'm doing a webservice that needs to transfer large files, so I'm using
281196 [mikisvaz@ya ] I'm droping attachments altogether and passing the matrix as a string,
threads.html
top