112928-113982

112609-114034 subjects 113068-115477

Ruby on WinXP (was Debugging wxruby programs.)
112928 [agorilla@gm ] Yes, it's the old magic disappearing dos box... I went through that
112952 [mental@gm il] I'm using the oneclick installer and it already sets .rb files to be
112959 [agorilla@gm ] Hadn't spotted that one, or at least hadn't tied it to the installer.
+ 112961 [agorilla@gm ] thx to EvilCHELU on #ruby-lang
+ 112962 [jamesUNDERBA] I've turned off some of these associations as I tend not to want just
  112964 [curt@hi bs c] The One-Click Ruby Installer only adds the associations for the ruby file
  112966 [jamesUNDERBA] Excellent.  I figured that was the case (I didn't ever do a "before" and

Reflection to find out the names of method arguments
112929 [tamc2@ca .a ] Is there a way to dynamically  find out the names of a method's
112942 [flgr@cc n. e] Moin!

Weird crash in Windows Ruby (installer, 1.8.2rc7a)
112936 [ggl@ki it s.] Installer for Windows, version 1.8.2rc7a, and I very occasionally get
112941 [Stephan.Kaem] What's the value of PROMPT? What's the initial value of result?

This showed up on a Java blogs site...
112939 [tom@in oe he] ...Ruby's everywhere!
112967 [jamesUNDERBA] Very nice.

Accessing Hash elements in sorted order?
112940 [ceo@no pa .o] CGI#params) in sorted order.
112943 [flgr@cc n. e] cgi.params.sort.each do |(key, value)|
+ 112949 [ceo@no pa .o] This is *exactly* what I was looking for.  Figured there had to be a way
| 112951 [markus@re li] I'd vote against, for the following reasons.
| + 112953 [hal9000@hy e] Let's distinguis between "sorted" and "ordered." If it's ordered, you
| | + 112960 [markus@re li] Agreed (as a terminology distinction), with the caveat that "you
| | + 112963 [jhaungs@ac .] One of the nifty abstractions in Smalltalk that is missing in Ruby is
| |   112969 [markus@re li] Yes!  That's what I was thinking of when I suggested that '=>'
| + 112954 [ mig@19 4. z] MiG
| + 113008 [B.Candler@po] 7. It would almost certainly no longer be a Hash!! In other words, to get
+ 112968 [gsinclair@so] cgi.params.sort.each do |key, value|
  + 112970 [ceo@no pa .o] When I saw the parens, I thought they might need to be there, but I
  | 112985 [flgr@cc n. e] It's all just Ruby's assignment semantics at work. I'm not sure if
  + 112984 [flgr@cc n. e] I think it is most clear when using parentheses. (Because it looks

[ANN] Ruby Quiz
112944 [james@gr yp ] Support seemed positive for my idea of a Ruby Quiz.  My thanks to those
112945 [zdennis@mk e] I say to start... the ruby list is a good of a place as any to post the
+ 113127 [bob.news@gm ] "Zach Dennis" <zdennis@mktec.com> schrieb im Newsbeitrag
+ 113185 [martin.anker] Exactly! Please start small, but *do* start :-)
  113190 [ehames@gm il] Even the longest journey begins with the first step. Go for it!

Fwd: Moderately Interesting Ruby Exercises
112973 [brianwisti@y] I don't know if this posted earlier today, so I'm resending it.
+ 112974 [gsinclair@so] I don't know where you posted this the first time, but thank!  It's
+ 113254 [martindemell] Very nicely done. I'd be interested in seeing these announced on the ng

Moderately Interesting Ruby Exercises
112975 [brianwisti@y] Yep, the geekery continues. Now there are the MIREs, "Moderately

[Nuby Question] Return value of while loop.
112976 [ruby@br an s] Maybe this question would be more adequate for the ruby-nuby forum ;), but
+ 112979 [botp@de mo t] Brian Schr?der [mailto:ruby@brian-schroeder.de]
+ 112980 [ruby@br an s] That was a typo, should have been
| 112982 [botp@de mo t] I'm sorry. I was looking at your code, not on your question.
| 113023 [ruby@br an s] I'd expect it to return the last statement in the while block. That would
+ 112990 [kristof@vl e] I would suspect while to return the last statement.  The last statement
| 113003 [purple.dot_m] $i <<= 1 while defined?($i) ? ($i < 100) : ($i = 1)
| 113004 [decoux@mo lo] i <<= 1 while i.nil?? (i = 1):(i < 100)
| 113009 [markus@re li] i <<= 1 while (i = i||1) < 100
| 113015 [ajohnson@cp ] i *= 2 while (i = i||1) < 100
| 113022 [ruby@br an s] You won, and I'm even able to grasp what you have written. So no
| + 113025 [dblack@wo bl] Obfuscation is in any case not a Ruby tradition :-)  Actually we
| | 113031 [james@gr yp ] This is a good practice everyone should try once and a while.  You can
| + 113035 [markus@re li] What were the criteria again?  The declared winner
|   113265 [martindemell] The criterion was to "break i" on loop exit.
|   113280 [markus@re li] Pardon me if I am being dense, but I still don't see what you are
+ 113011 [B.Candler@po] i=128
  113018 [B.Candler@po] Ah, I forgot ||= to initialise, so if you're counting lines rather than

