The first cherry-compiled web-application! https://borkdude.github.io/cherry/examples/wordle/index.html
@teodorlu has joined the channel
Testing compiled cherry code in itself on Node 18 ;) https://twitter.com/borkdude/status/1551565172505976832
This is also possible with #nbb + Node 18 btw. Nice diffs
Async version: https://twitter.com/borkdude/status/1551582911748575233 @mkvlr Perhaps with this async stuff, maybe a nice stretch goal is to get this to work with playwright tests? ;)
node --test ...
Good stuff :)@alidcastano has joined the channel
@mauricio.szabo has joined the channel
React example: https://borkdude.github.io/cherry/examples/react/index.html Source: https://github.com/borkdude/cherry/blob/main/examples/react/index.cljs All deps loaded from skypack
Will varargs compile to the ES6 spread operator? (He asked having noticed the "no varargs yet" comment.)
Hmm, interesting :)
@jackrusher Cheating :)
(def foo (js* "(x, ...y) => [x,y];"))
(js/console.log (foo 1 2 3 4))
$ node ./node_cli.js run test/scratch.cljs
[ 1, [ 2, 3, 4 ] ]
I wonder if there's any downsides for generating (x) => x + 1 rather than function(x) { return x + 1 }
One difference would be the this thing I guess
I guess I'll stick to function for now
this and I believe function declarations (`functions` fn’s) are hoisted while arrow functions are not
@miguelb has joined the channel
@volcano0909 has joined the channel