50673-53702

50580-51355 subjects 50878-51711

classes, constants, inheritance and ===
50673 [hgs@dm .a .u] I have been looking at TupleSpaces and Rinda and so on.
50839 [hgs@dm .a .u] My solution was to give each class an instance variable of class

RubyConf...question to Matz
50678 [rich@in oe h] Matz,
50680 [matz@ru y- a] Not yet.

visual ruby
50683 [kgergely@ml ] That's why this project called VisualuRuby or sg. like that?
+ 50697 [djberge@qw s] That's very interesting.  Can you trademark a product that doesn't exist?
| 50737 [hal9000@hy e] My limited understanding: You don't "trademark a product."
| 50744 [mikkelfj-ant] And as they always say this will happen very soon, they also registered
| 50745 [ianm@Ac iv S] This is still true. Or though I'll say immediate roadmap. We will ceratinly look at doing a VisualRuby if the market seems to be there to justify it.
| 50748 [Graeme.Matth] I am sure that in the near future that a VisualRuby product should become
+ 50705 [ptkwt@sh ll ] Hmmmm... I also see that they've trademarked ActiveRuby.
  50711 [rich@in oe h] They did do this well over a year ago...I don't think ActiveRuby or
  50728 [bilotta78@ho] Yet if they are protecting the name now, it's probably because they

subclassing Integer
50685 [tromp@do ad ] I'm writing a state space search program where each state can be consisely
+ 50688 [billtj@z. lu] I think if you really have 100s of millions of states to be searched,
| 50690 [szegedy@no p] If one uses Arrays of Integers in Ruby, then you would not spare much
| 50694 [billtj@y. lu] Using C, if a state can be represented as a number between 0 and 255, we
| 50696 [szegedy@no p] You can use Strings in Ruby to achieve the same memory performance.
| 50709 [billtj@y. lu] If the development time is an important factor, then probably it is better
+ 50689 [szegedy@no p] .... Snip ...
+ 50692 [hgs@dm .a .u] Do you need to know the number when you create it?  I'm wondering
| 50699 [hgs@dm .a .u] s = "I am a string"             ?   "I am a string"
+ 50693 [meier@me st ] class Cart < Array
+ 50706 [matz@ru y- a] Integer is a pure virtual class (in C++ terms).  And its concrete
+ 50719 [chr_news@gm ] Well you could write (ASSUMING 1.7)

alias/method redfinition
50695 [ahoward@fs .] it seems alias/method redefing can be a slipery slope.  i wanted to
50698 [decoux@mo lo] You use #eval which is evil
51015 [ahoward@fs .] if the eval'd string is constant, why?
51012 [decoux@mo lo] There are 2 problems in your implementation
51080 [ahoward@fs .] so, in general, extending an object always results in a new proxy
51165 [decoux@mo lo] second one : first ruby create a singleton class for example

ANNOUNCE: RHDL 0.3.0
50722 [ptkwt@sh ll ] After a long break, I finally started working on RHDL again...
50733 [mikkelfj-ant] So now there are two Ruby hardware definition languages
50753 [ptkwt@sh ll ] Yeah, I suppose it could be confusing... I hope they don't sue us ;-)

[BUG] ruby/tcltk reentrancy bug
50729 [j.travnik@sh] I have found a bug in ruby's tcltk interface.
50837 [decoux@mo lo] Well, it crash with 1.6.7
50841 [matz@ru y- a] I will backport 1.7 tcltklib.c to 1.6.
50844 [hgs@dm .a .u] Should we be looking out for 1.6.8 shortly, then?  A search for
50855 [matz@ru y- a] Hopefully.  I have a few leftovers to fix.  I encourage people to try

don't understand cause of `sysread': Bad file descriptor (Errno::EBADF)
50732 [tarasis@bt p] Was writting a script to poll an audiotron (www.audiotron.net) and
+ 50993 [tarasis@bt p] Okay looking at this futher, I stripped out all the superflous stuff
+ 51074 [tarasis@bt p] Just wanted to do a final follow up, I have been running the code under
  51146 [nobu.nokada@] mingw32 version is almost equal to mswin32.  Could you test
  + 51319 [tarasis@bt p] how it goes
  + 51341 [tarasis@bt p] Playing track 0 of 21119 in a random way
    51370 [nobu.nokada@] ...
    51485 [tarasis@bt p] Excellent, thats good to hear :) that you'll look into it & can
    52161 [nobu.nokada@] Now I expect it's fixed.  On my box, at least, it worked over
    52180 [tarasis@bt p] Wonderful Nobu! I'm very pleased about that :)
    52212 [nobu.nokada@] Mingw32 is almost same as mswin32.  You need cygwin environment

