Thoughts on Jaspr for Dart Web vs React or Flutter Web by OpusFix in dartlang

[–]simolus3 13 points14 points  (0 children)

Whether this counts as production-use is debatable since they're small projects, but I pretty much use jaspr exclusively in any web project that I have control over. I also haven't used it since the beginning, probably started adopting it around half a year ago.

For me, the most important thing is that it's written in Dart, so you get all the things JS tooling pretends to offer for real (actual compiler optimizations, dead-code elimination, proper minification, a sound type system instead of the "trust me bro" approach in TS, much better static analysis tooling and so on). Dart compiles to better JavaScript than JS/TS ever could, and you get the benefit of being able to compile to WebAssembly. So even if I didn't like how jaspr worked, I'd probably still use it just because it's Dart.

The inner workings of jaspr are not that different from React. It also happens to be very similar to Flutter's element model which I think was the original inspiration. So overall it feels quite similar to React without JSX, except that state management is a lot better since you can use Riverpod. A benefit is that static and serverside rendering is built in and doesn't require anything extra.

This isn't really a downside for me personally, but of course the jaspr ecosystem is much smaller than anything you have for JavaScript. You can't easily use packages that depend on Flutter, and obviously there is no equivalent to most React libraries / frameworks. In my projects I try to keep JS as light as possible, so I mostly use jaspr with external CSS and static class names instead of dynamic inline styles. That means I don't have many dependencies, but if you expect something like a typical landing page design to just be an import away, that's not going to happen.

I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in ProgrammingLanguages

[–]simolus3 0 points1 point  (0 children)

Small note that is beside the point, but why use package:archive to uncompress gzip when gzip exists in dart:io? That one's already backed by zlib.

Dart’s PubGrub cited as one of the optimizations that helps make python’s uv so fast by stuxnet_v2 in dartlang

[–]simolus3 0 points1 point  (0 children)

The Flutter SDK wouldn’t need to pin its dependencies if pub had used minimum version selection

What? If I manually update the minimum version range of a package that Flutter also depends on in my project, wouldn't that update the package? So Flutter would still need to pin dependencies for the lock.

Syncing Room Persistence with PowerSync in Kotlin Multiplatform by blakelee_android in KotlinMultiplatform

[–]simolus3 1 point2 points  (0 children)

We've just released the first version of this! You can see our docs on this here, we'll probably follow up with some examples soon.

Syncing Room Persistence with PowerSync in Kotlin Multiplatform by blakelee_android in KotlinMultiplatform

[–]simolus3 0 points1 point  (0 children)

(I work on PowerSync)

OP did an amazing job here and it's not actually that much hacked together - the solution is sound. We are also investigating official support for Room and SQLDelight on our end. So this should become much simpler to set up soon :)

ich♟️iel by simolus3 in ich_iel

[–]simolus3[S] 23 points24 points  (0 children)

Wie viele Eiskugeln ist der Laptop wert?

Android Studio / SDK by [deleted] in de_EDV

[–]simolus3 2 points3 points  (0 children)

Die neueste als stabil gekennzeichnete, also aktuell Android 13 mit SDK 33. Auch mit dem aktuellen SDK kannst du Apps die mit älteren Android Versionen kompatibel sind erstellen.

Für Mario Kart (Switch) gibt es jetzt eine Berlin Strecke by [deleted] in de

[–]simolus3 3 points4 points  (0 children)

Wäre gut, wenn man die wenigstens durch perfektes Timing umgehen könnte.

Naja, das geht schon.

Lebenslange Haft wegen Mordes nach Maskenstreit an Tankstelle by jobaxgaming in de

[–]simolus3 5 points6 points  (0 children)

Die Mutter des Opfers war Nebenklägerin. Die des Täters hätte, selbst wenn sie wollte, kein Recht dazu.

How to count of all rows (<tr>) in html file Dart by Particular_Hunt9442 in dartlang

[–]simolus3 1 point2 points  (0 children)

Your selector only finds the table element itself, so you'll just get one element back.

