Hacker News new | ask | show | jobs
by FabricPaul 5187 days ago
not really - Fabric is integrated with dynamic languages, we 're not interpreting JS or Python (we work with both languages). Fabric is basically a high-performance threading engine that you can call from your dynamic language - the key element is that the operator code (KL) enables the high-performance. This KL is only required for the operators, and is not as difficult or complex as C/C++ to use - it's designed purely for this task. A regular Python or JavaScript developer can pick it up.
3 comments

> Fabric is integrated with dynamic languages, we 're not interpreting JS or Python (we work with both languages).

Neither does Cython.

> Fabric is basically a high-performance threading engine that you can call from your dynamic language

Well Cython is for writing Python modules, so it's integrated with Python only. But that's pretty much it.

> the key element is that the operator code (KL) enables the high-performance. This KL is only required for the operators, and is not as difficult or complex as C/C++ to use - it's designed purely for this task.

So's Cython. Cython compile to a native module, that native module is simply imported and used from regular Python code.

> A regular Python or JavaScript developer can pick it up.

A regular Python developer really shouldn't have any trouble picking up cython.

as per my other comment: "please correct me if I'm wrong, but I don't see anything about Cython handling multi-threading and I don't see anything about dynamic compilation on target. I just had a flick through their documentation, so if this stuff is in there then I missed it..."
When we designed Fabric, our goal was not to speed up Python, or JavaScript. Our goal was to build high performance multi-threaded applications on top or dynamic languages.

Fabric is for software developers who need to build high performance software, and also use dynamic languages.

V8 will continue to speed up, and may even get close to the speed of native code. But in that time, CPUs architectures will continue to gain more cores, widening the gap between multi-threaded code, and dynamic code.

I think you've just described cython. A higher-than-c level language that trivially binds to the higher target language.
Replying to comment below (can't see a reply button) - please correct me if I'm wrong, but I don't see anything about Cython handling multi-threading and I don't see anything about dynamic compilation on target. I just had a flick through their documentation, so if this stuff is in there then I missed it...
There is a cython mechanism for compiling code on demand (pyximport), but it is only transparent to the user, it isn't especially dynamic.

There are also some parallel features:

http://wiki.cython.org/enhancements/prange

Multi-threaded software development is a huge challenge facing software developers. The model we have taken enables massive amounts of computation to be distributed across all available cores.

The combination of task based parallelism, and data based parallelism, orchestrated using a dependency graph, enable our scheduler to very efficiently manage the CPU(and in the GPU in the future).

This model is used in high end video game engines today to leverage multi-core CPUs effectively. We make this programming model available in Python and JavaScript.

http://s09.idav.ucdavis.edu/talks/04-JAndersson-ParallelFros...

A single call from Python/JavaScript can kick off hundreds of tasks (written in KL) to be scheduled and executed.