348950-350014 subjects 349256-349615
Re: frubygems -- quicker loading rubygems:"spooky" version
349105 [rogerpack200] oops yep thanks for the correction.
selective module include
349109 [billk@ct .c ] Howdy!
349138 [mguterl@gm i] You may want to look at Daniel Berger's "use" library. Although I
349142 [billk@ct .c ] Thanks! That got me started. I ended up with the following, which seems
349113 [jstevenson@y] I am sure that there is going to be info I leave out that you will need,
349116 [marnen@ma ne] Looks like you're in a Rails application. Where does convert.rb live?
349121 [jstevenson@y] These are the scripts that a rails application calls on, yes. However, I
349123 [marnen@ma ne] OK, so these scripts are not part of the Rails app, and the rails
349126 [jstevenson@y] proivisioner = GAppsProvisioning::ProvisioningAPI.new(p_domain,
349127 [marnen@ma ne] And are those classes defined anywhere?
349131 [jstevenson@y] Yes.
349157 [b.candler@po] script/runner -e production myscript.rb
349196 [jstevenson@y] Brian,
ruby debug version...
349114 [rogerpack200] I've been toying with the idea of creating a patched version of ruby
Re: class model question
349115 [Gurdipe.Dosa] ...
+ 349117 [aldric@tr vo] 1) This is the wrong forum in which to ask Rails questions
+ 349118 [globyy3000@h] 1. You're posting in the wrong forum. Try the rails forum.
String Matching Problem
349124 [mattbrooks@g] I need a way to accomplish the following. I can't figure out an elegant
+ 349128 [marnen@ma ne] A possible solution (untested, and probably susceptible to lots of
+ 349133 [shortcutter@] You can split your original string into an Array and start testing from
| 349148 [richard_wilt] Here is a quick implementation. I did not spend that much time on it so
+ 349152 [kabkab@do am] Does this work?
+ 349156 [b.candler@po] blah = "CHLE,231,1"
349174 [mattbrooks@g] I appreciate everyone's input, It seems like they should all work, and
349180 [shortcutter@] What does "received" mean? Is this some kind of network interface?
349187 [mattbrooks@g] Okay, thanks for asking.
349194 [shortcutter@] Um, I have to say I'm a bit stumped. First of all, from your
349205 [mattbrooks@g] I tried each, gets, and readline, none of which returned anything...
349206 [mattbrooks@g] Actually .each works, I am trying this now to see if speed is little
Are you interested?
349125 [baiacristian] Watch free tv online 320 channels from 32 countries
[ANN] JRuby 1.4.0RC3 Released
349137 [tom.enebo@gm] The JRuby community is pleased to announce the release of JRuby 1.4.0RC3
Ruby in Australia...
349140 [rubyhacker@g] I have talked with two or three Rubyists in Australia --
349144 [has.sox@gm i] Hey Hal,
349173 [james@gr ys ] That's why we want you to host one. It gives us an excellent excuse
349250 [has.sox@gm i] Well in that case I don't see how we can't have one! Most of the chatter
Having issues with exception
349141 [kylearippee@] program that will allow me to run a file containing a directory listing
349238 [nyarly@gm il] Your problem is that you're catching the exception outside of the loop. Try
349242 [marnen@ma ne] Should that matter? The extension is still happening after the begin,
349243 [marnen@ma ne] Sorry, I meant "exception", not "extension", obviously! :P
349244 [nyarly@gm il] From the OPs description of the problem, and the code presented, yes, the
349246 [marnen@ma ne] I think you're right about what the OP wants. I had initially thought
349255 [kylearippee@] Thank you so much guys. IT WORKS!!!! We have seriously been beating our
349274 [marnen@ma ne] Yeah, I'm @marnen (big surprise... :) ).
[OT]Re: Test your ruby skill
349151 [devguy.ca@gm] You're welcome Ravenndrean, I look forward to your next set of questions!
What us binding objects
349159 [thillaibooks] What is the usage of binding objects
+ 349160 [paul@po ly n] What?
| 349162 [thillaibooks] Posted via http://www.ruby-forum.com/.
+ 349175 [glennj@nc .c] Principally, to specify the context in which you want to evaluate some code
349163 [natarajan334] WELCOME TO
Cloning only when necessary
349165 [shortcutter@] if you want to make sure you get a copy of an instance that nobody
Open an explorer window
349167 [eric.ramsey@] Does anyone know how to open a windows explorer window with Ruby?
349168 [timsheehy@gm] Would this work?
349169 [shawn42@gm i] system("start C:\somepath")
349170 [eric.ramsey@] Thanks,this works
Welcome to www.pickbuygoods.com
349176 [clg043@gm il] Welcome to www.pickbuygoods.com
Welcome to www.pickbuygoods.com
349177 [clg043@gm il] Welcome to www.pickbuygoods.com
Problem with tar2rubyscript
349178 [ele.samuel@g] my final point of this app is to test the
349182 [ele.samuel@g] don't know why, but the
Using multicore CPUs in parallel tasks
349183 [marc.hoeppne] I've been reading around a bit but couldn't find a solution that worked,
+ 349190 [devguy.ca@gm] You might want to checkout Pure and Tiamat and talk to James Lawrence
+ 349203 [damnbigman@g] You are going to want Ruby 1.9 for this. In 1.8 threads are "green",
| 349221 [tony@me io .] Ruby 1.9 isn't going to help you when using threads to distribute
| + 349223 [damnbigman@g] it
| + 349236 [shortcutter@] Are you saying that the global VM lock even extends to several
| | 349241 [tony@me io .] No, if you look over my post again it specifically mentions the GVL applies
| | 349278 [shortcutter@] es
| | 349316 [damnbigman@g] I've always worked best as a diversion.
| + 349310 [quixoticsyco] I'm not so sure jruby does this effectively.
| 349436 [headius@he d] * Use Java 6+
| 349492 [quixoticsyco] I didn't consider it because the behavior I showed looks wrong for
| + 349496 [headius@he d] This does not match my results. Are you sure both cores are being used?
| + 349567 [quixoticsyco] I am certain. I tried to head off this question when I said: all
+ 349220 [pbooth@no oi] Marc,
+ 349240 [shortcutter@] I believe you are not using Process.fork properly. In fact, I am
+ 349284 [marc.hoeppne] it down from memory, sorry about that..
+ 349308 [quixoticsyco] Another option,
349313 [devguy.ca@gm] This is just elegant =3D) ... it's funny how I observer something then
Thread error "undefined method `keys' for nil:NilClass"
349186 [acemutha@gm ] require 'net/http'
Roma, distributed key-value store in ruby Translation Needed
349188 [dsisnero@gm ] Here's an interesting project that I first heard about on reddit. It is a
OS and IE version detection
349192 [chad.locke@c] I've looked around but haven't came across something that helps me. In
DRbIdConv without _id2ref
349197 [headius@he d] As mentioned in a previous thread on ruby-talk, we are looking to
Problem with compiling Ruby-1.9.1-p243
349199 [wing2@ya oo ] anyone help me? Thanks
+ 349200 [aaron@te de ] Can you post the problem?
+ 349201 [paul@po ly n] Not unless you explain something about the problem. What are you
+ 349202 [charles.john] Would you be kind enough to post the nature of the problem, and the
349209 [wing2@ya oo ] gcc -O2 -g -Wall -Wno-parentheses -I.
349231 [paul@po ly n] =A0-I.
Why (1..4).inject(&:+) works ?
349207 [eregontp@gm ] I was just wondering why,
+ 349217 [aldric@tr vo] Works in 1.8.7 too, FWIW.
+ 349218 [b.candler@po] a + b is syntactic sugar for a.+(b), or a.send(:+,b) - you can see that
+ 349252 [rick.denatal] And
349281 [eregontp@gm ] In fact, I knew about about the 1.8 implementations. I just forgot about it.
349208 [James.French] Can anyone suggest a faster alternative to String.split()? I need to call i=
+ 349211 [reid.thompso] use ruby inline
| 349212 [James.French] Thanks for the link - was not aware of that. Will definitely look into that=
+ 349215 [ryand-ruby@z] I can suggest you not thread hijack anymore. It is rude and messes up
349279 [James.French] Was not being rude - was not aware of it. My mail client allows me to read =
List of ruby callbacks
349214 [aldric@tr vo] I've been looking for a few days online but I can't find an exhaustive
#system() hangs, child is defunct
349216 [ tel@jk m. o] I am trying to track down the source of an intermittent and tricky
349400 [rogerpack200] Try 1.8.7 or 1.8.x SVN trunk?
349409 [ tel@jk m. o] The thing is that this is a test setup, so we want to keep it just like
349494 [rogerpack200] Looks like your next step might be to try and trudge through the code
349229 [devguy.ca@gm] I would like to create an embedded pdf viewer on a website that would
+ 349235 [marnen@ma ne] This is really in the realm of client-side development, so you'd have to
+ 349344 [hramrach@ce ] It's physically impossible, regardless of what various
349345 [usenet-nospa] Since you're displaying it on the user's machine, the data being displayed
I can not load rubygems onto ruby using linux
349230 [mpclarkson@a] I want to try out rails but I can not load rubygems.
+ 349239 [aaron@te de ] What version of rubygems are you trying to install?
| 349247 [mpclarkson@a] I have lists the output below, thanks
| + 349338 [aaron@te de ] Looks like you unzipped rubygems incorrectly. After you unzip rubygems,
| | 349544 [mpclarkson@a] A real big thankyou. The instructions on the ruby website must be wrong
| + 349518 [dreampilot@m] Try including the gem version at the end- 'gem1.3'
+ 349245 [walton@vy er] My experience is entirely with Ubuntu so if I'm wrong I apologize
[ANN] unicorn 0.93.5 - fix timeout kill regression
349234 [normalperson] Unicorn is a HTTP server for Rack applications designed to only serve
Ruby doesn't implement x++ for Fixnum's because ???
349253 [RichardDummy] In The Well Grounded Rubyist (which, along with The Ruby Way, I
+ 349254 [dblack@ru yp] ...
+ 349303 [RichardDummy] On Oct 29, 9:18=A0pm, RichardOnRails
349307 [shortcutter@] IMHO the story goes like this: absence of postfix ++ and -- is a
+ 349332 [minilith@gm ] You could "decorate" it with such a method though. This could look
| 349334 [devguy.ca@gm] can you extol your knowledge on me about what method_missing is doing?
| 349343 [marnen@ma ne] (Not what that word means.)
+ 349337 [rick.denatal] I think that theres a more fundamental problem with ++ in a language
| + 349346 [shortcutter@] How their behavior is defined is completely up to the language designer.
| | + 349381 [overlord@gm ] $ ./ab
| | | 349397 [rick.denatal] I'm not going to run the experiment, but I believe that if the
| | + 349383 [cmdicely@gm ] I think it would make more sense, if you were going to define a "++"
| | + 349393 [rick.denatal] ts
| + 349600 [tony@me io .] Personally I see nothing interesting about the behavior of ++ in any mutable
| 349606 [_mwryder55@g] Maybe I am missing something but how would one print a variable and
| 349607 [tony@me io .] Yes, maybe you're missing that I support a unary ++ operator :)
| 349611 [headius@he d] Of course I had to jump in here.
| + 349617 [minilith@gm ] Wouldn't it be cool if ruby had macros?
| | 349618 [shortcutter@] No.
| + 349621 [gsinclair@gm] There's no reason it _should_ be added. That's the reason it
| | 349654 [tony@me io .] I think you're missing why ++ could be useful, and it's precisely because
| | + 349656 [martindemell] And how exactly would you change the value of 1 in place?
| | | + 349659 [tony@me io .] You don't. Are you insinuating the behavior of Fixnums isn't already
| | | | + 349661 [paul@po ly n] a =3D 1
| | | | | 349676 [tony@me io .] Why would 1++ be illegal? I'd think it would just evaluate to 1.
| | | | + 349666 [martindemell] a =3D Foo.new()
| | | + 349660 [tony@me io .] Another way to look at it: does Fixnum#+ change the value of its receiver?
| | + 349665 [walton@vy er] But you already can with the mechanics of the language that are already
| | | 349671 [_mwryder55@g] i = 1
| | | + 349677 [marnen@ma ne] This is unidiomatic Ruby. In fact, it's becoming clear to me that just
| | | | 349678 [tony@me io .] What if it's not?
| | | | 349681 [marnen@ma ne] What semantics do you intend here? I'm not sure I understand.
| | | | 349683 [tony@me io .] alias_method :++, :increment!
| | | | 349737 [dblack@ru yp] But what would it mean to send the message increment! to, say, the
| | | | 349738 [aldric@tr vo] I agree with David.. At which point are we completely violating the
| | | + 349682 [walton@vy er] I'd argue it's much, much cleaner. ++ has long been a source
| | | | 349688 [_mwryder55@g] Not for me it wasn't. I had to try it to see that it actually works.
| | | | 349689 [marnen@ma ne] Well, you do have to know what Numeric#times yields to its block. But
| | | | 349693 [walton@vy er] Whoop! Good point, that's what I get for not actually testing my code.
| | | | + 349696 [_mwryder55@g] That version I understand just looking at it as it is equivalent to a
| | | | + 349807 [_mwryder55@g] i = 10;
| | | | + 349808 [marnen@ma ne] No.
| | | | | + 349810 [dblack@ru yp] puts *10.downto(1)
| | | | | + 349815 [_mwryder55@g] I missed the downto method, I guess that is a problem when you have so
| | | | | + 349817 [dblack@ru yp] I think one thing that's getting lost in the sauce here is that Ruby
| | | | | + 349819 [marnen@ma ne] That's because you're trying to write C in Ruby. There are far more
| | | | | 349828 [dblack@ru yp] You'd need to take multi-word city names into account, though. So
| | | | | + 349833 [marnen@ma ne] Quite right. I was trying for simplicity, but that had indeed crossed
| | | | | + 350123 [t3ch.dude@gm] irb(main):004:0> str =3D "Washington Court House OH 43160"
| | | | + 349809 [matt@ha ps a] what about the downto method?
| | | | + 349823 [walton@vy er] Others have mentioned reverse each and downto, so I'll just throw in one
| | | + 349731 [gsinclair@gm] Maybe you'll just have to find another way to print the numbers 1 to
| | + 349730 [gsinclair@gm] What's wrong with
| | 349755 [tony@me io .] What's wrong with Array#push? Why do we need Array#<<? How is that any
| | + 349771 [dblack@ru yp] irb(main):001:0> .push(1,2,3)
| | | 349798 [tony@me io .] There's no point at all if it doesn't work on numbers.
| | | 349800 [dblack@ru yp] It depends how you define "work" :-) I'll stick with my formulation,
| | | 349804 [usenet-nospa] I have found a lot of idioms which are amenable to use with ++, especially
| | | 349805 [dblack@ru yp] Oh, I have no problem with ++ per se. It just seems against the grain
| | | 349814 [usenet-nospa] Yeah. I think fundamentally it's the "variables aren't objects" thing.
| | | 349879 [tony@me io .] I've seen this mentioned a few times. I think it's something of a gross
| | | + 349880 [rick.denatal] el
| | | | + 349884 [usenet-nospa] Insofar as anything in C is "an object", pointers are.
| | | | + 349885 [tony@me io .] You still seem to be missing what I'm proposing.
| | | | + 349886 [marnen@ma ne] Yuuuuuuuck! Why do this ugly special-casing for something that's hardly
| | | | | 349887 [tony@me io .] To reiterate from my previous message, because the behavior of Numerics is
| | | | | 349889 [walton@vy er] How? Because they are immutable? That's not special casing, that's just
| | | | | 349892 [tony@me io .] Yes, non-Numeric objects can be immutable. However, Numeric objects can't
| | | | | 349898 [walton@vy er] Incorrect. In fact the very first message in this thread provided an
| | | | | 349900 [tony@me io .] No it didn't, that post created a new class called "FixNum"
| | | | | + 349901 [walton@vy er] I apologize, you are correct that post defined a new class, due to a
| | | | | + 349902 [florian.assm] Gaah, close this thread! ;)
| | | | | + 349903 [marnen@ma ne] I don't think there's a mechanism for doing that, since this is an
| | | | | + 349908 [tony@me io .] I suppose the whole discussion is moot as Ruby will likely never see a ++
| | | | | + 349909 [marnen@ma ne] And as others have made clear, you are incorrect.
| | | | | | 349910 [tony@me io .] What exactly is it you think I'm "incorrect" about?
| | | | | | + 349917 [jballanc@gm ] ...that is all.
| | | | | | | 349929 [tony@me io .] Tony Arcieri
| | | | | | | 350009 [afmcc@bt nt ] OK, that gets you killfiled. Getting ruby wrong is not so bad, you just
| | | | | | | 350011 [tony@me io .] Psst, it's a joke, and a self-deprecating one at that.
| | | | | | | 350015 [james@gr ys ] I too found it really offensive.
| | | | | | + 349918 [marnen@ma ne] The last assertion you made about the ++ operator. Read the recent
| | | | | | 349928 [tony@me io .] I read and responded to them. Was there something about my responses you
| | | | | + 349935 [gsinclair@gm] If implementing ++ requires changes to the parser, that seems like a
| | | | | 349937 [tony@me io .] Assuredly it would require changes to the parser, as "++" presently
| | | | | + 349939 [vjoel@pa h. ] The only sane answer is to do what C does, as far as parsing. But the
| | | | | | + 349940 [tony@me io .] You will find the answer to these edge cases varies. Fortunately they are
| | | | | | | + 349955 [marnen@ma ne] Well, that's certainly one of the issues.
| | | | | | | | + 349977 [aldric@tr vo] I really do hesitate to speak, here, as I am not nearly as skilled in
| | | | | | | | | 350003 [tony@me io .] The only reasons it's impossible are cultural, not technical. If you think
| | | | | | | | | + 350004 [usenet-nospa] It's impossible to implement as a method. You could introduce it as
| | | | | | | | | | 350943 [aldric@tr vo] Well, with -that-, we definitely can add '++' as syntactic sugar for
| | | | | | | | | | + 351004 [gsinclair@gm] Phew! It was about time someone added to this thread! ;)
| | | | | | | | | | | 351005 [marnen@ma ne] You mean thread++ ? :D
| | | | | | | | | | | 351008 [tony@me io .] NO! thread += 1
| | | | | | | | | | + 351094 [sepp2k@go gl] But what good would that do except confuse people?
| | | | | | | | | | 351096 [aldric@tr vo] Hey. You see that horse on the ground? It's dead. Dead dead dead. D-E-D,
| | | | | | | | | + 350005 [aldric@tr vo] Tony, as I said: I am merely a fledgling Ruby enthusiast. I'm reading
| | | | | | | | + 349980 [usenet-nospa] blahblahblah.each do |args|
| | | | | | | | + 349981 [marnen@ma ne] Would you? Or would you rather see
| | | | | | | | | 349985 [usenet-nospa] Huh! That is prettier. Didn't know it existed.
| | | | | | | | | 350063 [jballanc@gm ] prefer ++.
| | | | | | | | | 350130 [_mwryder55@g] Or your style of programming is different than the programmer(s) in the
| | | | | | | | + 349988 [rick.denatal] Hey, I might 'rather' have C allow if statement modifiers.
| | | | | | | | + 349989 [marnen@ma ne] Ce n'est pas la même situation. Nous anglophones ne pouvons pas changer
| | | | | | | | | 349994 [aldric@tr vo] a = [1,2,3,4]
| | | | | | | | | 349997 [marnen@ma ne] Because you used a different method than I did.
| | | | | | | | | 350000 [aldric@tr vo] a = [1,2,3,4]
| | | | | | | | | + 350002 [marnen@ma ne] You're using Array#size. I'm using Enumerable#count. They're not
| | | | | | | | | + 350006 [dblack@ru yp] it.)
| | | | | | | | | | 350008 [aldric@tr vo] Actually, David, I believe that you are right on the mark with that
| | | | | | | | | + 350020 [rick.denatal] Actually I think the subtleties are similar between French and English here
| | | | | | | | | 350022 [aldric@tr vo] Okay, I knew that...
| | | | | | | | | 350024 [rick.denatal] Just so you know I wasn't dissing La langue belle. I try to maintain
| | | | | | | | | 350027 [aldric@tr vo] Hah! No worries, I wasn't insulted.
| | | | | | | | | 350046 [rick.denatal] Bien sur
| | | | | | | | + 349995 [usenet-nospa] I'd rather use Ruby without those features than C++ with them. (Not quite
| | | | | | | + 349978 [usenet-nospa] No, you won't. The parsing is 100% consistent and has been, so far as I
| | | | | | + 349975 [usenet-nospa] Postincrement should always produce the original value.
| | | | | + 349974 [usenet-nospa] a++ + b
| | | | + 349890 [rick.denatal] =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 matz.
| | | | | 349891 [tony@me io .] But the rebinding is being done by an operator, not a method, and there's
| | | | | 349894 [usenet-nospa] And which of those operators special-case Numeric?
| | | | | 349897 [tony@me io .] Admittedly it would be a first.
| | | | + 349893 [usenet-nospa] I don't think that gives the right semantics in many cases. It's also
| | | | 349895 [tony@me io .] Well, this is a very interesting question, as I discovered something about
| | | | 349896 [tony@me io .] Never mind, bar= was still defined because I was reopening the class.
| | | | 349933 [phrogz@ma .c] Dude, you just about gave me a heart attack. Phewsh - sanity is
| | | | + 349936 [tony@me io .] My bad, it will serve as a reminder to double check my work before posting
| | | | + 349943 [ralphs@do 32] Noob question: What does that mean?
| | | | 349944 [tony@me io .] class Foo
| | | + 349883 [usenet-nospa] I'd say they are in C.
| | + 349775 [gsinclair@gm] any
| + 349625 [dblack@ru yp] It would, I think, be quite anomalous, since it would be the only case
| | + 349627 [shortcutter@] +2 (Thanks for the well formulated reasoning, David!)
| | + 349658 [RichardDummy] y.
| | 350176 [dblack@ru yp] Thanks!
| + 349633 [rick.denatal] Certainly it could be implemented in an extension to the language as
| 349635 [marnen@ma ne] I believe you are quite wrong. If a destructive function like gsub! can
| + 349636 [usenet-nospa] gsub! is implemented as a method on objects which contain data. ++ would
| | + 349637 [minilith@gm ] rage
| | | 349650 [usenet-nospa] Everything is an object.
| | + 349664 [RichardDummy] can
| | 349667 [usenet-nospa] This doesn't seem to do the right thing.
| | 349672 [RichardDummy] =3D 5; =A0v >> 1
| | 349675 [usenet-nospa] I'd call it an oversight, not a personal failing.
| + 349643 [matz@ru y- a] Only if you accept the language that can change the value of 1 to 2.
| | + 349651 [usenet-nospa] Hmph. Fortran can change constants, why's Ruby so much less powerful?
| | | 349772 [rick.denatal] an
| | + 349668 [RichardDummy] an
| | + 349669 [aldric@tr vo] I am confused.
| | + 349670 [martindemell] Variables don't contain values, they refer to objects. That's the
| | + 349684 [matz@ru y- a] There's no way to modify local variables by sending message in Ruby.
| | 349847 [RichardDummy] =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 matz.
| + 349732 [me@to ia co ] class MutableNum
+ 349598 [RichardDummy] ractices.com/
+ 349601 [rick.denatal] No x++ doesn't work fine if you want it to act like C's post-increment oper=
| 349603 [usenet-nospa] Apparently apocryphal -- the increment usage predates the PDP 11 port
+ 350175 [dblack@ru yp] ...