26772-28470

26539-27442 subjects 27043-29076

SV:  Database connectivity
26772 [mikkel.bruun] ...

BOOK: maybe an interesting one. Update: sample code for ruby available
26780 [mjais@we .d ] yesterday I posted a messeage about the upcoming
+ 26781 [dblack@ca dl] print result,"\n"
| 26804 [tobiasreif@p] not
| + 26808 [Dave@Pr gm t] or even
| | 26811 [tobiasreif@p] duh..sure!
| + 26821 [dblack@ca dl] Evidently not.  Not a puts in sight.  (Don't blame the messenger :-)
|   26832 [tobiasreif@p] In xmlpppp/ch21/, there is
+ 26795 [mjais@we .d ] after I browsed all the code, I decided to cancel the book.

Ruby User Groups
26794 [dblack@ca dl] I just want to remind people of the existence of the Ruby User
26806 [kentda@st d.] Seeing that there still isn't one for Norway,
26838 [mikkelj-anti] Well - we are a few danes on this group.

SV:  Re: Ruby User Groups
26809 [mikkel.bruun] Or DANES???

ANN: Fractal Life Engine 0.2
26813 [phlip_cpp@ya] The small changes are Lapidary instead of RubyUnit, more internal

RE:  Ref Counting (was KDE or GNOME curiosity question...)
26825 [mchahn@fa el] My thoughts on ref counting are really academic.  I am not arguing for
26827 [1007407366.0] I'm not sure how optional ref counting can be accomplished without
26828 [pbrannan@at ] 1) Reference counting could be explicit (that is, you would have to call
+ 26829 [1007408636.a] I agree that this could certainly be implemented in 100% Ruby today,
| 26830 [pbrannan@at ] It's not that Ruby has "no types", but that a reference in Ruby can point
+ 26831 [alan@di ik t] How about
  26834 [mchahn@fa el] At this point my ideas are getting really vague, but I'm thinking that you
  + 26837 [pbrannan@at ] The problem with scoping is that it doesn't work if you need to share the
  | + 26842 [mchahn@fa el] I have run into the db problem myself.  I coded java apps using a jdbc
  | + 26844 [mikkelj-anti] But you can combine scoping with subscribe unsubscribe as mentioned in other
  |   26845 [DHable@ph in] I wouldn't implement any finalizer like Java. IMO the finalize method is the last (final) method that will be called before the GC reclaims the object. This method should do the minimum to get the object back into a sane state for destruction.
  + 26841 [mikkelj-anti] being
    26843 [mchahn@fa el] Thanks, that was very clear.

finalizer not getting called
26840 [pbrannan@at ] def finalize
26904 [kentda@st d.] Would it not be better to throw an exception if the given Proc isn't of

Session / CGI suggestion
26848 [patrick-may@] I think I have a nice way of combining the functionality of CGI and

Ruby and Tk problems
26855 [icculus@gm s] I compiled my ruby interpreter to include the tk and tcltklib extensions,

One line body
26859 [alwagner@tc ] Does anyone know what this reply from:  ruby-talk-admin@ruby-lang.org
26864 [hal9000@hy e] Well, it sounds as though it is complaining about
26865 [rich@in oe h] Hal...your email had another line with nothing on it.
26868 [hal9000@hy e] Heh... not one I typed, I think.

Testing
26863 [hal9000@hy e] Trying a one-line message.  - Hal

One line body (test)
26866 [rich@in oe h] testing one line (not two)
26877 [bobgus@mc .c] Maybe it is a test for messages which have no "\n", but "\r" instead?

Small RubyUnit extension
26867 [Dave@Pr gm t] At the back of my mind, I seem to remember someone doing something
+ 26880 [   ml@sp .d ] Also las ich bei Dave Thomas [mailto:Dave@PragmaticProgrammer.com]
| 26884 [Dave@Pr gm t] Another good approach, except... When I did the same for RubyUnit, and
| 26889 [   ml@sp .d ] Also las ich bei Dave Thomas [mailto:Dave@PragmaticProgrammer.com]
+ 26882 [feldt@ce ch ] Good that someone tries to get a solution to this into the RubyUnit
| 26920 [Dave@Pr gm t] Thats a good idea - I'll add it to mine.
| 27041 [max@ma va co] Please see documentation on Tcl tcltest package.
| 27042 [feldt@ce ch ] We're lazy; can you summarize or give pointer?
| 27048 [max@ma va co] pattern is specified in shell glob language
| 27058 [feldt@ce ch ] Thanks.
+ 27149 [masaki.suket] Does RUNIT::TestCase.all_suite help you?
  27153 [Dave@Pr gm t] Not really, because it returns all the suites, where I need all the
  27183 [masaki.suket] Sorry, I misunderstanded.
  27195 [Dave@Pr gm t] How about
  27258 [masaki.suket] It is good. I'd like this than mine.
  28007 [masaki.suket] I decided to add

Wishing for instance_yield or the equivalent
26870 [hal9000@hy e] Follow my reasoning here.
26872 [decoux@mo lo] Well I've not understood your problem
26873 [hal9000@hy e] [snip Guy's proof that I am an idiot]

FXGLViewer - rotate a primitive?
26871 [phlip_cpp@ya] I finally got back to this effort; here's a recap regarding this example
26908 [phlip_cpp@ya] gluCylinder(quad,radius,radius,height,FXGLCYLINDER_SLICES_NUMBER,FXGLCYLIND
26929 [ljohnson@re ] Note sure if this made it last time...

Can this be factored?
26886 [mchahn@fa el] The two if statements below are identical except the words left and right
+ 26887 [feldt@ce ch ] I haven't gone through it all but what about the "pattern"
+ 26948 [ralph.mason@] As already pointed out in earlier an if statement that is almost the same

Article on Program design
26890 [henning@ik o] Why does  for example Ruby appeal to people in the way it does?
+ 26892 [feldt@ce ch ] Interesting.
+ 26968 [mikkelj-anti] I think many minimalistic pragmatic ideas of Graham are in common with Ruby.

short article draft for review
26894 [tobiasreif@p] here is a draft for a very short article about Ruby. All in all I want
+ 26898 [dblack@ca dl] To me, that doesn't illustrate iterator power very dramatically or
| 26899 [tobiasreif@p] David,
| 26902 [dblack@ca dl] I'm just thinking that the "for" loop doesn't show off anything
| 26940 [tobiasreif@p] David,
| 26956 [neumann@s- i] You could here also use Symbols (:even) instead of Strings.
| 26957 [Dave@Pr gm t] And perhaps a case statement
| 26960 [tobiasreif@p] Thank you both!
| + 26962 [Dave@Pr gm t] print "
| | 26963 [tobiasreif@p] Why? I can't see a disadvantage.
| | 26964 [Dave@Pr gm t] 1. Move the file between Unix and Windows boxes: what happens to the
| | 26966 [tobiasreif@p] That alone suffices :)
| | 26971 [Dave@Pr gm t] puts        - is 4
| | 26979 [tobiasreif@p] Ah sorry; you're right. (I didn't doubt it ;) )
| | 26981 [Dave@Pr gm t] Ah ha! I hadn't miscounted after all :)
| + 26988 [neumann@s- i] Instead of assigning number and step in each when-clause, why not
|   26991 [tobiasreif@p] Nice; thanks.
|   27000 [neumann@s- i] No, I meant the formatting of *my* example.
+ 26900 [curt@hi bs c] This link just results in a directory display.
| 26901 [tobiasreif@p] Thanks!
+ 26925 [neumann@s- i] It's a great feature but should be used with caution, because
| 26932 [tobiasreif@p] Thank you very much for your feedback!
+ 26967 [j.travnik@sh] this code is not good, it is too much boring ;-)
  26970 [tobiasreif@p] Thanks a lot for you version! It is better. But the article is sent :(
  26972 [Dave@Pr gm t] As a matter of interest, where was it sent?
  26978 [tobiasreif@p] nothing too big...

Re: Article on Program design; dynamism
26895 [henning@ik o] Thanks, was just looking for that link!
26896 [feldt@ce ch ] Yes and here's some more from the top of the head (and note that I haven't

Etc.getpwnam() hanging
26903 [harryo@zi wo] I was very pleased to find that the Etc module provided a getpwnam()

Fixed ... partly ... maybe a bug?
26909 [harryo@zi wo] OK. I discovered that I needed to do a "require 'etc.so'" and then it
26911 [decoux@mo lo] ruby must give an error message in this case
26916 [harryo@zi wo] Yes. I get that error message. Let me try my original code again ...
+ 26919 [decoux@mo lo] Well, generally the authentification is done by the www server,
| 26927 [harryo@zi wo] The problem with that is that in this case it requires configuring the
| 26935 [decoux@mo lo] You have ruby-shadow in RAA perhaps it can be usefull
| 26954 [harryo@zi wo] Thanks.  I didn't know that existed.  I'll remember to look in RAA next
+ 27134 [kentda@st d.] Maybe PAM would be a better bet?

ANN: REXML 1.1a5
26912 [ser@ge ma e-] I've just posted version 1.1a5 to the web.  I may or may not have time to
+ 27003 [tobiasreif@p] ... of the awesome kind :)
+ 27013 [james@ru yx ] This is very handy when you have code that navigates to various elements, and needs to perform some operation relative to its
  27018 [rich@in oe h] Actually the weather here in VA is weird.  Its warm (~70F) and
  27389 [ser@ge ma e-] Well, it has been snowing (or snowy) here in Bend, Oregon since the

