1788-2056 subjects 2163-2454

":symbol undefined " in my extension library
1967 [j.b.huijsman] I'm trying to write a ruby extension to the newt library (used in redhat's
1970 [decoux@mo lo] aestivum% cat extconf.rb

Ruby 1.4.3 Linux RPM Question
1971 [DDouthitt@cu] # rpm -Uvh ruby-1.4.3-3mdk
1974 [crouton@du l] Maybe it is the version of ncurses under the packager's
2085 [pixel_@ma dr] yep, ncurses-5 has been out for a while...

Iterating over all instances of a class
1977 [DDouthitt@cu] I just KNOW this is related to "collection" somehow, or that there is a way to do this.  However, the way I do it now is to create an array of instances, but this creates some unwieldy *.find{ |i| .... } sequences and worse.  Can't I do a find over instances of a class?
1978 [crouton@du l] oll_instances_of_Foo = []
1979 [DDouthitt@cu] Cool!  I do think you meant "ObjectSpace" and "all_instances..." in
1980 [Dave@th ma e] Perhaps you want to look at Hashes...

1981 [DDouthitt@cu] or whatever the right syntax is :-)
+ 1982 [Dave@th ma e] Try
+ 1983 [hgs@dm .a .u] You have not used it as a method of anything.  So it is looking
  1984 [hgs@dm .a .u] s/on/at/
  1985 [DDouthitt@cu] That worked beautifully!  I'm actually beginning to understand this :-)
  1986 [Dave@th ma e] three dots
  1994 [matz@ne la .] (Grin)
  2028 [excalibor@de] You surely meant "on".sub!(/on/, "at")

Is Matrix in Ruby dynamically expandabl ?
1987 [thucdat@ho m] Is Matrix in Ruby dynamically expandable rowwise & columnwise?
1988 [Dave@th ma e] The source of the Matric class is actually available in the '/lib'

English Ruby/Gtk Tutorial?
1989 [schneik@us i] Is there an interim version (however primitive) of the English Ruby/Gtk
+ 1990 [ljlane@de ia] ljlane@debian.org
| + 1991 [ljlane@de ia] Oops. That's not GTK. Sorry.
| + 2000 [schneiker@ju] Interesting. Thanks.
+ 1992 [igarashi@ue ] Sorry, it is not yet available.
| + 2001 [schneiker@ju] I'll look these up.
| + 2014 [manamist@wh ] ...
| | + 2016 [manamist@wh ] SugHimsi.
| | + 2021 [schneiker@ju] invaluable
| | + 2031 [igarashi@ue ] I think so too.
| | + 2049 [aamine@dp u-] ^^;;;
| | + 2055 [manamist@wh ] ...
| |   2059 [MAP2303@ma l] Ah, sorry for my lazy(^^;
| + 2029 [igarashi@ue ] Here is a half of my part.
|   + 2035 [fukusima@go ] And here is my part.
|   | + 2048 [schneiker@ju] Thanks,
|   | + 2051 [maki@in c. o] And my part.
|   + 2047 [schneiker@ju] Thanks,
+ 2176 [igarashi@ue ] ...
  2179 [schneik@us i] Thanks.

slice! ate my machine!
1999 [Dave@th ma e] Don't try this one unless you have a spare shell window open and are
+ 2004 [thucdat@ho m] Is this a bug|feature ?
| 2007 [matz@ne la .] Of course it's a bug.
+ 2006 [matz@ne la .] Sorry, here's the patch.
+ 2008 [decoux@mo lo] aestivum% diff -u string.c.old string.c
  2011 [matz@ne la .] You're right.  I should have check more.  Here's new patch.

Extension and other testing
2005 [Andy@To ls e] Does Ruby have any sort of standard for testing extension modules
+ 2015 [CQN02273@ni ] Not packaged, but there is testsupp.rb for testing.
+ 2017 [schneiker@ju] Also IIRC Perl (and I think Tcl, among other tools) also give a fairly

2022 [decoux@mo lo] I need to access ruby_errinfo and initially I've written (ruby_errinfo is
+ 2026 [matz@ne la .] Use rb_gv_{get,set}() for global variable retrieval.
+ 2030 [decoux@mo lo] It don't exist in 1.4.3, no ?
  + 2039 [matz@ne la .] Oops, I have to merge them into 1.4.4, soon to be release.
  | 2103 [komatsu@sa i] In the message of [ruby-talk:02039] Re: rb_global_entry
  + 2043 [decoux@mo lo] I've a similar problem with symbols. One of my modules define
    2046 [matz@ne la .] OK, I'll add SYM2ID to 1.4.4.

class File acting funny!
2034 [DDouthitt@cu] Lock.lock
+ 2041 [matz@ne la .] First of all, IO and its subclasses does not call `initialize' yet.
+ 2042 [c.hintze@gm ] class File acting funny!
  2052 [DDouthitt@cu] Aha!
  2063 [matz@ne la .] No, I don't think so.  Can you show me your script?

Anonymous and Singleton Classes
2036 [Bob.Davison@] I am a Ruby newbie and having some problems getting my mind around certain
2045 [matz@ne la .] (a) `Class::new' should call `inherited' because it creates new
2050 [Bob.Davison@] OK, so would I be right in saying that it's an implementation thing and you
2062 [matz@ne la .] Hmm, there was discussion about this matter before, without explicit
2072 [Bob.Davison@] Matz,

Load error message
2038 [schneik@us i] # ruby -I/driver/tests/tools/src gtkbrows.rb
2044 [matz@ne la .] Including load_path information in LoadError exception is little

2053 [DDouthitt@cu] Only sometimes :-)
2058 [c.hintze@gm ] Lockfiles
2060 [DDouthitt@cu] This is not guaranteed to work.  This shows the danger of locks: in the
2075 [kjana@os xa ] ....And same is true when system is used.  Why can you believe a file
2076 [DDouthitt@cu] set -o noclobber
2078 [c.hintze@gm ] But you have to look, how it is implemented in the corresponding

