69703-70768

69446-70011 subjects 69942-71079

Help with regexp in range in Ruby 1.8
69703 [putsch@mx m.] Howdy,
69704 [decoux@mo lo] try

File Type problems / Re: How to test for text file
69707 [aredridel@nb] That's what perl does as well, internally -- it opens and checks the (I

Multi-dimensional arrays
69712 [marsberger@t] I have created a 'Person' class that uses multi-dimensional arrays to
+ 69793 [B.Candler@po] foo.size     # number of subarrays
| 69823 [calvin8@t- n] Whoa! Thanks, that did it... I don't know how I could've overlooked
| 69824 [B.Candler@po] No problem! If you can afford it, a paper copy of the Pickaxe book is IMO
| 69845 [calvin8@t- n] Thanks... I'll look into that. Right now, I am using the online copy,
+ 69864 [bob.news@gm ] I'd rather model InterestGroup and maybe Interest as separate classes.

ruby's History
69720 [surrender_it] there is somewhere a  "Ruby since 0.1 till 1.8"  document?
69746 [matz@ru y- a] ChangeLog describes changes and bugs since 1.1.  I have old ChangeLog

Win32OLE help
69722 [walter@mw ew] Can someone point me to some more information on using Win32OLE.  I
+ 69739 [allt@sh w. a] says...
+ 69761 [allt@sh w. a] says...

Bug in Rational?
69723 [nemo@he lo r] irb(main):001:0> require 'rational'
69744 [matz@ru y- a] I don't call this a bug, but a pitfall behavior. ;-)
+ 69751 [jim@fr ez .o] Seems to me like a misuse of the constructor.
+ 69847 [unet@re x. o] On the other hand,
  + 69854 [jim@fr ez .o] Hmm... I would avoid passing anything but Fixnum as arguments to
  + 69856 [matz@ru y- a] Rational.new is for internal use.  Use Rational().
    69857 [akr@m1 n. rg] It's not intuitive because X.new is too usual to create new instance.
    69858 [matz@ru y- a] It was Keiju's design.  But I will tell him your idea.

