cherry

zimablue 2022-08-16T19:31:39.006299Z

hi, stupid question - what is the advantage of this vs self-hosted cljs [somehow output-modified to be es6 (a)] or is the (a) part so difficult that it motivates the whole project?

zimablue 2022-08-16T19:33:13.431249Z

I asked the same question re babashka I know, it's the question that helps me grok what's actually going on xD

Cora (she/her) 2022-08-16T19:35:49.178679Z

I'm pretty sure the advantage is mostly "Reducing friction between ClojureScript and JS tooling"

Cora (she/her) 2022-08-16T19:36:43.723579Z

there are a bunch of ways this is achieved and some future goals listed int he readme. I'm sure someone can expand on more concrete differences but that's the gist of it

zimablue 2022-08-16T19:37:29.361059Z

I understand that but don't understand what the main technical element of achieving that is beyond the self-hosted, whether it's (a) or something else

borkdude 2022-08-16T21:02:33.017209Z

@zimablue Good questions: cherry is currently more an exploration of ideas than a final working product. It will take some time to see if it's better than what we have or whether it allows new things that were previously not easily feasible.

zimablue 2022-08-16T21:04:14.993459Z

Thanks, it's not meant as a criticism I'm learning clojurescript and trying to understand, the complication and tooling are still a bit of a black hole to me. Because I'm working on an electron app bundle size is less relevant

borkdude 2022-08-16T21:07:09.049089Z

Yes, JS is used in a wide variety of use cases. At the same time I'm also exploring #squint (with the help of some amazing people in that channel) which compiles more directly to JS without any of the CLJS "baggage" which can e.g. be used for ultra-small bundle sizes for cost savings on AWS or cloudflare, etc. It's about adding more use cases for Clojure(-ish) instead of "being better" than existing tools but what exactly those use cases are remains to be seen as these products aren't yet production-ready.

mauricio.szabo 2022-08-16T00:06:04.406439Z

So macros in cherry don't actually expand before emitting JS code, is that it?

borkdude 2022-08-16T01:06:07.532299Z

They do expand before emit

borkdude 2022-08-16T01:06:53.987449Z

But they only run in the JS hosted compiler

mauricio.szabo 2022-08-16T01:49:07.570999Z

Right, do you think this is a problem? I always felt that Clojurescript macros are really weird...

mauricio.szabo 2022-08-16T16:44:03.400149Z

Do you think it's a problem that cherry and Clavascript macros will run only on ClojureScript, and have no access to JVM/Basbashka? What I feel is that Clojure macros are more "integrated" on the language - you don't have to worry about java elements "leaking" into the final source, or defining things on different files, etc...

mauricio.szabo 2022-08-16T16:44:52.834959Z

One example is the hack we need to check (:ns &env) to know if we're compiling a CLJ macro or a CLJS one, because reader conditionals don't work right

borkdude 2022-08-16T04:13:17.374789Z

Please elaborate