top | item 43678590

JSLinux

392 points| TechTechTech | 10 months ago |bellard.org

118 comments

order
[+] tombl|10 months ago|reply
Fabrice does a great job at building these self-contained pieces of software which often grow to have lives of their own. As a lesser known example, JSLinux's terminal emulator was forked a few times and is now known as xterm.js, which has become the predominant web embeddable terminal emulator.

This all comes full circle, because now I'm building a true successor to JSLinux that's way faster because I've natively compiled the kernel/userspace to wasm, and of course I'm using xterm.js for the terminal emulation.

If you like buggy demos that probably shouldn't be shared yet, you should check out https://linux.tombl.dev, but note that it's currently just a busybox shell and nothing else, so I hope you're good with `echo *` instead of `ls`.

[+] apitman|10 months ago|reply
I like to say Fabrice creates side projects that others spend their entire careers maintaining.

I knew about QEMU, ffmpeg, his LTE stuff, and QuickJS. I had no idea xterm.js started with him too.

[+] pantalaimon|10 months ago|reply
This produces

        attempted to munmap
        ------------[ cut here ]------------
        WARNING: CPU: 3 PID: 36 at kernel/exit.c:812 0x00000000
        CPU: 3 PID: 36 Comm: sh Not tainted 6.1.132 #
        Stack:
            at vmlinux.o.__warn (https://linux.tombl.dev/dist/vmlinux-NLTKI6YG.wasm:wasm-function[278]:0x17655)
            at vmlinux.o.warn_slowpath_fmt (https://linux.tombl.dev/dist/vmlinux-NLTKI6YG.wasm:wasm-function[279]:0x1772b)
            at vmlinux.o.do_exit (https://linux.tombl.dev/dist/vmlinux-NLTKI6YG.wasm:wasm-function[329]:0x1985e)
            at vmlinux.o.task_entry_inner (https://linux.tombl.dev/dist/vmlinux-NLTKI6YG.wasm:wasm-function[154]:0x12249)
            at vmlinux.o.task_entry (https://linux.tombl.dev/dist/vmlinux-NLTKI6YG.wasm:wasm-function[153]:0x12155)
            at self.onmessage (https://linux.tombl.dev/dist/worker-MHWHWELT.js:151:53)
        ---[ end trace 0000000000000000 ]---
on any command
[+] fsiefken|10 months ago|reply
Awesome, I suppose it's more energy efficient then jslinux and can be run on iOS, it might be a good alternative for A-Shell or iSH. I tried it on my a MacBook, but the keyboard input doesn't register.
[+] agumonkey|10 months ago|reply
is there any command working ? ps, cat, vi, ed .. they all crash (I don't know enough about embedding busybox to know what to do)
[+] tombert|10 months ago|reply
Fabrice is amazing. The amount of stuff this guy has built is utterly incredible.

If I built any one of the things he's built (ffmpeg, qemu, tinyc) I would never stop bragging about it. Instead, he just keeps hacking on other cool stuff.

[+] wruza|10 months ago|reply
Yeah why don't we learn what he wants and just give it to him, in return he'll properly rewrite all the broken shit we have. Phones, operating systems, desktop environments, countries, appstores, etc.
[+] p0w3n3d|10 months ago|reply
I love this guy. Half of the world's android development has been made easier due to his courtesy, and it's getting more (his qemu is ubiquitous)
[+] danielEM|10 months ago|reply
100% agree, would like to meet that guy one day
[+] xorcist|10 months ago|reply
Also the same person who wrote LZEXE, which might be familiar to people who used DOS.
[+] jebarker|10 months ago|reply
I'd love to know how he chooses what to work on. I wonder if he just follows his interest?
[+] jorvi|10 months ago|reply
Don't forget VLC! Probably his most well-known project.
[+] smusamashah|10 months ago|reply
[+] DrNosferatu|10 months ago|reply
Is this list just 16bit?
[+] pveierland|10 months ago|reply
Considering the extremes of prolific developers gives interesting contrast to dogmas such as "functions/files should never be above x lines", where `quickjs.c` is 50k lines and has functions that are hundreds of lines long:

https://github.com/bellard/quickjs/blob/master/quickjs.c

(Obviously different approaches suits different circumstances.)

[+] lifthrasiir|10 months ago|reply
The answer is simple: Bellard can recall all 50K lines of context, while most can't. I too happen to have a larger working memory and only later realized that my threshold for files and functions is way higher than most others. The dogma is only required when the file is to be read and written by multiple people.
[+] saghul|10 months ago|reply
I work on that codebase (we forked it off to QuickJS-ng) and while daunting at first, it's somewhat easy to work with, with the right editor! Many of them choke on such a large file, alas.

While it being a very large file, it's sorted somewhat semantically, so it's easy to work on adding a new iterator method, for example, since they are all close to each other.

[+] wiseowise|10 months ago|reply
Because people you’re working with are not Fabrice. It is easier to say “don’t do X at all” than explain when it is safe to break the rule.

Also, this would depend on language of choice. JVM, for example, might not inline function above certain threshold of bytecode instructions.

[+] worewood|10 months ago|reply
Case in point: .NET's garbage collector which is a single 54k loc C++ file.
[+] larschdk|10 months ago|reply
Rather one long function than does one thing well than multiple function that are strongly coupled and difficult to reason about. Programmers who apply dogmas can be harmful.
[+] txdv|10 months ago|reply
I think this person creates these marvels entirely by himself. There is no need for collaboration rules.
[+] klarko|10 months ago|reply
In the age of advanced IDEs/text editors with goto definition, find references/usage, fuzzy search, etc, what is even the point of multiple files?

I never navigate by files in my code bases, it's all based on search and "jump to" type navigation.

[+] patwolf|10 months ago|reply
I played around in Windows 2000 for the first time in 20 years. I know nostalgia can be blinding, but I would go back to that UI in a heartbeat. The uncluttered taskbar, the simple start menu that isn't full of useless recommendations and ads—such a joy!
[+] steeleduncan|10 months ago|reply
I don't remotely want to use Windows 2000 again, but it is interesting to see a version of Windows where the UI was consistent. Currently it is a mishmash of four generations of GUI toolkits, some UI is in one style, some UI is another, etc, etc
[+] jsd1982|10 months ago|reply
I tried to install Visual Basic 6 on it but couldn't get past SSL errors in the installed Firefox version to even download the ISO. Sad.
[+] edoceo|10 months ago|reply
The reason I've been on Xfce since at least 2010, it still works the same.

I feel like open-source inherently has alignment with users and blockers to enshitification

[+] throwaway2037|10 months ago|reply
Does anyone know how Fabrice Bellard gets paid? This guy's output of open source project is simply stunning. Is there anyone in his class? It is hard to compare. I assume that someone like VMWare would try to hire him, or Google to work on video codecs, V8, Chromium rendering, or ffmpeg.
[+] keepamovin|10 months ago|reply
I have to say there are some extremely talented, creative and productive "software artists" or ICs coming out of France. Not sure if that's a French thing (the Ecoles or whatever) or something else, but it's noticable.
[+] ptsneves|10 months ago|reply
Bootlin is a French company and they are a major open source contributor. I worked with them and I recommend them.

French tech used to have a reputation for Renault old car quality, but I did not see it. Even in Renault and Citroen I came to admire them. On the other hand working with German SE is hard because they are incredibly set on not invented here. My generalisation for whatever it is worth.

In general the issue of Europe tech scene is simple: we suck at selling and optimise for resource efficiency(competitive salary means never pay above rate no matter what). Americans optimise for growth and will risk paying for higher so they can amortise costs with growth.

On a final note, where I come from there is lots of sneer that France is a dump due to immigration. While that is a point of view, it is definitely true they have also brain drained their colonies and have very capable productive individuals coming from there. Myself I had my master’s tutor from cot-de-Ivoir and in bootlin also worked with top of the shelf engineers that have non francophone names.

[+] justin66|10 months ago|reply
Can you name some that invite comparison with FB?
[+] a3f|10 months ago|reply
We are using JSLinux over at https://barebox.org/webdemo to let potential users see the conveniences of the bootloader's shell without having to flash it to actual hardware.

I am glad to see all the forks mentioned here, need to see which one runs bareDOOM best and if any have working sound perhaps..

[+] ridruejo|10 months ago|reply
JSLinux was our inspiration for creating Endor (https://endor.dev) and his qemu work is also powering a lot of other Wasm-related browser projects
[+] pveierland|10 months ago|reply
Are there any open details on how the VM / container / WASM-native approaches are implemented?
[+] NetOpWibby|10 months ago|reply
I just spent an hour playing Solitaire in Windows 2000
[+] skerit|10 months ago|reply
I can't seem to get the Linux VMs running (I'm just getting a CORS error when it tries to fetch the little text file at `https://vfsync.org/u/os/buildroot-riscv64/head` for example), but the Windows 2000 one does work. Quite smoothly even.
[+] slt2021|10 months ago|reply
Fabrice Bellard is the Chuck Norris of software engineering
[+] dxroshan|10 months ago|reply
Fabrice is an amazing programmer, and does cool things. He is an inspiration to us all.
[+] someoneontenet|10 months ago|reply
My dream is have a in browser nixos vm on wasm. If I could have a bare vm, I can bootstrap it easily with a nixos config. From there I can start thinking about running web services in browser tabs instead of physical hardware.
[+] londons_explore|10 months ago|reply
Pretty sure this is possible already... What's stopping you?
[+] sylware|10 months ago|reply
Good.

Only wayland RISC-V 64bits binaries from now on, even for the web.

We don't need anything else anymore.

[+] slackfan|10 months ago|reply
Ah, the destroy all software talk is coming true!
[+] gamebak|10 months ago|reply
This is amazing! But beware admin, it seems that the RAM can be hijacked and increased...
[+] appleaday1|10 months ago|reply
I use ffmpeg to create transcript with a popular video sharing site.