Beginner question on how to get info on keywords
112977 [nkb@pa if c.] I'm reading up the sample code sslclient.rb from
+ 112992 [nakahiro@gm ] Since there's almost no document of soap4r, please see the source
+ 113010 [agorilla@gm ] puts client.methods

[OT] Re: This showed up on a Java blogs site...
112978 [ruby@br an s] What does lack of bile mean? Also I know what bile is, I do not understand
+ 112995 [markus@re li] This is slang from a few hundred years ago that has become part of the
+ 113002 [jamesUNDERBA] Programming language discussions often degenerate into "My language is
+ 113005 [hal9000@hy e] I guess literally bile is stomach acid. As an English idiom, it also
+ 113012 [aengstrom@gn] For a nice example of 'bile' in this context (java related), check out

Soap4R how to set up user name?
112987 [nkb@pa if c.] I am attempting to use soap to get some info via https.
+ 112989 [drossruby@ya] You should check out the auth_header example in NaHi's
+ 112994 [nakahiro@gm ] Here's a question from me about the authentication you must do.
  112998 [nkb@pa if c.] basic authentication.
  113000 [nakahiro@gm ] Check test/soap/test_streamhandler.rb in a ruby distribution.  Or,

[Nuby on instiki/wiki] Putting images on an instiki page
112991 [botp@de mo t] I want to put an image on a page in instiki. Instiki says I could use
113057 [david@lo dt ] There's currently no way to do that. The !ImageUrl! is for linking to

rpa local distribution package or sort of..
112996 [botp@de mo t] I'm updating ports using rpa at office and I'm very happy w rpa. I have
113062 [batsman.geo@] I'm implementing it: local repositories + mirroring the "official" one :)

[RubyConf] InfoEther to sponsor Conference dinner
112997 [dblack@wo bl] Dear Rubyists,

watermarking libraries ?
113007 [daniel@da ie] Are there any libraries for ruby that do invisible watermarking on
113016 [cyclists@nc ] RMagick (http://rmagick.rubyforge.org) includes a `stegano' method, which
113017 [daniel@da ie] Thank you. Yes my problem is that I would like to use it on JPEGs. The
113019 [jamesUNDERBA] Is this helpful?
113024 [daniel@da ie] Great! this does look do-able, I was hoping there might be something
113027 [jamesUNDERBA] Let us know how this goes.  Maybe consider putting something up on

Ruby guidelines for creating libs
113013 [ml-ruby@th p] Does Ruby have something equivelant to Perl's perlmodstyle[1] manual
+ 113014 [batsman.geo@] Regarding packaging, take a look at
+ 113020 [chadfowler@g] More specific than what you're looking for but still relevant, check
+ 113021 [drossruby@ya] Here is documentation from experts.
+ 113028 [rob_02004@ya] RubyGems is a package management framework for Ruby. Packaging your
+ 113037 [drossruby@ya] By the way. For packaging, there is RPA base
+ 113047 [marcel@ve ni] though none of those links are *official* ruby guidelines...does anyone

Method improvement request .--
113026 [charleshixsn] I'm sure there must be a more idiomatic+efficient way to do this, but I
+ 113030 [james@gr yp ] I'll probably get in trouble for this around here, but I came from
| 113032 [james@gr yp ] (.*?)
| 113039 [charleshixsn] That would only work if the postmatch pattern were included in the same
| 113044 [james@gr yp ] I did include all three in the same pattern, I just used the whitespace
| 113084 [charleshixsn] Sorry.  It took me a bit of digging to find the /.../x documentation
| 113086 [james@gr yp ] You can match space characters in an /.../x regex.  The easiest way is
| 113089 [charleshixsn] Does that work inside character class definitions( [] delimited groups)?
| + 113090 [charleshixsn] Silly of me, of course not.  /s *IS* a character class definition.
| | 113102 [dblack@wo bl] There's no regex without /x that cannot be expressed with /x :-)
| + 113092 [james@gr yp ] Contrary to what you expect (judging by your later message), it sure
|   113095 [charleshixsn] Whuuf!  That *is* a surprise!  Thanks.  That may make some of my regexps
+ 113034 [dblack@wo bl] The spacing got screwed up there, as you can see, but anyway --
| 113036 [charleshixsn] That's a very interesting rewrite of the parse1 match patterns.
| 113043 [dblack@wo bl] Think about "'tis" :-)
| 113085 [charleshixsn] OUCH!  An excellent point.  I don't know how to handle that except by
+ 113038 [agorilla@gm ] Might be easier if you could show a sample of what you're starting
| + 113040 [agorilla@gm ] strike that, should be...
| + 113042 [dblack@wo bl] yield a unless a.to_s.empty?   # nil.to_s is ""
| + 113093 [charleshixsn] etc.
|   113099 [agorilla@gm ] New site, written in Ruby.  For now, there's no time limit.
|   113120 [charleshixsn] Actually, after several comments, and thinking about things, I've
|   113169 [markus@re li] If it turns out you're using this to try to get past spam filters I
|   113194 [charleshixsn] Well, since I plan to eventually release full sources...that may well
|   113197 [halostatue@g] I wouldn't mind seeing a more portable (Ruby?) implementation of a
|   113199 [charleshixsn] Well, certainly not formally.  But then I haven't gotten well started.
+ 113051 [kjana@dm la ] irb(main):008:0> "!@#456&*(".split(/([\w\-.]+)/, 3)
  113088 [charleshixsn] Unfortunately, when I take this approach, I get a lot of nil's (and the
  113101 [dblack@wo bl] There are lots of cases where one uses both the yielded values and the