Extensions with C: laziness as virtue :-)
26915 [hgs@dm .a .u] Given the idea that laziness is supposed to be a virtue in programming :-)
+ 26922 [harryo@zi wo] I'm not having a very good success rate with my posts today, but I'll
+ 26924 [Dave@Pr gm t] Well, there's SWIG. (www.swig.org)
+ 26926 [kentda@st d.] Not a piece of Ruby, but seem to recall that SWIG does much of this for
  26936 [hgs@dm .a .u] Thanks Dave and Kent, I'd forgotten about SWIG.

Interfacing to a C++ library (was: overload possible?)
26941 [kevinbsmith@] I was surprised at how difficult it was to write a clean
+ 26946 [johann@ph si] Hm.  I just did this, or think I did.  What was the problem?
+ 26949 [ljohnson@re ] As the author of another Ruby interface to a C++ library, let me be the

ANNOUNCE: FXRuby-0.99.181
26952 [ljohnson@re ] No, it's not deja vu all over again. Since there was some confusion about
27059 [bobh@hs da o] Lyle -
27082 [ljohnson@re ] No, it should be fine to just install over  the current version.

some more finalizer weirdness
26958 [pbrannan@za ] class Foo
+ 26959 [pbrannan@za ] This should read "uncomment the line 'puts "foo"'."
+ 28437 [matz@ru y- a] The finalizer timing is not deterministic.  They are called sometime
  28445 [paul@at es .] This sounds reasonable, if perhaps a bit odd, but why would it preserve
  28470 [matz@ru y- a] I guess unused C stack reference to the Foo instance is scanned by the

