Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mraleph
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
mraleph
7y ago
Dart VM is written primarily in C++. There is bytecode, but the story here is kinda complicated - there are actually 2 different versions: one is called DBC and is used during development of Flutter applications on iOS, there is another cal
32.
▲
by
mraleph
7y ago
> Is it possible to work with Flutter using Typescript, or is it Dart only? You might be thinking that Flutter underneath is using JavaScript - to which Dart compiles. However this is not how Flutter works, there is no JavaScript involve
33.
▲
by
mraleph
8y ago
Yes, your intuition is correct. The way it works in Dart VM is like so: Each loop has an interruption point somewhere (e.g. in the header). If a very hot loop is found VM would enter runtime at that interruption point, where it would synchr
34.
▲
by
mraleph
8y ago
That is fairly classical thing to do - a lot of VMs, including JVM and JS VMs do OSR.
35.
▲
by
mraleph
8y ago
Non-nullability is actually being actively worked on[1]. Currently language team is working on specifying the feature and figuring out the path towards it. [1] https://github.com/dart-lang/language/issues/110
36.
▲
by
mraleph
8y ago
There is the "static immutability" proposal[1] which is related to concurrency. However it is correct that there is no single issue that just says "Make Concurrency Awesome". I believe that we already have necessary buil
37.
▲
by
mraleph
8y ago
I am not a language designer myself, but I think "avoid overwhelming" was an explicit idea behind initial design of Dart. Yes, this led to a language that some might consider boring, but it also led to a language that a lot of peo
38.
▲
by
mraleph
8y ago
When you say "JIT compilers are notoriously tricky to implement" what, I think, you actually mean is "optimizations for dynamically typed languages are notoriously tricky to implement". If the language you need to compil
39.
▲
by
mraleph
8y ago
That's because compiling non-C++/Rust-like language to WASM is unpleasant and associated with completely unneccessary overheads.
40.
▲
by
mraleph
8y ago
Dart does not use LLVM anywhere in its toolchain.
41.
▲
by
mraleph
8y ago
> dropped their custom runtime Dart VM is very much alive, nobody dropped it - it's used by Flutter to run Dart code, used by all Dart CLI tools (and Flutter CLI tools too) and on server side underneath pub.dartlang.org (and used on
42.
▲
by
mraleph
8y ago
Is C# statically typed?
43.
▲
by
mraleph
8y ago
> I have personally gone through and fixed hundreds of these runtime failures. An interesting question here would be how many of those hundreds of failures were actual bugs and how many were just were just side effect of changing "d
44.
▲
by
mraleph
8y ago
Works just fine in Safari and Firefox Nightly for me. Consider reporting your browser configuration to the author? [1] [also notice that it is in no way affiliated with Flutter and done by somebody in the community] [1] I can't find an
45.
▲
by
mraleph
9y ago
but I am not talking about the percentage increase I am talking about increase "by a factor of X" that is X = B/A. See: https://ell.stackexchange.com/a/52747 Maybe my problem is that I am missing "b
46.
▲
by
mraleph
9y ago
I am not a native speaker, so I was always under impression that "factor of K larger" means something was X and became K * X (e.g. the multiplicative factor was 1 and became X). Can I read somewhere about the correct usage?
47.
▲
by
mraleph
9y ago
> completely neglected code maintainability Where did I neglect maintainability as a factor? The only optimization that potentially affects maintainability is manually allocating Mapping-s in the typed array. And there I openly acknowled
48.
▲
by
mraleph
9y ago
Flutter has the builtin ability to mimic platform conventions (Android on Android, iOS on iOS), which includes scrolling, animations, fonts, etc. If you have an Android phone you can download Flutter Gallery app from Play Store, go to the m
49.
▲
by
mraleph
9y ago
It's a mobile UI framework for creating Android and iOS applications from the same code base. Here is a good introductory video: https://www.youtube.com/watch?v=fq4N0hgOWzU
50.
▲
by
mraleph
9y ago
I don't think you can avoid JavaScript even with WASM - and WASM in it's current form is, for some languages, a worse compilation target than JavaScript.
51.
▲
by
mraleph
9y ago
Not irrelevant. Question for you, is this more legible: https://twitter.com/mraleph/status/965686742614462466 I can update CSS if that helps. UPD. Updated CSS to use non monospace fonts for the body.
52.
▲
by
mraleph
9y ago
The math is not that obvious because Rust implementation does not match 1-1 what baseline JS version was doing (e.g. it sorts only generatedMappings and not originalMappings). I will do measurements later to compare and update the post.
53.
▲
by
mraleph
9y ago
FWIW, quick look at Rust code actually reveals that that implementation is also different algorithmically from what I was optimizing, e.g. it only sorts generatedMappings array. In reality it means that performance of my code should not be
54.
▲
by
mraleph
9y ago
I should mention in the post that source-map version that relies on WASM actually requires you to manually manage lifetime of SourceMapConsumer object[1], which my change does not actually require because the memory object is encapsulated w
55.
▲
by
mraleph
9y ago
[Thank you for reading the post! I am glad you enjoyed it] All optimizations in the post can mostly be divided into three large groups: 1) algorithmic improvements; 2) workarounds for implementation independent, but potentially language dep
56.
▲
by
mraleph
9y ago
> but isn't expressive enough for a modern language. What do you miss?
57.
▲
by
mraleph
9y ago
> Scripts for GC languages wouldn't be compiled directly for WebAssembly -- their runtimes would It is not a walk in the park to compile runtime into WebAssembly (unless you are just compiling an interpreter). Performant runtimes us
58.
▲
by
mraleph
9y ago
You can still do d8 --trace-turbo \ --trace-deopt \ --code-comments \ --redirect-code-traces \ --redirect-code-traces-to=code
59.
▲
by
mraleph
9y ago
> is like IRHydra It does 'IR' part of the IRHydra, but it does not give you another important feature - ability to see how your function evolved over time and figure out reasons for it. Loading files one by one in search for t
60.
▲
by
mraleph
9y ago
Yes and no. "Yes" because JS decorators are indeed very local - they apply to what they decorate. "No" because JS decorators are still imperative. Essentially when you write @D class A { } this simply means some
More ›