252748-254704

252510-255563 subjects 252870-263552

^ Odd Regexp Issue
252748 [dbcoder gmai] I'm writing a web crawler, and in that crawler I want to remove all
+ 252749 [lparravi gma] gsub(/<!--.*?-->/m,"")
| 252757 [Rob AgileCon] Of course, you do realize that you're saying "scripts" but you're
+ 252750 [vjoel path.b] Try multiline mode: gsub!(/<!--.*-->/m,"")
| 252751 [vjoel path.b] gsub!(/<!--.*?-->/m,"")
| 252756 [dbcoder gmai] Well, that seemed to do the trick :D
| 252758 [Rob AgileCon] Actually, it is the . expression that doesn't match a newline without
+ 252963 [jenda cpan.o] I'm not sure what are you after actually, but apart from the <script>

^ ANN: RubyGems 0.9.4
252755 [jim weirichh] = Announce: RubyGems Release 0.9.4
252820 [yakumo9275 g] Updating RubyGems...

^ optimizing for speed - Array#each
252761 [mikejaystein] I ran the profiler on my program and it said that 51% of the time is spent
+ 252763 [apeiros gmx.] No. I don't think you can speed up Array#each at all. What's far more
| + 252768 [tim.pease gm] I was going to suggest something even more primitive -- query each
| + 252791 [shortcutter ] Note that the profiler output is often irritating because time for each
|   252817 [mikejaystein] One of the things I'm doing is a lot of File.join's, and I have to do a gsub
|   + 252846 [stefan mahli] Are you using the strings generated by File.join outside of ruby?
|   + 252851 [shortcutter ] Can you be a bit more specific on what exactly you are doing?
+ 252827 [ryand-ruby z] The time spent on Array#each itself is minimal and can't really be
+ 252860 [john.carter ] Mostly what the profiler is telling you is "don't do that".

^ Getting a Ruby script to run on a colleague's Mac
252769 [sharon_machl] work. I wanted to share it with a colleague who uses a Mac at the
+ 252771 [keynan howe.] Which begs the the question why cant you reinstall the ruby interpreter
+ 252772 [m_goldberg a] I'm surprised, but I know nothing about Ruby on Windows. On my iMac,
+ 252776 [highlyjhi gm] I had the same problem with the RSS. Since 10.4 comes with Ruby 1.8.2
+ 252782 [matt tidbits] Why are you not saying simply require 'rss' just as in Windows? That
  252818 [sharon_machl] Thanks for letting me know how it works on your Mac. I changed to the
  + 252821 [bitdoger2 ya] a couple of things sharon....
  + 252834 [matt tidbits] I'm going to guess that the problem is that your friend has never
    252900 [matt tidbits] I taking back my guess. I tried a clean system install and sure enough,

^ [ANN] gembuilder 1.1.3 Released
252773 [phurley gmai] Build your gem so that it can be deployed on machines without a build chain
+ 252775 [garbagecat10] Beautiful job, Patrick. Thanks.
| 252788 [benjohn fysh] That's marvelous.
| 252806 [garbagecat10] Obviously one problem is resources. Another is that the most-broadly "right"
| 252814 [rick.denatal] And, until gems implements automatic platform detection, I'd be
| 252815 [garbagecat10] It can be even weirder than that. I often have to ship extension gems for
| 252816 [phurley gmai] Yeah I was initially put off by the mac showing the platform as
+ 252789 [alexey.verkh] AWESOME.
  252790 [alexey.verkh] ...
  252810 [phurley gmai] Thanks for posting the link :-) Hope it works for everyone. I have

^ override def method in CGI class, without altering the class!??????
252774 [jeremygwa ho] I am a newbie to ruby.
252777 [highlyjhi gm] Just re-write it in your program where it's needed.
252786 [dzwell gmail] Class String

^ ruby and ajax.
252792 [music musi.c] I have a problem with a ruby script, it doesn't work if I call from a
253127 [pstickne gma] Use firebug to inspect what is actually being transmitted and you get
253390 [music musi.c] What is firebug?

