148764-150572

148567-149458 subjects 149049-170709

[ANN] yajb 0.5.0
148764 [m.sakurai@dr] yajb 0.5.0 has been released.
148765 [m.sakurai@dr] I mistook URL. The correct URL is
148878 [botp@de mo t] Sakurai Masashi [mailto:m.sakurai@dream.com]
148902 [m.sakurai@dr] Yes.

Trouble with Gems and SQLite under Windows
148767 [steve@bo us ] I am trying to learn Ruby and having a problem that doesn't make any
148775 [jamis@37 ig ] This ought to be 'sqlite3', if you are using the sqlite3 gem. See if

Rails, Lighttpd, FastCGI and Cygwin
148785 [me@pa lw st ] Has anyone been successful in getting this combination (Rails, Lighttpd,
+ 148799 [vanweerd@gm ] I don't think many people use Cygwin here, since there isn't much
+ 148915 [redentis@gm ] Frankly I'm amazed you've got that far. I had real problems getting
+ 148917 [se@di it le ] Simple answer is: Just forget it. I have spent weeks on this before

Regarding rand
148793 [foolfodder@g] ' Note that I used rand(101) to get back numbers from 0  to 100, and
+ 148801 [daniel@br ck] That's a great idea!
+ 148802 [lukfugl@gm i] module Enumerable
  148837 [twifkak@co c] 1. Use #respond_to? instead of ::method_defined? This allows for singleton methods.*
  148847 [foolfodder@g] Thanks guys,
  + 148854 [twifkak@co c] Ha! I had to ri Range to actually find out how it supported Ranging Things. Now I know. That's neat.
  + 148882 [daniel@br ck] That could be useful, at least for single-character strings.
    148884 [Ara.T.Howard] ...
    148926 [foolfodder@g] Ooh, i'm liking singleton methods, I'm guessing they make a lot ofrails easier/possible.

Instance Eval of a Proc
148796 [gavin@re in ] Why can I not use a Proc created from a method in #instance_eval? (Or
148800 [Ara.T.Howard] just because you are call meth_lambda in instance_eval doesn't mean @name will
+ 148805 [lukfugl@gm i] I think Gavin's point is that it *does* work for my_lambda and
| 148810 [Ara.T.Howard] obj.method(sym)    => method
| 148828 [daniel@br ck] That is not in dispute.
| 148833 [lukfugl@gm i] Evaluates a string containing Ruby source code, or the given block,
| 148838 [Ara.T.Howard] class C
| 148844 [gavin@re in ] [a bunch of snipped examples]
| 148849 [pit@ca it in] As has been shown in the original post, Ruby's lambdas are what you call
| 148852 [gavin@re in ] Ack, very true. I withdraw that statement. It's just that (as you say)
+ 148840 [gavin@re in ] my_proc = inst.method( :method_name ).to_proc

Help with SOAP
148807 [ben.myles@gm] I'm trying to write some code to connect to a SOAP webservice. I only
148925 [nakahiro@sa ] You should use WSDL file located at
148942 [ben.myles@gm] Thanks so much! That's what I call community support - trying it out now :-)

Web Developer Opportunity with Top-Tier Investment Bank - Chicago
148822 [FD@Na is af ] Frank Deluccia with Navistaff.  I have a great opportunity for a web

Parsing to DateTime
148829 [segabor@gm i] I have to parse input string to DateTime in format "%Y.%m.%d". How
148831 [james@gr yp ] You're looking for Date.strptime().
+ 148835 [mrcode@ne ro] def parse_date(str)
+ 148839 [segabor@gm i] ...

RCR: required args after optional ones (was Re: [RCR] nil for unassigned keys)
148834 [eric_mahurin] don't like it - too ambiguous.  Does b or d get assigned when
148864 [daniel@br ck] I'd say it's obvious that b gets assigned, since the above

IRB reset?
148842 [chuck.brotma] I'm not sure if this is a Ruby or FreerRIDE question, so I'll ask it here
148862 [rcoder@gm il] This isn't specific to IRb -- any time you reload code which defines
148936 [chuck.brotma] Lennon.
148940 [discordantus] Object.class_eval do
148959 [rcoder@gm il] You can also put a sigil on the const_remove calls to prevent them from

Fwd: [Rails] Atlanta Ruby Group
148857 [pat.eyler@gm] This was posted to the rails list, where it is gathering some i

customizing redcloth?
148858 [bdarcus@gm i] How do I add a new inline rule to RedCloth?
148922 [tamc2@ca .a ] a) add :inline_textile_quote to the list of rules in the RedCloth
148927 [bdarcus@gm i] Thanks Tom. Tied b, but no luck.  I'll need to see if something's wrong
148945 [tamc2@ca .a ] Your syntax looks fairly close to other textile syntax (quotes,links)