eval.rb fails
2057 [thucdat@ho m] (eval):1: parse error
2061 [matz@ne la .] The newline terminates the statement, so that poor Ruby does not
2071 [hgs@dm .a .u] until
+ 2073 [thucdat@ho m] The doc is fine, this happens only if you try to execute 'until' block
| 2074 [hgs@dm .a .u] Yes, that is true.  Discussion off list and experimentation confirms this.
| 2077 [crouton@du l] Umm, I think it is the limitation of eval.rb.
| + 2079 [thucdat@ho m] This is it, it's gonna be my Ruby Shell. Dave Thomas advised me about it
| + 2081 [hgs@dm .a .u] There is quite a lot in that contrib directory.  Could someone
|   2082 [fit0298@fi e] Please see a URL:  <http://www.ruby-lang.org/en/raa.html>
|   2083 [hgs@dm .a .u] Thank you
+ 2080 [matz@ne la .] It's a bug in eval.rb, not in Ruby.

A thought
2064 [DDouthitt@cu] Ruby is nice and provides some nice features for those tripping and bumbling in from procedural programming languages.
2065 [andy@To ls e] These features aren't so bad; the implicitly global Perl-like

2066 [bi28261@Ap l] *****    ***   	  ***  *      *****  *   *  ***  *

A thought
2067 [schneik@us i] This might not be an either/or sort of thing. For instance, Perl
2068 [andy@To ls e] That could be quite interesing -- you could check for adherence

Ruby/GTK+ question about imlib --> gdk-pixbug
2069 [schneik@us i] When looking around for imlib (mentioned in the gtk-0.23 Readme file) which
+ 2086 [imain@gt .o ] It's a good idea, but I'd hold off for now.  There hasn't been an official
+ 2100 [yashi@ya hi ] # is there a ruby list in ibm.com? :)
  2117 [yashi@ya hi ] oops, next stable version of gtk+ might include pixbuf...

Ruby, AIX, Oracle
2070 [thucdat@ho m] Dear all,

Scope violated by import via 'require'?
2084 [c.hintze@gm ] I have following found. If I define one module *in* another one, the
2099 [matz@ne la .] Well, it's an expected behavior (at least I as expect it ;-)
2101 [c.hintze@gm ] So does that mean it works as you intended? May I ask another
2125 [matz@ne la .] Yes.
2127 [c.hintze@gm ] I have already thought of this. Only I was not sure, if it is the best

Array trouble
2087 [thucdat@ho m] $ ruby -v
2088 [Dave@th ma e] Actually it _did_ do it, but it just didn't do what you were

Array other wonder
2089 [thucdat@ho m] self + other
2090 [Dave@th ma e] Perhaps you could use the Matrix package - a vector is a Matrix with