[Q] "dynamic_cast" with Ruby and Swig
69736 [yura@op r. o] Can anyone tell me if this is the best way to do "dynamic_cast" with
69740 [lyle@us rs s] %extend Base {
+ 69741 [yura@op r. o] Indeed.  Thank you.  I was just doing copy/paste from Swig-generated
+ 69750 [t-peters@in ] Any Chance that swig could perform a cast to the most derived type
  + 69758 [stevehart@be] Now that's what I call service!!. Just came on to ask this same question.
  + 69815 [lyle@us rs s] It's not completely automatic, but there is feature that handles part of

Extend initialize method in String Class
69738 [allt@sh w. a] My first Ruby newbie question.
69743 [austin@ha os] Use Module#alias_method.

Are procs thread-safe?
69747 [tcfelker@mt ] I'm assuming that it's not good to make gtk2 calls in threads other than

text based GUI?
69748 [ptkwt@sh ll ] Seems I recall someone working on a text-based GUI.  I can't find anything
69749 [hal9000@hy e] Was it JTTUI, the curses-based interface
69755 [ptkwt@sh ll ] That's it.  It's not under GUI, but TUI.

Adjusting or creating new instance members?
69756 [kudling@kd .] in my little Project OPAL (Ordinary PAth Library, www.kudling.de/opal/) i have

Hackathon at OSCON
69757 [ptkwt@sh ll ] I just noticed this on the OReilly OSCON site

Multi-Lingual Ruby
69762 [jweirich@on ] I was following a Java VS Perl discussion on a web board that I read.
69763 [nemo@he lo r] ;)
69765 [nemo@he lo r] DOH!
+ 69768 [rpav@nw in .] Actually, you shouldn't be, since that seems to (somehow) be the
| + 69769 [dcarrera@ma ] Indeed, this is an odd behaviour.  Below is another example.  It certainly
| | 69771 [jweirich@on ] Perl allows the same thing.  Consider the file masquerade.pl ...
| | + 69772 [dcarrera@ma ] It also works for the shells (then again, I would have expected that).
| | | 69776 [batsman.geo@] Can we infer something on the evilness of languages (as in 'intention
| | + 69773 [james_b@ne r] So that, some time later, you can declare,
| + 69790 [heaney@ca le] In the Perl documentation, it says
|   69791 [denshimeiru-] But it's implemented differently.
+ 69770 [jweirich@on ] No problem ... I've been burned enough that I read an entire thread

1.8 marshal.c compatible with 1.6?
69777 [ gm@na el gr] We are currently using ruby 1.6.8 on a number of projects.
69779 [nobu.nokada@] Although not tested, this may work.

ruby can't find init.tcl
69780 [aussie2010@y] require 'tk'

Float.to_rational
69781 [achou@te le ] ...

question about ruby-GD...
69788 [jonnypichler] i have to draw a filled polygon into a .png-file. i chose ruby-GD to do

Matrix bug
69792 [unet@re x. o] An old bug from ruby 1.6 is still unfixed in the ruby 1.8 preview.
69836 [unet@re x. o] This bug affects more than just the determinant (though I think the
69838 [jim@fr ez .o] Is the problem that you are asking for 5/9 not to be zero?
69859 [unet@re x. o] The problem is that, when mathn is not required, matrix.rb
+ 69865 [jim@fr ez .o] [explanation snipped]
| 69886 [unet@re x. o] No! No! No!   Sorry for shouting, but I'm an excitable
+ 69867 [Stephan.Kaem] Ahem, it's not. The program just "interprets" these numbers in a
  69879 [nemo@he lo r] <snip lecture>

Logfile parsing and sending mail
69794 [wichmann.mar] though I have to admit that I'm a newbie to Ruby I'll try to devise my
+ 69795 [billk@ct .c ] Welcome to Ruby !
+ 69798 [ahoward@fs .] i'm *not* a newbie and my questions are generally arcane and un-intelligent so
  69799 [michael_s_ca] Another old unix-y way of doing this (not sure if it will work on

dots in hex printf
69800 [ecashin@ug .] 1ecashin@meili linux-2.4.18-kgdb$ perl -e 'printf "%x\n", ~(8192 - 1)'
69802 [matz@ru y- a] You were trying to print negative numbers in hexadecimal.  Ruby
69803 [ecashin@ug .] OK, thanks.  I have always thought of printf as treating the argument

̤ ӣȣХ󥭥󥰻äΤꤤ
69805 [reirei.net@2] <>

ASCII class inheritance tree generator
69806 [deliriousNOS] I thought I might share this little piece of code that generates a
+ 69807 [botp@de mo t] Thank you. It's very handy :-)
| 69935 [deliriousNOS] Done !
| + 69937 [ahoward@fs .] simon, you may want to consider added a user page for yourself, and adding a
| + 70234 [dooby@d1 .k ] 'Stress-testing', I tried ...
|   70238 [deliriousNOS] Harry Olson caught this one too (see his solution in this thread).
|   70249 [dooby@d1 .k ] Oops, long thread and still 800 unread messages :(
+ 69811 [cedric.foll@] I'd like to see this function included in irb ?
| 69812 [decoux@mo lo] Well, when you run irb, it read the file $HOME/.irbrc. Just put this
| 69814 [cedric.foll@] Good idea.
+ 69906 [harryo@qi so] I love it!
  + 69907 [botp@de mo t] cool, too. very helpful.
  + 69929 [deliriousNOS] No, it's not; I meant to do that too but I forgot.
    69959 [harryo@qi so] There was another post where someone has put it on the Wiki, so that's sorted now.
    70058 [deliriousNOS] The reaction to this trivial piece of code has been stronger than I
    70079 [dave@pr gp o] aphviz.org and *graphr* (see RAA) this certainly seems within
    70139 [deliriousNOS] My mistake Dave ... though you could be less modest and boast a little

UML: Modelling run-time method adding
69810 [telemorphix@] as far as I know it is possible with Ruby to add methods to objects at

module_functions are private?
69818 [pbrannan@at ] module M
69819 [decoux@mo lo] Perhaps to use it like this
69820 [pbrannan@at ] irb(main):001:0> module Math
+ 69821 [decoux@mo lo] pigeon% ruby -e 'module Math public :sin end; include Math; p self.sin(0)'
| 69827 [pbrannan@at ] I understand that.  I was pointing out that the example you gave me did
| 69861 [decoux@mo lo] When you write
| 69882 [pbrannan@at ] This makes sense, thanks.
+ 69822 [nemo@he lo r] You're assuming that public is the default, as with a normal method
  69828 [pbrannan@at ] I have a function that I want to use as if it were a normal public
  69840 [kentda@st d.] I'm gonna try to read Matz' mind for a second. :-)

accessing top-level 'self'
69825 [ahoward@fs .] rubyists-
69826 [nobu.nokada@] eval "self", TOPLEVEL_BINDING
69829 [ahoward@fs .] thanks!
69842 [deliriousNOS] neither do I; let us know about your findings on this one if you please.
69843 [ahoward@fs .] i'm looking at exactly this.  the thing is, i have no need to share data

Ruby in a university course
69830 [chadfowler@c] ...
+ 69831 [jim@fr ez .o] I am teaching OO using Ruby at my work. We are treating it like an in-house
| 69832 [chadfowler@c] in-house
| 69833 [jim@fr ez .o] Please Chad, come on down. Keeneland is still going on.
+ 69851 [ecashin@ug .] Huh.  Odd choice.  ;)
| + 69852 [hal9000@hy e] That's fascinating. Another programmer-by-avocation.
| + 69853 [dcarrera@ma ] Not yet, but I've been hoping to do just that some day.  I have seen
+ 69873 [Stephan.Kaem] While not a university course, I'll offer an introductory course to Ruby
  + 69881 [tpeters@in a] Great to hear! I thought sometimes of giving such a course myself. How
  | + 69884 [emschwar@po ] Sounds more like a community college to me.
  | | + 69893 [Stephan.Kaem] That sounds very good. <scibbles new vocabulary on post-it note...>
  | | + 69898 [ jupp@gm .d ] Saluton!
  | + 69892 [Stephan.Kaem] See below.
  + 69897 [hal9000@hy e] That's great. I'd love to see this place, but it's unlikely

What's the difference between IO and File
69834 [jim@fr ez .o] When learning ruby back in 1.6 days, I would see
+ 69835 [billk@ct .c ] One difference between
| 69844 [B.Candler@po] True. But since File inherits from IO, the first example could be written
| 69849 [ahoward@fs .] java has a very non-blurry class division amongst it's io classes and this is,
+ 69848 [gsinclair@so] In 1.8 you can also do File.read(path) and get back a single String.

ANN: REXML 2.5.8
69855 [ser@ge ma e-] Greetings!

XML Parser
69862 [dwerder@gm .] is there any w3c schema validating parser for ruby? either c with ruby
+ 69880 [james_b@ne r] To the best of my knowldege, no.
+ 69887 [sean@ch tt n] If you have some XML/XSD documents that you'd like me to test with,
  69909 [dwerder@gm .] I'll send you some files and examples in a couple of days when I'm back

Interpretation of Profiler Results
69863 [bob.news@gm ] ...
69868 [jim@fr ez .o] I think that 'self seconds' and 'cumulative seconds' are equal for
69876 [bob.news@gm ] "Jim Freeze" <jim@freeze.org> schrieb im Newsbeitrag

two-way pipe
69866 [viclists@ma ] How can I realize two-way pipe?
+ 69869 [laurent@da a] Cheers,
+ 69870 [jim@fr ez .o] This may not be exactly what you are looking for, but maybe it is.
  69871 [B.Candler@po] That's an old post. I believe popen itself now supports bi-directional
  69875 [jim@fr ez .o] Thanks. This works great! Exactly what I was looking for.

RDE ide zerodivide Error
69872 [allt@sh w. a] After runnung a Ruby script I always get a

ruby-dev summary 20020-20038
69883 [aamine@lo er] This is a summary of ruby-dev ML in these days.

os-thread synchronize with ruby
69885 [student_vien] I have a c-extension with has to threads. A main-thread (A) and a
69913 [decoux@mo lo] Don't try to mix OS thread with ruby thread

[OT] -- Edgar F. Codd: 1923-2003
69888 [mwilson13@co] ...

Ruby Weekly News
69889 [Dave@Pr gm t] Ruby Weekly News: 04/21/2003

Performance test: 1.8.0p2 versus 1.6.8
69890 [jose.alegria] ...
69895 [nobu.nokada@] It needs extra Regexp.quote call in 1.8.  Try with
69915 [Jose.Alegria] Thanks! I did try it and got just a 10% improvement. The 1.6.8 version is still faster.
+ 69918 [batsman.geo@] IRC some tunings in the GC were modified in 1.8, which could give wildly
+ 69923 [ahoward@fs .] i'm not sure how smart it would be with a file that large, but you could
  69926 [Jose.Alegria] I've already tried that and it crashes! And I have a 1 GB RAM machines :-) ... So, GC is an really an issue!

ANN: New release of ruby plugin for eclipse
69891 [Markus.Barch] There is new release of the Ruby Development Tools (RDT) plugin for

Looking for vim syntax expert
69894 [jim@fr ez .o] Sorry for posting off topic, but I have seen some posts
69896 [ahoward@fs .] jim-
69912 [jim@fr ez .o] That's  what I suspected. I am greatly interested in your syntax

why is Kernel#id writable?
69899 [ian@ca ib n.] I just had to debug a fairly obscure problem with a colleague's code.
69900 [dave@pr gp o] It doesn't. When you write, you're writing to a variable. When you
69905 [jbshaldane@h] Also, it is worth noting that in 1.8 Object#id (or Kernel#id if you

ANN: REXML 2.4.8
69901 [ser@ge ma e-] Hot on the heels of the 2.5.8 release is the next update of the stable

seek your assistance
69902 [mrs_abha@ya ] Dear,

Select()
69908 [kuros@sb gl ] ...
69911 [decoux@mo lo] pigeon% ri Kernel::select
69914 [bob.news@gm ] Another option might be to use threads.
69919 [billk@ct .c ] Bjorn Stahl posted a nice threaded TCPServer example at
69921 [B.Candler@po] (towards the end of section 2) although it doesn't include the concurrency
69924 [kuros@sb gl ] Thank you all very much.

Collect your winnings - $4,000 is waiting for you - ucantlose.co.uk
69916 [help@uc nt o] ******** http://www.UCantLose.co.uk uses opt-in emails for

DBI/OCI8 & binary data
69917 [roberto@RE O] Env.: ruby 1.6.8, ruby-dbi 0.18, ruby-oci8 0.1.2.
69920 [kubo@ji ba .] I re-read my codes. I forgot many of them. :-)
69997 [roberto@RE O] Right.
70196 [kubo@ji ba .] I ran your code. But there was no error in my environment. It is
70235 [kubo@ji ba .] I put ruby-oci8-0.1.3.tar.gz just now.
+ 70261 [roberto@RE O] Thanks, I'll test that tomorrow at work.
+ 70413 [roberto@RE O] Apart from changing two ?"? into ?'? at line 106 of oraconf.rb, compiles
  70461 [kubo@ji ba .] I'll fix it next release.
  70491 [roberto@RE O] Well, I can see data in the table with a SQL browser (TORA but Toad under
  70565 [kubo@ji ba .] Sorry I forgot to return nil when fetched data is null.
  70768 [roberto@RE O] (rdb:1) p row

Module inclusion at runtime...
69922 [spamblock@da] I want to have some nested structure of modules,
+ 69925 [bob.news@gm ] I read you post several times over but I'm still not sure, whether I got
| 69927 [spamblock@da] I don't think so. As far as I understand Ruby,
| 69995 [bob.news@gm ] "Hadmut Danisch" <spamblock@danisch.de> schrieb im Newsbeitrag
+ 69928 [matz@ru y- a] You've misunderstood autoload.  It defines top-level (non nested)
  69930 [spamblock@da] Ah, I see.
  + 69986 [matz@ru y- a] It's planned.  But it still requires Morning to be nested in the
  + 69993 [bob.news@gm ] "Hadmut Danisch" <spamblock@danisch.de> schrieb im Newsbeitrag

[ANN] Ruby.shop
69931 [hal9000@hy e] In the interest of promoting Ruby, I've created
+ 69932 [nemo@he lo r] By the way: The "Ruby Core" poster is known to
| 69934 [hal9000@hy e] Object -->
| + 69948 [batsman.geo@] /*
| | + 69949 [hal9000@hy e] Hmm, OK. It may be wrong according to the interpretation I
| | | + 69951 [nemo@he lo r] <snip chart>
| | | + 69982 [batsman.geo@] Object <-- Module <-- Class <---
| | |   69989 [hal9000@hy e] This agrees with my drawing... but it conflates
| | + 69988 [matz@ru y- a] The vertical relationships (e.g. one between Module and Object) are
| |   69991 [hal9000@hy e] I am sure your figure is not wrong. Mauricio BTW was saying
| + 69950 [nemo@he lo r] I do think that 'a.class == b' and
|   69953 [hal9000@hy e] Wish I could. :) Will you share notes afterward? Or
|   69955 [nemo@he lo r] Wish I could. :) Will you share notes afterward? Or
+ 69936 [ahoward@fs .] well done hal!
+ 69938 [bobx@li ux a] Rats! Just baught a Debian hat!!!  : P
+ 69939 [0bz63fz3m1qt] When I try from konqueror to view the large pictures
| 69944 [hal9000@hy e] Hmm, works for me (Konqueror 3.0.3-14).
+ 69940 [B.Candler@po] Not well... most of the time the webserver just gives 'connection refused'.
| + 69941 [ian@ca ib n.] Be persistent and you'll get through.
| + 69945 [hal9000@hy e] refused'.
|   69978 [kent@ze os h] Awesome!
|   + 69980 [kent@ze os h] [SNIP]
|   + 70173 [hal9000@hy e] Ask, and you shall receive.
+ 69946 [brett_willia] Very cool (alhtough I had to try a couple of times before it loaded).  Can any
| 69952 [hal9000@hy e] any
| 69961 [billk@ct .c ] loves.grep(/Ruby/).each { horn.honk }    # :)
+ 69954 [surrender_it] damn I'll try it soon.
+ 69968 [drosih@rp .e] Cute.
threads.html
top