Mapping Db Fields to Class Attributes
50734 [Graeme.Matth] I am currently designing my "object model" for a project management system
50853 [David.Stagne] Depends on how complex your code is.  I tried doing this once in Java, to
50875 [meier@me st ] =20

generate the test data in Ruby for a c program
50741 [mxiao@ee ua ] I'd like to generate the test data in Ruby for a c program and test it. Has
50754 [ptkwt@sh ll ] Could you give some more details?
50758 [mxiao@ee ua ] Sorry I didn't express my problem correctly.

Error in Sys::Host on FreeBSD
50751 [ljz@as as .c] I just downloaded the Sys::Host package from RAA.  Upon installing it
50757 [ljz@as as .c] I just discovered that if I use "each" in the final line, the error goes
50845 [djberge@qw s] That's interesting.  It *should* work without the each method.  I just
+ 50846 [decoux@mo lo] pigeon% cat test.rb
+ 50893 [gotoken@no w] The error was raised on FreeBSD release and current.

Criticise me
50760 [Graeme.Matth] negative advice on wether I am doing the "correct" thing here, or better if
51014 [    s@xs .d ] irb(main):001:0> def a(b=nil)

[ANN] SOAP4R/1.4.7 with WSDL4R/0.0.1
50761 [nahi@ke na t] SOAP4R/1.4.7 with WSDL4R/0.0.1 is out.

Thoughts on improving usage of Regexp#match
50762 [hal9000@hy e] Please feel free to point out obvious things
+ 50764 [dossy@pa op ] Hee hee.
| + 50767 [matz@ru y- a] regex.match(str)
| | 50772 [hal9000@hy e] True. And also because they have three operands
| + 50774 [hal9000@hy e] What, Dossy, you think it looks familiar? :)
| + 50808 [tsiivola@cc ] Na, it's lisp-envy. Nil and false should be indistinguishable from an empty
|   50812 [tsiivola@cc ] To extend on this & the related auto-vivification issues: seems to me that
|   50823 [vjoel@PA H. ] That's a wonderful thing about Ruby. Arguably, Perl is slightly better
+ 50765 [matz@ru y- a] How about
| 50770 [hal9000@hy e] I like that very much. I don't usually use
+ 50768 [dblack@ca dl] sub1 = regex.match(str).to_a[1].to_s
+ 50769 [pbrannan@at ] foo = "this is a test"
| 50773 [hal9000@hy e] Yes. Overall a bad idea on my part.
+ 50817 [pit@ca it in] Hal,
  50829 [nobu.nokada@] sub1 = str[regex, 1] || ""	# 1.7 feature

ruby-inline and alias_method
50763 [joe@vp p. et] I have be experimenting with Ruby-Inline, and I have to say it is

[MATZ] Re: ruby-inline and alias_method
50766 [ryand-ruby@z] I'm reasonably sure that it's not RubyInline that is causing this

Help with attribute structure
50771 [Graeme.Matth] Any help would be great
+ 50775 [matz@ru y- a] "nested method definition" means you're defining a new method within a
+ 50777 [hal9000@hy e] Do you really have a missing quote on
+ 50778 [x@ic im nk .] Usually means you haven't ended a prior method, class, or other

CGI - Ruby Data Types
50779 [Graeme.Matth] thanks for all your help before, it was just me been stupid and leaving out
+ 50781 [joe@vp p. et] id =cgi['id'][0]
+ 50784 [dblack@ca dl] Don't worry -- see my last post if you want to see real filler :-)
+ 50786 [x@ic im nk .] You may not be used to checking data types, but you should be used to

loving the look of Ruby code
50780 [dblack@ca dl] I just think Ruby code looks so great.  I'm so glad we get to do
50782 [hal9000@hy e] But the way the indentation came out made me laugh.
+ 50785 [dblack@ca dl] Ha -- I need to expand(1) things I guess :-)
+ 50819 [tarasis@bt p] I think that one looks the best, more unique
+ 50849 [mike@st k. o] It's good to see your perl improving Hal ;-) That is pretty close to a

generate the test data in Ruby for a c program
50783 [mxiao@ee ua ] My problem is generate a set of test cases automatically in Ruby, and use

How to test c program using Ruby
50788 [mxiao@ee ua ] My problem is generate a set of test cases automatically in Ruby, and use
50810 [billk@ct .c ] Perhaps you could post some sample "test" data to be fed to the 'C'
50813 [mxiao@ee ua ] no idea how to feed the input data to c program,(using ruby inline?)and output
50871 [billk@ct .c ] Have you tried pipes?  You could connect Ruby to the stdin and stdout

