News for hackers. Stuff that matters.
Re:Show HN: Programming Google Flutter with Clojure by 100phlecs on Friday December 02, 2022 @12:04AM (#33827014)
When working with Flutter I did dream "It would be pretty amazing to have a Lisp on top of this" - awesome work you're doing here!

Lots of interesting stuff happening in the Clojure space lately.

https://github.com/squint-cljs

It's a strange thought, but I wonder if Clojure (or rather, the clojure community) would somehow "migrate" from the jvm at this rate.

Re:Show HN: Programming Google Flutter with Clojure by bcrosby95 on Friday December 02, 2022 @02:39AM (#33827900)
> It's a strange thought, but I wonder if Clojure (or rather, the clojure community) would somehow "migrate" from the jvm at this rate.

I don't know what "migrating" from the jvm means exactly. Clojure runs in the JVM, CLR, BEAM (mostly the work of a sole developer, but I wish this got more attention), bash, and transpiles (I think, I don't know the exact details) to JavaScript.

What you linked seems to be for having better JavaScript integration.

Re:Show HN: Programming Google Flutter with Clojure by simongray on Friday December 02, 2022 @04:03AM (#33828339)
No one is "migrating" anywhere.

Clojure has always been about being hosted on different platforms. The best Clojure development experience is probably full-stack Clojure, i.e. JVM Clojure on the backend and ClojureScript on the web—and perhaps ClojureDart for apps. People are implementing Clojure on different hosts because they love the language and want to use it in other contexts, not because they don't like the JVM.

I actually wrote about this phenomenon a few years ago and it reached the top of HN: https://news.ycombinator.com/item?id=22458827

I should probably revisit the topic again, since much has changed in the meantime.

Re:Show HN: Programming Google Flutter with Clojure by 727564797069706 on Friday December 02, 2022 @04:22AM (#33828449)
My dream is Clojure hosted on Rust.

It's because Clojure isn't intended to "hide away" the platform underneath and you interact with the platform quite a bit. Since I prefer Rust ergonomics over Java/JVM ergonomics, it'd be awesome to have Rust as a Clojure platform.

One day it will happen - if not by me, then by someone else, I'm sure!

Re:Show HN: Programming Google Flutter with Clojure by pjmlp on Friday December 02, 2022 @04:33AM (#33828515)
It is called Common Lisp and Scheme.
Re:Show HN: Programming Google Flutter with Clojure by medo-bear on Friday December 02, 2022 @08:27AM (#33830142)
i dont understand what you mean
Re:Show HN: Programming Google Flutter with Clojure by pjmlp on Friday December 02, 2022 @09:08AM (#33830544)
No need for Clojure on Rust, when there are already several mature Common Lisp and Scheme toolchains, compiling to native code for the last 40 years.
Re:Show HN: Programming Google Flutter with Clojure by medo-bear on Friday December 02, 2022 @09:17AM (#33830653)
i am a big advocate for common lisp use but i still don't see your point. are you saying that the whole point of having a clojure on rust is to have native compilation? because i imagine "clojure on rust" for the parent means having a clojure-like-syntax on rust, keeping in mind that rust is a statically typed language (kind of a big point of rust)
Re:Show HN: Programming Google Flutter with Clojure by pjmlp on Friday December 02, 2022 @10:44AM (#33831999)
Common Lisp supports gradual typing.
Re:Show HN: Programming Google Flutter with Clojure by medo-bear on Friday December 02, 2022 @04:29PM (#33837175)
but not static mem allocation
Re:Show HN: Programming Google Flutter with Clojure by pjmlp on Saturday December 03, 2022 @03:36AM (#33841838)
It surely does, including stack values.

That is the thing, Lisp is not only lists unless one is stuck using Lisp 1.5.

Re:Show HN: Programming Google Flutter with Clojure by medo-bear on Saturday December 03, 2022 @07:48AM (#33843082)
i dont think were talking about the same thing unless youre claiming that common lisp can be non garbage collected. otherwise stack allocation is very implementation dependent
Re:Show HN: Programming Google Flutter with Clojure by phtrivier on Friday December 02, 2022 @07:40AM (#33829739)
I'm sincerely curious about what you have in mind for "clojure hosted on rust".

Rust has a relatively thin runtime, but heavy static compilation work (types and lifetime and borrowing, etc...) , so it kinda seems like a completely different set of tradeoffs than what clojure favors (dynamicity, late bindings, runtime checks, managed memory, etc..)

Or did you mean "a clojure-like syntax for something that produces rust code to be eventually compiled natively ?"

Re:Show HN: Programming Google Flutter with Clojure by kaba0 on Friday December 02, 2022 @08:03AM (#33829938)
Also, if everything would be ARC then it would be slow as all hell and would leak (it can’t GC circular references)
Re:Show HN: Programming Google Flutter with Clojure by cnity on Friday December 02, 2022 @10:14AM (#33831533)
I think they mean a JIT compiler for a clojure-like language written in rust, with rust interop (instead of Java interop). There would be no static compilation of rust code.
Re:Show HN: Programming Google Flutter with Clojure by fulafel on Saturday December 03, 2022 @04:36AM (#33842137)
Code is easy, data is hard, the JIT would help with the former only. Rust on JSVM/.NET/JVM/Dart relies on the host platform to provide the underlying object system, reflection, interop with host code, GC etc.
Re:Show HN: Programming Google Flutter with Clojure by souenzzo on Tuesday December 06, 2022 @10:49AM (#33881982)
Re:Show HN: Programming Google Flutter with Clojure by pgt on Friday December 02, 2022 @09:16AM (#33830625)
Have a look at Carp for real-time applications: https://github.com/carp-lang/Carp

Carp is a statically-typed, GC-less Lisp that implements Rust’s borrow-checking. It is implemented in Haskell and compiles to C. It shares some syntax with Clojure, but I wish it was more Clojurey.

Re:Show HN: Programming Google Flutter with Clojure by kennytilton on Friday December 02, 2022 @09:35AM (#33830913)
Carp! A user just turned me onto that, I am looking at porting Matrix to Carp. Matrix started on Common Lisp in the last century. https://github.com/kennytilton/cells
Re:Show HN: Programming Google Flutter with Clojure by joshlemer on Friday December 02, 2022 @11:49AM (#33832959)
So basically https://jank-lang.org/ (assuming you don't mean literally it has to be Rust but just any LLVM clojure implementation)
Re:Show HN: Programming Google Flutter with Clojure by jiyinyiyong on Tuesday December 06, 2022 @12:17PM (#33883582)
I built a Clojure dialect in Rust called Calcit https://github.com/calcit-lang/calcit . It's ClojureScript at core, despite its indentation-based syntax.
Re:Show HN: Programming Google Flutter with Clojure by kennytilton on Friday December 02, 2022 @05:39AM (#33828850)
Thx! Full marks to the folks at Tensegritics for ClojureDart.

As for migration, Mr. Hickey made a small language, and that made CLJS and CLJD possible. Nice! Now they just have to bring CLJD under the CLJC umbrella...but I suspect that would be a stretch.