Live data from Hacker News

Startling new proof that Ruby sucks at scripting

txt.io

11–20 of 30 posts

Re: Startling new proof that Ruby sucks at scripting

#12
post #4

Nice how the test is performed on a release candidate version of Rubinius instead of a MRI release such as 1.9.3 or 2.0.0. This is quite a contrived test. Test it against MRI 1.9.3 and 2.0.0 and I'll consider it more accurate.

I ran this against MRI on my MacBook Pro (ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]) and got:

real 0m0.429s user 0m0.215s sys 0m0.145s

As a comparison, for Java (java version "1.6.0_43") I got:

real 0m18.856s user 0m20.529s sys 0m3.093s

Re: Startling new proof that Ruby sucks at scripting

#15

  Running 'awk -f bogobench.awk' 100 times…
  …done.
  real         0.70
  user         0.33
  sys          0.32
  Running 'java bogobench' 100 times…
  …done.
  real        34.25
  user        38.15
  sys          6.71
  Running 'ruby bogobench.rb' 100 times…
  …done.
  real         1.11
  user         0.56
  sys          0.42
  Running 'rbx bogobench.rb' 100 times…
  …done.
  real        41.53
  user        38.42
  sys          2.82

  awk version 20070501
  java version "1.6.0_43"
  ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]
  rubinius 2.0.0.rc1 (1.9.3 3981b1d0 yyyy-mm-dd JI) [x86_64-apple-darwin12.3.0]
The submitter is using Rubinius WIP in 1.8.7 mode vs stable and tested releases.

Re: Startling new proof that Ruby sucks at scripting

#17
Just in case this post isn't satire this post is inane. And I know I risk being seen as "that guy" with the shallow and dismissive comment.

Scripting languages should be "fast enough". That's an intentionally vague requirement. And Ruby is indisputably "fast enough" for a billion little usecases.

Of course it would be better if ruby were to start up instantly. But it's absolutely not a dealbreaker and to suggest Java is a better scripting language because it starts faster strikes me as idiotic.

The measurements in the post don't prove anything and it certainly doesn't prove that Ruby sucks at scripting. The author must know this. The author must also know that measuring the time needed for a print statement isn't a meaningful performance metric.

So that means this post is either satire or intentionally provocative idiocy. Either way I don't think it's HN material. Flagged.

Re: Startling new proof that Ruby sucks at scripting

#18
I know I'm feeding a troll with a title like that, but the results are very strange. On my macbook:

$ ruby -v

  rubinius 2.0.0.rc1 (1.8.7 release yyyy-mm-dd JI) [x86_64-apple-darwin12.2.0]
$ time ./runner.sh ruby bogobench.rb

  Running 'ruby bogobench.rb' 100 times…
  …done.

  real	0m0.732s
  user	0m0.289s
  sys	0m0.273s
Linode with Ubuntu:

$ ruby -v

   ruby 1.9.3p392 (2013-02-22 revision 39386) [i686-linux]
$ time ./runner.sh ruby bogobench.rb

  Running 'ruby bogobench.rb' 100 times…
  …done.

  real	0m3.701s
  user	0m2.486s
  sys	0m1.202s

Re: Startling new proof that Ruby sucks at scripting

#19
post and measurements like these are kindergarden posts. which speaks volumes about the fact that usually end up on the front page. scripting is a process of putting some other process in motion (e.g. some that would do millions of calculations) and for starting such a process(es) an instruction is needed every once in a while.

Re: Startling new proof that Ruby sucks at scripting

#20
This is a useless benchmark: there's no rhyme or reason for the version choices (rubinius?), the compile time is disregarded (which, for a one-off script, actually matters) and hello world is so trivial that it won't show any difference in development time.

How about choosing a nontrivial text processing example (print the second word of each line, for example) and compare the results between either a) all of the latest versions or b) the versions you would get from a fixed Linux distro (say, Ubuntu 12.04)

Post reply on HN