cherry

borkdude 2022-07-25T11:46:55.696609Z

The first cherry-compiled web-application! https://borkdude.github.io/cherry/examples/wordle/index.html

🎉 2
teodorlu 2022-07-25T13:00:01.471749Z

@teodorlu has joined the channel

borkdude 2022-07-25T13:49:21.219369Z

Testing compiled cherry code in itself on Node 18 ;) https://twitter.com/borkdude/status/1551565172505976832

borkdude 2022-07-25T13:51:04.385009Z

This is also possible with #nbb + Node 18 btw. Nice diffs

borkdude 2022-07-25T14:06:49.003139Z

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? ;)

borkdude 2022-07-25T14:52:55.420809Z

node --test ...
Good stuff :)

Aleed 2022-07-25T16:12:28.618459Z

@alidcastano has joined the channel

mauricio.szabo 2022-07-25T17:02:42.767149Z

@mauricio.szabo has joined the channel

borkdude 2022-07-25T18:10:39.333819Z

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

2022-07-25T18:11:54.326909Z

Will varargs compile to the ES6 spread operator? (He asked having noticed the "no varargs yet" comment.)

borkdude 2022-07-25T18:13:41.668549Z

Hmm, interesting :)

😄 1
borkdude 2022-07-25T18:31:10.907959Z

@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 ] ]

😂 1
borkdude 2022-07-25T18:33:23.209829Z

I wonder if there's any downsides for generating (x) => x + 1 rather than function(x) { return x + 1 }

borkdude 2022-07-25T18:34:19.075859Z

One difference would be the this thing I guess

borkdude 2022-07-25T18:35:07.500239Z

I guess I'll stick to function for now

miguelb 2022-07-25T19:12:22.410309Z

this and I believe function declarations (`functions` fn’s) are hoisted while arrow functions are not

miguelb 2022-07-25T19:03:02.385619Z

@miguelb has joined the channel

jeongsoolee09 2022-07-25T19:20:33.587659Z

@volcano0909 has joined the channel