Array Gotchas
2091 [thucdat@ho m] While I was wondering why '+' was the concatenation and '-' was the
+ 2092 [Dave@th ma e] I'll bite. In what way are they different?
| 2093 [thucdat@ho m] [1, 2, 3, 4, 5]
| 2096 [gotoken@ma h] I'm guessing you used eval.rb.  This difference is not in Ruby but in
| 2097 [crouton@du l] In addition, bcause array indice have range from 0 to size-1,
+ 2094 [gotoken@ma h] At first, `+' and `concat' is slightly different.
+ 2095 [fit0298@fi e] The "Range" object samples.
+ 2098 [matz@ne la .] Besides return values, `..' operator creates a range covers including
  2115 [thucdat@ho m] Please, irb.rb is more solid than eval.rb.
  2171 [quinn@en y. ] Dat

2102 [bi28261@Ap l] *****    ***   	  ***  *      *****  *   *  ***  *

ARGF or $<
2104 [hgs@dm .a .u] Has anyone any examples of how to use ARGF or $< as I cannot find much
2105 [fit0298@fi e] Have you read next page ?  I can find them.
2106 [hgs@dm .a .u] Yes, but it doesn't explain how to use them.  ARGF is
+ 2107 [Dave@th ma e] I'll add the examples to the next version of the FAQ.
+ 2108 [fit0298@fi e] If you write the paragraph, how do ?
  + 2109 [decoux@mo lo] see io.c
  + 2111 [hgs@dm .a .u] Having seen the different answers, I can see that it is more than
    2113 [Dave@th ma e] The concatenation of the contents of all the files....
    2114 [hgs@dm .a .u] Agreed.
    2116 [schneik@us i] I think this (plus the latest suggestion by Dave Thomas) is a big

Is Ruby Ready?
2110 [thucdat@ho m] From the messages discussing interesting issues i.e. class variables, I am
2112 [Dave@th ma e] Andy and I are using Ruby as a central component in a development for

ARGF vs. $<
2118 [Dave@th ma e] Sorry to add to the confusion, but...
2121 [matz@ne la .] They are same in semantics, but syntactically, $< is a read-only
2140 [schneik@us i] I don't know if Dave also wants to include the following in his
2141 [Dave@th ma e] I'm documenting English.rb in the section on library files, although
2161 [schneiker@ju] both

TRUE vs. true
2119 [Dave@th ma e] As far as I can tell, 'true' is a symbol built in to the lexer which
2120 [matz@ne la .] No.  Once upon a time, when `nil' was the only false value, there were

2122 [schneik@us i] I had some trouble trying to retrieve glade-ruby. First, when clicking on
2123 [yashi@ya hi ] $ bzip2 -tvv glade-ruby-0.9.2.tar.bz2
2139 [schneik@us i] Got it. Thanks!

load "file", true
2124 [decoux@mo lo] load(file[, priv])
2126 [matz@ne la .] Things like untrusted applets.  E.g.

Re: New filelock-0.2.tar.gz in in.coming (II)
2128 [c.hintze@gm ] matz, I will send following questions as reply to your reply to my
2132 [matz@ne la .] Usually I do not check in.coming directory unless informed by email.

Question the sequence in $:
2129 [c.hintze@gm ] $ ruby -v
+ 2130 [thucdat@ho m] It's the order your PATH is arranged. Rearrange your PATH, you get a new
| + 2131 [decoux@mo lo] I don't think this is a good idea for security reason. ruby don't add "."
| | 2136 [c.hintze@gm ] Yeah, yeah! I am already blamed! I admit I have not thought about
| + 2134 [c.hintze@gm ] Sorry, but I do not understand! What has my PATH to do with the
+ 2133 [matz@ne la .] Yes, It's intended.  Mostly because security reason.  If you want to
  2135 [c.hintze@gm ] Damned! I have written to quickly, indeed. I have not thought about
  2137 [matz@ne la .] Even though it's not UNIX way to put application related files into
  2138 [decoux@mo lo] I'm wrong when the script is setuid, ruby initialize $SAFE = 1 before