Converting HTML to XML in Ruby
113029 [rob_02004@ya] How are people converting HTML to XML in Ruby?
113033 [jamesUNDERBA] I believe you can use html-tools for this.

need advise on connection refuse error.
113041 [nkb@pa if c.] ##################
113046 [nakahiro@gm ] client.options["client.http.proxy"] = "http://proxy.mysite.co.uk:8080"

Pty for Windows (win32utils?)
113045 [ptkwt@ar cn ] There doesn't seem to be a Pty package for Windows.
113355 [nobu.nokada@] Windows doesn't provide pty feature.
113440 [ptkwt@ar cn ] I suspected as much...
113956 [djberg96@ho ] It might be possible, but it would take some research.  It might
113982 [nobu.nokada@] It seems like to curses rather than pty, which is quite

[ANN] Planet Ruby started
113048 [moonwolf@mo ] My name is MoonWolf.
113058 [dblack@wo bl] Are you saying there's a problem with this? :-)
+ 113061 [moonwolf@mo ] I think there are serious problems.
| 113066 [neoneye@ad l] No good..  hmm..
+ 113065 [matz@ru y- a] I'm not sure.  ruby-list become less active for a year or two.  If

bug bytes
113049 [agorilla@gm ] for starters, I have my cheesy little debugger, forgive the globals, I
113050 [markus@re li] Bill --
113052 [agorilla@gm ] Turns out I was wrong... it lacked the (very important for Win) .binmode
113053 [markus@re li] I suppose writing a wrapper of some sort doesn't work for you?  For

Newsgroups
113054 [tilbste@ro e] The wsitch to Giganews has happened.

