38772-43039

38582-39644 subjects 38976-39400

[Patch] MACROs cleanup 3
38772 [m.rokos@sh c] this could be the final cleanup for MACROs (at least for those
38788 [matz@ru y- a] Thank you for these patches.  Will you be a CVS committer?
38797 [m.rokos@sh c] Did you approved all my patches I sent during weekend or just
38834 [matz@ru y- a] All but the one for irb.  "irb" has an independent maintainer, Keiju
38843 [m.rokos@sh c] OK, thanks!
38847 [matz@ru y- a] The "ruby-dev" list is reserved for the privileged language - Japanese. ;-)
+ 38849 [ruby@th rs e] Moin,
| 38854 [cboos@bc -t ] ruby-core-devel
+ 38857 [m.rokos@sh c] "ruby-core", but it should be for ext modules as well...
| + 38859 [sosoruby@em ] ruby-dev-eng
| + 38895 [matz@ru y- a] Only if someone succeeds newsgroup CFV process.
+ 38881 [alan@di ik t] ruby-dev-en?
+ 38890 [sean@ch tt n] Ehhh...  why not try to reduce the number of (cultural|language)
  38892 [tobiasreif@p] did you note the ";-)"?

RE: Ruby golf (FFT)  Was: Freshmeat article about Ruby --> Anti-golf suggestions
38781 [Lachlan_Pitt] Instead of golf or figure skating as the metaphor (non XP kind), how

Compiling stable-snapshot on linux
38782 [martin@ma si] I'm trying to compile the stable snapshot from
38786 [eban@os ri .] I've fixed this in CVS. Try again.
38787 [martin@ma si] -I/home/martin/downloads/ruby-snap/ruby

Problem installing algebra package, where do the files go?
38790 [mfp@st de ts] This is very much a newbie question. I've tried installing the algebra package
38798 [sinara@bl de] The easiest way to install is adding the path of *.rb to the

Re: Problem... Doh!
38796 [mfp@st de ts] I'm still not sure about whether I've properly installed the Algebra package,

Stack frames
38799 [jean_hugues_] I am neither happy with caller() nor with set_trace_func(). caller() does