Something new undefined method
50789 [Graeme.Matth] (NameError)
50794 [hal9000@hy e] nil
50795 [Graeme.Matth] return @data.nil? ? nil : @data['prj_id']
50796 [Graeme.Matth] got that to work when its a read only assignment
50797 [Graeme.Matth] Perhaps it is better to move away from the DBI fetch_hash method and go back
50834 [dblack@ca dl] It looks like you're defining the instance variables in the wrong

help getting libpng working with fxruby
50792 [joaopedrosa@] I am compiling fox toolkit 1.0.23 and fxruby 1.0.13 with vc++6.
50800 [lyle@us rs s] It sounds as though you didn't compile FOX itself with PNG support
50836 [joaopedrosa@] Thank you Lyle.

Attribute Access Problems
50798 [Graeme.Matth] Im just not getting this !
+ 50799 [lyle@us rs s] Don't Panic!
| 50801 [Graeme.Matth] thanks for the help, i am willing to use the attr_reader, attr_writer
| 50832 [dblack@ca dl] class A
+ 50806 [pit@ca it in] This error message clearly says that there's no method called

Private Writer
50803 [Graeme.Matth] If I create reader and writer attributes
+ 50807 [david.naseby] if you define, for example,
+ 50811 [alan@di ik t] attr_reader :code

wxWindows for Ruby Again
50820 [phasis@ko ne] Is anybody working on wxWindows for Ruby?
+ 50828 [curt@hi bs c] We have just goten started on wxRuby, which is now hosted at savannah (we
| 50840 [phasis@ko ne] I'd glad to see www.wxruby.org is working on.
+ 50996 [bilotta78@ho] Could you contribute this to the SourceForge/Savannah project?
  51042 [curt@hi bs c] He already did !
  51124 [bilotta78@ho] Lovely :)

[HELP!] Re: ruby-inline and alias_method
50824 [ryand-ruby@z] OK... I have a fix on the problem, but not a fix FOR the problem... It

RFC: Need a better caller(n) - real reflection for call stack wanted
50825 [ryand@ze sp ] def caller_method_name()
+ 50827 [decoux@mo lo] Look at [ruby-talk:12097] "RCR: replacing 'caller'" for a previous
| 50830 [ryand-ruby@z] So... Matz's reply (granted, a year ago) says the change was
| 50831 [decoux@mo lo] If you want to make reference to [ruby-talk:12106], this was for another
+ 50874 [rking@pa op ] Another thing, and this may not only be off-the-wall but also
  50895 [nobu.nokada@] It sounds like as local_variables.

Problems with calling ruby from a C program - undefined symbols.
50833 [zsdfherg@uk ] I am writing a program in C.  From this program I need to call into some Ruby
50835 [decoux@mo lo] You have forgotten the flag -rdynamic

Questions regarding: Mnemonic and Object Prevalence
50838 [oliver-b@nt ] I recently read an article on object prevalence at developerWorks.
50842 [erik@so id o] I have tried Mnemonic a couple of months ago. It seems very promising,
50847 [ysantoso@je ] multiple processes: use a single mnemonic process for, what's the
50961 [oliver-b@nt ] I have done much research on object / relational mapping patterns. After all
50977 [oliver-b@nt ] I am sorry for the lack of clarity in my last message, it had been a long day.
51155 [hwyss@yw se ] Oliver

Extconf problem.
50848 [szegedy@no p] I have a minor problem with mkmf (ruby 1.6.7) and gmake.
50862 [nobu.nokada@] Are there two dots at beginning of the line, and the command
+ 50869 [szegedy@no p] Of course, this was a copy and paste error: there is only one point.
| 50988 [nobu.nokada@] It's due to that mkmf.rb didn't generate .SUFFEXES: rule, I'd
| 51030 [szegedy@no p] Thanks!
+ 50870 [szegedy@no p] Yes, but what if I have cxx files in my directory?
+ 50990 [lyle@us rs s] I'd like to see this bug in mkmf.rb fixed as well.
  50992 [szegedy@no p] Thanks, I will change my mkmf.rb accordingly.

