Re:ClojureScript: Graal.js REPL Environment
by mfikes on Friday May 10, 2019 @07:35AM
(#19876806)
Additionally, the Graal team has done some great work to ensure that the JavaScript produced by ClojureScript runs quickly under Graal.js. For more details, see https://github.com/graalvm/graaljs/issues/29
Re:ClojureScript: Graal.js REPL Environment
by harlanji on Friday May 10, 2019 @10:53AM
(#19878326)
So happy to see options for Cljs expanding. Glad I took those horrendous NodeJS dev jobs after a year of Clojure in the data pipeline, for the modern JS RT exp. I am just chillin’ out of tech and waiting for things like this to make me employable again, as I build my dream stack at Starbucks each morning. It’s like waking up is going into the dream lately :).
Re:ClojureScript: Graal.js REPL Environment
by escherize on Friday May 10, 2019 @01:17PM
(#19879962)
I've had a wonderful time designing a Santorini (the board game) clone[0] in clojure/script. The game logic is written once and used on the client for local play and on the server for realtime multiplayer.
The polymorphism clojure offers (multimethods here) came in handy for dispatching websocket messages, and for drawing pieces onto the board.
Re:ClojureScript: Graal.js REPL Environment
by new4thaccount on Friday May 10, 2019 @07:35AM
(#19876803)
Yea, 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.
Re:ClojureScript: Graal.js REPL Environment
by jmiskovic on Friday May 10, 2019 @08:35AM
(#19877091)
I'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.
Re:ClojureScript: Graal.js REPL Environment
by svieira on Friday May 10, 2019 @09:19AM
(#19877417)
Actually, since this is Graal the Ruby implementation here is almost certainly 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).
Re:ClojureScript: Graal.js REPL Environment
by lvh on Friday May 10, 2019 @11:18AM
(#19878563)
I'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 polymorphism clojure offers (multimethods here) came in handy for dispatching websocket messages, and for drawing pieces onto the board.
[0] https://buildtowers.club
this is both impressive and terrifying.
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.
I believe most are in the 400kb range iirc.
i.e., call C/C++ functions from Javascript through GraalVM.
[1] https://github.com/oracle/graal/tree/master/sulong
https://twitter.com/mfikes/status/1126627560157253632?s=21