Ruby as Smalltalk
38802 [comp.lang.ru] - - This seems to be the main critism of ex-smalltalkers when they
+ 38806 [pbrannan@at ] def foo(&block)
+ 38807 [nat.pryce@b1] Sure, but the syntax is awkward.  That's the beauty of Smalltalk -- user
| 38823 [pbrannan@at ] This seems very awkward to me, much more so than passing two procs to a
| + 38826 [ned@bi e- om] Typical Smalltalk compilers inline a number of different methods. ifTrue: et
| | 38830 [pbrannan@at ] Can they be redefined on-the-fly or are they hard-coded?
| | 38836 [ned@bi e- om] Pretty much everything in Squeak can be redefined on the fly.
| + 38828 [pbrannan@at ] p false.ifFalse { true }.ifTrue { 42 }.endIf #=> 42
| + 38829 [mps@di co sy] Not to start a flame war, and a "my language is better than your
| + 38831 [nat.pryce@b1] look
+ 38819 [avi@be a4 co] In theory.  In practice, Ruby's syntax makes this awkward enough that
  38822 [pbrannan@at ] def exception_intercept(main_block, rescue_block)
  + 38846 [matz@ru y- a] exception_intercept({|| raise MyException},
  | + 38852 [jean_hugues_] obj.meth {
  | | 38871 [pbrannan@at ] obj.meth({
  | | 38901 [jean_hugues_] The later. Basically }{ (on the same line) would be equivalent to },{. I am
  | + 38860 [nat.pryce@b1] Although I'm probably the one most at fault for starting this thread, I
  + 38850 [jean_hugues_] I save persistent data. Over my software versions, from time to time, the

Taintedness inheritance
38803 [ser@ge ma e-] a = "sean"
+ 38804 [ser@ge ma e-] .... er, not as efficient as 'a.untaint' :-)
+ 38805 [decoux@mo lo] There is faster and more efficient way to do it

Modified date due to File.copy
38808 [Michael.Kirc] I am developing an application where I have to rely on the
38809 [ned@bi e- om] $ ri utime
38825 [Michael.Kirc] Thanks for the reply. Are you sure it works on Win XP?
38827 [ned@bi e- om] Not at all. I avoid using Windows whenever possible.

Test f generalpren. #1
38817 [kentda@st d.] (\[ Kent Dahl ]/)_    _~_    __[ http://www.stud.ntnu.no/~kentda/ ]___/~
38818 [kentda@st d.] Ups. I'll go soak my red face in cold water before it explodes. Sorry.

Imlib2-Ruby Image#draw_pixel Bug (was Re: [ANNOUNCE] Imlib2-Ruby 0.4.0)
38821 [pabs@pa lo r] It looks like there's a bug in Imlib2::Image#draw_pixel for the
+ 38824 [tom@li ux ri] Just FYI, the bug in imlib_image_draw_pixel is now fixed in imlib2 cvs,
+ 38837 [phlip_cpp@my] /Muchismus gracias/ to both of you.

ruby-dev summary 16851-16960
38832 [maki@ru yc l] This is a summary of ruby-dev ML in these days.
38855 [decoux@mo lo] There are well known problems with this

Weekly RCR Summary
38833 [RubyGarden@t] This is an automatically generated list of Ruby Change Requests.

building extensions-- new vs initialize
38839 [normsu@sl b.] player example, I noticed that they define a singleton_method called "new" and
+ 38856 [nobu.nokada@] In general, redefinition of "new" will be deprecated in 1.8.
| + 38872 [pbrannan@at ] Does this apply to Ruby code or just to extensions?  Will redefinition
| | 38898 [matz@ru y- a] Both.  Redefinition of "new" is not encouraged even in 1.6.
| | 38899 [pbrannan@at ] What can I do, then, to ensure that my extensions will work on both 1.6
| | 38907 [matz@ru y- a] Redefine "new".  It's the only way to work on 1.6.  My recommendation
| + 38873 [m.rokos@sh c] Is there any documentation about new features and needs?
| | 38930 [nobu.nokada@] AFIK, the best documentation is the source.  And a discussion
| + 38902 [normsu@sl b.] OK, I believe this will make things clearer.
|   38909 [decoux@mo lo] No, why. In your ruby example you have not used ::new, why do you want use
+ 38896 [dennisn@pe n] Try using SWIG to build your extension.  Some on this list have
  38933 [mattmsykes@y] I tried SWIG last week.  I think the Ruby C API is elegant and
  38945 [pbrannan@at ] SWIG is more than that; it's also a good way of abstracting away all the

TestFirst [Was: Imlib2-Ruby Image#draw_pixel Bug]
38840 [phlip_cpp@ya] This is a habit picked up writing production code TestFirst.
38848 [ rik@kd .o g] #if Phlip
38865 [phlip_cpp@ya] Phlip

Book or tutorial to download
38841 [chicolinux@y] I'm just beggining with the wonderfull OOL Ruby, I
38842 [rich@in oe h] www.rubycentral.com/book

(none)
38844 [air@to bu co] ...

[ANN] Ruby/Google 0.3.0
38845 [ian@ca ib n.] Version 0.3.0 of Ruby/Google has been released.

[Patch? (well question is more appropriate for this)] gc.c
38861 [m.rokos@sh c] question is if this patch is correct?
38864 [nobu.nokada@] In the case of C_ALLOCA defined, the pointer returned from
38912 [m.rokos@sh c] OK, got it.

comp.lang.ruby FAQ
38863 [hal9000@hy e] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2002-4-4)

Hostname command
38866 [djberg96@ho ] Is there a 'hostname' command in Ruby (short of backticks, I mean)?
38869 [decoux@mo lo] Well, you can do
+ 38887 [djberg96@ho ] Hmmm...forgot about that (oops).  Seems like overkill just to get the
+ 38889 [djberg96@ho ] Oh - just discovered an alternative way as well using 'Resolv.rb',
  38894 [vmreyes@us i] Perhaps I don't know what you guys are talking about, but I get my windows
  39024 [djberg96@ho ] A couple of problems.  First, this creates a subprocess, which may not

Random numbers
38867 [crux57005@tu] I know it's old, :) but can anyone tell me how to get random numbers in
38870 [decoux@mo lo] pigeon% ruby -e '4.times { p rand }'

Is there a better way to convert between arrays and strings?
38874 [hutch@re ur ] a = [?a, ?b, ?c]
+ 38875 [decoux@mo lo] I don't know if it's fast but try
| 38885 [hutch@re ur ] Thanks. For short arrays (about 10) your method is takes about 75% of the
+ 38876 [matt@li ke .] I bet it is much faster in ruby 1.7 than 1.6, since String#<< is much
  38886 [hutch@re ur ] You might be right about that. I'm using 1.7 already.

21 Days book: list of misprints (URL)
38877 [ms@ia ta e. ] At the publisher's request, I've submitted to them a list of minor

socket programming: IO.select <-> using Threads, \n <->\r\n
38878 [kgergely@ml ] I started to code in ruby a little server, which listens on a TCP port
38879 [decoux@mo lo] Well, you have the 2 examples select / thread in ruby-man-1.4

HttpUnit equivalent for ruby
38891 [mhale@ro em ] I was wondering if anyone knows of an HttpUnit equivalent for ruby.  For
38893 [armin@ap ro ] Armin.

Data available on a pipe?
38900 [dcorbin@im e] I have a pipe.  I would like to read data ( preferably lines) from this
+ 38905 [nobu.nokada@] An easy way is to use threads.
+ 38906 [chris@cm -e ] handle = File::popen "some_pipe", "r"
  38936 [dcorbin@im e] so readline doesn't block? If there is no line on the pipe, it returns

Re: building extensions-- new vs initialize (corr)
38903 [normsu@sl b.] Whoops, I meant define "bar" in a "new method.

Minor Tk bug on Windows?
38908 [hal9000@hy e] This is something that has been annoying me
+ 38944 [neil@qu ll r] A bind something like this should work,
| 38996 [hal9000@hy e] Thanks, Neil... that works very nicely.
| 39043 [nagai@ai ky ] hal9000> 1. How can I fix radio buttons so that when I move
| 39048 [hal9000@hy e] Yes, it does... see below.
| + 39065 [nagai@ai ky ] hal9000> Yes, it does... see below.
| + 42841 [hal9000@hy e] This problem is still happening to me in
|   42845 [nagai@ai ky ] Probably, current tcltklib.c has memory-allocation problems.
|   + 42850 [hal9000@hy e] Thanks for your reply...
|   | 42854 [nagai@ai ky ] My sample of problem shows the reason of fail to fix bugs. :-)
|   | 42875 [hal9000@hy e] Thank you for your hard work... I am impressed with the job you
|   + 42978 [Jean-Francoi] I don't know if it will be useful for your problem, but here is what I
|     43030 [nagai@ai ky ] Thank you for your report.
+ 39019 [mghall@en er] No.
+ 43039 [kgergely@ml ] I think Space is the default activate button.

Numberic#prev
38910 [sean@ch tt n] I do a lot of incrementing and decrementing of values: it'd be nice if
38913 [matz@ru y- a] I think you meant Integer#prev.
+ 38915 [    s@xs .d ] IMO the *only* way to define String#prev is such that
| 38919 [r2d2@ac .u u] This is not enough to uniquely define String#prev.
| 38920 [sean@ch tt n] irb(main):001:0> "08".succ == "8".succ
| 38922 [r2d2@ac .u u] The question is what "10".prev should be. String#succ is not injective
| 38961 [sean@ch tt n] Whoops.  Yeah, I realized that when I went out for a run....  it's
+ 38916 [sean@ch tt n] Yes, sorry: the edit is in numeric.c.  :~)
| 38917 [matz@ru y- a] Hmm, ascending order vs descending order...
| + 38918 [sean@ch tt n] I never understood why the last character in the string wasn't
| | 38925 [r2d2@ac .u u] Is such pedantry really necessary? I thing of String#succ mostly as
| | 39064 [kentda@st d.] Huh?
| + 38969 [    s@xs .d ] a) there is no String#prev
|   + 38971 [hal9000@hy e] Clever, Stefan... but let's be honest. The entire set of real
|   | 38973 [pbrannan@at ] These are very good questions.  I don't have an answer to any of them.
|   | 38995 [decoux@mo lo] Well, this is not really the reverse of the algorithm for #succ. You can
|   | 39003 [pbrannan@at ] Nobody's perfect. :)
|   + 39029 [in6x059@pu l] - String#succ is a convenience method. It is nice to have, but one
|     39053 [martindemell] But note likewise that none of this applies to Integer...
|     39058 [sean@ch tt n] So... ehh... I hate to beg the question, but before this thread gets
|     39155 [matz@ru y- a] Agreed,
|     + 39184 [chr_news@gm ] On the other hand what is useful about
|     | + 39241 [matz@ru y- a] I'm not really sure what you meant.
|     | | 39354 [chr_news@gm ] I guess my point was that forming Ranges from non-Integer Numeric
|     | | 39363 [matz@ru y- a] Point taken.  So, if you were a language designer, how do you define
|     | | 39381 [chr_news@gm ] It is probably enough to throw out the ``to_i'' conversion for Numeric
|     | + 39260 [in6x059@pu l] (2.2..4.3) === 2.1   # => false
|     + 39217 [sean@ch tt n] Heh, that's a better question than I thought...  after benchmarking
+ 38947 [michael_s_ca] As a point of reference, perl has avoided this issue by just not providing a
| 38949 [decoux@mo lo] Try it with "/" and do the same with ruby
| 38950 [michael_s_ca] I'm not sure what your point is.  I was merely pointing out that there IS
| 38951 [decoux@mo lo] A "precedent" which don't use the same rules is not really a "precedent"
+ 38948 [pbrannan@at ] Or, rather, Integer#pred (opposite of successor is predecessor).

io/process/win32 patch
38911 [rich@in oe h] Is going to be rolled into 1.7.x?
38914 [usa@os .a t.] I wish so.
38965 [rich@in oe h] Reason for this is under win32 and linux I want to launch a Java program

Two questions about ? extension
38921 [anton@we st ] 1. How can i make instance method from ? string?

Re: Two questions about extension
38923 [nobu.nokada@] rb_eval_string() or rb_eval_string_protect().
38924 [decoux@mo lo] pigeon% cat uu.c

My First Time
38926 [ruby@th rs e] with your help, I finished my first program in Ruby last weekend.
38928 [nobu.nokada@] If you want to split the file by exact "~###~" lines,
38941 [mwg@fl ff .i] There is also mathematically nice recipe for picking random line from
38946 [michael_s_ca] It is a nifty algorithm and works reasonably well, depending on how fast your
38955 [tom.hurst@cl] File.open(aFile, 'r') do |f|
+ 38956 [tom.hurst@cl] Obviously, this has the disadvantage of giving longer entries more
+ 38959 [michael_s_ca] Interesting.
| 38966 [tom.hurst@cl] Yes, this is what I said in my second message.  In such a case, you'd
| 38970 [hal9000@hy e] [snip somepne else's comment, similar to mine,
| 38972 [tom.hurst@cl] Possibly.  On a file with very large lines (>512 bytes at least,
+ 38967 [hal9000@hy e] [snippage before and after]

ruby-core mailing list (was: Re: [Patch] MACROs cleanup 3)
38927 [matz@ru y- a] I'm going to start the new list "ruby-core" from somewhere around May
38940 [m.rokos@sh c] Thanks for it.

Require vs. C++ include
38929 [werasmus@gr ] In a modern C++ development environment (for example C++ Builder or
+ 38939 [nobu.nokada@] Ruby doesn't search required files from the requiring file's
| 38984 [tobiasreif@p] ... instead it searches them from the running program's directory
| 38997 [pbrannan@at ] I use it quite a lot, and it has shown to be much more reliable then
| 39862 [tobiasreif@p] perhaps you want to post it as RCR?
+ 39014 [vorlord2@at ] This should work exactly as you say.  require by default looks in the

ZODB equivalent for ruby
38931 [gmosx@so tl ] I was wondering if there is something similar to ZODB for ruby ?
+ 38932 [shirai@p1 p.] I'm interested in it - Plasma. Could you tell me overview or features ?
+ 38957 [rich@in oe h] You could build a darned scalable database on Berkeley DB.

Ruby/NetFilter?
38934 [magnus@gi ab] Has anyone developed a Ruby module for NetFilter? Complete firewall

Free XXX Screen Saver!  1215   [1/2]
38935 [ib82@ho ma l] bybnpxtghnxqlgosrjtwinqpm

Converting hex to string
38937 [kh.wild@wi o] I try to convert a tcpdump
38938 [decoux@mo lo] Well you can try

Any global matching function ?
38942 [christian.co] I am trying to do something like
38943 [decoux@mo lo] This is String#scan

Beginner's question
38952 [ruby-talk@gr] I'm attempting to implement a game called "Twixt".  There are lots of
+ 38953 [dblack@ca dl] puts board
+ 38954 [pbrannan@at ] Here, you have defined your own [] and []= operators that have a
  39030 [ruby-talk@gr] Thanks!

uninitialized class variable
38958 [pbrannan@at ] class Foo

ignore the previous post
38960 [pbrannan@at ] I found [ruby-talk:35157] and attempted to abort my message, but I

User and Group name => user id and group id
38962 [sean@ce so t] This is kind of a trivial question, but I can't find reference for a
+ 38964 [ian@ca ib n.] require etc
+ 39020 [mghall@en er] The "etc" module is standard;

choice between &block or yield
38963 [ian@ca ib n.] def each(&block)
38968 [gotoken@no w] For simple tasks, &block passing looks faster than yield x.

[ANNOUNCE] Xmms-Ruby 0.1.0
38974 [pabs@pa lo r] I've released the first public version of my Xmms (http://www.xmms.org/)

question about extending in C
38975 [rpg@xs al .n] +----------------------------------------------------------+
+ 38977 [pbrannan@at ] VALUE rb_cPoint = rb_const_get(rb_cObject, rb_intern("Point"));
+ 38980 [matz@ru y- a] rb_class_new_instance(argc, argv, klass) ?
+ 39068 [W.L.Kleb@la ] You mean to have written,
  39127 [tobiasreif@p] is there a difference? (besides the retuned value)
threads.html
top