Live data from Hacker News

Announcing Topaz: A New Ruby

docs.topazruby.com

111–120 of 190 posts

Re: Announcing Topaz: A New Ruby

#111
post #86

Earlier quoted context omitted.

> 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?

The same, as far as I've seen. RPython is both the VM-framework and the Python subset which exists within (and for) that framework (RPython is not considered and developed as a general purpose language, but as a language for building VMs within the RPython system/framework/toolset).

The important distinction really is between RPython (a language and framework for building virtual machines) and PyPy (a virtual machine implemented in/on RPython)

Re: Announcing Topaz: A New Ruby

#112
post #73

Does Topaz benefit at all from the work that's been done already on Rubinius? I seem to recall that Rubinius implements as much of Ruby in Ruby as possible. It seems like this would help Topaz as well in implementing the standard library. Or are the implementations different enough that this doesn't work?

AFAIK much of the Rubinius library is independent of VM features (since it was only in C for historical speed reasons), so there should be opportunity for reuse.

Re: Announcing Topaz: A New Ruby

#113
post #45

Earlier quoted context omitted.

So, lets talk about JRuby. JRuby is a Ruby implementation on the JVM, and its really awesome power is actually that you can wrap and interface with Java libraries, and still write all of your app code in Ruby. If Topaz was able to give me the ability to access NLTK, but still write in Ruby? I'd be overjoyed.

So that would be a very cool project to merge python ruby (or any other interpreter written in RPython). It requires quite a bit of work to pull it off the ground though. I would be happy to provide guidance on that, but I definitely won't do it myself (just yet).

It's also worth noting that this is (mostly) possibly with RubyPython running in Ruby against a CPython2 dynamic library.

Zach Raines did 99% of the heavy lifting (I've got a very small part to the whole project, and no time to work on it right now), and it works pretty nicely overall.

Re: Announcing Topaz: A New Ruby

#114

I'm probably in the minority but I would love to see a dialect of ruby that has significant whitespace. Death to unnecessary 'end's

Significant whitespace in Python was a significant factor in my decision to get proficient in Ruby over Python.

Yes, I hate it that much, and I know quite a few Ruby devs with similar views...

Re: Announcing Topaz: A New Ruby

#115
post #97

Earlier quoted context omitted.

If the goal is to benchmark Ruby execution time, it's unfair. The slow startup time is a valid concern when considering short-lived sessions, but it's kind of meaningless when trying to benchmark a Ruby implementation.

There are no 'fair' benchmarks, all benchmarks should be biased to the problem you're actually solving running your actual workload. If you can't replay your workload at multiples of real volume then you should probably work on doing that before benchmarking as it helps you out with the real problem of verifying your infrastructure. In general a benchmark is probably the worst metric you could ever use for deciding o…

I don't even know where to begin with this.

In all comparisons, you should remove confounding variables. Yes, you should benchmark something you actually care about, otherwise what's the point? That doesn't mean all other variables are immediately null and void. That's why I said said if your goal is to measure ruby execution time, you should remove startup time.

As for the practice of benchmarking in general, you're partially right. Micro-benchmarks are usually useless because they don't map to real work load. But profiling and speeding up small portions that are used heavily can have drastic improvements that in isolation seem small -- the death by a thousand cuts problem. Not all improvements come from isolated instances with very slow performance profiles.

This fallacy about DB access and not needing to optimize really needs to go away though. Even if 50% of your app is spent hitting DB, you have opportunity to speed up the other 50% and it's likely far easier. Ruby in particular is ripe for improvements on the CPU side. I managed to reduce my entire test suite time by 30% by speeding up psych. I managed to cut the number of servers I need in EC2 in half by switching from MRI, Pasenger, and resque to JRuby, TorqueBox, and Sidekiq. And I've managed to speed up my page rendering time anywhere from 8 - 40x by switching from haml to slim. None of these changes required modifications to my DB, none required me to write assembly, none required me to switch to custom-built hardware, and each helped reduce the expenses for my bootstrapped startup, while improving the overall experience for my customers.

Re: Announcing Topaz: A New Ruby

#116

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

- PHP | https://bitbucket.org/fijal/hippyvm

Re: Announcing Topaz: A New Ruby

#117
post #97

Earlier quoted context omitted.

There are no 'fair' benchmarks, all benchmarks should be biased to the problem you're actually solving running your actual workload. If you can't replay your workload at multiples of real volume then you should probably work on doing that before benchmarking as it helps you out with the real problem of verifying your infrastructure. In general a benchmark is probably the worst metric you could ever use for deciding o…

I don't even know where to begin with this. In all comparisons, you should remove confounding variables. Yes, you should benchmark something you actually care about, otherwise what's the point? That doesn't mean all other variables are immediately null and void. That's why I said said if your goal is to measure ruby execution time, you should remove startup time. As for the practice of benchmarking in general, you're…

How much does one EC2 server net you in revenue?

What is the percentage increase in profitability yielded from these optimizations?

What was the percentage increase in profitability yielded from the last A/B test of your homepage CTA copy?

Re: Announcing Topaz: A New Ruby

#118

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

Expanding on the concept of entirely unscientific benchmarks, I benched some simple prime number math with Topaz, Ruby, JRuby and RBX.

Looks promising for Topaz! https://gist.github.com/havenwood/4724778

Re: Announcing Topaz: A New Ruby

#119
post #117

Earlier quoted context omitted.

I don't even know where to begin with this. In all comparisons, you should remove confounding variables. Yes, you should benchmark something you actually care about, otherwise what's the point? That doesn't mean all other variables are immediately null and void. That's why I said said if your goal is to measure ruby execution time, you should remove startup time. As for the practice of benchmarking in general, you're…

How much does one EC2 server net you in revenue? What is the percentage increase in profitability yielded from these optimizations? What was the percentage increase in profitability yielded from the last A/B test of your homepage CTA copy?

An EC2 server doesn't net me anything in revenue. It costs us money and falls into the category of expenses. Reducing expenses makes us more profitable. Reducing our expenses by 50% made us roughly 50% more profitable.

Better than that, this savings isn't one-time. It's recurring, as EC2 is recurring. But we've also reduced the expense growth curve (the savings wasn't linear), so we can continue to add customers for cheaper.

The A/B testing thing is a complete non sequitur. a) there's no reason you can't do both. b) most A/B testing yields modest improvements.

Re: Announcing Topaz: A New Ruby

#120

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

Impressive, how does it compare to JRuby?

[deleted]
Post reply on HN