Live data from Hacker News

Show HN: Programming Google Flutter with Clojure

github.com

61–70 of 93 posts

Re: Show HN: Programming Google Flutter with Clojure

#61

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!

So basically https://jank-lang.org/ (assuming you don't mean literally it has to be Rust but just any LLVM clojure implementation)

Re: Show HN: Programming Google Flutter with Clojure

#62

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

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 changed but so far I’m like, thanks I hate it.

Re: Show HN: Programming Google Flutter with Clojure

#63
post #34

Earlier quoted context omitted.

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

Do you know what is the relationship between Dart/Flutter and Kotlin? On paper, it seems that Dart/Flutter is a better choice in the context of mobile dev because it is cross platform. If I were to focus on Android exclusively, would Kotlin offer any advantages over Dart/Flutter?

I guess I am trying to understand why these two coexist, which one to learn, and how likely it is that Google will kill Dart/Flutter in the next 5-10 years.

Re: Show HN: Programming Google Flutter with Clojure

#64

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

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

Re: Show HN: Programming Google Flutter with Clojure

#65
post #34

Earlier quoted context omitted.

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

Do you know what is the relationship between Dart/Flutter and Kotlin? On paper, it seems that Dart/Flutter is a better choice in the context of mobile dev because it is cross platform. If I were to focus on Android exclusively, would Kotlin offer any advantages over Dart/Flutter? I guess I am trying to understand why these two coexist, which one to learn, and how likely it is that Google will kill Dart/Flutter in the…

Politics, go to Android SDK site, you will hardly find anything related to Flutter.

It is all about Java, Kotlin, C, C++, Web widgets and PWAs.

I am not a big Kotlin fan, the way Android has pushed it using their Android Java as counter example instead of supporting modern Java, however as JVM language it definitely has a broader industry support than Dart.

Re: Show HN: Programming Google Flutter with Clojure

#66

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…

`Center` is a result of Flutter having a coherent philosophy (design).

Specifically, instead of doing random mish-mash of layout (like in every other UI toolkit I know, including HTML), Flutter has a simple layout protocol that defines how a parent lays out it's children.

It's a simple, local protocol. ("local" means that the effect of layout is local to widget doing the layout, unlike in HTML where some layout properties effect more than just immediate children).

`Center` is a simple widget that lays out its child in the center of itself.

Why is it good and coherent design?

What if you need to position child 2/3rds on the X axis of the parent?

In Flutter you write (trivial) `Position23rdX` widget and you're done. An easy way to implement custom layout logic that plugs into a coherently designed layout protocol.

In HTML you can't. You can use layout properties that HTML gives or you're out of luck.

I've also worked (or dabbled) with win32 (no layout at all), WinForms, WPF, Cocoa, Gtk - none of them have anything like that.

Re: Show HN: Programming Google Flutter with Clojure

#67
post #33

Earlier quoted context omitted.

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

> Backwards compatibility is overrated, sticking to it too hard

While there is surely a very delicate balance of slowly deprecating a few things, remember that the only significant productivity booster is relying on existing code (as per Brooks).

I’m fairly sure there are orders of magnitude more Java code transpiled to JS running at Google than all of their Dart codebases combined, so not sure “random compilers” are a fair description.

Re: Show HN: Programming Google Flutter with Clojure

#68
post #65

Earlier quoted context omitted.

Do you know what is the relationship between Dart/Flutter and Kotlin? On paper, it seems that Dart/Flutter is a better choice in the context of mobile dev because it is cross platform. If I were to focus on Android exclusively, would Kotlin offer any advantages over Dart/Flutter? I guess I am trying to understand why these two coexist, which one to learn, and how likely it is that Google will kill Dart/Flutter in the…

Politics, go to Android SDK site, you will hardly find anything related to Flutter. It is all about Java, Kotlin, C, C++, Web widgets and PWAs. I am not a big Kotlin fan, the way Android has pushed it using their Android Java as counter example instead of supporting modern Java, however as JVM language it definitely has a broader industry support than Dart.

Very useful - thanks for answering!
Post reply on HN