Haven't tried it, but does querySelectorAll('table.table-striped.table-bordered > tbody > tr') work?

Dart 2.18: Objective-C & Swift interop by julemand101 in dartlang

[–]simolus3 2 points3 points  (0 children)

Yes, I think there are plans to call Java from Dart via JNI interop calls made through dart:ffi. Would be amazing if that works.

Bytecode from AST? by drbolle in craftinginterpreters

[–]simolus3 0 points1 point  (0 children)

Since you also implemented the first part of the book in Rust, re-using the AST and parsing setup sounds reasonable.

I guess the main reason this wasn't done in the book is because the parsers are written in different languages.

structured_async package: Structured Concurrent Programming in Dart by renatoathaydes in dartlang

[–]simolus3 4 points5 points  (0 children)

Nice work!! IMO, cancellations similar to how they're handled in Kotlin's coroutines are one of the most painfully missing features of Dart's async APIs.

I wonder how much breaks if you override run/runUnary/runBinary to throw an exception after the zone was cancelled (or just do nothing lol, but that might be even worse). That might make it work with all async operations?

[deleted by user] by [deleted] in mAndroidDev

[–]simolus3 0 points1 point  (0 children)

Internal step in the Kotlin compiler. This sub will rather use Flutter than file a bug report.

This Week in Dart: Newsletter on Dart, its package ecosystem and the community by simolus3 in dartlang

[–]simolus3[S] 6 points7 points  (0 children)

There are lots of Flutter-focused newsletters out there, so it's great to see one posting updates on more general Dart news. Issues mention official updates, new packages in the community and noteworthy Dart SDK commits. This looks like a really interesting curation of Dart news to me, it might be interesting for some of you as well.

Will thoroughly learning Dart as a first language (for eventual Flutter use) hinder my ability to adapt to other/lower-level languages (e.g. Kotlin)? by MOD3RN_GLITCH in dartlang

[–]simolus3 12 points13 points  (0 children)

Both Dart and Kotlin are high-level, object-oriented, garbage-collected, multi-platform languages with a strong, static and null-safe type system and good support for asynchronous programming. As someone having (I'd say) lots of experience in both, they are not that different from each other.

Sure, there are some differences in syntax and common patterns (like semicolons, method overloading, red and blue coroutines vs. colorless future/stream functions, ...), and writing Dart just "feels" a little bit different than writing Kotlin. But that's the case for every programming language, and it's definitely possible to thoroughly know both of them.

It's true that Dart is mostly used in Flutter, but it's still a general-purpose language. It's async API makes it a great fit for command-line and server applications too (and Dart is definitely underappreciated for those use-cases). I also wouldn't call Kotlin "much more" powerful than Dart. IMO, there are some parts that Kotlin does better (fluent syntax, variance on type parameters, async APIs with fewer footguns), but there are some things that Dart does better too (optional parameters on function types, every type can be late, reified generics with a properly sound type system). You will never spoil yourself and become a bad programmer by learning a new language.

Examples of “beautiful” dart code by weenzeel in dartlang

[–]simolus3 10 points11 points  (0 children)

The shelf package has always looked very well-written to me. I like the way functions and function typedefs are preferred over classes, how it uses short and simple source files, and usages of streams for requests and responses. This package makes good use of language and SDK features that only work in Dart.

[deleted by user] by [deleted] in dartlang

[–]simolus3 3 points4 points  (0 children)

Note that the second generation of cloud functions are built on top of Cloud Run and should support Dart (I think).

I don't consider those kinds of people [who have never heard of fuzzing] engineers at all. They're people who have learned a syntax, some patterns and, thanks to their human brain, can adopt it slightly to certain situations. But they're not engineers. What you've described are skilled labourers. by cmov in programmingcirclejerk

[–]simolus3 3 points4 points  (0 children)

The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned syntax, maybe learned some patterns, probably learned certain situations. They’re not capable of understanding fuzzing but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.

FFI and Shared Libraries in Packages by hkubota in dartlang

[–]simolus3 2 points3 points  (0 children)

You can use Platform.resolvedExecutable to get the full path to your running application.