Live data from Hacker News

Show HN: Programming Google Flutter with Clojure

github.com

41–50 of 93 posts

Re: Show HN: Programming Google Flutter with Clojure

#41

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!

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

#42
post #5

Ah Flutter. I burned a month making silly apps with it, but then I realized that I would probably be better off learning any other programming language than Dart (careerwise at least)

I don't mind Dart, but I'm about a month into Flutter and so far, their approach to UI seems completely insane. It just feels like there's no coherent philosophy backing it.

I think I know what you mean. I would not say it is incoherent, but it does not have the extreme uniformity of attributes> children . 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!

Re: Show HN: Programming Google Flutter with Clojure

#43
post #38

Earlier quoted context omitted.

i dont understand what you mean

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.

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

#44
Consider: https://flet.dev/ + https://coconut-lang.org/

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"

Re: Show HN: Programming Google Flutter with Clojure

#45

Earlier quoted context omitted.

I don't mind Dart, but I'm about a month into Flutter and so far, their approach to UI seems completely insane. It just feels like there's no coherent philosophy backing it.

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

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!

Re: Show HN: Programming Google Flutter with Clojure

#46

Earlier quoted context omitted.

I can confirm the experience and I've used dart on multi month projects twice now : first time when it was the JS replacement and using AngularDart back in the angular 2 beta days - it was ahead of the curve at the time with tooling (compared to JS world), but it went nowhere because of poor design choices. Then they decided to salvage the team and made flutter with it - the technical reasons of chosing it over JS so…

Oh this totally reminds me of the BLoC pattern[0][1] that everyone kind of... really gritted their teeth through. It just wasn't at all an appealing way to structure data flow and I was kind of surprised that it was the architectural choice that was being pushed. 90% of the time, it felt like simple IoC plus an app-wide singletons would have been enough for most apps-- trying to get everyone to aadopt BLoC was painfu…

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

Re: Show HN: Programming Google Flutter with Clojure

#47
post #41

Earlier quoted context omitted.

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!

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.

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

#48

Hello Kenny, that looks cool. I will try it later today. 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…

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.

Re: Show HN: Programming Google Flutter with Clojure

#49

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

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.

Re: Show HN: Programming Google Flutter with Clojure

#50

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.

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