158678-161794

158515-159606 subjects 158942-171320

1.8.3 or 1.8 4: will define_method allow blocks, defaults, etc.?
158678 [itsme213@ho ] I know 1.8.2 does not allow methods defined with #define_method to take
158906 [itsme213@ho ] Bump :-)
158909 [halostatue@g] I'm not answering for Matz, but I suspect that it won't. That's a new
+ 158916 [binary42@gm ] I would assume you mean incompatible by implementation? I see no other
+ 159072 [itsme213@ho ] I think it would take code that was previously illegal and now accept it. If

Re: ShortURL 0.7.0
158687 [vfoley@gm il] I just released ShortURL 0.8.0.  It includes an improved bin/shorturl.
158702 [djberg96@gm ] Why didn't you add a WWW namespace?  With a "class Service" it could,
158709 [vfoley@gm il] Oh right, I forgot about that one.  Give me a few days, I'll add it.
158761 [vfoley@gm il] Done.  I thought I'd add a GUI before, but I just made a minor version

split without lookbehind
158691 [alex@de et m] I'm trying to split a path (like an URL, but not one) into bits on the
+ 158700 [neoneye@gm i] 'foo/bar // baz/qux'.split(/(?<!\/)\/(?!\/)/)
+ 158744 [james@gr yp ] Don't know if your case is loose enough to allow for a hack like
+ 158807 [gavin@re in ] ...
  + 158812 [alex@de et m] Thanks all for your suggestions. I had forgotten scan was handy in
  | 158818 [ruby.brian@g] You can avoid toothpick-ities by using a custom regexp delimiter. E.g.
  + 158862 [w_a_x_man@ya] str = 'foo,bar ,, baz,qux,,,jorb,jing,,,,blat'

[ANN] Alexandria 0.6.1
158707 [lrz@gn me or] Alexandria 0.6.1 has just been released.

[ANN] Ruby/ZOOM 0.2.1
158712 [lrz@gn me or] I am happy to announce the 0.2.1 release of Ruby/ZOOM.

Problems with Instiki 0.10.2
158715 [CBlair1986@g] I've installed Instiki 0.10.2 with both the downloadable .zip and .gem,
159129 [zimba.tm@gm ] Cblair,
159816 [CBlair1986@g] I was actually using ruby 1.8.2 at the time, but have since upgraded to

