Live data from Hacker News

Announcing Topaz: A New Ruby

docs.topazruby.com

81–90 of 190 posts

Re: Announcing Topaz: A New Ruby

#81

Earlier quoted context omitted.

1) Note that the post doesn't sell its speed; all it says is that they are interested in a high-performance Ruby 2) Python is a very similar language to Ruby, and Pypy already runs python very rapidly. This doesn't guarantee that the Ruby interpreter will be anywhere near as fast, of course, but it does give evidence that it's possible. 3) As kingkilr notes below, they've taken into account your argument and they bel…

The third paragraph reads "Out of the box Topaz is extremely fast." This is most definitely selling its speed.

Fair enough, I missed that. Thanks.

Re: Announcing Topaz: A New Ruby

#82

Implementing other languages on top of the PyPy toolchain is an interesting concept, and I'd like to see it happen more often. But calling this "Ruby in Python" is sure to invite flamewars from all sides. The actual Topaz site seems to be careful not to do this, but if this thread is any indication, a fair number of people are already mistakenly calling it that.

There are already a few other language implementations on PyPy.

For e.g.

- Javascript | https://bitbucket.org/pypy/lang-js

- Smalltalk | https://bitbucket.org/pypy/lang-smalltalk

- Schema | https://bitbucket.org/pypy/lang-scheme

- Io | https://bitbucket.org/pypy/lang-io

Re: Announcing Topaz: A New Ruby

#83
post #80

Completely unscientific, but if these outputs are any indication, this is going to be great news for Rubby users in the future... $ time ruby -e "puts 'hello world'" hello world real 0m0.184s user 0m0.079s sys 0m0.092s $ time ~/Downloads/topaz/bin/topaz -e "puts 'hello world'" hello world real 0m0.007s user 0m0.002s sys 0m0.004s

In order to eliminate the potential bias of startup time I run similar test in many iterations. Here's what I got: $ time ruby -e "10000.times { puts 'hello world' }" > /dev/null real 0m0.102s user 0m0.096s sys 0m0.005s and $ time ./topaz -e "10000.times { puts 'hello world' }" > /dev/null real 0m0.098s user 0m0.071s sys 0m0.026s Any idea why I don't see such big difference?

The overhead of starting the interpreter must be longer that executing the loop.

Re: Announcing Topaz: A New Ruby

#84
post #34

I'm all for new Ruby implementations, but be very careful about judging performance of an incomplete implementation. It's "trivial" to make a fast language that looks quite a bit like Ruby. It is a lot harder that make a language that remains fast in the face of handling all the quirks of the full Ruby semantics, though, such as selectively handling the risk of someone going bananas with monkey-patching core classes…

What you just wrote is exactly what I've been telling people about every new "Python" implementation for the last 3 years. Believe me, I understand this argument completely, that's why I made sure we had all the hard bits (monkey patching core classes, eval, etc.) before I released this.

callcc?

Re: Announcing Topaz: A New Ruby

#85

I will be the first to ask: why did Alex / the pypy devs start this project? I thought the three community funded ideas were great (STM, Python 3, and Numpy). What prompted this new project? Is it meant to attract new developers to pypy as platform for implementing languages? Is it a side project? Is it a long term project meant to become the premium implementation of ruby as pypy is becoming for python? Etc. Not cri…

Hi to be clear, this is project undetaken by me (Alex) independently, it wasn't funded out of the PyPy funds or anything like that. There were 3 primary motivations: a) Because it's fun b) To prove RPython is a great platform c) To mess with people's heads, it's crazy!

Hey Alex, let me tell you I completely understand points a) b) c) and more. It seems we started our competing Ruby on PyPy implementations at about the same time [0]! My goal was to build a robust and documented Ruby parser, and hope PyPy make it magically fast. To that end I embedded PLY and modified it to not require kwargs. Then a thunder of work fell from the skies, and I was just recently unearthing PyPy 1.9 to put the thing back on track.

Congratulations for the release :-)

[0]:

    $ ls -l playground/pypy
    total 29160
    drwxr-xr-x  12 lloeki  staff       408 18 Feb  2011 ply-3.4
    drwxr-xr-x  15 lloeki  staff       510  3 Apr  2012 pyby
    drwxr-xr-x  23 lloeki  staff       782 27 Mar  2012 pypy-pypy-2346207d9946
    drwxr-xr-x  18 lloeki  staff       612 27 Mar  2012 pypy-tutorial
    -rw-r--r--   1 lloeki  staff  14927806 27 Mar  2012 release-1.8.tar.bz2
    drwxr-xr-x  10 lloeki  staff       340  3 Apr  2012 unholy

Re: Announcing Topaz: A New Ruby

#86
post #20

So Ruby on top of RPython on top of PyPy? Why not, but how does it compare to JRuby and Rubinius?

> So Ruby on top of RPython on top of PyPy? No. It's Ruby in RPython, where PyPy is Python in RPython. The pypy project is currently in the process of splitting "RPython" (the VM-development framework) from PyPy (the Python VM) to make that clearer. RPython is a general purpose, language-agnostic (ish?) core for implementing JIT-ed garbage-collected languages, it's kind-of similar to LLVM being a framework for implem…

But RPython used to be the reduced version of the Python language. What name do you give to the jit-compiler generator?

Re: Announcing Topaz: A New Ruby

#88
post #80

Completely unscientific, but if these outputs are any indication, this is going to be great news for Rubby users in the future... $ time ruby -e "puts 'hello world'" hello world real 0m0.184s user 0m0.079s sys 0m0.092s $ time ~/Downloads/topaz/bin/topaz -e "puts 'hello world'" hello world real 0m0.007s user 0m0.002s sys 0m0.004s

In order to eliminate the potential bias of startup time I run similar test in many iterations. Here's what I got: $ time ruby -e "10000.times { puts 'hello world' }" > /dev/null real 0m0.102s user 0m0.096s sys 0m0.005s and $ time ./topaz -e "10000.times { puts 'hello world' }" > /dev/null real 0m0.098s user 0m0.071s sys 0m0.026s Any idea why I don't see such big difference?

topaz probably has a pretty slow IO (for bad reasons, it's an RPython problem)

Re: Announcing Topaz: A New Ruby

#89
post #52

Earlier quoted context omitted.

[deleted]

> the lack of many core features probably helps out a lot atm. I don't understand why the lack of features would affect the time of "hello world."

Exactly.

time echo "hello world" hello world

  real    0m0.000s
  user    0m0.000s
  sys     0m0.000s

Re: Announcing Topaz: A New Ruby

#90

Earlier quoted context omitted.

What you just wrote is exactly what I've been telling people about every new "Python" implementation for the last 3 years. Believe me, I understand this argument completely, that's why I made sure we had all the hard bits (monkey patching core classes, eval, etc.) before I released this.

callcc?

no call/cc yet, I do have a branch with fibers, but I'm waiting for an RPython branch to land for that first.
Post reply on HN