Array#index block and rdetect
113055 [transami@ru ] Array#index optionally take a block like Enumerable#detect does.
+ 113063 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| 113069 [transami@ru ] But this Array#index {block) is acceptable, yes?
| + 113070 [matz@ru y- a] Along with assoc and rassoc.  I will consider this idea.
| + 113072 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| | 113097 [matz@ru y- a] In that case, Hash#each and Enumerable#each_with_index should be
| | 113100 [dblack@wo bl] Could #each_with_index be left to individual classes, as #each_index
| | 113103 [matz@ru y- a] Can you express your idea in detail?
| | 113105 [dblack@wo bl] There is no Enumerable#each_index -- nothing to remove.
| | + 113106 [matz@ru y- a] I meant each_with_index.
| | | + 113130 [bob.news@gm ] "Yukihiro Matsumoto" <matz@ruby-lang.org> schrieb im Newsbeitrag
| | | | 113138 [dblack@wo bl] Yes.  I certainly didn't mean numerical indexes for hashes; that's the
| | | | 113146 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
| | | | + 113150 [dblack@wo bl] I honestly doubt it would break much code.  I have never seen
| | | | | + 113162 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
| | | | | + 113172 [matz@ru y- a] This (numerical index) is what I thought when I designed
| | | | |   113179 [dblack@wo bl] I liked Tom's idea of "counter".  That seems to be more what it is.
| | | | |   113219 [matz@ru y- a] Sorry for being noisy.
| | | | |   113237 [dblack@wo bl] Feel free :-)
| | | | |   + 113239 [transami@ru ] each_with_index {|value,key| ...
| | | | |   + 113243 [matz@ru y- a] No need for each_counter, for there's no way for general enumerables
| | | | |   | + 113253 [bob.news@gm ] "Yukihiro Matsumoto" <matz@ruby-lang.org> schrieb im Newsbeitrag
| | | | |   | | 113267 [dblack@wo bl] I'm really not worried about that, since Array would still have it
| | | | |   | | 113270 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
| | | | |   | + 113268 [dblack@wo bl] "maintaining a counter in a loop".  It also has a "dumb" sound (in a
| | | | |   |   + 113269 [transami@ru ] For sake of interchangeability (after all that's the upside of ducktyping)
| | | | |   |   | 113279 [matz@ru y- a] Arrays have number index, and hashes have arbitrary type of keys, so
| | | | |   |   | 113314 [transami@ru ] Well, like anything of this sort one doesn't have examples off hand b/c this
| | | | |   |   + 113287 [markus@re li] To put a slightly finer point on it: in common usage, a "counter" is
| | | | |   + 113251 [ml-ruby@th p] I'm not sure I understand the justification for these. It's simple
| | | | |     + 113261 [martindemell] In general, the easier ('cheaper') it is to do something, the more uses
| | | | |     + 113266 [dblack@wo bl] each_with_counter is just a rename of each_with_index, which already
| | | | + 113152 [flgr@cc n. e] Let me propose yet another alternative. (More general than my last one.)
| | | | | 113153 [dblack@wo bl] The trailing comma, and the sense that it's impossible to just iterate
| | | | | 113182 [hal9000@hy e] Haha, I am now. I haven't followed the entire discussion because beyond a
| | | | | 113184 [transami@ru ] Hmmm... what was it about?  Reference?
| | | | | 113188 [Ara.T.Howard] class BlockIteratorProxy
| | | | + 113154 [transami@ru ] That's an interesting perspective. So you're saying index is just a "helper"
| | | |   113158 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| | | |   + 113160 [transami@ru ] Huh. That's telling. Oh well, I was just trying to keep i local to the block
| | | |   + 113161 [transami@ru ] Wonderful!  And I like the concept: a zipper ;)
| | | + 113140 [dblack@wo bl] In that case, yes.
| | |   113173 [matz@ru y- a] "index" in "each_with_index" is a loop counter.  Perhaps wrong choice
| | |   113231 [gsinclair@so] I've never cared one way or the other about Hash#each_with_index.
| | + 113157 [ml-ruby@th p] All enumerable objects don't neccessarilly have a meaningful concept of
| |   + 113159 [transami@ru ] Main Entry: enumerable
| |   | + 113163 [ml-ruby@th p] hmm, I guess in the current context I think of enumerable as meaning
| |   | | 113167 [bob.news@gm ] "Randy W. Sims" <ml-ruby@thepierianspring.org> schrieb im Newsbeitrag
| |   | | 113176 [transami@ru ] Well, there is a a subtle distinction that can be drawn: by "enumerating a
| |   | | 113202 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| |   | | 113206 [transami@ru ] Sounds like a contradiction in terms to me: "some completely contingent
| |   | | + 113209 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| |   | | + 113476 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| |   | + 113166 [dblack@wo bl] But "being put into one-to-one correspondence" can be done externally,
| |   | | 113174 [transami@ru ] I Agree.
| |   | + 113260 [martindemell] Just for what it's worth, this is a mathematical notion the closest
| |   + 113164 [dblack@wo bl] I know.  That's why I've been advocating the removal of
| + 113076 [dblack@wo bl] That's how I tend to see it, though Ruby has two interpretations of
| | 113077 [transami@ru ] Right! Index in this second sense has no significance with regards to Hash
| + 113094 [flgr@cc n. e] I agree heavily with this. It would greatly simplify Hashes. If we then
+ 113073 [dblack@wo bl] See the thread at

ncurses interface change (was: silly question)
113056 [ferenc@en ar] Did the ncurses lib's interface was changed from 1.6.8 to 1.8.x? In the
113064 [henryso@pa i] This is apparently a change in version 0.8 of the ncurses binding.
113071 [ferenc@en ar] This looks promising, thank you!

TCP Socket read and write
113067 [ruby@br an s] I'm writing a simple chat client-server as an introductory example, and
+ 113125 [ysantoso-rub] synchronise access to the socket otherwise it is like two people
| 113145 [ruby@br an s] in the program only one thread at a time is reading, and only one at a
| 113186 [billk@ct .c ] I didn't know if two threads simultaneously accessing the same
| 113272 [B.Candler@po] I believe it is, if you think about how Ruby implements threads internally.
| 113313 [billk@ct .c ] Ahh.. That does make sense...
| 113364 [B.Candler@po] Oh I see now.
| 113417 [billk@ct .c ] The data_ready_signal passed into BufferedIO provides a means to
| 113518 [B.Candler@po] Ah, I see now.
+ 113171 [B.Candler@po] Not unless you have two threads which are talking on the same TCP socket at
threads.html
top