Live data from Hacker News

Show HN: Programming Google Flutter with Clojure

github.com

31–40 of 93 posts

Re: Show HN: Programming Google Flutter with Clojure

#31
post #18
post #8

Earlier quoted context omitted.

Easy, its only purpose to exist is for doing Flutter apps, there is hardly any significat use of Dart outside of Flutter.

It does predate Flutter by five or so years but I do agree that it doesn't have much of a reason to exist outside of that now. I would love to have been a fly on the wall when the decision was made to choose Dart.

It does, and had AdWords not rescued Dart from being killed, it wouldn't even be an option for Flutter.

Re: Show HN: Programming Google Flutter with Clojure

#32

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…

Also, if everything would be ARC then it would be slow as all hell and would leak (it can’t GC circular references)

Re: Show HN: Programming Google Flutter with Clojure

#33

Earlier quoted context omitted.

The last time I used Dart, it felt like the worst parts of C# + Java put together somehow. The type system was verbose yet relatively weak in comparison to something like Typescript, it'd already been rewritten once (which isn't a bad thing), and it was almost unusable outside the platform (I remember trying to write tests for something using sqlite.dart and then realizing that you just... couldn't). Flutter is an am…

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 relation to cloJure, made and used heavily by google)

Re: Show HN: Programming Google Flutter with Clojure

#34
post #18

Earlier quoted context omitted.

It does predate Flutter by five or so years but I do agree that it doesn't have much of a reason to exist outside of that now. I would love to have been a fly on the wall when the decision was made to choose Dart.

Didn't it have something to do with Dart being pushed as Google's pet language? I have heard arguments that it was chosen because TS is Microsoft's pet, while Oracle was having a picnic with Java (this was around the time of the Google-Oracle saga). Dart was seen as a way for Google to be independent of both, and Kotlin wasn't developed yet at the time, hence Flutter went with Dart.

It is a bit more convulated than that.

Dart was being pushed as JavaScript replacement, back when everyone had one.

However Chrome team failed to push ChromiumVM and eventually the project was ramped down, by then AdWords had made a massive investment moving from GWT into AngularDart, so they rescued the project.

Eventually Flutter, initally prototyped in JavaScript, moved into Dart, and they also decided to change the language semantics from dynamic language with gradual typing (Dart 1.x), to static typing with type inference (Dart 2.0).

Somewhere alongside this timeline, many well known names from language design like Gilad Bracha and Kasper Lund, well known for favouring dynamic languages, left the project.

Kasper Lund's latest project, is not surprising also a dynamic language, https://toit.io/

Re: Show HN: Programming Google Flutter with Clojure

#35
post #15

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!

It is called Common Lisp and Scheme.

i dont understand what you mean

Re: Show HN: Programming Google Flutter with Clojure

#36

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…

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 language is so limited it's impossible to solve this via library, unlike say JavaScript.

Re: Show HN: Programming Google Flutter with Clojure

#37
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 remember reading on the docs that Flutters ui architecture (& philosophy?) was inspired by React

Re: Show HN: Programming Google Flutter with Clojure

#38
post #15

Earlier quoted context omitted.

It is called Common Lisp and Scheme.

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.

Re: Show HN: Programming Google Flutter with Clojure

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

Looks like a nice project!

Re: Show HN: Programming Google Flutter with Clojure

#40

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

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