135 karma · joined November 5, 2013
And Clojure and JS. Forty years of coding in NYC tall buildings and small start-ups. Ed tech (tiltonsalgebra.com) and fine-grained data flow (Cells and Matrix). BPM will change the world.
Popcorn left as an exercise.
I know, I have been beating on CLJD like I was its Daddy wrapping it in a reactive framework, despite their warning that there would be surprises. I had one problem that turned out to be a simple bug in CLJD.
I also follow their channel on the #clojurians Slack and see they are doing a profoundly deep job on the compiler. This means a robust product, not one that has developers forever looking over their shoulders at the language they are using.
Six months for that is nothing. Now send them eight dollars. jk. :)
cough Well, this article _is_ about a delightful Lispy alternative to Dart that compiles to Dart, yielding a superior language with Genuine Dart Inside(tm) and elegant support of Flutter.
Dart may end up living on inside ClojureDart, much like DOS living on deep inside Windows and PCs.
Happy opportunity for ClojureDart!
btw, in case anyone is wondering, I am not a part of Team CLJD at all. My hack is my own separate effort.
As for what I call the "Lego model" of UI construction, while definitely off-putting, I think the "why" is prolly "simplicity thru decomposition". So we do a bit more typing but have a dead simple approach to building our UIs.
The nice thing about any Lisp with its macro capabilities is that we can wrap sth like Flutter to produce a library that remains Flutter, but hides the noise.
ClojureDart offers a so-called "widget" macro, and my Matrix library goes a different way, making every constructor such as "scaffold" into a friendlier macro.
Please let me know what else you might like to see.
I see a lot of solutions in the Flutter ecosystem and none getting raves, so I decided to throw my "reactive first" Matrix[2] hat into the ring. Feedback welcome.
[0] https://github.com/mobxjs/mobx [1] https://github.com/ThoughtWorksInc/Binding.scala [2] https://github.com/kennytilton/mxtodomvc#readme
The one caveat I offered was "...but a REPL will be a selling point!" ROTFL
Seriously, when I want a REPL I hack the test code into "main" and comment out the UI launch. Then I edit and save and the output goes to my terminal nearby thanks to auto build/restart.
I know little about Dart/Flutter history, but it sounds like ClojureDart might do a lot for Flutter development if only for CLJD's stability.
Is there a state management solution in there? I looked at the Todo app and it looked like manual change propagation.
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.
I hang mostly on the Clojurians Slack if you get stuck, #clojuredart or #matrix channels.
The tersest write-up I have on Matrix is of the JS version, and all the demos are CodeSandbox if you want to play: https://tilton.medium.com/simplejx-aweb-un-framework-e9b59c1...
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 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.
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.
And my specific contrib, Matrix, handles state management and the whole reactive thing pretty well, one area where I see a bit of thrashing in the Flutter community. Check out the examples and esp. the TodoMVC demo, they cover quite a bit of ground.
Instead I get by with sub-second recompiles/reloads and print statements. It works great, tbh.
That said, Tensegritics is working on it.
My takeaway was that they successfully identified the small essence of the problem ("It's DAG, stupid!") and wrote a relatively few but intelligent lines of code to solve it. And they have gotten pretty far with the implementation.
God does not require rewrites of such.