183379-184524 subjects 183793-184725

^ Python a hungrier beast than Ruby?
183605 [rcs bgoark.n] I have tested two implementations of wxRuby/wxPython applications (stock
+ 183627 [ml.chibbs gm] All I can is is that neither Ruby nor wxRuby is super optimized. The
+ 183662 [riko despamm] Did you run the tests on Windows? On GNU/Linux (which distro?)
| 183672 [rcs bgoark.n] On Windows.
| + 183682 [riko despamm] You can check on the documentation of the packages. I suppose that it
| + 183727 [foxdeman gma] Windows may be doing something funny with the shared libraries. Just for
|   184005 [rcs bgoark.n] Same thing, whichever I open first.
+ 183683 [logancapaldo] Random theory, (which could be tested by looking at the source)

^ Optimizing ruby constant array data
183608 [noone nowher] I decided it was time to do a little profiling, and am so glad that it's built
+ 183610 [g_ogata optu] Perhaps use #at instead of #[] ?  Using texture coord arrays might
| 183615 [noone nowher] Thanks for the feedback.  at() didn't seem to do much, but I just remembered
+ 183639 [ mfp acm.org] def draw_string( string )
+ 183648 [bob.news gmx] This looks rather like the code in each_byte was the problem.  Notice that

^ syntax highlight problem about the ruby-mode in emacs
183611 [eric.python ] I edit ruby script in emacs, but sometimes I just cannot get ruby mode

^ Embedable Ruby Interpreter
183616 [mscode3 cox.] I am looking for a Ruby interpreter that can be embedded in another
+ 183619 [jtregunna bl] charset=US-ASCII;
+ 183620 [billk cts.co] in your ruby distribution.

^ backslash in quotes
183622 [itsme213 hot] Why is \ the same as \\ in the 1st 2 cases, but not in the 3rd?
183626 [orotone gmai] I'm new here, but I can answer this one.  In the last one you are

^ String subclass method returns subclass - bug or feature?
183623 [svolkov comc] Could you please explain me why String instance methods return subclass,
183746 [g_ogata optu] String (and Array) methods that return new strings (arrays) tend to

^ named method arguments with defaults
183629 [eliben gmail] What is the current idiomatic approach to pass named arguments to a
183634 [devlists-rub] def a_method(*options)
183637 [eliben gmail] This works when I remove the asterisk from the (*options).
183642 [devlists-rub] Language support for named arguments will be in Ruby 2.0 (hopefully :P)
183659 [gene.tani gm] There's a discussion of how to simulate keyword args in the draft Ruby

^ ruby -w and '(...) interpreted as grouped expression'
183630 [minkoo.seo g] I've encountered enigmatic error message while learning rdoc. This is
183631 [matz ruby-la] It's caused by a space before argument parenthesis.  I just removed it

^ Matrix in Ruby
183633 [minkoo.seo g] What is the best way to create a matrix whose size is m x n?
183646 [minkoo.seo g] a = Matrix[(0..3).map { Array.new(5) }]
183657 [ara.t.howard] if you're going to be working with large matrices and doing lots of number

^ Optimizing Programs And Code them with Ruby way
183640 [serbulentu g] no errors.
183718 [noone nowher] Have you tried running it with 'ruby -rprofile'?

^ [RCR] abstract method in Ruby
183647 [kwa kuwata-l] To define abstract method in Ruby, I use NotImplementedError like the
+ 183656 [halostatue g] In the last four years of using Ruby, I thought I needed abstractmethods in the first few months. Then I learned what value Modules asmixins gave me.
| 183704 [kwa kuwata-l] Thanks Austin,
| 183709 [logancapaldo] I think you're over engineering. Let's consider the Enumerable module
| + 183711 [benjohn fysh] supposed to implement something. You could point that out with a
| + 183749 [kwa kuwata-l] Logan,
|   + 183751 [meinrad.rech] if you want serious discussion then it would be great if you were able to
|   + 183784 [logancapaldo] charset=US-ASCII;
|   | 183837 [kwa kuwata-l] I have no intention to argue about dynamic vs. static.
|   | + 183839 [ara.t.howard] careful - ruby is strongly typed.  what it is not is statically typed.
|   | + 183844 [logancapaldo] charset=US-ASCII;
|   + 183804 [halostatue g] Actually, the method #each is not abstract in Enumerable. It's aprerequisite. There's a difference. In the C++ and Java world, it's*necessary* to define a prerequisite method as an abstract method,because without a method definition, the compiler goes stupid and can'tfind anything and won't then compile your code at all. Ruby sees thecall to #each with a block and says "okay, I'll trust that you'vesatisified this until I hit it at run time."
|   | 183814 [benjohn fysh] *snip*
|   + 183815 [matz ruby-la] class Base
|     183823 [ara.t.howard] how about something very simple?  i use this in my own code
|     183824 [ mfp acm.org] It fails in the very way matz indicated.
|     + 183827 [ara.t.howard] class Module
|     + 183838 [kwa kuwata-l] I don't want the just same as Java's abstract method.
|       + 183841 [ara.t.howard] class Module
|       | + 183870 [nobu ruby-la] This hides NoMethodError within the super method too.
|       | | 183918 [ara.t.howard] class Module
|       | | + 183973 [pit capitain] All those implementations which actually create dummy methods prohibit
|       | | + 184022 [nobu ruby-la] Simply separate Module#abstract_method and Class#abstract_method.
|       | |   184060 [xmlarchitect] Hmm, just some thoughts.
|       | |   184061 [xmlarchitect] Oops, my apologies, forgot an end in example.
|       | |   184066 [dblack wobbl] I fear that  "duck-typing prototype" is a contradiction in terms.
|       | |   184071 [xmlarchitect] Good points both, thanks.
|       | |   + 184072 [xmlarchitect] My apologies for double posting, I must have confused  Gmail somehow.
|       | |   + 184073 [avdi.grimm g] The point of duck typing is that your code automatically ensures it,
|       | |     184076 [xmlarchitect] Ok, I think I see what you mean. I didn't have the right understanding of
|       | |     184094 [Stephen.L.Mo] Unit tests?
|       | + 183987 [mental rydia] Hmm, what about cases where the super exists, but calls something
|       + 183843 [matz ruby-la] It's caused by mix-in, a kind of multiple inheritance.  The above is
+ 183715 [lukfugl gmai] I'm of a similar opinion with others that predeclaring an abstract
  183750 [kwa kuwata-l] Hmm...

^ delay
183652 [huseyinpolat] while (i>=0)
183653 [dharple gene] Use Kernel#sleep

^ [ANN] Ruby-GetText-Package-1.3.0
183654 [mutoh highwa] Ruby-GetText-Package-1.3.0 is now available.

^ Threads and Deadlocks
183655 [riko despamm] It seems that the standard ruby interpreter is able to detect deadlocks
+ 183664 [drbrain segm] There's nowhere to throw an exception to, all threads are blocked
| 183666 [riko despamm] What happens then? Is there any documentation about this (I'd rather not
| + 183686 [bob.news gmx] format=flowed;
| | 183829 [riko despamm] Thank you very much.
| + 184336 [headius head] JRuby currently uses Java threads to implement Ruby threads, and therefore
+ 183894 [nobu ruby-la] ThreadError will be raised in the main thread.
  183928 [bob.news gmx] Hm, but why then isn't it caught by a clause "rescue Exception => e"?
  183984 [riko despamm] require "thread"

^ Regular Expression Intersection
183670 [fugalh xmiss] Regular languages are closed under intersection (as well as difference,
183755 [dan dankohn.] You'll generally get a better answer if you include an example in your
183758 [benjohn fysh] I think he's trying to do this...
183768 [bob.news gmx] This does not help at all as Benjon explains.  The question is not whether
183809 [fugalh xmiss] Yes, precisely.

^ attribute setters for instance variables
183676 [eliben gmail] class Incorrect
+ 183678 [fugalh xmiss] @one = 1 is setting the instance variable itself, and that's fine for
| + 183679 [eliben gmail] Thanks for your swift and insightful reply.
| + 183728 [noone nowher] I really wish Ruby required explicit locals declaration.  There are many
|   183739 [fugalh xmiss] What problem? I don't see any problem, I quite like that behavior. I
|   183744 [noone nowher] I can't imagine coding thousands of lines of code without variable
+ 183693 [ara.t.howard] def one= arg

^ Calling plotutils from xemacs using Ruby GSL
183677 [rubymode gma] I'm using ruby from Xemacs on OSX.  Ruby works well in IRB mode from Xemacs=
183713 [Nuralanur ao] Just guessing ...
183732 [rubymode gma] This was my output, leaving me to believe I have bigger problems, or I'm
+ 183780 [Nuralanur ao] Sorry, I actually wanted to say something else in my last mail,
+ 183797 [gdprasad gma] In Linux , after some modifications to rnd3.rb

^ Suggestions for improving code
183681 [adityam umic] I am trying to convert a plain text file into a tex file with
183747 [w_a_x_man ya] ruby -p01e'gsub(/(\n\s*\n)((?:^\s{4}.*\n)+)/,
184029 [adityam umic] Thank you for the regex. The chapter part of your regex is better than

^ Tk on windows
183684 [jeppe88 gmai] require "tk"
183687 [vjoel path.b] If you are using recent one-click windows installers, the tk84.dll is no
183696 [jeppe88 gmai] Tk on windows
184674 [rubytalk gma] I downloaded the ActiveTcl and installed it. Now i have a differnt error,
184675 [r.mark.volkm] Interesting. I also installed Ruby from the latest version of the one
184681 [rubytalk gma] I uninstalled ruby,( i did install over the old version), and

^ http-access2 question
183685 [const deribi] I'm learning Ruby and trying to write small script to fetch data from

^ Recommend a hosting company?
183689 [snail objmed] I have an idea for a website. I want to develop it using Ruby on Rails,
+ 183695 [michael.gors] I use TextDrive (http://www.textdrive.com) and am very happy with them
+ 183698 [farrel.lifso] I use site5 (http://www.site5.com). They're enthusiatic Ruby users so
+ 183759 [sgriffin cal] I suggest www.site5.com.  They have great prices and packages and their
| 183857 [riko despamm] I have a hosting with them too. Great support.
+ 183872 [gregory.t.br] I use dreamhost.  They are cheap and reliable and add more space /

^ win32ole question - how to get handle on currently running app?
183690 [itsme213 hot] I need to process a bunch of word files using win32ole.
183691 [david.mullet] word = WIN32OLE.connect('word.application')
184044 [kiaroskuro g] How would you choose between a number of different running instances of an
184053 [david.mullet] You could use the WIN32OLE.connect method with the path and filename of

^ [rdoc] horizontal lines not working
183692 [vjoel path.b] RDoc's horizontal line feature seems to have broken recently (maybe
187089 [vjoel path.b] (The problem only affects horiz lines in plain text files, not in .rb

^ Textmate Bundles for form_remote_tag shortcut
183694 [soren hawaii] Watching through the online videos of the flickr tutorial, I noticed
+ 183699 [gene.tani gm] this may not be the answer, but i saw it on Oreilly's ruby site
| 183705 [soren hawaii] Thanks for the link that is a helpful cheatsheet of the default
+ 183757 [dan dankohn.] You want syncPEOPLE on Rails.

^ cgi script send a bad image to the browser
183697 [metallourlan] I'd like to use a ruby script to generate an image (directed graph) and
+ 183700 [logancapaldo] Maybe you want to use the CGI class.
+ 183701 [logancapaldo] Actually forgot what i just said, you're doing this all wrong. src
  + 183708 [james_b neur] You might be able to us JavaScript to get a reference to the desired
  | 183767 [metallourlan] 1)The user insert some data in a field, than press a button
  | 183785 [james_b neur] See my previous response to your initial message
  | 183852 [metallourlan] I understand, thank you for your help.
  + 183766 [metallourlan] Thanks a lot!

^ from Python to Ruby in 10 seconds
183703 [john_sips_te] I think this subject might make for a very nice article in
183706 [logancapaldo] Everything is a reference to an object
+ 183707 [marcel verni] Any object can be made immutable by freezing it.
+ 183726 [riko despamm] Having some object immutable allows some optimization otherwise not
| + 183729 [rampant gmai] a += b is the same as a = a + b. So, (a + b) creates a new string, and
| | 183753 [riko despamm] Ok. Perfect: it makes sense even if in the first instance I found it
| + 183731 [logancapaldo] I'm sorry I made that sound more general than I meant. I meant _in
+ 183730 [dave burt.id] I find Logan's answers accurate and complete, except for one, which is a
  183733 [agorilla gma] I found this a bit confusing.  Maybe....
  183736 [dblack wobbl] If I can join the word-tweaking sweepstakes:  I don't think attributes
  183738 [agorilla gma] Perhaps best said with "when you have no other methods that set/get @x"?
  183741 [dblack wobbl] Perhaps, though I deliberately didn't qualify it, on the theory that

^ newbie question about mkmf and dir_config
183710 [ralphkon yah] Please help a beginner!  I'm trying to write my first c-extension, and I
183898 [nobu ruby-la] dir_config('foo') enables --with-foo-dir option, which implies

^ Strange behaviour
183712 [jvalencia lo] tigre@enigma tigre $ irb
+ 183717 [lukfugl gmai] $ irb
| 183719 [jvalencia lo] Oh thanks, i really had a misunderstood on that point.
+ 183721 [ruby anthrop] This stems from a fundamental misunderstanding of how the default
+ 183722 [cyclists nc.] The "events.default = []" statement establishes a default object to be

^ unexpected behavior of range.each (Newbie extreme)
183714 [bttman bigtr] with r=(5..9), r.each{|num| print num,"\n"} behaves as expected.
+ 183716 [cyclists nc.] It was done on purpose. Ranges want to be able to iterate from beginning
| + 183720 [wright_gary_] There have been several threads over the last few months
| + 183724 [bttman bigtr] seems like an odd definition of "include" (and "each") and inconsistent
|   183748 [g_ogata optu] str[2..-1]
+ 183725 [james.herdma] Hey Joe (Whatcha doin' with that gun in your hand? -- a little Jimi

^ Adding methods to a singleton dynamically
183723 [noone nowher] I'm building a view hierarchy from a file, and I would like it to add getter
+ 183737 [dblack wobbl] I get a syntax error on that; I think you need a semi-colon after
+ 183740 [dblack wobbl] I just *know* there's a way to do this with inject... :-)  But
  183803 [noone nowher] Thanks, that does the job.  I was a little unclear of how << worked but now I

^ windows messagebox example(s)
183734 [rtilley vt.e] This is probably documented somewhere, but I thought ruby win32
183752 [john-rubytal] <bunch of constants>

^ [ANN] el4r-1.0.3 - EmacsLisp for Ruby
183735 [rubikitch ru] El4r enables you to write Emacs programs in Ruby as well as in EmacsLisp.

^ [ANN] Agile Web Developement with Rails in Italian
183754 [riko despamm] I have recently seen the italian version of "Agile Web Developement with
183770 [davidw dedas] Yes, I saw that on http://www.libreriauniversitaria.it and was surprised
+ 183778 [riko despamm] Well, I'm quite happy about it...
| + 183786 [pit capitain] I know that unbit.it supports Rails.
| | 183816 [riko despamm] site5 too (and I have an hosting with them). But PHP is more widespread...
| | 183845 [raffaele.sal] and they get a cheap service...
| | 183856 [riko despamm] The Rails book? Definitively it's worth buying. Well, if you already
| + 183802 [davidw dedas] Searching for 'rails hosting' finds quite a few.  If you don't mind that
| | 183817 [riko despamm] Well, I quite said something when I meant something else. That is to say..
| + 183859 [surrender_it] well, an italian ruby community[1] existed for a while (since 2003 IIRC)
|   183865 [riko despamm] Unfortunately I live quite far from it. :(
+ 183792 [nshb inimit.] Anyone know of some other Italian websites in general or companies
  + 183855 [nicholas_wie] HTH,
  + 183861 [surrender_it] I'm not sure what you mean by "offer it as a service" but I can tell you

^ Ruby equivalent for PHP's strtr?
183760 [rails jeroen] function in PHP (and possibly other languages, I don't know). That is, I
183772 [dave burt.id] tr comes from Perl, where it has the meaning of PHP's three-argument version
+ 183886 [shugotenshi ] ri String#tr
+ 183967 [rails jeroen] Thanks, exactly what I was looking for.

^ Latent semantic indexing, but for other languages than English ?
183761 [Nuralanur ao] Dear authors of the classifier library,

^ mysql command line
183762 [chriswillis1] does anyone know how to delete databases/tables in mysql command line?
183764 [vanek acd.ne] if you're referring to the mysql client program,
+ 183774 [chriswillis1] so does that actually DELETE it?
+ 183775 [chriswillis1] don't worry about that last one!
+ 183777 [chriswillis1] so then,
  183779 [dblack wobbl] It drops the table if the table exists, without raising an error if it
  183806 [w3gat nwlaga] It seems a ligit question to me especially since Ruby interfaces so

^ Re: Small regexp question
183763 [benjohn fysh] Which is exactly what I was after, thanks.

^ FileTest.size > 2GB ?
183773 [kasten.m gmx] I'm using "ruby 1.8.4 (2005-12-24) [i386-mswin32]" and I'm
183899 [nobu ruby-la] mswin32 version doesn't have large file support yet.
183917 [Daniel.Berge] Yes, use win32-file, available on the RAA.
183977 [dave burt.id] Daniel, you are the hero of Ruby users on Windows.
183981 [Daniel.Berge] Heh, thanks. :)

^ Problem installing RMagick
183776 [ruby anthrop] I am trying to install the RMagick gem under MacOS X (10.3 latest). I have

^ Mac OS X Intel 10.4.5 readline support
183787 [reevesg pobo] Does anyone know how to get readline support working for an Intel
183790 [daesan gmail] Readline library is already there.  (It's not GNU's, I think it's
183853 [riko despamm] Yes, you are right.

^ [SOLVED] Problem installing RMagick
183789 [ruby anthrop] } I am trying to install the RMagick gem under MacOS X (10.3 latest). I have
183799 [cyclists nc.] xwindow.h is part of the X11 package, which should be on your 10.3