169082-171160
168905-195288 subjects 169314-172185
^ Re: Shuffling an array, sort_by{rand}'s bias (was Re: need some Ruby
169082 [schmitt num.] So I suggest the following 'pythonic' solution ;-)
169091 [ mfp acm.org] arr.sort_by{rand}
169100 [schmitt num.] that is not equivalent to my solution.
+ 169108 [michael.ulm ] I would have thought those two functions do the same thing
| 169124 [schmitt num.] If you use random as sorting key, the result of a<=>b
| + 169125 [decoux moulo] run
| | 169135 [schmitt num.] Thanks. As I told you before I'm new to ruby ;-)
| + 169157 [surrender_it] Are you sure of what you say? AFAIK
| + 169171 [steve waits.] Ok, I think I've beat sort_by{ rand } on large Arrays , by about 30%. I
| + 169172 [vjoel path.b] 2**30 - 1 is reliably a fixnum (though I guess it might not be the
| + 169173 [steve waits.] OOPS!
| 169176 [steve waits.] Here's another shot.. still faster than sort_by{rand} on my system, and
| 169182 [ mfp acm.org] This is not equivalent to
| 169209 [steve waits.] Oops.. I thought too much like C. Now I understand that the loop is
+ 169127 [billk cts.co] No, Array#sort_by does the 'decorate-sort-undecorate', aka.
^ ArachnoRuby -- a professional Ruby IDE
169085 [janchrister.] I compared ArachnoRuby with Komodo, using my solution for RubyQuiz #57.
+ 169094 [curt.hibbs g] Thanks for the numbers. I had not actually timed it, but I knew there was a
+ 169185 [nightphotos ] You're very welcome!
| + 169188 [phurley gmai] I will second the recommendation. I really like ArachnoRuby and have
| + 169190 [hankgong gma] What's your feeling with that? Currently I'm using RDE, I think it's not
| | 169197 [nightphotos ] Yes, I used RDE for a year or more before ArachnoRuby was available.
| | 169237 [hankgong gma] Oh, I c. I didn't make big Ruby program yet!
| | 169368 [nightphotos ] The Ruby program was only a few hundred lines, but it took a long while
| + 169219 [basi_lio hot] As a total noobie, I am still unfamiliar with Ruby syntax. ArachnoRuby
| | 169221 [curt.hibbs g] Yes, this is a nice feature. It should be noted that Eclipse/RDT and Komod=
| + 169276 [janchrister.] ArachnoRuby -- a professional Ruby IDE
| 169340 [nightphotos ] Hey Christer,
| + 169344 [mark.ericson] I've been playing with Arachno and wish it had hyper navigation of the code
| | + 169347 [Patrick.Benn] You can use Search->Lookup selection, but it's nothing more than an
| | | 169446 [zdennis mkte] This isn't a ArachnoRuby thing persay, but it applies to any up and coming ruby IDE.... how would
| | | + 169452 [janchrister.] Good question!
| | | + 169764 [jussij zeuse] The Zeus for Windows IDE handles this case by displaying dialog
| | + 169363 [phurley gmai] I do not think this is in the current editor. In any case it would not
| | 169367 [the.mindstor] I am a user of Arachno for quite a while and I am quite happy with it,
| | 169373 [nightphotos ] Yes, it would be nice to see a new release. I had an email exchange with
| | 169382 [jeff.darklig] I use it from time to time @ this point ... the most recent beta release is
| + 169355 [janchrister.] Wayne!
| 169366 [nightphotos ] Hey Christer,
+ 170108 [ronjeffries ] Arachno seems nice at a quick glance. I don't agree with Lothar that
170125 [tsumeruby ts] Perhaps a waste of time to some people, but documentation comes very good to
170173 [ronjeffries ] Or even an old programmer who would like to know how to use Arachno well.
170339 [phurley gmai] I understand what you guys are saying, but if given the choice between
170386 [faker yahoo.] I think it should be free or have documentation. I don't think I should have
+ 170441 [nightphotos ] Actually, it's US $59, with volume discounts starting at 2 licenses.
+ 170472 [snowzone5 ho] i'm productive with both komodo and arachno-ruby...i didn't need to
170476 [janchrister.] tony,
+ 170528 [jeff.darklig] Arachnos debugger is best-in-class... it *BY FAR* out runs any of the othe=
| 170534 [pertl gmx.or] I personally think it's a pain...
+ 170537 [snowzone5 ho] i much prefer the debugger in arachnoruby. i often need to debug
170552 [gene.tani gm] agreed, if you're doing perl, C, python, PHP, java etc you have 6
^ Gems Install All Dependencies Option
169093 [transfire gm] Is there a way, or can a way be made to install all dependencies
+ 169095 [francois bag] gem install GEMNAME --include-dependencies
| + 169109 [jim weirichh] For future reference: http://docs.rubygems.org/read/chapter/10#page33
| + 169180 [gavin refine] You know what would be nice?
+ 169113 [dblack wobbl] gem install -y
| 169206 [guslist free] yes | gem install GEMNAME
| 169242 [gregory.t.br] wow... I didn't know that existed. Cool!
| 169272 [hgs dmu.ac.u] It doesn't exist on all unix flavours.
| 169502 [gsinclair gm] #!/usr/local/bin/ruby -w
+ 169114 [transfire gm] Thanks!
^ How can I find __LINE__ on the execution stack ?
169097 [janchrister.] I would like to be able to display the line number in my simple assert.
169103 [bob.news gmx] irb(main):007:0> def test
169105 [janchrister.] Thank you Robert!
169126 [bob.news gmx] You're welcome.
169146 [janchrister.] Robert, I guess this is a minimalistic approach. I will see the info I
^ Looking for a PostScript or EPS module
169101 [kibleur.chri] I'm looking for a ps (or eps module) in Ruby, like EpsGraphics2D in
^ Ruby compiler question
169104 [mccarthyjame] Hey just wondering, is there a plan to add a compiler to the future
+ 169107 [janchrister.] Posted via http://www.ruby-forum.com/.
+ 169116 [james_b neur] Yes. See YARV.
+ 169122 [blargity gma] Yes. Ruby 2.0 will be byte compiled. Google for YARV.
^ Re: Iterating over test data in unit tests
169117 [schmitt num.] I'm looking for a module for accessing newsgroups via nntp.
^ NNTP was [Re: Iterating over test data in unit tests]
169119 [decoux moulo] It's best to look in RAA
^ Recursive Rake
169128 [tanner.burso] I'm working on a very large set of build tasks for several .NET projects.
+ 169133 [rubikitch ru] I use Rake to make HTMLs from RDs, to upload a package to the server,
+ 169153 [jim weirichh] There was a recent discussion about this on the Rake mailing list.
| 169177 [tanner.burso] Thanks for the information Jim. I would definitely like to see more
+ 169175 [langstefan g] Perhaps you want to try Rant, which is an alternative to Rake.
^ Screen scraping an html text contents into a file
169149 [basi_lio hot] I'm looking for a screen scraper that will extract text contents off
+ 169161 [vanek acd.ne] curl www.apple.com > mytextfile
+ 169179 [ruby.brian g] $ w3m -dump www.ruby-lang.org
| 169212 [basi_lio hot] Can't find a w3m binaries for windows xp. I'll continue to look.
+ 169181 [gene.tani gm] i think open-uri and Rubyful_soup are pretty straightforward. I like
169183 [ef alum.mit.] No need for a commercial product. wget does all that.
169208 [basi_lio hot] Thanks for the info on wget and curl. Both are powerful page
169211 [joevandyk gm] $ lynx -dump www.rubystuff.com
169215 [basi_lio hot] Can't find windows xp binaries of w3m, snarf, also tried cUrl, wget,
169235 [sjc2000_uk y] I will throw something like this together in Ruby over
169267 [martindemell] Nope, according to the OP's requirements, you also need to render the
169269 [sjc2000_uk y] By rendering the html, my interpretation of this was
+ 169273 [ruby.brian g] E.g. Tables and frames. So better use links2 or w3m for the task.
| 169285 [sjc2000_uk y] Ah, yeah, forgot all about those nasty little things.
+ 169293 [martindemell] Even without things like tables, the significance of various whitespace
169331 [leavengood g] of the HTML as text. As others have said, what we really need is some
^ simple scope question
169159 [noSpam noSpa] Is it possible to place another file within the same scope
+ 169163 [ara.t.howard] i assume you are making a config file? why not use yaml?
+ 169167 [vjoel path.b] The best solution I've found is to read file1.rb and module_eval it's
169203 [dave.burt gm] You can't get quite the same scope. Check out Joel's "Script" library
^ ldap install problem
169162 [szot.shaun g] Trying to install ruby-ldap on solaris x86 I keep recieving an error
171106 [lists.ruby-t] I feel your pain. I tried compiling it on Solaris 10 SPARC using some slightly
171160 [greg.kujawa ] Do you have Cyrus SASL or the like already installed? The default Ruby
^ [ANN] Net::SFTP 1.0.1
169166 [jamis 37sign] versions 1-5. It is dependent upon the Net::SSH library.
^ 1.8.4: nightly smapshot results.
169168 [hgs dmu.ac.u] I've just tried to build the nightly snapshot with GCC 4.0.2 on
^ [Newbie] Variable score
169191 [vnpenguin gm] I'm newbie to Ruby. I'm trying to write a small script to parse a text
+ 169192 [ezra yakimah] var1 = '' #initialize to striung or whatever else you expect the
+ 169195 [desmarm gmai] Are you certain that you've matched regexp1 before you've matched regexp2?
+ 169256 [pit capitain] Do regexp1 and regexp2 match on the same line of data? Or could it be
^ Re: Variable score
169194 [akonsu gmail] But this is not true, the variables should be visible on the scope of
169196 [ezra yakimah] Ahh yes you are right. I misread the source.
169275 [clr9.10.rand] as others have pointed out, create a reference to var1,var2 before the
^ Question concerning multiline regexps and best practice
169199 [oliver.andri] I am currently moving an application from Python to Ruby for a training
+ 169200 [akonsu gmail] unless i do not understand the question, a regex option that allows
| 169205 [oliver.andri] Well, to better describe what I am currently dealing with, I post a
| + 169210 [akonsu gmail] the best that i could come up with is to remove new lines from your
| + 169214 [akonsu gmail] (var = <<TARGET).gsub!(/\n/, '')
| + 169216 [surrender_it] foo #foo
| + 169220 [w_a_x_man ya] msg_rx = %r{
| 169259 [oliver.andri] Thank William and Gabriele! This is exactly what I have been looking
+ 169207 [ef alum.mit.] The cleanest solution is to make a regular expression that can work
^ Ruby 1.8 fcgi.rb Pipe Closed Exception
169224 [bheinz nexti] Anyone have any ideas on this? This is running a rails app with
^ Interfaces in Ruby?
169228 [cohen.jeff g] I'm new to Ruby - actually new to dynamically typed languages in
+ 169229 [gregory.t.br] You can use Mixins (Modules) and the query the mixins.
| 169233 [james graypr] We generally use respond_to?() for this, but I must stress be REALLY,
+ 169297 [florgro gmai] As others have already noted in Ruby we generally do the simplest thing
^ In need of help. Win32Ole objWMIService.Create?
169230 [caldridge gm] objWMIService.Create takes a parameter which is set to the pid of a
169308 [dave burt.id] The _invoke method takes an array of values and an array of types. Your
^ time difference calcualtion
169231 [uval rz.uni-] I would like to calculate the difference between two times in seconds
+ 169232 [hal9000 hype] require 'time'
+ 169234 [dave.burt gm] require 'date'
^ [ANN] RbDynamicMethod first drop
169238 [drjflam gmai] You'll need a copy of Visual C++ 2005 (probably any edition, but I haven't
^ Mixins and variables
169239 [johannes.fri] I can't figure out how to set an instance variable with a mixin method
+ 169240 [daniels pron] class TestClass
| 169244 [johannes.fri] OK, thanks. Can I force "x=(whatever)" to mean a method call instead
| + 169245 [dblack wobbl] You have to give the explicit receiver 'self'. The thing is, local
| | + 169246 [daniels pron] self.x= will be a method call.
| | + 169247 [johannes.fri] Thanks.
| + 169248 [gwtmp01 mac.] It is a parsing problem. Because ruby supports zero argument methods
| 169296 [florgro gmai] Hm, and a syntax error as well, if I'm not wrong.
| 169310 [gwtmp01 mac.] My bad. I really should cut and paste into irb...
+ 169300 [james graypr] attr_accessor :x
^ nuby: method defined in two classes
169253 [botp delmont] I have the ff code below. It works but you can see that i have duplicated the "is_odd?" method on both Fixnum and Bignum. I am just asking for something more cleaner/elegant...
+ 169257 [vjoel path.b] Why not define #is_odd? on Integer?
+ 169258 [transfire gm] Integer#odd?
169264 [botp delmont] #From: Trans [mailto:transfire@gmail.com]
169265 [botp delmont] Joel VanderWerf [mailto:vjoel@path.berkeley.edu]
^ snmp with s2nmp or rubyonrails
169254 [hemtirik yah] I'm using Ruby about 3-4 mounts. Now, i want to make a project about network devices with SNMP.
^ Test::Unit Console Runner
169260 [listrecv gma] Is there anyway to pass options to the (wonderful!) Test::Unit Console
169262 [pit capitain] Looking at the output of "testrb -h" there seems to be no built-in way
169266 [jeff.darklig] Also, if you take a look @ the same question when asked for the JUnit
^ [ANN] Amrita2 1.9.6
169268 [takunakajima] Amrita2 is a XML/HTML template library for Ruby. I released a new
^ One-Click Ruby Installer
169270 [kishor.gurtu] Any idea when this will be updated to 1.8.3?
169280 [curt.hibbs g] 1.8.4 will be out at the end of December (1.8.3 was skipped by the one-clic=
169311 [gregory.t.br] Will this version have a fix to the YAML problem?
169313 [curt.hibbs g] It should have. Its was bugs like that (and the fact that 1.8.4 was coming
^ wxruby and threads
169274 [kozlov.y gma] I trying to write a small GUI application.
+ 169283 [alex deletem] I don't know exactly how ruby's threads interact with wx's scheduling. Perhaps you could try adding an evt_idle handler to your example?
| 169286 [kozlov.y gma] It seems, what this code make new thread every time when on_idle
| 169290 [alex deletem] Yes. It was just an example. If you want to run a previously defined thread, the following works for me (CVS HEAD, Wx 2.6.2 unicode, OS X 10.3, Ruby 1.8.2)
| 169291 [kozlov.y gma] Could you post the full text working example ?
| 169301 [alex deletem] See below - note it doesn't really matter where you create the thread - it could be passed into the App's constructor. It's just in on_init for simplicity.
| 169515 [kozlov.y gma] Not worked.
+ 169284 [neil hakubi.] Ruby threads aren't system threads. When you're in the Wx main loop,
169287 [kozlov.y gma] Ok. I suspected like this.
169289 [kozlov.y gma] Aha.
^ where is the Content Assist of RDT?
169277 [could.net gm] this url() said RDT *HAS* Content Assist. I use RDT 0.6.0, but I never foun=
+ 169278 [could.net gm] ...
| 169279 [could.net gm] sorry for my duplicated posts.
| 169329 [leavengood g] You aren't posting twice to the list, you are just seeing Gmail put in
| 169494 [could.net gm] Yes, it's really annoying.
+ 169282 [rosco roscop] In my experience it's not as comprehensive as with e.g. Java, partly
+ 169493 [could.net gm] Thank you.
+ 169495 [could.net gm] OK, I tried the ri again, it works for me.
^ Build array of possible combinations
169288 [th-dev onlin] I'm looking for an easy way to convert a string representing a
+ 169385 [trashcan hot] Unpaired parentheses ! (I was a compiler in a previous life, I just
+ 169425 [nightphotos ] First, we write a method that converts the input string from infix to
169872 [th-dev onlin] thanks a lot for your suggestions. This is really an interesting
169909 [malte__ gmx-] => false
^ Switch User Agent
169295 [amatbcn hotm] UAProof of an HTTP request that I'm sending out. (To pretend that my
169298 [gene.tani gm] I haven't seent the term UAproof before, but the open-uri and Net::HTTP
169299 [gene.tani gm] ...
169303 [amatbcn hotm] Sorry mate I meant User Agent (I'm a bit new to the world of ruby and
^ Win32OLE: Output parameters, Dispatch IDs
169304 [dave burt.id] x1 recently asked about an issue with a WMI script that had an output parameter.
169510 [caldridge gm] I have not been able to figure anything out yet myself.
169520 [dave burt.id] I figured.
169779 [caldridge gm] ObjectSpace.each_object(Array) do |arr|
169803 [dave.burt gm] pids = []
169805 [caldridge gm] I find it strange that the win32ole package cant handle out params.
169817 [dave burt.id] That's the thing, though, it _does_ explicitly handle out params. The only
169830 [masaki.suket] Sorry for being too late to reply.
+ 169834 [masaki.suket] WIN32OLE researches type library to get info on method.
+ 169886 [dave burt.id] No need to apologize! And you're not even late - the thread's still warm
170029 [caldridge gm] <trim>
^ profiling question
169307 [skaes gmx.ne] During profiling some code using ruby 1.8.2 and standard profiler, I
169316 [matz ruby-la] It's a bug. I have checked in the fix to the CVS repository.
169320 [skaes gmx.ne] Wow. That was quick. Thanks very much.
^ Where is RUBYOPT set?
169312 [williamerubi] Checking the RUBYOPT environment variable at a command prompt reveals
169321 [kyosuke sezn] I do have it in System variables on W2k.
169365 [curt.hibbs g] It should be in system variables on XP as well. I just doubled checked my X=
169383 [jeff.darklig] Curt, if you would, for future releases also put it in User Variables ...
169388 [curt.hibbs g] The same thing would then be true for putting ...\rub\bin on the user.
169404 [jeff.darklig] yeah, the path modification would be nice too.
threads.html
top