Live data from Hacker News

Show HN: Programming Google Flutter with Clojure

github.com

51–60 of 93 posts

Re: Show HN: Programming Google Flutter with Clojure

#51
post #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 : "Spe…

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.

Re: Show HN: Programming Google Flutter with Clojure

#52

Earlier quoted context omitted.

With regards to records, you only need to wait for it: https://github.com/dart-lang/sdk/commit/99f60a5e662a7951dd5a...

I mean they basically have a single purpose programming language (AFAIK Flutter is the only relevant use case) and it is taking them years to add ergonomic improvements to the language that would make day to day dev much easier. Meanwhile they spent colossal effort and broke half of community packages (including a bunch of first party ones) with null safety. I'd say go for low hanging fruit first. Because the languag…

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.

Re: Show HN: Programming Google Flutter with Clojure

#53

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!

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.

Re: Show HN: Programming Google Flutter with Clojure

#54

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.

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.

Re: Show HN: Programming Google Flutter with Clojure

#55
post #38

Earlier quoted context omitted.

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)

Common Lisp supports gradual typing.

Re: Show HN: Programming Google Flutter with Clojure

#56
post #33

Earlier quoted context omitted.

Dart is at least adding new features relatively quickly (just recently they started working on immutable record data structures with pattern matching, which even TypeScript doesn't have yet) and soon they'll have static metaprogramming meaning you can have Lisp like macros to create your own syntax, including algebraic data types as in any functional language. That is really what people are looking forward to. Anothe…

It is easy to iterate fast on language design when you don’t care about backwards compatibility. > Very few languages can do all 4. JVM ones can't Java can (JIT is trivial, for AOT there is among others Graal, for JS and WASM there is TeaVM (which works on class files, so now that I think about it, pretty much every JVM language can do all platforms), but also the very great Closure compiler (j2cl) which has no relat…

Backwards compatibility is overrated, sticking to it too hard is how we get stuff like JS or C++ that have ten different ways of doing the same thing. I'd much rather a language be improved and break sometimes than to convolve around keeping strict BC. Anyway, they have good BC support since Dart 2 released several years ago so I'm not worried.

With your Java example, that's exactly what I mean, you don't need 4 different tools in Dart to achieve the 4 types of compilation, they're all included in the standard Dart compiler/SDK. Sure, if we go by your definition, probably any language has some level of support for each via various random compilers but I'm talking about something first-class, built-in.

Re: Show HN: Programming Google Flutter with Clojure

#57

Earlier quoted context omitted.

With regards to records, you only need to wait for it: https://github.com/dart-lang/sdk/commit/99f60a5e662a7951dd5a...

I mean they basically have a single purpose programming language (AFAIK Flutter is the only relevant use case) and it is taking them years to add ergonomic improvements to the language that would make day to day dev much easier. Meanwhile they spent colossal effort and broke half of community packages (including a bunch of first party ones) with null safety. I'd say go for low hanging fruit first. Because the languag…

I'd rather take sound null safety over records. To say it's taking them years is disingenuous when they've mainly been working on null safety all this time, not twiddling their thumbs.

Re: Show HN: Programming Google Flutter with Clojure

#58
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 find the state management in flutter needlessly complicated and I don't see why they threw out decades of GUI development wisdom

Re: Show HN: Programming Google Flutter with Clojure

#59

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

> Are you basically saying that I can build my front end using clojure?

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.

Re: Show HN: Programming Google Flutter with Clojure

#60

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…

Why are people using BLoC? I thought Provider and now Riverpod are what was recommended, which are the global singletons you're talking about.
Post reply on HN