5 ms·
Polyglot Ruby is invoked from Clojurescript which transpiles to JS which runs on GraalJS implementation running on GraalVM extension to the JVM? this is both i
by keymone 7y ago
Polyglot Ruby is invoked from Clojurescript which transpiles to JS which runs on GraalJS implementation running on GraalVM extension to the JVM?
this is both impressive and terrifying.
- new4thaccount 7y agoYea, I'm sure it's impressive work far beyond my skills, but that sounds like a monument to complexity. There are a lot of things to not like about Smalltalk, Forth, and Lisp, but their systems seem to be so much more knowable. Put another way, I question the longevity of these franken-systems. I doubt people will be maintaining each one of those layers in 10 years let alone 40. I used to make fun on Cobol and Fortran a lot, but now see that we've traded some inefficiencies for a large jump in systems complexity. Yea it only takes 5 pages of code for your app, but another million are being executed. I guess the economics make sense and the developer speed of development and more systems to target makes it worth it.
- Moru 7y agoHave you tried to make a "Hello world" in Microsofts latest creation? Far away are the days of 58 bytes hello world examples.
- new4thaccount 7y agoI'm mostly a high level dynamic language guy, but have played with hello works in Nim, D, Ada, C++, and C on Linux and Windows. I believe most are in the 400kb range iirc.
- new4thaccount 7y agoJust tried GFortran on Linux and it was 16kb if that helps.
- jmiskovic 7y agoI'm not sure this is meant for production? I understood it as way to call other language functions from this REPL, for convenience. You'd replace those calls with ClojureScript code. As for maintenance, I'm not worried about JVM and JS at least.
- new4thaccount 7y agoAh, fair points
- svieira 7y agoActually, since this is Graal the Ruby implementation here is almost certainly https://github.com/oracle/truffleruby https://github.com/oracle/truffleruby so you're invoking Ruby in the same compiler _and process space_ that underlies GraalJS (no transpilation to JS needed). That means the JVM can optimize calls between JS and Ruby (inlining JS values into Ruby method call sites, and vice versa).
- keymone 7y agoright, i meant clojurescript is transpiled, not ruby. still, cool detail, thanks!
- lvh 7y agoI've been working with GraalVM a bunch and one of the things I'm most excited about is that it also supports LLVM via Sulong. This is great because it means I finally have to care a lot less about native v JVM gaps, and it becomes much easier to ship non-JVM code as part of the same app :-)
- the-alchemist 7y agoI had to look up Sulong [1]. Basically, as long as LLVM can compile your code, you can use it with GraalVM. i.e., call C/C++ functions from Javascript through GraalVM. [1] https://github.com/oracle/graal/tree/master/sulong https://github.com/oracle/graal/tree/master/sulong