[SOLUTION] Lisp Game (#49)
158719 [markus@st er] Again a fun quiz! I remember reading this tutorial too.

state of blocking/nonblocking I/O
158720 [joshua@re er] Here is my understanding about the current state of I/O in Ruby.
158739 [akr@m1 n. rg] Right.
158742 [joshua@re er] ...
158749 [akr@m1 n. rg] IO#sysread and IO#syswrite is possible candidates.
+ 158753 [Ara.T.Howard] thanks so much for doing this work!
+ 158754 [joshua@re er] It seems that Ruby should keep track of whether a descriptor has
  158771 [akr@m1 n. rg] Yes.  The shared fd is a problem hard to solve.
  158826 [bob.news@gm ] I have one question on this matter which I still don't understand (I'm not
  + 158932 [akr@m1 n. rg] It is an interesting question I also have.
  | + 158941 [joshua@re er] ...
  | | + 158947 [blue.technx@] This sounds really interesting, but I don't fully understand the while
  | | | + 158954 [snacktime@gm] ...
  | | | + 159090 [joshua@re er] I'm not sure exactly what you're asking.  Nonblocking I/O basically
  | | + 158950 [bob.news@gm ] Thanks for the feedback.  Even in this case I'd probably choose a
  | | + 158964 [akr@m1 n. rg] I see.
  | |   159003 [joshua@re er] Yes, the code I posted made some simplifying assumptions.  If some of
  | + 158990 [Ara.T.Howard] it's sort of the same thing as 2, but network intense clients might me written
  |   159028 [mcotner@ya o] Here's an example that I tested recently.  The application is a network
  + 158956 [snacktime@gm] ...

Re: MouseHole 1.2 -- rose-colored spectacles for the Web
158729 [CBlair1986@g] I can't get MouseHole to run. When I run mousehole.exe I get
161793 [drew.robinso] What version of Windows are you running ?
161794 [daniels@pr n] The MH environment variable isn't being set because it can't find your

[Quiz] [Solution] Lisp Game
158731 [ruby.brian@g] Nice quiz James!
159162 [dave@bu t. d] I've enjoyed reading both versions of your code. It looks a lot more
159163 [james@gr yp ] define_method() builds a method from the provided block and all Ruby

Re: Lisp Game (#49)
158732 [gregory.t.br] Hmm... not exactly sure why this doesn't work.  I'll try to dig through
+ 158733 [gregory.t.br] Here is my solution, which is basically Jame's solution, but split into
| 158734 [gregory.t.br] Here is my solution, which is basically Jame's solution, but split into
+ 158743 [markus@st er] undefined method `strip' for nil:NilClass (NoMethodError)

Cannot subclass Class?
158738 [itsme213@ho ] irb(main):006:0> class MC < Class
+ 158747 [florgro@gm i] You can subclass Module. Perhaps that is powerful enough?
| + 158782 [itsme213@ho ] I think you are right. I'll try using modules to inject things into classes
| + 158785 [itsme213@ho ] module M
|   158822 [ruby.brian@g] Maybe that this is not the most elegant method, but heres what I came up with
+ 158758 [rascal1182@g] I was trying to figure out exactly what metaclasses allow you to do,
| 158763 [dblack@wo bl] I don't know what the term refers to in Python, but I do know that in
| + 158765 [hal9000@hy e] Well said. I would fall into the last camp.
| | + 158774 [rascal1182@g] I assumed this was coming from a Python perspective, as almost all of
| | | 158799 [twifkak@co c] What if you're trying to build a <a
| | | 158802 [dblack@wo bl] You can just define the method directly on the object -- you don't
| | | 158907 [itsme213@ho ] Thanks Rob, David! That's nice and succinct.
| | + 158794 [jim@we ri hh] Abstract classes never have instances.
| | + 158801 [dblack@wo bl] Well, the major example that comes to mind is the singleton class in
| + 158810 [gene.tani@gm] Alex martelli's talk on python metaclasses, if you're curious, they're
+ 158776 [surrender_it] funnily enough, you can subclass Class with Class.new,

class/singleton methods
158752 [r.mark.volkm] These seem to be identical. Are they?
+ 158760 [rascal1182@g] They are identical.  Inside Foo, self==Foo
+ 158762 [dblack@wo bl] The advantage of the self version is that it might be a little easier
  + 158767 [ruby-ml@ma i] Hm?
  | + 158777 [nseckar@gm i] Meaning that the singleton method of C is being called with self as D.
  | + 158798 [dblack@wo bl] I think you must have misunderstood me.  What I mean is: as far as I
  + 158811 [r.mark.volkm] Did you mean the singleton_methods method?  I don't see a method named
    158816 [dblack@wo bl] I meant class_methods, and I was wrong.  For some reason, I have for

(4+3).reverse # => 1?
158755 [caldridge@gm] Does anything like this exist?
+ 158756 [hal9000@hy e] No... and what you're asking for doesn't really
+ 158757 [dblack@wo bl] ...
  158759 [caldridge@gm] Hal.. good point. :-)
  158783 [robbie.carlt] The problem, as has been pointed out, is that the expression in the

Re: [QUIZ][Solution] Lisp Game (#49)
158768 [faker@ya oo ] I think the fun of these games ( especially when they first came out ) was

packages, gems, libraries ... and ruby itself.
158780 [jeff.darklig] ...
158803 [hgs@dm .a .u] To be fair, there is effort to reduce this time to something more

String#scan_and_map (was: Re: split without lookbehind)
158813 [gavin@re in ] Whenever I find myself about to do something like the above, I say to
158844 [gavin@re in ] OK, that was dumb. On the way to work I realized that the above can far
158876 [chneukirchen] p str.scan( /(.+?[^,],{2}*)(?:,(?!,)|$)/ ).map{ |saved,others|
158899 [gavin@re in ] Oh hell. Well done. :)

Compilation of ruby
158817 [christophe.p] Is there any chance that ruby will become compilable by an ANSI
+ 158835 [halostatue@g] My understanding is that this is *definitely* happening for 1.9/2.0,
| 158840 [christophe.p] I'm currently working with 1.9.0 as it seems that it has already been
| 158846 [halostatue@g] You may want to raise the question on ruby-core. Some typecasts may or
+ 158963 [nobuyoshi.na] Already possible.  C90 doesn't prohibit K&R style function
  158999 [christophe.p] I've been making a lot of changes so that the basic ruby interpreter

You Can FIND any thing u want
158819 [sina.818@gm ] Enjoy

Boston Ruby Users Group is tomorrow (Tuesday) at 7PM!
158829 [clambert@gm ] Rubyists,
158831 [greg7224@gm ] I think it would be cool if UNH.rb (University of New Haven) took a

Type inference
158830 [eeklund@gm i] Yes, "we" do.  As in the Ruby community.  And I'm willing to be that
+ 158838 [dblack@wo bl] I think "we" would be better off not predicating membership in the
| 158857 [eeklund@gm i] I meant it quite differently and much more positive: As an inclusive
| + 158895 [googlegroups] Insulting those who disagree with you is a brilliant tactic;
| | 158977 [eeklund@gm i] *sigh*
| | 159041 [ruby-ml@ma i] I would advise you to err on caution's side: your statement came out
| + 158927 [ptkwt@ar cn ] Did you take a poll?
|   158972 [eeklund@gm i] I took a number of discussions.
|   159016 [ptkwt@ar cn ] Elvind,
+ 158845 [eric_mahurin] To take advantage of type (really class) inference in an
  158851 [dblack@wo bl] What about type (really type) inference? :-)  There have been some
  158855 [eric_mahurin] Maybe I misunderstood what Eivind was asking for.  From the
  + 158921 [gene.tani@gm] I jus tfound this, which may be relevant or no
  + 158968 [eeklund@gm i] Not class.  What is possible is to infer the binding of certain
    158988 [eric_mahurin] "class" is still closer to what you are talking about than the
    + 158998 [eeklund@gm i] That's what's usually called an abstract type.  What we are (or at
    + 159018 [igouy@ya oo ] -snip-
      159021 [eric_mahurin] That's the one I'm talking about.  I said the speed of ruby was
      159030 [igouy@ya oo ] Say X times faster or slower and even I will understand what you mean

How does this work? def[](own_arg_1, own_arg_2)
158833 [krekna@gm il] While reading some code, which tells that one can define a new
158841 [dblack@wo bl] song.[](0,15).play  # note the first dot

[ANN] Reminder! Portland Ruby Brigade (pdx.rb) meeting on 10-04-2005
158836 [robby.lists@] Just another quick reminder.

Question about Ruby system() method
158837 [greg.kujawa@] I have a Ruby application running in a Qtopia enviornment. One method I
158847 [greg.kujawa@] I suppose the system() method itself in Ruby forks things off. This is

'require' to fill $" with long names?
158842 [google@er kv] Require fills $" with (the short names of) the library files it
158965 [nobuyoshi.na] 1.9 does so.
158980 [google@er kv] Quick check...
158982 [nobuyoshi.na] It is built-in now, and defined for backward compatibility

HighLine Issue (was Re: Lisp Game (#49))
158843 [james@gr yp ] I'm very interested in understanding this problem and fixing it
159432 [markus@st er] I really appreciate your and Greg's work. It's nice to see what can
159777 [james@gr yp ] Thanks for the kind words.

Beer & Pizza SIG; 8 pm, 10/4, San Francisco, CA, USA
158853 [rdm@cf l. om] In the spirit of Bay Area Debian's "SHOTGUN RULES FOR BAD MEETINGS"

Selecting From A Different Table
158854 [MrPaulAR@gm ] How do I select records from a table that has a different name than my
158856 [james@gr yp ] @regions = Region.find(:all)
158859 [MrPaulAR@gm ] Thanks for the prompt reply.  When I call @regions = Region.find(:all)
158866 [wilsonb@gm i] Try putting <%= debug(@regions) %> on your _form.rhtml, above the
158877 [MrPaulAR@gm ] Thank you.  The root of my problem was the missing =.

ruby.codefetch.com offers API and books search
158863 [spammable@co] Greetings!
158869 [james_b@ne r] Nice.  But why does it say "Ruby Rails", rather than simply "Ruby"?
158875 [spammable@co] Really, it should say Ruby / Rails, and HTML CSS should be HTML / CSS.
158898 [spammable@co] It looks like indexing the stdlib would flummox our scanner because
158905 [halostatue@g] How are you trying to index? You *do* realize that classes are
+ 158923 [gene.tani@gm] maybe run the ruby C source through your tokenizer/indexer and then we
+ 159534 [spammable@co] No I didn't, (I've haven't yet had the pleasure of using Ruby), and in

Determine media type
158864 [csjasnoch@wi] I am trying to write a catalogging program for a bunch of data we
+ 158868 [csjasnoch@wi] It seems like I should be able to do this for determining write
+ 158892 [csjasnoch@wi] Also via most OS's you can give a disk a name. How would I access this
  159032 [guslist@fr e] I am afraid all the question you have asked are very OS specific and
  160478 [csjasnoch@wi] I was hoping that was not the case (OS specific), but I could make

HttpClient
158874 [hh@hh nn .d ] Is there a ruby library with support for making a HttpClient - like the
+ 158878 [hh@hh nn .d ] Sorry for this beginner question.
+ 158879 [james_b@ne r] What does Jakarta commons HttpClient do, and have you looked at the
| 158882 [hh@hh nn .d ] Thanks for a very fast answer.
| 158885 [james@gr yp ] See also openuri in the standard library which is just a different
+ 158884 [patrick@he a] In addition to Net::HTTP, there is also WebUnit.  It has an interface

ActiveRecord and FXRuby..
158880 [nowahere@ho ] Is there any reason why I can't use ActiveRecord to help build a client
158881 [lyle.johnson] ActiveRecord is the ORM layer used by Rails, right? I don't think
+ 158887 [mcotner@ya o] The Pragmatic RoR book explains in detail how to do this.  It mostly just
| + 158889 [louis.j.scor] ...
| | 158893 [nowahere@ho ] Thanks for the pointers. I'd better get started :-)
| + 158890 [jamis@37 ig ] Nope, you're exactly right, Mark.
+ 158888 [naseby@gm il] I've built a beer brewing helper in FXRuby/ActiveRecord with a SQLite
| 158894 [rhkramer@gm ] Brewing (and subsequently drinking) beer to help you (or me) program should
+ 158891 [mcotner@ya o] Found my PDF version . . . Connect outside of Rails like so . . .

[Solution]: Lisp partial solution - meta-programming help
158886 [louis.j.scor] ...
158900 [ef@al m. it ] Here's a sketch.  It doesn't have the full feature set (portals, etc),
158902 [sean.ohalpin] Along the same lines, as I am unlikely to pursue this any further,
158908 [louis.j.scor] ...
159039 [louis.j.scor] ...
159045 [ef@al m. it ] te?

access variables inside a block ...
158896 [kh.wild@wi o] I'm playing with the class TcpServer from the
+ 158897 [vjoel@pa h. ] t = GAME::Server.tcpserver(:port=>1110, :nodelay=>true) do
| 158940 [kh.wild@wi o] Great. It works.
+ 159017 [bob.news@gm ] I'd prefer to hand over the session to the block as first parameter.  That

Re: Lisp Game
158901 [mreed@th re ] I have a solution that works nicely in irb, but I'd like some help making
158910 [james@gr yp ] This was quite problematic when I was building my own version.  I
+ 158911 [mreed@th re ] Sure.  Here's what I have so far.  As I said, it follows the Lisp
| 158917 [james@gr yp ] I had to double-check that to convince myself it works.  I thought I
| 158918 [mreed@th re ] I've always done it this way, so it's worked at least since Ruby 1.6.
+ 158912 [sean.ohalpin] module IRB
| 158913 [sean.ohalpin] module IRB
| 158919 [mreed@th re ] Useful.  Thanks!
+ 158937 [adam.shelly@] I solved it by letting method_missing fill in the allowed words itself.
  158939 [adam.shelly@] elsif $valid_words.include? symbol

1.8.3 and One-click Installer
158914 [jwkenne@at g] Any news on porting 1.8.3 to the One-click Installer?
158915 [leavengood@g] Based on a message I saw to ruby-core, Curt Hibbs is working on it. Of
158922 [curt.hibbs@g] ...

Wrapping strings
158920 [benbelly@gm ] I have a string containing multiple lines that I would like to put
+ 158925 [mreed@th re ] I recommend getting the text-format module (available from the RAA
| 158926 [mreed@th re ] [snippy-snip]
| 158994 [benbelly@gm ] Thanks to e all who replied.  I took Ara's idea to make it generic,
+ 158929 [Ara.T.Howard] require 'alib'
+ 158991 [james@gr yp ] irb(main):001:0> str = 'This is a test of the emergency broadcasting

[ANN] KirbyBase 2.3 beta 2
158924 [jcribbs@tw i] I would like to announce the second beta of version 2.3 of KirbyBase, a
159046 [logancapaldo] ...

iconv aliases? (Re: Iconv.iconv and Windows XP)
158928 [dave@bu t. d] An interesting thing I didn't put down in response to your original post is
158960 [nobuyoshi.na] It needs config.charset[1] file, and does nothing for Windows.

Odd hash behaviour
158931 [kevin.jackso] I'm still munging data and I'm struggling with Ruby's hash
+ 158933 [jtregunna@bl] As a Hash should. Keep in mind, that if you have a key 'foo' in your
+ 158934 [heron@jp .n ] Kev,
  + 158935 [kevin.jackso] Actually it was working, but when printing out the values, it prints
  | 158938 [leavengood@g] Set implements a collection of unordered values with no duplicates.
  | 158983 [james@gr yp ] Or http://www.ruby-doc.org/.
  | 159001 [gavin@re in ] In case you've been to ruby-doc and were confused, use the "Core API"
  + 158936 [registration] ...
threads.html
top