ruby-gnome2 canvas pixbuf scaling
148859 [joevandyk@gm] According to http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspixbuf.html#GNOMECANVASPIXBUF--WIDTH-SET
+ 148866 [joevandyk@gm] The problem I'm trying to solve is I want to let a user zoom in and
+ 148966 [mutoh@hi hw ] Both of Gnome::CanvasPixbuf#width_set=(val)
  + 148973 [joevandyk@gm] Thanks for the tip!
  + 148981 [joevandyk@gm] I've got another question for you.

[OT] blah (was Re: `not' in parameter lists)
148890 [twifkak@co c] Sorry! Maybe I'm just broken. Maybe I'll experiment with it.
+ 148893 [daniel@br ck] Thanks!  That's a great article, and I don't think I did
+ 148912 [mailing-list] That article is again proof that Joel is an utter idiot,
  148930 [twifkak@co c] Well, I happen to think he's, like, 20% right on exceptions, and 5%
  148932 [kevin.jackso] I read it and thought that the idea that the original idea was to prefix
  148951 [twifkak@co c] True, and his argument was pretty convincing, but I wonder if there isn't another way to architect the whole system such that the safe/unsafe thing doesn't become  a problem at all. I dunno, I'm just babbling, really.

RMagick Help
148891 [mikeleonard@] I finally got RMagick working on my OS X machine and I'm trying to use
+ 148916 [rosejn@gm il] I happen to be doing something similar right now.  Here's some code that
| 149083 [mikeleonard@] That worked perfectly. Thank you very much. I was unaware of the ">>"
+ 148919 [aglarond@gm ] If you don't mind recompiling ImageMagick, you can set the option

[WAY OT] Re: Ruby/Rails as a starter language?
148896 [Ara.T.Howard] what do you think of ocaml hal?
148897 [hal9000@hy e] Is that an Irish animal that can go for a week
148898 [Ara.T.Howard] yes.  ;-)
148961 [ptkwt@ar cn ] So, Ara, what do you think of OCaml after reading that book?
+ 148967 [Ara.T.Howard] it seems extremely powerful for doing algorithmic work and the compilation
| 150507 [bg-rubytalk@] A good summary, only I think C is also the one you kinda have to use
| 150572 [john.johnkni] ...
+ 148969 [rick@no ne .] Phil,
  148972 [jim@fr ez .o] I looked at ocaml a while back, but stopped when I didn't see
  + 148975 [rick@no ne .] It would be difficult to do.  Ruby libraries expect a 'C' style
  | + 148988 [jim@fr ez .o] Yeah, I like that idea. That would let one call any
  | | 148993 [rick@no ne .] No.  The runtime is machine code.  The OCaml program or library
  | + 149046 [B.Candler@po] The obvious alternative if OCaml is as fast as C: somebody just needs to
  |   + 149053 [mailinglists] I doubt that a simple X vs. Y feature will help you in any way.
  |   | + 149058 [B.Candler@po] OK, a sample application implemented in all those languages then, with a
  |   | | 149064 [Ara.T.Howard] and so much more.
  |   | | 149128 [mailinglists] All of them are very trivial examples.
  |   | + 149078 [james_b@ne r] Well, few people have the time to do this properly, so some sort of 'E-Z
  |   + 149097 [rick@no ne .] That would be a really large task.  OCaml has almost nothing in common
  + 148984 [drbrain@se m] Eric Hodel - drbrain@segment7.net - http://segment7.net
    148987 [Daniel.Berge] Sure.  Let us know when you're done. :)
    + 148991 [Ara.T.Howard] i second that!
    | 149088 [chneukirchen] Or a DRB for Ocaml?  It would "only" require rewriting Marshal...
    | 149089 [Ara.T.Howard] i meant using something supported by both languages: like soap or xml-rpc,
    | 149107 [chneukirchen] And I meant something that is faster than parsing XML. :-)
    + 149085 [ryand-ruby@z] You coming to rubyconf??

drb pass by reference
148899 [r.mark.volkm] I've been reading about DRb from several sources including the
+ 148914 [B.Candler@po] Then you should be able to see that
+ 148971 [drbrain@se m] Don't include (or extend) DRb::DRbUndumped.

Which way should I go?... Google Alert for: ruby language
148900 [paul__mcardl] This is the best I've got yet. :)

List of removed items using Array#uniq
148901 [docboobenste] Greetings!  I have a small dilemma, and was wondering if I could gain
+ 148903 [cmills@fr es] Here is an ugly O(n*log(n)) version that only works if the elements are
+ 148904 [desmarm@gm i] I may be way off, but maybe this'll help...
+ 149031 [koyakam@gm i] all = [["join", "as", "director"],
| 149045 [koyakam@gm i] duplicates_with_count=Hash.new(1)
+ 149091 [docboobenste] Thanks to all who sent in suggestions.  They are much appreciated!

how to do charset conversion in ruby?
148905 [femtowin@gm ] say I've get a file encoding in GB2312,
148943 [k.wong@la os] How about a good old RTFM ? ;)
149023 [femtowin@gm ] require 'iconv'
149024 [femtowin@gm ] I've found out the problem,

mkmf in Ruby 1.8
148910 [cydonia_1@ya] I am trying to install a Ruby SMB library, but it
148920 [nobuyoshi.na] It is included in ruby source tree.  What's your platform and
148923 [cydonia_1@ya] Thankyou.

Trying to alias for/foreach
148911 [leslie@ca ar] I noticed that IO has a "foreach" iterator while Array's, etc. mostly call
+ 148921 [alex@de et m] IO.foreach is a _class_ method, not an instance method. It's a shortcut,
+ 148933 [dblack@wo bl] There's no inconsistency.  "each" is a message you send to objects

RubyGarden wiki URLs being intercepted
148918 [B.Candler@po] Hmm, I notice that all the external URL links in www.rubygarden.org/ruby are
148938 [james_b@ne r] I believe this is a technique to prevent URLs from enhancing their

Date.to_time error
148928 [kevin.jackso] I'm messing with some dates and (being new to ruby), I've come across an
+ 148931 [kevin.jackso] Interestingly it seems to be a real bug in the code (yes respond to
| + 148939 [aglarond@gm ] That would make sense, since Time represents time since the Epoch.
| | 149039 [B.Candler@po] But what's wrong with negative time values?
| | 149054 [aglarond@gm ] Hmm...never thought of that.
| + 149082 [chneukirchen] ... on win32.  Complain to your vendor for having an unsigned time format.
|   149145 [kevin.jackso] yeah because complaining to Microsoft about their crappy software has
+ 149002 [acharlieblue] What do you mean? Ruby is included in the Mac OS X standard install.
  149026 [kevin.jackso] ruby 1.6 is installed as standard, installing ruby 1.8 over a modem so
  149028 [james@gr yp ] Tiger also ships with Ruby 1.8.2 installed, just FYI.

[SCIRUBY] how to tell mozart from the meat puppets
148937 [Ara.T.Howard] this week starts what will be a series of interviews with some of the many
149075 [surrender_it] great stuff,ara thanks.
149127 [Ara.T.Howard] glad you enjoyed it.
149183 [surrender_it] yes, but please consider this as just a suggestion.
+ 149212 [pat.eyler@gm] It would be nice to allow posts at rubygarden to be cross posted to
+ 149217 [james_b@ne r] Centralization is overrated.

Variable class (newb question)
148941 [shaun.fannin] I'm trying to figure out how to use Ruby to implement a strategy type
+ 148948 [twifkak@co c] I can't really comment on design quality, as 1)mine's never been spifferoonic, and 2)it's hard for me to visualize this in the context of a larger app right now. But here's a coupla ways you might do that.
+ 148953 [zdennis@mk e] class A
| 148957 [dblack@wo bl] class Module
| + 148962 [mrcode@ne ro] Definitely traditional, I've seen it many times in the last few months
| + 148964 [zdennis@mk e] Very beautiful! And thank you for the more concise and better
+ 148956 [dblack@wo bl] class Survey
  148979 [shaun.fannin] Basically since the data is coming from an HTTP form post, I am able to name

Imlib2 to OpenGL textures
148946 [alexg@eb .a ] I'm using Imlib2 to load textures for openGL. Imlib2's raw data output
148952 [desmarm@gm i] Have you tried something like this?

[SCIRUBY] Thoughts on performance and garbage collected languages
148968 [Ara.T.Howard] i thought some of you might like this

.rb meetings
148974 [pat.eyler@gm] July 26th - the seattle.rb http://www.zenspider.com/seattle.rb in Seattle, WA
+ 148977 [Ara.T.Howard] boulder_denver.rb - date TBA - but it'll be during agile for those of you planning
+ 148978 [zdennis@mk e] August 6th - Grand Rapids Ruby Users Group in Grand Rapids, MI
+ 149294 [nathaniel@ta] raleigh.rb always has a meeting planned for the second Thursday of
+ 149298 [ng@jo nw on ] The Chicago Area Ruby Group meets out in Hinsdale the third Monday of
+ 149415 [halostatue@g] TRUG (Toronto Ruby User's Group) will be meeting the first Sunday of

[Ann] EzCrypto 0.1
148980 [pelleb@gm il] I have just released the first release of EzCrypto, a easy ruby like

Hotfolders or "watched" folders in Ruby?
148983 [keith@or il ] Hey,
+ 148985 [Daniel.Berge] There's Ara Howard's "dirwatch".  For Win32, there's win32-changejournal.
| 148989 [Ara.T.Howard] of the lack of a changejournal type functionality for *nix filesystems in
| 149071 [surrender_it] plus dirwatch is really designed to setup a processing system
| 149081 [Ara.T.Howard] well, dirwatch is an application vs. and api.  so you don't have something
+ 148986 [belorion@gm ] Take a look at "Daedalus", its part of the FreeBSD Sysutils
+ 148998 [mneumann@nt ] Regards,
+ 149000 [gavin@re in ] ...
| 149001 [gavin@re in ] ...
+ 149017 [john.carter@] If you are on Linux, it would be trivial to wrap something around

[Rails] Alternative to <%=
148995 [brian.takita] Is there another way to render html to the final page without using <%=
+ 148996 [jamis@37 ig ] <% _erbout.concat "hello" %>
+ 148999 [gfb@to es ft] From a controller method responsible for generating the page, you can
  149005 [ news@ja .f ] You many want to rethink the name if you expect this to become

Re: Alternative to <%=
148997 [acharlieblue] In ERb? No, that's how you do it. What's wrong with the syntax as it
149004 [brian.takita] <p<%= ' style="text-align: center"' if @has_style%><%= '...' if
+ 149006 [jamis@37 ig ] This looks like a prime candidate for refactoring into a helper,
+ 149007 [acharlieblue] I would wrap something like that in a helper method. Although you may

Changing Process#uid while staying with $SAFE=0
149003 [listen@ma cr] Dear List,
149011 [vjoel@pa h. ] Have another thread with $SAFE=0 that exists just to call Process.uid= .
149034 [listen@ma cr] its a daemon and its gonna create files, execute shell commands etc.

Ruby/OCaml Was Re: [WAY OT] Re: Ruby/Rails as a starter language?
149008 [rick@no ne .] Well, I looked into it and it is far easier that I thought.
+ 149010 [jim@fr ez .o] Please post the website.
+ 149012 [Ara.T.Howard] go rick!
| 149027 [rick@no ne .] Thanks Ara!  That will (*hopefully*) keep my DSL line from being
| 149033 [Ara.T.Howard] the wiki supports uploads so i added them as attachments... so now they are
+ 149013 [lyndon.samso] Oooh oooh, a frankenstien language!
  149014 [Ara.T.Howard] what if frankenstien could run the 100m in 4.23 seconds?  ;-)
  149016 [jim@fr ez .o] Go Franky!
  149018 [cyclists@nc ] That's FRAHNK-en-steen!
  149021 [jim@fr ez .o] Ooh, sorry.
  149065 [jim.mcmaster] Walk this way, mahster....No, THIS way.

C extension makes things slower
149035 [ptkwt@ar cn ] In general I've always seen things speed up when I've writtten C
+ 149036 [pit@ca it in] Phil, 6 seconds is _faster_ than 8.6 seconds...
| + 149052 [dave.m@em il] I agree.
| + 149095 [ptkwt@ar cn ] <kidding> Yeah, but it's not as much faster as I wanted it to be
|   149098 [ mfp@ac .o g] You're doing things like
|   + 149102 [joevandyk@gm] Wow, neat.  Does Data_Get_Struct extract out members of a Ruby object
|   | 149108 [vjoel@pa h. ] No. Ruby instance vars are stored separately from the C struct belonging
|   + 149112 [ptkwt@ar cn ] $ ruby point.rb
|     + 149118 [cmills@fr es] point - "hey"
|     | 149133 [ mfp@ac .o g] point - "hey" would actually be OK since Data_Get_Struct first does a
|     + 149119 [ mfp@ac .o g] ==============
|       + 149125 [cmills@fr es] Unless you want to make the optimization I did and use the free
|       + 149148 [ptkwt@ar cn ] object = Data_Wrap_Struct(klass,0,-1,point);
|         149150 [cmills@fr es] object = Data_Wrap_Struct(klass,0,free,point);
|         149157 [nobuyoshi.na] Still supported, of course.
+ 149090 [cmills@fr es] Ruby defines an ID type, it may be a long (not a int) which could cause

YAML::Store - fast read, slow write
149037 [billk@ct .c ] I have a 635K YAML file I'm using as a flat file database
149043 [ mfp@ac .o g] syck's emitter is known to be slow.

Seting up Ruby on XP (HELL)p
149038 [leevi@th le ] I ma having heaps of troubles setting up ruby and rails on my windoes XP
149047 [Stephan.Kaem] That sounds as if your PATH environment variable isn't set properly.

rdoc generates method description twice
149042 [mailinglists] sometimes rdoc generates all method declaration twice, for example in
threads.html
top