Scripting and OO -- thought question
2142 [h.fulton@at ] Here's an opinion question for you all.
+ 2143 [andy@To ls e] He misses a very important point -- it's those stupid little
+ 2144 [Dave@th ma e] Well, I guess I'd first say that it would clearly be his choice.
| 2145 [thucdat@ho m] Many things said above would also be true when replacing 'Ruby' with
| 2146 [andy@To ls e] Sure, but Python fails on the "convenient" count.  I, for one,
+ 2148 [c.hintze@gm ] Scripting and OO -- thought question
| 2164 [schneiker@ju] For many (if not most) people I know (and know of), "scripting" != "real
+ 2156 [matz@ne la .] It highly depends on the definition of `scripting', I think.
+ 2162 [schneiker@ju] Wait a minute! A 60,000 line chess program in Java or C++ could turn out to
+ 2169 [schneiker@ju] ... And other thing....
  2193 [DDouthitt@cu] I write some interesting programs in ksh :-)  Don't knock it...
  + 2194 [perin@pa ix ] Is that 41,000 *new* lines every 5 minutes?  Or is it e.g. 40,900 old
  | 2197 [schneik@us i] Yes, but HOW do they do this?
  + 2199 [c.hintze@gm ] Hey, I do not knock it! I also have written some fine things in sh,
    2201 [DDouthitt@cu] LogFile.open.readlines.each { }
    + 2206 [c.hintze@gm ] ...
    + 2207 [schneiker@ju] of

Ruby/Glade usage questions.
2147 [schneik@us i] First of all, thanks to everyone involved in developing the Ruby GTK+, XML
2150 [yashi@ya hi ] as soon as glade2rb starts working (again :^) I shouldn't have put
2178 [schneik@us i] Language
+ 2180 [schneik@us i] I also think that it might be useful to look at the "Glade Python Code
+ 2202 [yashi@ya hi ] it does.  I think some sample .glead files in Glade/Ruby alread have
  2204 [mrilu@al .c ] I think Python can marshal arbitratry construct to the disk. So is it
  2212 [decoux@mo lo] * the interpreter is a "black box"
  + 2390 [yashi@ya hi ] # late, late, late, late, late, late ;p
  + 2396 [decoux@mo lo] if (rb_respond_to(obj, s_dump)) {
    + 2406 [yashi@ya hi ] I'm sorry, I don't think I get your point.  Are you suggesting to
    + 2407 [decoux@mo lo] Yes, if you can create a ruby object from your C struct, you can do it. You
    + 2408 [decoux@mo lo] Well my message is not very explicit, i.e. a little example with 2 struct

2149 [Dave@th ma e] Guess what I'm documenting today ;-)
+ 2151 [thucdat@ho m] In the first case, if codeA throws an exception, codeB won't be  executed at
| 2153 [c.hintze@gm ] Yep!
+ 2152 [c.hintze@gm ] begin/else
| 2154 [Dave@th ma e] Yup! It's in the book in the tutorial section on loops. There's also
+ 2155 [matz@ne la .] No technical difference on that assumption.

parse bug in 1.5
2157 [mirko.nasato] Ruby 1.5 seems to have a problem when parsing methods called
2159 [matz@ne la .] It's not a bug.  It is a bad feature which I'm thinking about
2198 [mirko.nasato] Most languages allow for space between the function identifier and
2200 [quinn@ng ee ] This slipperly path looks like one followed by a certain other language.
+ 2203 [schneik@us i] Hmm, must be the overly context-dependent one.
| 2205 [mrilu@al .c ] I have to say I don't agree. Principle of least surprise goes well along
| 2209 [schneiker@ju] may
| 2210 [Dave@th ma e] FWIW, in the book we're recommending that people use parens, but...
| 2216 [mirko.nasato] As a personal rule, i happily avoid parens when the method doesn't require
| 2217 [h.fulton@at ] I tend to agree with you!
| + 2218 [schneik@us i] require
| | 2219 [Dave@th ma e] Well, perhaps the first thing to do is to collect examples of cases
| + 2220 [Dave@th ma e] Absolutely - it's in line with the uniform access principle, and makes
|   2221 [schneik@us i] more
+ 2312 [matz@ne la .] I like this expression "hovering near the edge of too complicated".

The state of Ruby
2158 [thucdat@ho m] Since Tutorial on Ruby in english is still a precious commodity, the growth
2160 [Dave@th ma e] There are some technical and copyright issues to address, but we hope
2168 [schneiker@ju] growth
2170 [Dave@th ma e] Heh - that's exactly how we feel, and we're writing it.