Live data from Hacker News

Flutter desktop shells

github.com

311–320 of 322 posts

Re: Flutter desktop shells

#311
post #153

Earlier quoted context omitted.

I'm the PM for the Flutter developer experience. I'm currently digging into the next steps for our desktop experiment with Flutter and I'm very interested to hear how your xplat desktop app dev options fall short. What do you need from an xplay desktop app dev framework and toolchain? Chris Sells csells@google.com

Hi Chris, that's awesome! My (perhaps idiosyncratic?) priorities in order: - a ui programming model that is thoroughly thought-through. to be honest i think javafx fits this bill, it took long- hard-learned lessons from Swing but rebuilt things up from that learning. the scene graph api model imo is so ideal and then the way they build the widget/controls on top of that...creates a lot of flexibility yet remains simp…

Thanks for the input!

Re: Flutter desktop shells

#312

Earlier quoted context omitted.

Xerox Alto [1] had GUI, Smalltalk 72 dev env and TCP/IP networking in 1973. How much real progress has there been in software technology since then? [1] https://en.wikipedia.org/wiki/Xerox_Alto

Considering I can do extraordinarily more complicated tasks today, and a whole more of them, a lot. But we also missed a lot of good stuff that we used to have.

Is that an improvement in software, or just a result of hardware getting faster?

Re: Flutter desktop shells

#313
post #310

Earlier quoted context omitted.

A null is not a string or an integer or a MyClass instance, etc. So why does it pollute variables of all those types? https://medium.com/@hinchman_amanda/null-pointer-references-... https://www.infoq.com/presentations/Null-References-The-Bill... https://www.quora.com/Why-was-the-Null-Pointer-Exception-in-... https://www.lucidchart.com/techblog/2015/08/31/the-worst-mis...

Thanks. Stupid question but consider the following: entity = Entity.fetch(id) if (!entity) doSomething() Entity.fetch returns null if it doesn't find anything. How would this work without null?

The real problem isn't null itself, it's that in most languages that have it, null inhabits all types (or at least all reference types).

Different languages solve this problem in different ways. Many languages get rid of null entirely, and use option types in its place. Other languages, like Kotlin, fix it in the type system, by differentiating between e.g. String and nullable String (spelled String? in Kotlin) .

Re: Flutter desktop shells

#314
post #310

Earlier quoted context omitted.

A null is not a string or an integer or a MyClass instance, etc. So why does it pollute variables of all those types? https://medium.com/@hinchman_amanda/null-pointer-references-... https://www.infoq.com/presentations/Null-References-The-Bill... https://www.quora.com/Why-was-the-Null-Pointer-Exception-in-... https://www.lucidchart.com/techblog/2015/08/31/the-worst-mis...

Thanks. Stupid question but consider the following: entity = Entity.fetch(id) if (!entity) doSomething() Entity.fetch returns null if it doesn't find anything. How would this work without null?

You would still have null, but only when asked for and checked explicitly.

In Kotlin, for example, you mark something with a question mark to say that it can be null, which forces you to check for null before using it:

  val entityOrPossiblyNull: Entity? = Entity.fetch(id)

  if (entityOrPossiblyNull == null) {
      doSomething()
  }
  else {
      // The compiler knows that the variable is not null in this branch,
      // so this assignment is OK.
      val entityForSure: Entity = entityOrPossiblyNull

      doSomethingWithEntity(entityForSure)
  }

Re: Flutter desktop shells

#315

Earlier quoted context omitted.

Kotlin native/multiplatform projects is the answer

Its not though.. the only IDE is CLion which does not have a free version. Thats a showstopper for a lot of people. Its also pretty slow compared with other native solutions.

It actually works really well in IntelliJ Community Edition. There is a template for creating a new Kotlin/Native project, the auto-completion works and there is even unit testing support! Things have come a long way since the early days of compiling your own cinterop stubs and figuring out APIs from the generated wrappers. :)