^ temporary require ,is it possible?
252793 [gpygood 126.] I have a idea,it is "temporary require"
+ 252796 [B.Candler po] Hmm, I was thinking of
| + 252831 [barjunk attg] Maybe I'm missing the OP's goal, but wouldn't you just use a module
| + 252839 [vjoel path.b] There's a way around that. See
|   + 252843 [AEtzold gmx.] Best regards,
|   | 252892 [gpygood 126.] Thanks,It seems that my need.
|   + 252844 [rick.denatal] Somehow this smells to me like a job for Why's sandbox.
+ 252848 [ara.t.howard] why not simply fork and do something?

^ Problem with REXML
252795 [jim.kronhamn] I have a problem when reading out strings from xml documents. The
252797 [george nutru] What are the file encodings? Do the text files have a different
252801 [jim.kronhamn] The XML file is encoded with ISO-8859-1 while the text files are Windows
252808 [george nutru] $KCODE = 'u'

^ Executing a post via SSH
252798 [domma procod] could somebody show me a working example on how to execute a post via
+ 252800 [fophillips19] net/https uses ssl, not ssh. Is that what you mean?
+ 252803 [B.Candler po] There's an example of how to convert a working HTTP client into using HTTPS

^ postgres monitoring
252799 [gianmh gmail] monitor postgres trasactions realtime as they occur?
252805 [shortcutter ] Dunno, you probably better ask that over in comp.databases.postgresql.

^ Re: RubyCocoa 0.11.0
252802 [sbostler gma] On May 22, 2:35 pm, "Laurent Sansonetti"

^ Re: Ruby Tutorial for beginners
252807 [lukejea adel] I am developing a Ruby tutorial as well. I will be covering CGI
252812 [doodpants ma] Seriously? What about common operators like "+", "*", "&&", and "||"?