Checking hash key's and values, with case insensitivity
50850 [khabibiuf@ho] Hey all,
+ 50851 [dblack@ca dl] If you set the global variable $= to true, they will not be
+ 50852 [dossy@pa op ] class Hash
| 50854 [tom@li ux ri] Doesn't iterating through all the keys on a lookup kindof take away the
| + 50856 [dossy@pa op ] If you're looking for case insensitive hashes you're already
| | + 50858 [decoux@mo lo] No, with '$= = true' it's case insensitive
| | | 50861 [patrick.benn] Out of curiosity, where is $= actually documented?  I found no mention
| | | 50866 [decoux@mo lo] Pickaxe  p 216
| | + 50868 [messju@la mf] if you do not need the case-information of your hash-keys at all you
| | + 50872 [mikkelfj-ant] The way to deal with this is to create a hashtable that is indexed by
| |   50876 [meier@me st ] up
| |   + 50884 [alan@di ik t] Overall, if your application code doesn't already expect normalized
| |   + 51044 [mikkelfj-ant] lookup
| + 50888 [qrczak@kn .o] Nope. But apart from the evil $= I'm afraid Ruby doesn't provide a way
+ 50859 [matz@ru y- a] Why not simply
  51116 [gsinclair@so] This has got to be the best solution, as it takes account of the important fact
  51122 [dblack@ca dl] irb(main):002:0> h = {"a" => 1}
  + 51154 [gsinclair@so] fact
  | 53702 [ahoward@fs .] h = Hash.new
  + 53683 [qrczak@kn .o] A hash table is as good for a case-insensitive dictionary as for a

Regexp question (newbie)
50857 [jspies@su .a] After playing a little bit with Ruby 3 years ago, I am trying to learn
50863 [dblack@ca dl] I would use #select, which filters based on a condition contained
+ 50887 [jspies@su .a] Thanks David!
+ 50897 [bruce@co ed ] irb(main):001:0> a = ["aaa","abb","bbb","acc","bcc","ccc"]
  50898 [dblack@ca dl] I *always* forget that one :-)

Speed up suggestions
50867 [tomas_brixi@] ...
+ 50873 [jim@fr ez .o] Sorry, I don't know python, but I am trying to run your script
+ 50877 [rich@in oe h] 01. outf = File.new( "found.log", "w" )
+ 50879 [ryand-ruby@z] Well... I don't have a WEB.log file as weird as yours so I had to fake
| 50972 [tomas_brixi@] ...
| 50975 [ryand@ze sp ] ...
| 50983 [tomas_brixi@] Well... yes and no ;-)
| 51050 [vinfoley@iq ] In my experience, Python is faster than Ruby.  I made a small script to
| + 51058 [gminick@un e] Yes, looks like python is faster than ruby, but it's possible to
| | + 51071 [alan@di ik t] Which version of ruby were you using? I've been reading on this list
| | | + 51082 [gminick@un e] ruby 1.6.7 (2002-03-01) [i586-linux]
| | | | 51095 [mike@st k. o] I'd guess that the link to help people get to a stable snapshot tarball
| | | + 51112 [bobx@li ux a] I did two similar (as close as you can for Python and Ruby) scripts that
| | + 51121 [gminick@un e] OK, i downloaded and installed ruby1.7.3, and... it's faster
| |   51149 [tomas_brixi@] I did not originally mean this thread to be for speed maniacs :-)
| + 51059 [gminick@un e] Looks like
| + 51064 [gminick@un e] Yes, looks like python is faster than ruby, but it's possible to
| + 51070 [joe@vp p. et] % time ruby -e "_wordList = open('/usr/share/dict/words', 'r').readlines"
| | 51081 [gminick@un e] You're not fair ;> As I said in other post, python also has readlines
| | 51096 [vinfoley@iq ] readlines does not do what I want.  It gives an array that looks like
| + 51078 [gotoken@no w] require "benchmark"
| | 51093 [kentda@st d.] I am confused. Ruby '\n' is not equivalent with Ruby "\n", so a
| | + 51100 [kentda@st d.] Sorry, I had a brainfart on the latter. The output is the same.
| | + 51107 [gotoken@no w] As you said '\n' != "\n" and '\n' == "\\n" indeed.  And also
| |   51111 [kentda@st d.] Thank you. I've missed this change. Both in the "not seen it yet" sense
| + 51120 [jcb@it ri .c] Tests need to be timed internally from Start of Action to End of Action.
+ 50991 [szegedy@no p] You can check for the comment by
+ 51006 [jcb@it ri .c] I don't know how to find the attachments.
+ 51051 [vinfoley@iq ] I other numbers, when I searched for any 6-letter word, here are the
  51063 [gminick@un e] Please, show the code ;)
  51094 [vinfoley@iq ] Ruby (that code has a serious bug though, see my thread, about
  + 51099 [mike@st k. o] You seem to be mixing up Strings and Regexps, here I have made the keys
  + 51103 [gminick@un e] repl = {
threads.html
top