How to match '|' but not '\|'
26969 [rshaw1961@ya] I'm a bit of a nuby to regular expressions so I need a little assistance.
+ 26974 [benoit.cerri] separated
+ 26975 [rshaw1961@ya] Doh,
| 26996 [1007508429.d] Simple, just use a zero-width negative look-behind assertion.  E.g.
| 27039 [rshaw1961@ya] Yes, this is just what I am looking for. Maybe I will try the latest build
+ 26987 [neumann@s- i] actual.scan(/((\\.|[^|])+)/).map{|t| t[0]}

thoughts on virtual base classes, interfaces
26973 [ptkwt@sh ll ] I want to pass around objects of a type which respond to a method called
+ 26977 [mikkelj-anti] This was crossposted while I posted the article on first class functions in
| + 26980 [pbrannan@za ] def foo(fun)
| + 26982 [ptkwt@sh ll ] I don't think it would work in this case.  I need an object because there
|   26990 [mikkelj-anti] If you read my posting more carefully, you'll notice that I discuss both
+ 27025 [feldt@ce ch ] I tend to use an "abstract base class" with raise NotImplementedError to
| 27028 [Dave@Pr gm t] Would a mixin perhaps be a better flag of this?
| + 27031 [feldt@ce ch ] Sometimes yes, but I (1) often find it hard to invent a good name
| | 27063 [pixel@ma dr ] Isn't a mix-in "interface inheritance", aka it should stateless (per object).
| | 27193 [jweirich@on ] Actually, a mix-in is implementation inheritance.  Ruby doesn't have a
| + 27032 [rich@in oe h] something like this...
| + 27038 [ptkwt@sh ll ] I've thought of this, but I think most of the methods from Runnable would
|   + 27049 [harryo@zi wo] Isn't that redundant, though, since it won't throw the exception unless
|   | 27114 [ptkwt@sh ll ] I guess my point is that either way you've got to document it.  Just
|   + 27062 [Dave@Pr gm t] Part of my thinking is that the Runnable mixin could be totally
+ 27128 [paul@at es .] You can, of course, use respond_to? to determine if run() is

