RiftSketch icon indicating copy to clipboard operation
RiftSketch copied to clipboard

JavaScript is quite verbose for live-coding. Use a higher language or provide a library of useful functions

Open brianpeiris opened this issue 11 years ago • 2 comments

brianpeiris avatar Oct 07 '14 12:10 brianpeiris

Are you familiar with the live-graphics-coding work that's been done with Racket? It would seem that you were already going towards this programming style of a purely functional, composable interaction API, but JavaScript can make that a bit of a pain sometimes.

Pict has been around for quite a while: http://docs.racket-lang.org/pict/index.html

This was very recent, an attempt to make a pict-like language for hardware accelerated 3D: https://www.youtube.com/watch?v=t3xdv4UP9-U

And finally, there is Whalesong, a Racket-to-JavaScript transpiler: https://www.hashcollision.org/whalesong/

Though there are a number of From-Scheme-To-JS transpilers that I'm sure would do well. Or perhaps what you really want is this style of API plus CoffeeScript.

capnmidnight avatar Oct 07 '14 12:10 capnmidnight

Also, if all you care about is direct translation to JS, with no specific runtime characteristics (i.e. NOT how like ClojureScript include their own type system), building scheme-like languages is mostly just a for-loop over an array of Regex replace expressions: https://github.com/capnmidnight/brian/blob/master/web/loosp.js

capnmidnight avatar Oct 07 '14 13:10 capnmidnight