Live data from Hacker News

Show HN: Programming Google Flutter with Clojure

github.com

81–90 of 93 posts

Re: Show HN: Programming Google Flutter with Clojure

#81

Are you basically saying that I can build my front end using clojure? 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

Building your frontend in Clojure has been possible for a while, see this announcement 11 years ago: https://www.clojure.org/news/2011/07/22/introducing-clojures...

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.

Re: Show HN: Programming Google Flutter with Clojure

#82
post #79

Earlier quoted context omitted.

Just to add on, Kotlin also does have some (limited) multi-platform features, with potential to build on for more. Honestly, Flutter is an amazing framework conceptually, but Dart may prove to be its demise. I just hope there is a possibility for Flutter based on Typescript or Kotlin in the future.

That is impossible, because Flutter is written in Dart on top of Skia, most Dart 2.0 features have been done to improve that development experience, using any other language means basically a full rewrite.

I know that.... But apparently with all the issues Flutter has, there is a possibility that a full rewrite will be absolutely necessary to rectify them.

Re: Show HN: Programming Google Flutter with Clojure

#83
post #78

Earlier quoted context omitted.

but not static mem allocation

It surely does, including stack values. That is the thing, Lisp is not only lists unless one is stuck using Lisp 1.5.

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

#84

Earlier quoted context omitted.

I remember reading on the docs that Flutters ui architecture (& philosophy?) was inspired by React

Oh I should have been more explicit when I said that. I really like the reactive model - the idea that the UI is a function of application state is [chefs kiss]. I love it. However, the idea that you need a “Center” widget just to position an item to the center of its parent…it just feels like GUI development took a major step backwards. I really can’t grasp why that decision was made. I’m open to having my mind chan…

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.

Re: Show HN: Programming Google Flutter with Clojure

#85

Earlier quoted context omitted.

How come? What's so bad about dart?

Off the top of my head, no access modifiers (so private variables, for example, are prefixed with `_`, by convention, not enforced by the compiler), no pattern matching (and obviously no exhaustive matching), no record types, no sum types, no json (de)serialization (requires 3rd party libary code gen, wow), mutability everywhere, everything is a statement (i.e. no implicit `return`, AKA everything is an expression),…

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.

Re: Show HN: Programming Google Flutter with Clojure

#86
post #79

Earlier quoted context omitted.

That is impossible, because Flutter is written in Dart on top of Skia, most Dart 2.0 features have been done to improve that development experience, using any other language means basically a full rewrite.

I know that.... But apparently with all the issues Flutter has, there is a possibility that a full rewrite will be absolutely necessary to rectify them.

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

Re: Show HN: Programming Google Flutter with Clojure

#87

Earlier quoted context omitted.

You posted this as a reply to cgrand saying they would need resources to go any faster. Yes it’s not ready yet so you’ll need to wait (or provide resources). Paraphrasing your memory of their prior time estimate on Slack seems a non sequitur - what is your intended point?

Parent comment says: REPL is a priority to me, do you have that? cgrand's comment says: Not yet, but probably soon! Here's a link to donate My comment says: Before you donate, here's some context for what "soon" likely means Your comment says........?

No cgrand didn’t say it’s coming soon, he said they’re working on it and donate to get it “sooner.” Is it possible you are having similar accuracy issues recalling what he said on Slack months ago?

Re: Show HN: Programming Google Flutter with Clojure

#88

Earlier quoted context omitted.

Not yet but we are working on it. Sponsor ClojureDart to make it happen sooner! https://github.com/tensegritics/ClojureDart

FWIW, I tried ClojureDart a little while back, had a good time, but thought to myself, "I'll be back when they have a REPL working." At that time you guys were saying things in the Slack like, "We already have a working prototype behind closed doors, it just needs polish. We'll be ready to release it soon." It was very exciting. That was... six months ago. :) So... I guess I'll keep waiting.

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

Re: Show HN: Programming Google Flutter with Clojure

#89
post #53

Earlier quoted context omitted.

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 rus…

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.

Like this one? https://github.com/babashka/sci/blob/master/doc/libsci.md

Re: Show HN: Programming Google Flutter with Clojure

#90

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.

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!

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.
Post reply on HN