^ [SUMMARY] Magic Squares (#124)
252809 [james graypr] I was pleasantly surprised by the number of people that tackled the extra credit

^ Ruby, OptionParser and multiple flags
252822 [jairo ldc.us] I'm currently writing a small script needed for my lab in which I need to
+ 252837 [ara.t.howard] you've told the option parser that -h accepts an argument and you've
| 252862 [jairo ldc.us] Fair enough. I thought that OptionParser looked out for that sort of
| 252927 [shortcutter ] Well, if you specify type of parameters (for example an int) then maybe
+ 252916 [nobu ruby-la] If -h can omit the argument,

^ Problem with Net/HTTP
252823 [peer canadad] I am running into a serious problem with a custom library I am building
252824 [B.Candler po] Can you prove the response is there? The best way to do this is
252826 [peer canadad] Thanks Brian,
252854 [B.Candler po] Are you sure you used net/https and enabled ssl? This question seems to have
252944 [peer canadad] Unfortunately, I am sure.  Most of the time there is no problem with the
252949 [B.Candler po] See RFC 2616 section 8.2.3. The server will only send a 100 Continue if the

^ virtual metaclasses explanation
252825 [angel.of.nor] I am getting a bit weighed down at this moment by looking under the
252830 [rick.denatal] I don't have the time to digest your long thread which followed, but
252852 [angel.of.nor] Thankyou for replying at such length.  I am sure that what you have

^ read binary .dat file?
252828 [ghalsey yaho] I found a PERL script to read a dataflex database file. But I don't know
253125 [pstickne gma] Good luck; there crucial parts are

^ Ruby tax calculation algorithm/program for federal and state income taxes
252833 [htruax stf.c] charset="us-ascii"
+ 252838 [reid.thompso] ...
+ 252942 [careo fastma] I had the... pleasure... of doing this for Federal and Oregon income

^ SOAP4r, threads, and Windows ... the mystery
252835 [clark.snowda] I am part of a team developing a remote computing tool of sorts.  My
252921 [phil.meier g] That's the point - threading in Ruby is done the "green threading" way.

^ Ruby - Debugging
252836 [jbucaran gma] How do I use the ruby default debugger?
+ 252840 [tpo2 sourcep] $ ruby -rdebug /tmp/some_ruby_program.rb
| 252891 [jbucaran gma] Debug.rb
| 252893 [alexg kuicr.] The debugger is running and now you need to use it. Type help (as
| + 252894 [alexey.verkh] ...
| + 252896 [jbucaran gma] I prefer using the Ruby default debugger since I am planning to build a
|   252897 [jbucaran gma] 'rubygems'
|   252898 [alexg kuicr.] You've told it (via your environment settings from looking at that
|   252902 [jbucaran gma] Is it necessary to load the rubygems when debugging? Why do I need this?
|   252903 [jbucaran gma] Debug.rb
|   + 252907 [alexg kuicr.] It's telling you that there is a syntax error in the way you
|   | 252910 [jbucaran gma] Debug.rb
|   | 252918 [tpo2 sourcep] Did you ask Google?
|   | 252920 [alexg kuicr.] ruby -rubygems
|   | 252925 [tpo2 sourcep] Where "-rXYZ" means: "Please ruby, load the library XYZ first please,
|   | 252932 [alexg kuicr.] ubygems *is* rubygems. This is getting off-topic, but ubygems.rb is
|   | 252934 [tpo2 sourcep] Ah, you're right, somehow I had missed that the last time I had run
|   | 252970 [jbucaran gma] Yes I googled it and I have found no help. I can't believe none can
|   | 253031 [leslieviljoe] Ok, I have something.
|   | 253068 [jbucaran gma] Great! It worked. Thank you Les, now I have a lot work to do.
|   | + 253379 [leslieviljoe] RugyGems is a platform independent packaging system for Ruby. It lets you
|   | + 253380 [leslieviljoe] On my windows system, rubygems seems to be included by default via the
|   + 253024 [leslieviljoe] It looks to me like the debugger is getting confused by the colon after C
|     253028 [leslieviljoe] Some tests show that this doesn't help you much.
+ 252850 [alexey.verkh] Just don't. ruby-debug is a much better alternative.

^ sending data, no strings via socket
252841 [javierisassi] I'm trying to send data like
+ 252845 [AEtzold gmx.] Maybe "pack/unpack"
| 252847 [javierisassi] mymsg = [10]
+ 252849 [vjoel path.b] IIRC, #write(arg) is converting arg to a string, so the number 10 is
| 252856 [javierisassi] just installed it! works.
| 252858 [vjoel path.b] unsigned :type,  32,   :endian => :native # little endian, if on x86
+ 252859 [rick.denatal] Well, write takes a string representing the datastream to be written

^ Installing 1.8.6 from source on RHEL4 x86_64
252842 [c_piliotis y] I've been fiddling with installing each of the stable snapshot and the
+ 252994 [c_piliotis y] Bump -> anyone know what's up?
+ 253047 [c_piliotis y] Bump - please - anybody?  Help?
  253056 [znmeb cesmai] The only obvious thing that I see is
  253339 [c_piliotis y] Thanks for the info - actually that flag though wasn't on.   It's
  253342 [znmeb cesmai] Are you saying that it works on one RHEL4/x86_64 box and not the other,
  253354 [c_piliotis y] On May 28, 11:05 am, "M. Edward (Ed) Borasky" <z...@cesmail.net>

^ Introducing the "it" keyword
252857 [gfodor gmail] g(m(x)) if/unless/while/until h(m(x))
+ 252861 [dblack wobbl] I think something like 99% of all suggestions for changes to Ruby
| + 252863 [pgquiles elp] We are talking about semantic sugar here, so I don't think it's
| + 252864 [agorilla gma] Well, you fixed the thing that was bothering me.  In the original
| + 252866 [gfodor gmail] Unfortunately this seems much more difficult and ambiguous
| | + 252867 [_mwryder wor] How about something like: return $1 if (v + 1) < 10 if you wanted to
| | | + 252868 [gfodor gmail] I like this better than def it() since it seems more intentional,
| | | | + 252869 [gfodor gmail] puts $2 if (x + y) * (a - b) < 10
| | | | + 252872 [_mwryder wor] That was why I had put in the comment about using flags from regular
| | | |   252877 [gfodor gmail] I understand these concerns. The pipes are just sugar, it seems like
| | | |   + 252882 [_mwryder wor] As I have been programming in Business Basic for over 25 years I am used
| | | |   + 252996 [sepp2k googl] This one already works. No changes to ruby needed.
| | | + 253386 [dblack wobbl] But $1, $2, ... are already taken.  What would happen here, for
| | + 252904 [charles.nutt] I'm not opposed to the idea, but I really, really hate "it". "it"
| | | + 252908 [gfodor gmail] As proposed right now, by default, it will be set to the value of
| | | + 253385 [dblack wobbl] The argument from precedent is tricky, though.  I'd say the presence
| | |   253531 [charles.nutt] No argument from me :)
| | |   253546 [sonoflilit g] That is a very interesting and educating discussion :)
| | |   253565 [sonoflilit g] I take this back, unless someone can come up with a solution ot the
| | |   253631 [gfodor gmail] If there's anything our functional programming friends can
| | |   253642 [sonoflilit g] I'm afraid only compiler-side wizardry can help here.
| | + 252914 [nobu ruby-la] By using $_ instead of $it, these will solve.
| + 252937 [perrin apoth] return v + 1 if v < 10
|   + 252959 [jenda cpan.o] Yep, the fact that he wanted to be able to shorten something like
|   + 253384 [dblack wobbl] return v + 1 if v + 1 < 10
+ 252865 [dan-ml dan42] No need for it to be such a special built-in construct.
| 252928 [shortcutter ] Not thread safe.
+ 252884 [aurelianocal] puts "User: #{it}" if (it=opts[:user]).
| 252886 [gfodor gmail] AFAIK this doesn't work because it will be assumed to
| + 252895 [transfire gm] I believe this is to be fixed in a future version of Ruby.
| | 252899 [gfodor gmail] Wow. Yes! Only issue I see is nested blocks though.
| | + 252915 [nobu ruby-la] p *my_strings.map(:pluralize).grep(/tests/)
| | | + 252922 [m.fellinger ] def it
| | | + 252931 [gfodor gmail] return $_ if $_ = opts[:user]
| | |   252957 [jenda cpan.o] At least in one case I know what's the variable here. For $_ that is,
| | |   253008 [gfodor gmail] I disagree. Using 'it' here would avoid worries about side-effects.
| | + 253003 [transfire gm] I would say that it would always belong to the current block. If you
| + 252953 [jenda cpan.o] That's what you get for not using a sigil. You never know what's a
+ 252924 [phelan tttec] Hasn't 'it' effectively been reserved as a keyword by the RSpec team
| + 252993 [ymendel pobo] When I first heard about the change from context/specify to describe/
| + 253122 [halostatue g] That shouldn't be a reason to prevent the addition of a keyword, if
+ 252926 [ronald.fisch] IMO, this is a special case of the more general idea that within a
| 253009 [ruby anthrop] def let(*args)
| + 253012 [robert.dober] So are you.
| | + 253014 [gfodor gmail] This has also been pointed out as *not* working :) Unless
| | | 253040 [robert.dober] You are right I got caught by irb - again. I did not see the post telling so,
| | + 253086 [pbattley gma] if (sum = a+b+c) > 10 then return sum end
| + 253377 [ronald.fisch] With the crucial difference that in your solution, you are *required*
|   253417 [ruby anthrop] Implicit variables make me queasy. I don't like Perl's $_, I don't like x86
|   + 253422 [ronald.fisch] Well, that article raises the issue that mutal local variables are
|   + 253513 [shortcutter ] I couldn't agree more.
|   + 253678 [eleanor game] I should just point out that Ruby is not Lisp, and that whilst Lisp
|     + 253683 [_mwryder wor] While I realize the Ruby is not C, I think that some of the style
|     | 253693 [perrin apoth] I'm afraid I must disagree.  The only thing I find "unreadable" about
|     | + 253701 [_mwryder wor] The problem is when trying to maintain the code.  Suppose you have to
|     | | 253704 [perrin apoth] That's why the fact there's no explicit, obvious connection in the
|     | | 253742 [igotimac gma] Would a let or with construct be fast enough and memory efficient
|     | | 253744 [igotimac gma] with(v+1) do |a|
|     | | + 253746 [B.Candler po] (1)
|     | | | 253775 [perrin apoth] I think I like this one the most.
|     | | + 253750 [skoot ideico] Maybe that's just my twisted brain, but I find the first example more
|     | |   253773 [perrin apoth] It's not just yours -- mine, too.  If you wanted to locate the parameter
|     | |   253849 [igotimac gma] The point of enabling something like with:a(v+1){ ... } in addition to
|     | |   + 253852 [B.Candler po] But if you're going to label them anyway, then why not write
|     | |   | 253874 [skoot ideico] The whole discussion started because this code does not work in current
|     | |   | 253876 [B.Candler po] OK, but maybe fixing this is an easier language change than adding
|     | |   | 253891 [gfodor gmail] I agree that having the assignment case work would be great,
|     | |   + 253933 [perrin apoth] Yes . . . I was just pointing out that, of those, the third is the only
|     | |     254160 [eleanor game] I tend to agree, although that's because I'd really like Ruby to have
|     | |     254184 [shortcutter ] I believe Ruby does not have "with" because there is instance_eval -
|     | |     254263 [eleanor game] It's not entirely clear to me that 'instance_eval' would obey the
|     | |     254271 [shortcutter ] I'm not too familiar with VB (I'm kinda happy that I could stay away
|     | |     254704 [eleanor game] I must admit that until this thread it had never occurred to me to
|     | + 254161 [eleanor game] Well as I said in my original post, %$ was intended purely as a
|     |   254171 [perrin apoth] Unfortunately for the <= idea, <= means "less than or equal to" as a
|     + 253699 [robert.dober] But maybe things should really by simple
|       254163 [eleanor game] Unfortunately this would greatly complicate the situation in which a
|       + 254185 [shortcutter ] In Ruby there is no such thing.  Every method returns something - even
|       | 254264 [eleanor game] That's true. But how many of us are in the habit of doing so
|       | 254272 [shortcutter ] No, nil!  SCNR :-)
|       + 254221 [robert.dober] That does not exist :)
|         254265 [eleanor game] The _intent_ often exists, regardless of the fact that Ruby always
|         254268 [robert.dober] I am not a native speaker but nevertheless I get the feeling that you
|         254697 [eleanor game] Guilty as charged ;)
+ 252929 [shortcutter ] I don't understand why you want to change the language where you can
| 252933 [gfodor gmail] Well, it is kinda, but that's not as bad as the fact that
| 252935 [shortcutter ] I see your point.  I do wonder though how relevant this is in practice.
| 253087 [shortcutter ] Btw, here is a solution that does not need new syntax and does not
| + 253120 [CHubas7 gmai] You can extend it and let the method do the work for you
| | 253121 [pstickne gma] I think something like this would be interesting, but "it" would be
| + 253149 [robert.dober] That is something I am surprised about, b/c the intention was to have
|   253191 [shortcutter ] No, it's "return it if it < 10" with "it" being "v+1" in this case.
|   253196 [robert.dober] Well that was the original idiom but we are looking for existing ones, right?
|   253202 [shortcutter ] Yes, and that's why I presented what I presented.  I am not sure I
|   253235 [robert.dober] Sure it is, actually the code is simple, I still try to grasp what is
|   253287 [shortcutter ] We are completely on the same page with this.
|   253434 [transfire gm] return it if ((it = 42) % 2).zero?
|   + 253527 [skoot ideico] see
|   + 253548 [robert.dober] and furthermore, which slipped away from me at first sight,
+ 252939 [perrin apoth] I'm a little groggy, and about to go to bed, so I'm long on vague ideas
+ 253015 [keith audiob] Hmm, this really isn't far from the Ruby equivalent of the common
+ 253019 [garbagecat10] I usually just do things like
threads.html
top