So, yes, we can now program Flutter with a Lisp. Yay.
Project includes dozens of working examples and a full implementation of the TodoMVC classic to help tire-kickers play around.
Support installing freely available on the #matrix channel on the Clojurians Slack.
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.
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.
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!
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 ?"
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.
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.
I really want to learn clojure and use flutter for a personal project... are there are any reasons not go down this path? (E.g. the "official" implementation of flutter is more secure?, etc.)
Thank you for the cool project
Unless I misunderstand your question, this has already been possible for some time: ClojureScript + React/React Native.
There are some impressive videos illustrating this. The devil is in the tooling and setup, but once that is in place the pace and ease of development looks great.
It's really amazing to make a code change in my text editor and see the UI on my mobile app update instantly.
ClojureScript & the user base has since steadily grown and improved and people have been shipping serious production applications with it for a long time now.
Matrix has many widgets yet unwrapped, but I will document the wrapping process and support any user by doing the wrapping myself. I also have in mind developing a Dart tool to generate wrappers automagically.
tl;dr: ClojureDart is in great shape, Flutter/MX is solid but needs more widgets wrappe.
OTOH, so far I am OK with the idea of forever adding nested widgets just to add some styling, and making children implicit makes the code look less "busy", but look for me to sneak in soon a DIV macro supporting the classic HTML attributes. That will be fun!
The type system was verbose yet relatively weak in comparison to something like Typescript, it'd already been rewritten once (which isn't a bad thing), and it was almost unusable outside the platform (I remember trying to write tests for something using sqlite.dart and then realizing that you just... couldn't).
Flutter is an amazing technical achievement, and to some extent so is Dart (there's a great talk from strangeloop about it) but I just... want to be able to use anything but Dart in there. Being able to use Typescript with Flutter would be heaven (JS compatibility was something in early versions of Dart that was removed).
If you like Java 8 and earlier you'll probably feel at home with Dart.
Obviously I'm biased, but I find Dart to be one of the most unpleasant languages I've had the misfortune of being exposed to; this despite Flutter and its instantaneous hot code reloading being quite amazing -- a bizarre mix of promise and despair.
[1] https://github.com/dart-lang/language/blob/master/resources/...
TL;RD; Functional Python on top of Flutter
From https://github.com/flet-dev/flet:
" Deliver to any device Deploy Flet app as a web app and view it in a browser. Package it as a standalone desktop app for Windows, macOS and Linux. Install it on mobile as PWA or view via Flet app for iOS and Android."
From https://coconut.readthedocs.io/en/latest/HELP.html:
"Specifically, Coconut adds to Python built-in, syntactical support for:
pattern-matching
algebraic data types
destructuring assignment
partial application
lazy lists
function composition
prettier lambdas
infix notation
pipeline-style programming
operator functions
tail call optimization
where statements"
Is there a state management solution in there? I looked at the Todo app and it looked like manual change propagation.
I was very keen on Flutter a few years ago until a version bump broke my one application and I never spent the time to fix it.
Clojure is far from my favorite Lisp, but I like it well enough. What will sell your project to me is how nice the dev process is. I love Common Lisp and Scheme dev process, but I struggle to get the same level of happiness with Clojure.
Looks like a nice project!
I hang mostly on the Clojurians Slack if you get stuck, #clojuredart or #matrix channels.
(Please say yes, please say yes, please...)
That was... six months ago. :) So... I guess I'll keep waiting.
Instead I get by with sub-second recompiles/reloads and print statements. It works great, tbh.
That said, Tensegritics is working on it.
Please let me know what else you might like to see.
The app rebuilds/reloads on save. Tensegritics is looking at better hot reloading; I am happy with automatic full restarts.
Flutter offers a couple of endpoints to visit for debuggers, but I just live off print debugging in the build console.
Video ASAP.