cherry

hoppy 2024-12-10T02:08:31.732199Z

So thought experiment time. I started noodling with cherry over the weekend, and it hits a really sweet niche of being able to deploy clojure-y things to devices that will never run a JVM, are not supported by Graal, and seems the best they can hope to be is node-js. The gateway drug is nbb, since it has the repl and the JS ecosystem. I've been writing a lot of bb code lately, love the hell out of it, so decided to use nbb in anger for the first time - it's doing pretty well! So, across the nodey-runny things that consume clojure, we have cljs proper, nbb, cherry, and I guess squint as well (sorta - but maybe for these tasks I don't need proper persistent data-structures). One distress point in migrating code through this spectrum is how to deal with promises. In cljs I grew up using (core.async/<p). In nbb, the gentle nudging seems to be in the direction of promesa, but in cherry & friends, we seem to be (js-await) friendly. I get that core.async is a booger - and won't ponder getting that in nbb/cherry universe. But there is a use-case here - I would like to develop/test things in nbb, and then use cherry to create the standalone js that can run on these devices - if nothing else as a deployment vehicle. I find nbb very comfortable for calva/repl work - but alas I have to consider that code change to move it to cherry. This may be a whole class of problem, to be sure, but that's the one I see atm. It may also be mitigated by an eventual cherry nrepl, but alas.... Anyway, what is the thought on unifying this across the spectrum of cljs'y things?

john 2024-12-11T15:51:17.497169Z

Hmm a p/for could probably do the for await thing more cleanly too, rather than trying to make await more fancy

borkdude 2024-12-11T15:53:33.128759Z

co-incidentally I just received an issue about for await today for squint: https://github.com/squint-cljs/squint/issues/594 this will be fixed soon

Chris McCormick 2024-12-10T09:26:34.628399Z

> I would like to develop/test things in nbb, and then use cherry to create the standalone js that can run on these devices Just want to say I understand this angle and I have been working towards something similar on the frontend using scittle for dev and then compiling using shadow-cljs in production to get smaller build sizes. I want to use scittle for dev for a similar reason to you using nbb - because the ergonomics make it fast and simple to set up and try out ides without having to commit to writing config files and set up builds.

borkdude 2024-12-10T10:04:37.725509Z

I think promesa could be simulated in cherry by using macros that just expand into lets with js-awaits