40578-42449

40364-49617 subjects 40784-41258

^ RFC: ||= operator
40578 [djberge qwes] This is a perl-ism that I use from time to time: ||=
40599 [matz ruby-la] You already have one, along with &&=.  I created it long before you
40618 [patrick-may ] I knew ruby had a mind reader in it!!!!

^ Re: ||= operator
40579 [nat.pryce b1] irb(main):001:0> p= nil
40580 [djberge qwes] Oops - I misread the error message when I ran my code snippet.  I had a
40581 [kgergely mla] Just cool down!

^ Greedy Regexp
40585 [ahumphreys p] Are Ruby regular expressions, especially those built using the
+ 40588 [ned bike-nom] Parsing HTML with regexes is not a good idea (that is, it's more complex
| 40593 [ahumphreys p] Ah yes. Thanks.
+ 40595 [kgergely mla] Try something like
  + 40597 [tom.hurst cl] Um, isn't that just a bit invalid?
  + 40611 [C.Teubner t-] Could you explain this? To me, it doesn't seem to make any sense.

^ user-name query
40592 [szegedy nosp] Does someone know how to query the name associated with
40596 [ian caliban.] Ian
40636 [alwagner tca] I am unfamiliar with Etc.  What am I doing wrong here?
40637 [kjana dm4lab] The message shows all.  There's no user whose name is `0'.  `nam' is a

^ function that returns function
40600 [spam bugbear] I'm writing something showing how you'd write the same
+ 40609 [dossy panopt] I think Proc is the mechanism Ruby uses to offer closures.
+ 40641 [edsin swes.s] % cat curry.rb
+ 40650 [avi beta4.co] def foo(x) lambda{|y| x = x+y} end

^ Exceptions and <=>
40612 [pbrannan atd] class Foo
+ 40613 [dossy panopt] p Foo.new <=> 42
+ 40614 [michael_s_ca] This seems correct to me; you're not calling <=> in the second code
| 40615 [pbrannan atd] I disagree.  In the second code snippet, I call Foo#==, which is not
| 40616 [michael_s_ca] Are you asking then if the exception behavior of "<=>" is
| 40629 [pbrannan atd] Perhaps consistency not the problem.  However, if I implement my own ==
+ 40625 [chr_news gmx] I think you make valid point - however catching the exception in
  + 40630 [pbrannan atd] It seems to me that it's enough to conclude that A and B are not
  | 40652 [chr_news gmx] It does not,  the above is an ``if and only if''.
  + 40640 [pbrannan atd] module Comparable
    40772 [matz ruby-la] Hmm, I like this one.  Let me consider.
    40837 [chr_news gmx] This is a multi-part message in MIME format.

^ Drawing with GUI toolkits?
40619 [W.L.Kleb lar] I'd like to create a simple GUI ap that contains some dynamic sketches
+ 40620 [sean BUHBYES] I haven't used the library myself yet, but you should be able to do this
+ 40633 [lyle knology] I think the answer depends on what you mean by "dynamic" sketches. But any
  40634 [W.L.Kleb lar] All I had to do was read one of the "books"...  I am now drawing triangles,

^ instance_eval from C API
40621 [vjoel PATH.B] Does anyone know an efficient way to call instance_eval from C? I'm
+ 40646 [nobu.nokada ] Do you want to make a Proc in C?  If so, recent 1.7 has
+ 40654 [pbrannan atd] VALUE my_instance_eval(VALUE obj) {

^ Module#< from C
40627 [vjoel PATH.B] Ok, here's another one: How do you call Module#< from C? The function

^ Ruby regex question
40635 [dossy panopt] Maybe this is Perl envy, maybe I'm just doing something wrong.
+ 40638 [tim vegeta.a] The main problem I see with this (even as a perl idiom) is that you're
| 40657 [dossy panopt] ($x, $y) = ("foo bar" =~ /(foo) (bar)/);
| + 40664 [mike stok.co] But in perl you should check that the array assignment happened e.g.
| | 40673 [dossy panopt] Or, I just test to see if defined($x) or defined($y) is true.  If
| | 40674 [dblack candl] str = gets
| | + 40675 [dossy panopt] Hmm.  What does x and y get if the match fails?  I don't have
| | | 40691 [chris cmb-en] x, y = str.match(/.../).slice(1..-1)
| | + 40677 [michael_s_ca] No more "bad thing" than necessary though.
| |   + 40679 [dblack candl] Remember though: what's really being matched is the whole pattern,
| |   | 40690 [chris cmb-en] <Pine.LNX.4.30.0205182039210.25793-100000@candle.superlink.net>,
| |   + 40684 [dossy panopt] if matched, x, y = str.match /(.)(.)/   # boobies!  sorry, couldn't resist
| |     + 40685 [dblack candl] You want a method called #match that throws away the match? :-)
| |     | 40686 [dossy panopt] For simplicity, yes.  $~[0] contains the match, if and when I ever
| |     | + 40688 [dblack candl] Remember that the underlying concept of the "match" is a match between
| |     | + 40734 [michael_s_ca] Why not?  How many times in c do you throw away the return from
| |     |   40738 [dblack candl] A better analogy would be a method called "printf()" that didn't print
| |     + 40732 [michael_s_ca] That's how my brain wants it, yes.
| + 40676 [tim vegeta.a] [ stealth cc's considered harmful ]
|   + 40678 [Dave Pragmat] irbsh(main):005:0> /(a)/ =~ "cat"
|   + 40683 [dossy panopt] [ accidental use of Mail-Followup-To considered harmful ]
|     40699 [tim vegeta.a] Hmm. I actually added those lines because a omitting them caused someone
|     40709 [dossy panopt] Yikes.
|     + 40714 [dblack candl] But in this example, the matches are indeed being checked, prior to
|     | 40716 [dossy panopt] True enough, we're relying on $line_count being undef from line 3087.
|     + 40753 [tim vegeta.a] No, I'm saying that foo() should check _its_ inputs, and bar() should
+ 40639 [chris cmb-en] Well, if you want a somewhat involved one-line approach...
+ 40656 [dblack candl] irb(main):003:0> RUBY_VERSION

^ Ruby libxslt port?
40642 [sean ruby-la] Quick ping to Ruby land: is anyone working on, or know of a Ruby port
40655 [mxp dynalabs] Wai-Sun Chia has made two libraries for accessing libxml2 and libxslt;

^ 백령도 약쑥 무료체험이벤트에 참여하세요 (광고)
40651 [yaksuknara l] <HTML>

^ FXDCWindow::drawIcon: illegal icon specified
40653 [barry_shultz] I've included a short code example exhibiting this 'illegal icon specified'
40659 [lyle knology] specified' error.
40666 [barry_shultz] Thanks for the help, Lyle. I didn't think to check the FOX faq (which I have

^ What is Test ?
40660 [han.holl pob] I installed testunit-0.1.4 and aspectr-0-3-5, and did
40668 [kentda stud.] Isn't Test the toplevel module of testunit?
40670 [han.holl pob] Ah, I see. The test for aspectr was probably written for one of the

^ Anyone use Komodo IDE with Ruby?
40663 [nospam nospa] Works great for Perl, what about Ruby?

^ Re: A few powered by mod_ruby logos...
40667 [sean ruby-la] In case there are graphically inclined folks in this crowd that use

^ Ruby Weekly News - Help Wanted
40669 [ptkwt shell1] Holden Glova and I trade off doing the RWN every other week.

^ Calling parent constructor from C
40671 [chrris mail.] What is the preferred method of calling my parent's initialize() when
40681 [nobu.nokada ] void

^ Best way to determine a VALUES Ruby type
40672 [chrris mail.] What is the cleanest way to determine the type of a VALUE when extending
40680 [lyle knology] if (rb_obj_is_instance_of(MyValue, rb_cRange) == Qtrue) ...
40682 [nobu.nokada ] In generally, I don't guess it's a good idea to compare a
40692 [vjoel PATH.B] Maybe I'm paranoid, but I've been using
40694 [nobu.nokada ] Agreed.  It's better to write ruby (interpreter/extension)

^ [ANN] RubyEclipse released
40687 [awilliams ro] First release of the highly anticipated (maybe just by me) Ruby IDE. Get it
+ 40689 [james rubyxm] Um, maybe it's my rusty Java knowledge, but how do you start it?
+ 40701 [tobiasreif p] What's "L&F"?
| + 40702 [tobiasreif p] ... and as James asked; how to run it? I can't find a readme in
| | 40707 [sangamon t-o] Yes, it's an Eclipse plugin. Install Eclipse and unzip
| | 40712 [tobiasreif p] OK, Eclipse runs now. I copied the dirs to eclipse/plugins, so that I
| | 40717 [sangamon t-o] Looks the same here.
| | 40719 [tobiasreif p] dito
| + 40704 [djkea2 mugca] Look and Feel.
+ 40718 [alwagner tca] Sorry, I don't run java apps.
+ 40720 [han pobox.co] Get it
  40741 [awilliams ro] Okay. So I probably need to work on some documentation.
  + 40742 [james rubyxm] <snip />
  | 40763 [awilliams ro] James,
  + 40743 [han pobox.co] I guess you're using Windows. For it to work at all om Linux, I had to
    + 40765 [awilliams ro] Han,
    | 40805 [han pobox.co] Please do.
    + 40766 [curt hibbs.c] First, I'll apologize in advance to the RubyEclipse people for pushing my
    | + 40787 [curt hibbs.c] That should have said "add additional capability" not "ass additional
    | + 40808 [han pobox.co] I've bookmarked it, and promise to play around with it as soon as
    + 40783 [pbooth nocoi] Han,
    | 40786 [djberge qwes] Heck, I can't even get the latest version to run on Solaris 8.  I had a
    + 41158 [llothar web.] Sorry but this will never be possible with scripting languages.
      + 41160 [james rubyxm] But it's already been done with, for example, ECMAScript in Microsoft's
      | 41164 [llothar web.] I never tried this (until now :-) but it will never be as useable as
      | 41177 [boognish23 y] VisualWorks Smalltalk has an auto-complete package.  I grant you that the
      + 41170 [han pobox.co] I understand that it will never quite equal the Java possibilities, and it

^ =?gb2312?q?=CA=C0=BD=E7=BB=AA=C9=CC=C7=C8=B0=FB=B3=AF=CA=A5=B5=D8=A8D=A8D=BB=C6=B4=F3=CF=C9=B9=CA=C0=EF--=C0=BC=CF=AA=BB=B6=D3=AD=C4=FA=C0=B4=CD=B6=D7=CA=D0=CB=D2=B5=A1=A2=C2=C3=D3=CE=B9=DB=B9=E2?=
40693 [research win] This is a multi-part message in MIME format

^ what happened to rubycookbook site?
40695 [ptkwt shell1] I haven't been able to get to rubycookbook.com (or .org) for a while now,

^ A few questions..
40696 [comedyharris] I've recetnly downloaded Ruby for windows. It seems great! Very tidy /

^ Simple google search script
40700 [charlesb sum] just a quick and simple question.
+ 40703 [djkea2 mugca] Are you aware of the Ruby/Google project?
| 40705 [charlesb sum] yes i am, but this is for a client and i was just wanting something that went to the search page if that's possible. I am looking into ruby/google as we speak, but i was wanting something that's nice and simple and doesn't require extra libs that the customer might not have and also so they don't have to get a key etc. if you know what I mean :)
| 40713 [dossy panopt] Charles,
+ 40722 [dennisn pe.n] I'm sure more experienced Ruby users can respond to the question of how
| 40760 [sera fhwang.] One caveat: Under most circumstances, using a bot or anything similar
| 40780 [charlesb sum] Yeah i know what you mean. but as the user would probably be very low, as you say they p[robably wouldn't notice :)
+ 40781 [charlesb sum] Thanks go to dossy for the help and the pointers. It now works great.

^ Qs on Ruby and DbC/Smalltalk
40706 [invalid nosp] 1. Is it planned to integrate Design-by-Contract (as described by

^ passing CGI parameters to ruby MySQL interface
40708 [neil sentine] I'm spending a lot of time trying to pass cgi.parameters to a MySQL
+ 40710 [dossy panopt] $my.query("insert into agent(_case, name1, name2) values
| 40769 [patrick-may ] $my.query( "insert into agent(_case, name1, name2)
+ 40711 [dblack candl] One way is to use Ruby's capacity to interpolate arbitrary expressions
+ 40715 [sangamon t-o] parms=... # Get params from CGI
  40740 [neil sentine] Thank you very much. These suggestions do just what I need -  I may
  40746 [sean chitten] <security_hat>

^ Broken protocol.rb behavior?
40721 [msnomer spam] There seems to be a problem with ReadAdapter, unless I'm doing something

^ are there unit tests for cgi.rb?
40723 [patrick-may ] if so, where could I find them?
40798 [wakou fsinet] Unfortunately I don't make it.
+ 40799 [wakou fsinet] now, I make next cgi.rb and new simple HTML generate librarys.
| + 40806 [tobiasreif p] Will it support XHTML1.0, which is the current version of HTML?
| | 40812 [wakou fsinet] It may support XHTML1.0. Even if it will support HTML, it's String base.
| | 40841 [tobiasreif p] Sounds great!
| | + 40844 [wakou fsinet] Oh, wonderful!  I'll tell Siena. this site (in ruby-list).
| | | 40845 [tobiasreif p] But as I said, it's not of release quality.
| | + 40881 [hal9000 hype] This may be old and half-baked, but it is
| + 40864 [patrick-may ] Thanks so much for maintaining cgi.rb!
|   40895 [wakou ruby-l] I want to accept suggestion at any time. But, I want to make separate
|   40954 [patrick-may ] I tried posting this earlier, but it looks like it got lost
|   40965 [wakou ruby-l] Thanks.
|   40980 [patrick-may ] Fair enough.  I'm excited to see it!
+ 40830 [patrick-may ] These look great!  I want to merge cgi.rb with the api that I've been
  40842 [wakou fsinet] ok, I put it here.

^ mod_ruby or remove_cost question
40724 [patrick-may ] is there an easier to test way of checking for the mod_ruby enviroment
40739 [sean chitten] Not one that is reliable and works across all Ruby WWW servers.  -sc
40817 [patrick-may ] That's a bummer.  I'm trying to unit test some switches in a cgi lib,
40832 [sean chitten] Using mod_ruby should barely change when using cgi.rb's

^ Why does open3.popen return status?
40728 [olczyk inter] The python version of peopen3 allows you to see the staus, so I

^ Object <-> Relational mapping
40729 [tom.hurst cl] db.select_all(long_sql_statement) do |row|
+ 40730 [home clabs.o] Some possible improvements. I'd try to take advantage of .send - so the loop
| 40731 [tom.hurst cl] Unfortunately, my row names do not map directly to object properties, be
+ 40737 [comedyharris] I posted a very similar question on comp.object (Relational Database
+ 40749 [cputney whis] It works the opposite way to many OR mapping systems - by analysing the
+ 40752 [avi beta4.co] I played with OR mapping in Ruby a long time ago, but mostly just as

^ E
40733 [gehlker fast] Just saw a blurb on O'Rielly's site about E. Has anyone used it. It sounds a
+ 40744 [harryo Dedek] Can you give us a URL?
| + 40756 [gehlker fast] The secret of life is honesty and fair dealing. If you can fake that,
| + 40758 [chr_news gmx] www.erights.org
| + 40811 [ahumphreys p] Here is where it gets interesting ...
|   40820 [chrris mail.] Would it be impossible to add nonblocking promises to Ruby?
|   + 40824 [pixel mandra] AFAIunderstand, it's more like a conceptual difference than an
|   + 40838 [marick visib] Someone on the E list was talking about implementing promises in
+ 40768 [ADATE kc.rr.] E has a lot more emphasis on being a language for "secure distributed

^ Errata Ch 13-15 Teach Yourself Ruby in 21 Days
40736 [jzakiya mail] These are mostly cosmetic
40874 [ms iastate.e] I can't consider most of these errata. You are objecting to layout

^ Need Multiline Regexp Help
40745 [jim freeze.o] I am trying to collect a set of lines in a string.
+ 40747 [pit.capitain] The RE searches for an "f" followed by as many characters
| 40748 [jim freeze.o] Thanks. Actually, I would like to match "fred" followed by
| 40751 [pit capitain] irb(main):001:0> s = <<EOF
+ 40755 [dossy panopt] f.* is matching "fred\nhell" -- "o" satisfies [^l].

^ Ruby and UML Modeling
40754 [usenets fast] Is there any on-going project to include Ruby Scripting Language(and./or

^ complicated callcc question (long)
40759 [ptkwt shell1] I'm trying to create processes that can wait for certain events to occur
+ 40773 [avi beta4.co] It won't restore variables to different values (that's a form of
| 40828 [ptkwt shell1] puts ">>>>>iteration: #{i}"
| 40848 [avi beta4.co] That's exactly what should happen -
+ 40776 [pit capitain] I used continuations in some of my classes but I still sometimes

^ Binary network protocols
40761 [ruby-talk el] I'm starting on a projects which requires me to use a spesific network
+ 40762 [gotoken notw] Maybe Array#pack and String#unpack can helps to such applications.
| 40764 [vjoel PATH.B] That's more than a joke, since I can imagine actually using it. Maybe
| 40918 [gotoken notw] Thank you.  But I think PackUtil is too slow in the Networking scene.
+ 40770 [dennisn pe.n] Suggest you use array#pack with arg of 'n' for int16 and 'N' for

^ [OT] Re: Simple google search script
40767 [dossy panopt] ^^^ Have they _ever_ done this?  Is this urban legend or
40774 [ian caliban.] Yes, this happens from time to time, especially when masses of

^ Ruby Weekly News
40775 [Dave Pragmat] Ruby Weekly News: 05/20/2002

^ [RDoc etc] automatic documentation: using tests in addition to / instead of comments
40778 [tobiasreif p] Comments are great, but they can become incorrect when not updated with
+ 40779 [tobiasreif p] - The while thing
+ 40788 [Dave Pragmat] Actually, by an amazing coincidence... :)  That's something we've been
  + 40790 [tsiivola cc.] *snippage*
  + 40791 [tobiasreif p] Awesome!
  | 40792 [Dave Pragmat] Sorry - that was just an example of the kind of thing I'm
  | 40794 [chris.morris] I think I like it -- I've been putting my tests in separate files for a
  | + 40797 [Dave Pragmat] I think probably I'd have
  | + 40871 [jean_hugues_] class MyClass
  |   40880 [chris.morris] If the tests are in a separate file, appended to the class, then when not in
  + 40800 [hutch recurs] 1) If the tests are included in the source file won't they be installed with
  | 40803 [dossy panopt] This was my initial negative reaction to Dave's otherwise
  | 40822 [Dave Pragmat] Say you're looking at method 'fred' in RDoc. In the documentation
  | + 40835 [tobiasreif p] I'd like to have an option where the relevant test code fragments are
  | + 40887 [ser germane-] Man, how did I miss this thread?
  |   + 40889 [pbrannan atd] OTOH, it would be nice if one could test the examples, to ensure that
  |   | 40896 [colin whistl] Here's my two bits.
  |   | 40898 [Dave Pragmat] I think is this a consistent message we're seeing in this thread, and
  |   | 42017 [patrick-may ] + it is good to keep the classes as light as possible, so that
  |   | 42021 [list chromat] See comments by Nat Price in [ruby-talk:22920] about meaningful test
  |   | + 42026 [pbrannan atd] And 22920 > 10000. :)
  |   | + 42048 [patrick-may ] I noticed that in my practice, test_method would often contain the
  |   |   42449 [list chromat] Yes, that happens to me too in many cases but there are some methods
  |   + 40893 [tobiasreif p] The inline tests would be usage examples that can be run automatically
  + 40823 [bcox virtual] I'd warn  against it. Had the same debate with Bertrand  who
  | 40827 [Dave Pragmat] True - but nothing precludes doing this too. I'm just thinking that if
  + 40840 [patrick-may ] The second reason does apply to Ruby, just less drastically.
  + 40852 [wconrad yagn] Dave,
  | 40867 [tobiasreif p] But RDoc could use the tests even if they are in (a) separate file(s),
  + 40858 [mike stok.co] Are tests intended to be used that way?  Most of the tests I write after the
  + 40869 [jean_hugues_] I like that. It fits well with the principle of locality ("things that
  + 41043 [listNOSPAM c] Here are my two cents.
    41046 [jean_hugues_] I like that. What happens if code is "loaded" instead of "required" ?
    41090 [listNOSPAM c] Actually I don't know, I never use `load'.
threads.html
top