If you want a debugger you need CLion, though. And the compiler is really, really slow – but they seem to be working on benchmarking things recently, so presumably it will be improved.

Re: Flutter desktop shells

#316
post #145

Earlier quoted context omitted.

As I write in https://www.reddit.com/r/rust/comments/9bapwt/thoughts_on_wh... I think the solution is to split in 2: A UI back-end with logic, layout, etc and a UI front-end renders in each UI native toolkit. So when write Button(title="hello") is NOT a widget, but a struct with data. It must be pushed to UI.Coccoa.render(button) to show up. But not only that, is possible to say: Form when(toolkit=UIKit) Field(UILabe…

That’s what ReactNative does

No. Almost.

You must buy the whole Package with react and others. You don't code normal UI on Swift and still be part of the react world.

Think is like build a JSON API. My idea is that. This mean that on the client, is full native (with some minimal coupling to the how transfer data).

Re: Flutter desktop shells

#317
post #310

Earlier quoted context omitted.

A null is not a string or an integer or a MyClass instance, etc. So why does it pollute variables of all those types? https://medium.com/@hinchman_amanda/null-pointer-references-... https://www.infoq.com/presentations/Null-References-The-Bill... https://www.quora.com/Why-was-the-Null-Pointer-Exception-in-... https://www.lucidchart.com/techblog/2015/08/31/the-worst-mis...

Thanks. Stupid question but consider the following: entity = Entity.fetch(id) if (!entity) doSomething() Entity.fetch returns null if it doesn't find anything. How would this work without null?

There are several ways. A popular one is an Optional type. Here's how Java does it: https://www.baeldung.com/java-optional

Re: Flutter desktop shells

#318

Earlier quoted context omitted.

Considering I can do extraordinarily more complicated tasks today, and a whole more of them, a lot. But we also missed a lot of good stuff that we used to have.

Is that an improvement in software, or just a result of hardware getting faster?

Very much an improvement in software too.

Compare a 1980 compiler with the optimizations GCC and LLVM make.

Or v8 with the best interpreter in 1990.

Or video codecs (almost non existent then). Or cryptography code (immensely improved). Or the capabilities of InDesign compared to a 1990 DTP. Or Photoshop compared to crude editors in the 80s. Or modern GCs versus crude 80s and 90s GCs. Or a modern DAW compared to 1990s midi apps...

Re: Flutter desktop shells

#319

Earlier quoted context omitted.

FreePascal with Lazarus, the true cross-platform GUI framework is similar to Delphi's VCL or .Net's WinForms, it's been in active development for over a decade, and you compile your program into native machine code to a lot of platforms. https://www.lazarus-ide.org/

Yeah but then you have to write every library you'll need, since the ecosystem is tiny.

Of course the ecosystem is smaller than big names such as Python, but saying that you have to write every lib is exaggerated and simple not true.

Re: Flutter desktop shells

#320

Earlier quoted context omitted.

One nice think about Dart I've found is that compile times are very fast (faster than Go) and when editing in VSCode the code intelligence is instant and 100% accurate in my experience. Compare that to Rust where compilation speed is almost as bad as C++, RLS is slower than e.g. Qt Creator's clang lints, and has auto-completions so innaccurate that they are almost worse than nothing. Buuut.... I wanted to make a deep…

> In C++ you just do `auto a = b;`. Sure, but does it do what you want ? :) If that map contains pointers or other types with "interesting" assignment semantics, then your idea of a deep copy and that author of that type's idea may not be the same. Cloning is a surprisingly hard problem. The two languages you compare to don't have GCs and prefer value semantics. But in most GC languages, everything is by reference an…

> your idea of a deep copy and that author of that type's idea may not be the same

Definitely true that they may have done something weird, but I think the idea of a deep copy is pretty easy to define: It should not be possible to modify the original object using only the deep copy. (Note that this doesn't preclude copy-on-write, etc.)

I think it is quite weird that so few languages (even GC'd ones) provide a proper solution for this. It's clearly a thing people want to do.

Post reply on HN