first class functions in Ruby
26976 [mikkelj-anti] In the thread on language design, I mentioned a wish for functions as first
+ 26986 [mike@st k. o] What about  using a Proc object?
| 26994 [mikkelj-anti] It's ok, but I'd like a more direct integration.
+ 26993 [ralph.mason@] irb(main):010:0> def sq(x)
  + 27009 [mikkelj-anti] wait - this only works because aMes and sq belongs to the same scope.
  | 27022 [ralph.mason@] Sure it works like that because they belong to the same scope, but you can
  + 27010 [mikkelj-anti] That is nice. It has the same level of compactness that I asked for.
    + 27023 [ralph.mason@] I'm not so sure what you are trying to do here.  It looks like you are
    | 27127 [mikkelj-anti] Yes - that is one the issues. I don't even know how this works in an OOP
    | 27157 [pit@ca it in] Here's one more version of the partial evaluation. It works with
    | 27158 [feldt@ce ch ] Yes, this is truer partial eval; mine would be better called "Proc
    + 27024 [feldt@ce ch ] class Fun
    | 27123 [mikkelj-anti] sq = Fun.new {|x,y| x*y}
    + 27083 [adamspitz@bi] could. Never used it much, though. :)
      27122 [mikkelj-anti] Yes, that is truly powerful.

Ruby job posted in NYC!
26983 [ jimm@io co ] I just thought I'd share this with the group: the first job posting I've
27033 [feldt@ce ch ] Way cool!
27035 [james@ru yx ] Not to spoil the fun, but $40/hour for contract work in NYC doesn't seem like much.
+ 27109 [schneiker@ju] like much.
+ 27139 [csawtell@pa ] Well if this job could be done using telecommuting - remember NYC is only

Can someone explain TupleSpaces?
26984 [ptkwt@sh ll ] I looked at the examples that came with drb, but I'm still not quite
+ 26992 [Dave@Pr gm t] It's a slightly bad name :)
| + 27001 [ptkwt@sh ll ] OK, from your description a TupleSpace sounds like a datastructure that
| | 27005 [Dave@Pr gm t] That's about it.
| + 27021 [feldt@ce ch ] Actually, this semantics for matching might be used in the overload
| | 27080 [jim@fr ez .o] This sounds like what I am looking for. I need
| | 27081 [feldt@ce ch ] There are some simple examples of using TupleSpaces in the tarball.
| + 27037 [list@ch om t] Can one do rd in rinda, too?  I have looked into TupleSpaceProxy but
|   27427 [list@ch om t] Sorry, Silly Question (TM) again.  A glance at tuplespaces.rb shows
+ 26995 [petemcbreen@] someone
+ 26997 [neumann@s- i] Tuples come from mathematics. Unlike lists they have a predefined length.
  27002 [ptkwt@sh ll ] Thanks.  It's starting to make sense.  I almost get the feeling that a
  + 27004 [tobiasreif@p] which of the upcoming books will cover them?
  + 27015 [curt@hi bs c] Its actually very exciting once you start to get gestalt of it. You can go

newbie question
26985 [nerurin@ho m] ...
26989 [hal9000@hy e] "Popular" is a relative term. It is certainly better known
27012 [matz@ru y- a] 15.

logging in Ruby
26998 [anany@ec .v ] I am writing a logger class for RubiCTM, and I was just wondering if I
+ 27006 [mchahn@fa el] The caller(0) method will give you the current list of callers.
+ 27014 [phlip_cpp@ya] set_trace_func proc { |event, file, line, id, binding, classname|

The Wild Goat book is here!
26999 [dblack@ca dl] I am cradling on my knee my very own copy of "Ruby in a Nutshell".

Why use symbols (was: Can this be factored?)
27007 [mchahn@fa el] I've never processed symbols before.  If I have an object and a symbol of an
27008 [1007513886.2] Object#send
+ 27011 [mchahn@fa el] Thanks.  I knew there had to be some other way to use them than just eval.
+ 27070 [pbrannan@za ] obj.method(symbol).call()

OSX 10.1.1 <help a newbie please>
27016 [bobh@hs da o] How do I get Ruby 1.6.5 to install from source?
27019 [hisa@im sy o] You need to apply the following patch to ruby-1.6.5 source.

How to get IP address of client from server
27017 [harryo@zi wo] If I have something like the following ...
+ 27020 [Dave@Pr gm t] Try #peeraddr
+ 27044 [mike@st k. o] Does session.peeraddr do what you want?
  27050 [harryo@zi wo] Thanks guys.  No idea how I missed that ... it was the next method in the

Help: factored sorting
27026 [W.L.Kleb@La ] I have an array of strings,
+ 27027 [ralph.mason@] It's just a matter of making the all the items count
+ 27029 [Dave@Pr gm t] a.map { |e|
+ 27030 [raja@cs in i] a.sort{ |x,y| keys(x) <=> keys(y) }
+ 27034 [raja@cs in i] 1.  the sorting described in an earlier note followed by
+ 27036 [raja@cs in i] Hmmm ... again.
+ 27103 [tobiasreif@p] main_array = ["zed66","alfred39","x1","x3","x2","f5","f2","g7","g9"]
+ 27104 [tobiasreif@p] sorry, there was trash included...
threads.html
top