Better HN
topnewbestaskshowjobs
Log inSign up

kennytilton

135 karma · joined Nov 5, 2013 (13y ago) · 93 submissions

Have Lisp. Will travel.

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.

Submissions

comment 2y ago · link · parent

I have written a couple of 80kloc Common Lisp apps. Not a problem. But we all are used to what we are used to, and anything different offends.

comment 3y ago · link · parent

Working eight tickets in thirty minutes, while yapping away about Flutter/MX, a sophisticated state manager wrapping Flutter, thanks to a Clojure implementation that compiles to Dart: https://youtu.be/18AbXfQdq68 . The product? The flutter_tts (text-to-speech) demo rethunk.

Popcorn left as an exercise.

3.

Live Coding of Flutter. Using a Lisp(youtube.com ↗)

4 points · by kennytilton · 3y ago · 1 comment

comment 3y ago · link · parent

I definitely identify with addressed concerns over the hassles of my go-to debug approach, viz. print statements. I have a rather intense state engine that, when things go awry, can be brutal to debug with prints. But now I am doing ClojureDart, which I know is on the FS roadmap. The state engine is stable these days, but if it misfires before you get to CLJD, forgive me if I swipe your idea and roll my own ad hoc, informally-specified, bug-ridden, slow implementation of half of FlowStorm. Maybe a tenth.

comment 3y ago · link · parent

FYI, they recently resumed activity on Hoplon. Good to see!

comment 3y ago · link · parent

(a) Is six months a long time? (b) And then they delivered successfully. (c) Not seeing a problem.

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. :)

comment 3y ago · link · parent

"a full rewrite will be absolutely necessary"

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.

comment 3y ago · link · parent

As a Dart/Flutter outsider myself, I am finding all this "Dart no, Flutter yes" traffic intriguing. I am also a lisper, so no need to sell me on the difficulties of Dart, even if it were the perfect static typed OO, but it sounds like we have a great UI stuck inside an unloved language.

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.

comment 3y ago · link · parent

I agree "UI = f(state)" rocks. That was the one thing React got right. But they never worked out state management, other than to kick off the Flux monstrosity that Redux ran with, and every other UI I can find.

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.

comment 3y ago · link · parent

By popular request, a video[0] of my workflow using ClojureDart and Matrix to live code Flutter. The last few minutes show me probing a new bug! I experiment, and find a partial workaround that hints at a solution.

[0]: https://www.youtube.com/watch?v=qQiTfIc7nDo

comment 3y ago · link · parent

Voila! https://www.youtube.com/watch?v=qQiTfIc7nDo

Please let me know what else you might like to see.

comment 3y ago · link · parent

I think the original MobX[0], not MobX State Tree, and perhaps binding.Scala[1], did well on state management, but not many libraries do.

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

comment 3y ago · link · parent

It's my fault. And other active users. Tensegritics polled us on what we wanted first -- Tensegritics is neither Oracle nor Google -- and we all had a REPL in last place.

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.

comment 3y ago · link · parent

This reminds me so much of the ClojureScript "win". I love that JS is rounding into shape as a serious language, but the version turmoil! CLJS was "done" when it came out, so the CLJS developer is insulated from any churn.

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.

comment 3y ago · link · parent

Wow! Coconut alone looks impressive.

Is there a state management solution in there? I looked at the Todo app and it looked like manual change propagation.

comment 3y ago · link · parent

Answering another question about Flutter variability I remembered that that variability requires a bit of custom wrapping per widget for Matrix goodness. ClojureDart is fine, but my Matrix macros try to bring in a little HTML-ish uniformity.

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.

comment 3y ago · link · parent

Mark! How are you! Yes, my heart belongs to Common Lisp, but Clojure has macros and the parens are in the right place..."well enough" says it all.

I hang mostly on the Clojurians Slack if you get stuck, #clojuredart or #matrix channels.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

The huge thing that encouraged me to port my Matrix library to CLJD was that I saw the Flutter community did not have a consensus reactive solution.

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...

comment 3y ago · link · parent

I think everybody but MobX and my Matrix hack lives off setState, so to that extent yes. But React embraces the HTML API in the form of JSX. Flutter designers were in an OO world and seemed to just wing it as they got to each widget. I can tell you, wrapping HTML (and React) was much easier, and I have many widgets to go!

comment 3y ago · link · parent

I think I know what you mean. I would not say it is incoherent, but it does not have the extreme uniformity of <tag> attributes> children </tag>. I actually bring some of that back in my Flutter/MX extension to CLJD. :content, :child, :body, and more all are expressed uniformly _and_ implicitly by nesting. Check out the examples.

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!

comment 3y ago · link · parent

I believe Tensegritics already has an app up on the app store based on early ClojureDart. I run screaming before apps have to be deployed, so please check with them on that. They hang out on the Clojurians Slack. My reactive hack is over twenty years old so it is pretty solid, should be OK if you want to throw that into the mix. ps. You are welcome!

comment 3y ago · link · parent

The tl;dr is, on the Mac, (1) start their Simulator app; (2) start a build with watch in the app root directory; and (3) edit code as usual (IntelliJ/Cursive).

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

I think you have made the case for ClojureDart. Clojure does not do the Typescript strong typing thing, but it meets the "Not Dart" requirement pretty well.

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.

comment 3y ago · link · parent

Will do! Any specific things you like to see in workflow vids? Otherwise I'll just do the obvious stuff. I will reply here when I have something for y'all.

comment 3y ago · link · parent

Yep, REPL is always great, but tbh even with ClojureScript (atop JS) I have never taken the trouble to figure out how to get a CLJS REPL going, though I am told it is possible. :)

Instead I get by with sub-second recompiles/reloads and print statements. It works great, tbh.

That said, Tensegritics is working on it.

28.

Show HN: Programming Google Flutter with Clojure(github.com ↗)

159 points · by kennytilton · 4y ago · 89 comments

comment 4y ago · link · parent

"I'm heartened to hear what you have is 2k lines, it will make a re-write much less painful if it's needed :)"

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.

comment 4y ago · link · parent

Worse, I am pretty sure. That counter is what spawned the Flux architecture. Because React had no solution, mind you.
1234