👋compiling compilers @Google overall tech lead for the @dart_lang programming language

Aarhus
me developing software (2022 edition)
4
8
94
I would not recommend sending kisses emoji to people with Firefox OS
124
10,542
9,097
No SciFi author foresaw this: we are building clans around languages we speak to the Machine.
41
2,334
1,319
I think I had enough of blogging, now lets try something with a plot
21
90
475
"Maybe you don't need Rust and WASM to speed up your JS" mrale.ph/blog/2018/02/03/may…
12
183
466
Today I am stepping into a new role on the @dart_lang team: I will be taking care of overall technical direction of the project as an uber-TL. Very excited to work across the whole Dart platform and together with my Flutter peers tackle all the challenges ahead of us.
64
17
467
16,079
behold: the cleanest piece of JavaScript you have seen in your life
18
127
355
"recent studies showed that humans are using only 15% of C++ features... it is also estimated that dolphins are capable of using 20% of C++"
12
475
323
latency numbers every programmer should know
3
261
242
- My salary allows me to buy a 130m apartment in SF. - 130 m^2 you wanted to say? - No, my salary is not enough to break into 2nd dimension.
2
154
242
In 2.15 we finally enable lightweight isolates (isolates that look isolated to developer - but share garbage collected heap internally) across all execution modes. This has been 3 years of deep work in the very guts of our runtime system 🎉🎉🎉
🥳 Announcing Dart 2.15 🥳 Learn all about new Dart SDK features: ✔️ Faster concurrency with worker isolates ✔️ Constructor tearoffs ✔️ Improved enums ✔️ New features for package publishers Read the article by @MiSvThgoo.gle/3IwOJBN
10
26
224
If you like @dart_lang and @FlutterDev the best you can do is to build new things with them - the code will outlive and outweight any and all Twitter discussions. Don't waste your time arguing - put it to better use: dream and create.
6
27
210
10,593
presented without a comment
7
137
168
here are my #GOTOChgo slides mrale.ph/talks/goto2015/, mostly already seen examples but also some new
12
142
173
best kept #golang secret: their backend is written using abstraction over types, which they deny to the developers #trololol
4
92
169
And so 4301 days after I pre-ordered it for the first time, it has finally arrived
5
10
175
30,143
so I made this gdb patch
6
181
165
often devs still approach performance of JS code as if they are riding a horse cart but the horse had long been replaced with fusion reactor
7
142
158
Please use Dart outside of Flutter more :)
Replying to @mraleph @dart_lang
You guys should encourage Dart use outside of Flutter more.
21
14
158
23,600
Remember I said I would not be bothered by nonsense benchmarks? I lied.
13
24
149
15,421
language design choices are not made by counting emojis under GitHub issues
12
11
140
When I did most recent AMA about @dart_lang, I have dodged most questions about macros - I had to do it because I could not yet give those that asked a full answer. We unfortunately decided to stop the effort, and refocus [1/2]
8
14
146
13,860
skills you need to know as a software engineer: 1) empathy 2) reading unfamiliar code 3) asking the right questions 3) zooming in and out on the big picture 5) sometimes it helps to know how to count.
7
27
135
["10 years at Google" a thread] so 10 years ago on 24 of February 2010 I crossed Danish border for the first, second and third time in my life. All within 30m... It was because I forgot my laptop on the pre-border security check, and had to go back to pick it up (1/n)
3
9
135
are you working with Dart/Flutter and suffering from slow IDE / completion / analysis? You feel like the tooling does not scale for your code base? I am looking to chat with people who are in this spot.
31
18
136
imagine the world where people easily admit that their favorite programming language is not the best tool for every job and every developer
8
36
123
javascript performance tips and tricks
6
66
120
do *not* use custom platform packages developed by third-parties unless you want to loose tree-shaking of conditionally used code for now use api.flutter.dev/flutter/foun… as @TechnicalKn0ck suggests
Did you know? If your code checks the current platform with Platform.isIOS, you’ll get a runtime exception when you run on Flutter web. 💥 As an alternative, consider using the UniversalPlatform package, which works on all platforms and offers a unified syntax. 👍
10
19
119
22,909
language design is freaking hard: I really wish Dart 1 did not try to be *soooo* simple and familiar, we would not spend years digging us out of the hole initial design has put us in
10
17
121
Are you a Flutter/Dart developer? Have you been significantly hindered by Dart's current concurrency model (isolates)? I would like to chat with you. We have done a lot to improve isolates in the past years - but I would like to gather some real-world issues / road blocks.
14
21
118
21,939
I have no plans to go anywhere. So many exciting plans for Dart in 2024 💪 But remember that a team is always greater than an individual. Behind 1 visible Dart/Flutter team members there are 10 who turn actual gears and make things happen
Replying to @lesnitsky
Hope @mraleph stays in the Dart team for as long as he feels like compiling compilers, otherwise, what's the point
3
7
120
6,475
If you like some technology and it solves your problems, then the best you can do is to build with it. The worst you can do is sit on Twitter and spread FUD filled with "but" and "what if". Ain't no one is forcing you to use things you don't like to use.
6
17
125
5,990
Do *NOT* accept such builds times from Flutter. Always check is taking the time, e.g. here this was caused by 1) choice by slang i18n package to generate 1 enormous function with all messages for each locale 2) quadratic behavior in Dart's register allocator cont
If you can show me a longer build time, I'll give you a cookie
5
8
118
15,108
ain't no CS degree will prepare you for the Tower of Babel that is modern software engineering
2
26
109
let us do this one more time: reply to this tweet to AMA about @dart_lang or complain about anything @dart_lang related. I will do my best to reply
69
20
111
19,399
I am still puzzled why various Flutter tutorials recommend splitting apps into subpackages. Packages are for publishing, independent versioning and independent reuse. If you don't do either of these things - you don't really need packages.
24
16
109
27,448
next time somebody is gonna say "but you can *just* use LLVM!" I am gonna link them to this @whitequark's comment eli.thegreenplace.net/2017/a…
2
43
100
I have not done these in a while: reply to this tweet to AMA about @dart_lang or complain about anything @dart_lang related. I will do my best to reply
38
25
112
14,173
I published "Introduction to Dart VM, Section 1: How Dart VM runs your code?", check it out mrale.ph/dartvm/
3
38
107
Replying to @bunopus
Вот такая философия и привела нас туда, где мы оказались. В ней отсутствует одно важное звено - она создаёт иллюзию, что есть "большие" и "маленькие" люди - и большие люди наделены какими-то особыми правами на изменения мира - тогда как в реальности все люди маленькие.
2
4
104
"don't let programming languages that you like define your identity... define your identity based on the languages you hate."
7
43
105
When the language has no garbage collector - that's just because *you*, the developer, are the garbage collector.
The genius of Go is that it has a garbage collector. The genius of Rust is that it doesn't need one.
7
13
101
21,477
once you get enough developers using your language / framework no matter what you do it is going to be perceived as "wrong" by somebody🤷‍♂️
10
4
109
5,248
Time for my traditional AMA about @dart_lang - ask me anything or complain about anything in replies. I'll see what I can answer / do about it. (Replies are not going to be real time though ;-))
37
12
107
16,379
What's your biggest issue with Dart? Hit me with everything - here or in the DMs.
84
13
103
25,179
we are starting to get more LLM slop PRs on dart-lang/sdk. I am thinking about approach this with "two strikes first, third one is a ban" approach. There is no shame in not knowing. There is a lot of shame in not wanting to learn.
3
7
108
4,718
LLM are very good at vomitting code that should not exist in the first place. But alas people are not very good at recognizing this.
12
5
104
6,604
Adventures in the land of substrings and RegExps (or making less_dart 7x faster) mrale.ph/blog/2016/11/23/mak…
4
62
104
The power of Dart and Flutter + the hands of a creative person = 🔥
Early version of Vide on the web is working! 🙂 A full canvas based IDE experience fully built in Flutter - for Flutter. In private alpha right now, public release will follow soon!
5
8
103
4,458
fuck. this. shit. 🖕
1
5
93
here we go again (I will now do this every 2 months on ~16th): reply to this tweet to AMA about @dart_lang or complain about anything @dart_lang related. I will do my best to reply.
44
13
103
14,562
I started looking at JsonDecoder performance (or more specifically its hidden variant which you get by fusing JsonDecoder with Utf8Decoder). My goal is to get it as close to V8's JSON.parse as possible *without* rewriting it to C++.
12
3
92
12,655
My opinion: you should never ever use FutureOr - its a sign something is wrong with your API. The only reason FutureOr exists is poorly designed APIs of Dart 1 which were shoehorned into Dart 2 era using FutureOr to avoid breaking changes
💡 Dart tip 💡 Do you know about `FutureOr` in @dart_lang? 🤔 It allows to execute either sync or async 🔄 Here is how to use it 👇
13
10
95
16,447
If you are curious how Dart VM is developed you watch me durdling around in the sources and listen to the sound of my keyboard piped.video/watch?v=L7ec_yPa…
3
13
93
12,694
JS community is having a revelation that if you not only write your JS as C, but you also compile it as C then your performance is going to be veeeeery close to C. 🤯
8
4
89
24,672
What do you expect from @dart_lang in 2024?
64
8
92
22,816
just because I can
7
6
88
how I imagine I look when writing code (2015 edition)
3
10
86
array is a linked list with links going through the 4th dimension and therefore invisible to us 3d simpletons.
2
21
85
step 1: make a five lines fix step 2: write a test for a fix step 3: refactor some code to make test possible step 4: refactor uncovers that our components depend on each other in rather messy way step 5: 195 files changed, 687 insertions(+), 608 deletions(-)
4
14
85
я не знаю, как у вас, а у меня кукуха тихо едет
11
1
80
performance tip #0: for any sort of performance sensitive binary data processing 1. never use any of high-level List manipulation helpers 2. avoid redundant copies You can be amazed how fast things would go if you just follow these two things.
TIL Dart: BytesBuilder, in `typed_data`. Lets you efficiently combine byte arrays without copying. Merging 60 x 16 KB Uint8Lists went from ~7 ms to 0 ms (it's an abstraction for only sending audio bytes with voice in them to Whisper in FONNX)
3
9
85
7,506
JS is extremely flexible dynamically typed language TS for obvious reasons (incremental adoption) bends backwards to find a way to statically type all convoluted JS code in the world. end result: both the code and types (and type system) are convoluted.
10
9
83
26,242
a very interesting paper about JSON "parsing" using SIMD (or rather extracting data from JSON without parsing) vldb.org/pvldb/vol10/p1118-l…
6
35
82
V8 joins esteemed company of GCC, LLVM, Z3, Coq, GHC and Jikes as a recipient of SIGPLAN Programming Languages Software Award \o/
40
82
when I was a child I had a book with walkthroughs for computer games, which I sometimes read in the evening like a science fiction... cause I did not have a computer or those games.
6
4
75
I made an empty HTML file and opened it in VS Code - that means my empty project now depends on more than 7 million lines of code made by god knows whom. o tempora, o mores!
6
8
74
Ребёнок просит на ночь читать ему стихи Хармса 👍 Начал читать и внезапно узнал из одного стиха, что тротуар раньше называли панелью. Я дядя 38ми лет и только сейчас понял откуда "стоять на панели" происходит - до этого я все время про какие-то строительные панели думал 🫣
6
6
85
6,882
Explaining JavaScript VMs in JavaScript. blog.mrale.ph/post/243517483…
3
58
74
javascript framework is basically a virus that spreads around by infesting JS devs and instructing them to replicate it.
3
37
82
And here I was thinking that Rust is the most infuriating thing industry can come up with, but the porcelain spiderweb of types people weave in TypeScript beats even Rust.
The logic The type
9
14
79
31,291
please don’t say “Flutter is fast because Dart is compiled to native machine code in release builds” You can compile almost anything to machine code - does not mean it’s going to be fast
2
8
78
the microbenchmark used to generate these numbers contains a flaw which is what causes the slow down, not minus-zero. ironically it is -1 that wreaks havoc here
`a = 0-x` is about 3-10x faster than `a = -x` 🤯 Let's jump into JavaScript VM details to see why and how to guard against this VM de-opt: 🧵🪡🧶
2
11
77
29,668
all programming languages are awful, yet there are people enjoying all of them. so let them have some fun.
2
25
77
when I was interviewing at Google 9 years ago 4th interviewer asked me to count set bits in 32-bit word. I wrote a loop and told them to consult “Hacker’s Delight” if they want something “fancy”. Still got hired somehow ¯\_(ツ)_/¯
4
5
78
Remote work is great - I am happy that it is a thing - but whenever I attend a team event I remember how energising it is to have your team under the same roof
2
3
80
3,418
Dart team will be hiring in Munich and Waterloo. We have a whole bunch of positions related to internal infra as well as external tooling and core Dart ecosystem. In addition we are always on a look out for VM/compiler/PL engineers. DM me if interested.
5
23
75
you might think that we only work on Dart in Aarhus - well, that's not really true :) There is also a team working on Android related technologies (R8/D8) and Kotlin. This team is hiring now: careers.google.com/jobs/resu…
24
76
adding shared memory multithreading to @dart_lang
7
4
74
7,178
pun intended?
4
4
74
6,549
My thought is that Dart absolutely _must_ have them in some form. We are working on shorter constructor forms right now, so that you can just write class Foo(final int x, final String y); We will look into things like data class methods later. For now codegen is the way.
Replying to @mraleph @dart_lang
What are your thoughts on supporting Data classes? Is there any updates you can share? Thanks!
4
4
76
5,706
One thing I found surprising: not that many people actually approached me to talk and many of those who approached started with "I dont want to bother you". You are not bothering me - I am here to chat with everybody who wants to ask me!
4
1
72
3,078
I used to think that parsers are a long solved problem, but then I looked into less.js implementation
7
37
69
I have been going through my Google+ stuff to see if I have anything to archive...
3
3
67
year 2013: Haskell people are still writing monad tutorials, JavaScript people are still trying to explain inheritance.
7
215
69
my wife “hacked” a webshop by accident: she put few things into a basket, then switched web site language which seamingly emptied the basket, then placed same things again and ordered - now we got a package with double of everything but we paid for single 🤔
5
10
69
controversial opinion: whiteboard interviews allow to check soft skill as much as coding/algo skills. If you throw a kindergarten level tantrum facing a 5 liner then you are probably lacking in both departments.
7
14
71
lets make a collection: what’s your top 3 favorite PL implementation related paper of 2017 (reply with a paper & RT for outreach)
7
41
67
🥳🥳🥳
3
11
70
saying that ClojureScript / Elm / ReasonML are "JavaScript flavors" is like saying that tea is a flavor of coffee.
8
12
69
One of my colleagues have been working on changing how we represent try/catch in Dart VM's CFG. It's a moderate change (-453 +1586 LOC) but if I had to review it using GitHub PR interface I would have probably quit and tried to start a winery in Bulgaria with my wife instead.
8
2
71
6,920
and now with comparison against Rust+WASM version /cc @steveklabnik @samccone -> mrale.ph/blog/2018/02/03/may…
1
18
70
Guess what's inside this app.
Found this 1:1 copy of iOS Notes app for Android, and it looks and works so well! I really missed the iOS notes app since switching to Android, and this fixes that for me. 😭
12
2
69
10,317