Readit News logoReadit News
mtlynch · 3 years ago
Blink sounds cool, but this blog post is pretty thin. It's just restating a handful of tweets about Blink by its author.
jart · 3 years ago
Author of Blink here. Ask me anything :-)
monocasa · 3 years ago
What do you account for the perf win over Qemu? A bunch of micro optimizations, less abstraction layers, or something more systemic?
worthless443 · 3 years ago
Last time I checked on blink, it couldn't run dynamic executables (or ELFs that run with the dynamic interpreter), and would result in a segfault. How has it improved since then?
xcdzvyn · 3 years ago
Hi jart! You're an inspiration! That's all :)
gabcoh · 3 years ago
The comparison with QEMU is with KVM disabled, right? Assuming this is true, how does it compare with KVM enabled?
Maursault · 3 years ago
> Blink is at least 2 times faster than QEMU

> Blink is now outperforming Qemu by 13% when emulating GCC.

Nice work. But isn't QEMU notoriously slow?

sidewndr46 · 3 years ago
Where is the getting started guide for this?
smith7018 · 3 years ago
Incredible work, jart! Have you tested if it can run on Asahi Linux (Linux for ARM Macs)?
britneybitch · 3 years ago
That reverse debugging feature looks cool. At a high level, how does it work?
Y_Y · 3 years ago
Why bother making this? (even if it is really cool)
Sophistifunk · 3 years ago
Where is it? I do not have a twitter account.

Dead Comment

musicale · 3 years ago
Self-hosting is certainly a thing if the emulator can run on the emulated platform. Same for VMMs that can run on a virtualized platform.

It's a nice test also and can be useful for debugging.

pdntspa · 3 years ago
This guy got Doom running inside of Doom using a code execution exploit

https://www.youtube.com/watch?v=c6hnQ1RKhbo

Dead Comment

mhh__ · 3 years ago
Is it actually 2x faster or 2x faster at starting up? QEMU does so much stuff, running cc1 on hello world isn't really a stress of the interpreter IMO as much as all the crap that goes around it.
jart · 3 years ago
Blink actually does run the GCC9 CC1 command from start to finish twice as fast. Qemu takes 600ms to run it and Blink takes 300ms. Both Qemu and Blink use a JIT approach. Since GCC CC1 is a 33mb binary, a lot of the time it takes to run it, it stresses the JIT pretty hard. https://twitter.com/JustineTunney/status/1610276286269722629
mhh__ · 3 years ago
That's partly what I meant though, how fast is it at a longer running process? C doesn't require all that much semantic analysis so there usually isn't all that much hot code in the compiler, so it would suit a simple-fast JIT whereas QEMU does do some basic optimizations.

I've only ever really skimmed the TCG source code but it wouldn't surprise me if a new-er JIT could smack it's arse given that with these old C codebases (it's probably one of Bellard's few flaws) it's pretty hard to actually make true architectural changes.

The Java/script (I think more Javascript but I'm hedging my bets by including jvms too) JITs are probably the cutting edge but I'd imagine still quite beatable for a few cases.

zamadatix · 3 years ago
"blinkenlights" put a smile on my face.

Looks like it itself is not yet able to be compiled with Cosmopolitan Libc (though it emulates programs compiled with it) but it's planned - very cool!

jart · 3 years ago
Author here. I'm planning to get Blink to compile with Cosmopolitan Libc as soon as possible. There's just a few switch statements that need to be refactored. There's a really nice `cosmocc` toolchain that makes building POSIX software with Cosmo easier than ever. See https://github.com/jart/cosmopolitan/blob/master/tool/script... and https://github.com/jart/cosmopolitan/blob/master/tool/script...
jvolkman · 3 years ago
Will compiling with Cosmopolitan enable it to run on Windows?
asciii · 3 years ago
> Me: How small can an emulator be? Blink: Yes.

My favorite FAQ

Deleted Comment

jedisct1 · 3 years ago
Does it require cosmopolitan libc? I compiled a hello world example in C with `zig cc --target=x86_64-linux-musl` but when running it with Blink, nothing happened.

With memory safety turned on, could Blink be used as an alternative to WebAssembly?

muricula · 3 years ago
At a glance, the debugger user interface looks much nicer than gdb's terminal ui. How tightly coupled is the debugger interface to the emulator/debugger engine? How much work would it be to plug in a different debugger, say lldb or gdb, into the ui instead of blink?

I think the user experience of cli debuggers is generally somewhat dreadful when compared to their gui cousins -- they seem to display a much narrower view of what's going on. Could the big blinkenlights debugger view be useful outside of blink itself?

yurymik · 3 years ago
You can go other way around and use other TUIs for GDB:

* https://github.com/pwndbg/pwndbg * https://github.com/longld/peda * https://github.com/hugsy/gef

saagarjha · 3 years ago
Ideally Blink would just support the GDB RSP, so you could directly use GDB or LLDB on the emulator itself.