9 ms·
JSLinux – Run Linux or other Operating Systems in your browser
- jason_slack 9y agoI feel like Bellard is a super hero. I wonder if he has a day job and just takes on these interesting (and large?) projects during his off time.
- masklinn 9y agoHe's the co-founder and CTO of Amarisoft, an LTE/4G hardware and software company: https://www.amarisoft.com/company/ https://www.amarisoft.com/company/
- jameskegel 9y agoCompanies with this type of leadership are the ones I'm interested in giving my money to, long-term, as a consumer. Not because of any sort of principled decision based on his skills, but because I feel these types of workers would stay sharp and be quicker to solve problems correctly should they appear.
- tbodt 9y agotccboot is beyond insane
- axonic 9y agoSuper Hero was exactly what I just said before reading this comment. bow
- jason_slack 9y agoI'd love to watch him work for a few days and ask him about his productive habits.
- iso-8859-1 9y agoInteresting with the VFSync site, nice to see some standardization on this. I used to work on on-demand file systems in Emscripten, but it never worked well, especially because you can't have binary XHR outside webworkers. https://github.com/kripken/emscripten/commit/e2046bb8ce2b2ccaaca5328f21a79c6efe15f336 https://github.com/kripken/emscripten/commit/e2046bb8ce2b2cc... But I don't understand, why is VFSync superior to something like NFS? It seems that Bellard is trying to set up a hosting site for VFSync, so that people can easily share images. I dreamt about having something like that, combined with copy-on-write, which would make it possible to make small changes to a big filesystem and share them, without having to upload the full system. Kind of like with Docker. I wonder if that would be compatible with the VFSync model.
- ericfrederich 9y agoWhat a great nostalgic color. I think I'll change my Windows 10 desktop to it. http://www.colorhexa.com/3a6ea5 http://www.colorhexa.com/3a6ea5
- florinutz 9y agobetter get rid of Windows10
- jameskegel 9y agoI'm not agreeing or disagreeing, but I am curious why you say this.
- marksomnian 9y agoPlease don't reddit on HN.
- axonic 9y agoWell put.
- jvandonsel 9y agoIs there a practical use case for this other than "ain't it cool"?
- Cthulhu_ 9y agoPossible emulation option for olde Windows applications, but installing stuff would probably be tricky, and Virtualbox would be a better option. But it depends. Chromebooks or other browser-only systems would be a target. But anyway, ain't it cool?
- deleted 9y ago[deleted]
- vanderZwan 9y agoChecking for bugs in Emscripten perhaps? A project as complex as an OS is probably good for finding edge-cases.
- deleted 9y ago[deleted]
- mark-r 9y agoDoesn't this work by emulating the processor instruction set along with a few key drivers? The complexity of the OS itself wouldn't be directly hitting the emulator.
- jmh530 9y agoIf you're on Windows, could you use it instead of a virtualized Linux? Maybe a work computer disabled the virtualization?
- ben174 9y agoFulfilling my lifeline dream of getting to run rm -rf /
- singularity2001 9y agoad blockers here translate nicely to boot errors: Boot failed: could not read the boot disk ntoskrnl.exe missing or corrupt
- lxe 9y agoFabrice Bellard's jsLinux and Jeff Parsons's https://www.pcjs.org/ https://www.pcjs.org/ are pretty fascinating. I think Bellard uses emscripten (transpiled machine and device emulator code from C to JS), while pcjs is hand-coded JS (which is neat: https://github.com/jeffpar/pcjs/blob/master/modules/pcx86/lib/x86cpu.js https://github.com/jeffpar/pcjs/blob/master/modules/pcx86/li...). Also is the source for jslinux available anywhere? The emscriptified file at https://bellard.org/jslinux/x86emu.js https://bellard.org/jslinux/x86emu.js is quite compex.
- fermigier 9y agohttps://news.ycombinator.com/item?id=5400185 https://news.ycombinator.com/item?id=5400185 for a previous discussion re source code...
- tbodt 9y agoIt doesn't look like emscripten to me
- duskwuff 9y agoBellard wrote JSLinux in 2011, well before Emscripten was a thing.
- s-macke 9y agoYou don't have to rely on the source code of jslinux. There are a lot of other web emulators and most of them are open source. https://github.com/fcambus/jsemu https://github.com/fcambus/jsemu
- jeffmcmahan 9y agoIt hung at the boot screen for me, which really took me back.
- naikrovek 9y agoDisable your ad blocker.
- jonathanstrange 9y agoWorks fine for me with uBlock Origin enabled.
- ehsankia 9y agoTook a few minutes on my Chromebook, but it eventually loaded.
- deadcell 9y ago> Disable your ad blocker to boot Windows 2000. WHAT YEAR IS THIS?!?!?!
- chocolatebunny 9y agoDid you try to turn it off and on again?
- agumonkey 9y agooh ! - linux kernel 4.12 - freedos image - windows 2000 image (!!!) and riscv32 emulation for the above listed
- s-macke 9y agoNot sure about the true meaning of your comment. But if you search for a 32-Bit RISC-V emulator, you can find it here: http://s-macke.github.io/jor1k/demos/riscv.html http://s-macke.github.io/jor1k/demos/riscv.html
- hzhou321 9y agoHow do I install vim? PS: It has git, but no network. PS: Upload non-zipped tar balls works. How to access the image (downloading)? PS: Well, it is way too slow and hangs easily. I guess it is only an interest at this point.
- 0x0 9y agoBrowsers won't let javascript that's running on a webpage access random TCP ports, at the very least you'd need a server component that could act as an IP proxy for you, perhaps tunneling over websockets.
- disconnected 9y agoI haven't tried it, but apparently you can upload files, so it would be a matter of pushing the vim source tarball there and build it. (edit: oops, you beat me to it) As for network, they say this: >Can I access to the network from the virtual machine ? > Yes it is possible. It uses the websocket VPN offered by Benjamin Burns (see his blog). The bandwidth is capped to 40 kB/s and at most two connections are allowed per public IP address. Please don't abuse the service. But I haven't been able to get it to work... Edit: the X11 VM has networking. Don't know how to get networking in the non-X11 VM
- plix71 9y agoOne step closer to GNU Hurd hegemony!
- sleazy_T 9y agoITS TIME TO STOP - JAVASCRIPT HAS GONE TOO FAR
- veganjay 9y agoCool stuff! GCC works - I thought it was broken, but it just takes a long time. [root@localhost tmp]# time gcc hello.c -o hello real 0m 24.43s user 0m 2.63s sys 0m 2.17s [root@localhost tmp]# ./hello Hello, World!
- akmittal 9y agoIs it using WebAssembly?
- sp332 9y agoAccording to https://bellard.org/jslinux/tech.html https://bellard.org/jslinux/tech.html it's using asm.js since 2015. But at the bottom of the page it mentions wasm, so it's not clear.
- zapperdapper 9y agoWow, that's impressive! I tried FreeDOS and it booted very quickly. Nice to play around with DOS again - it's even got tab completion on the command line these days - fancy! p.s. By the way archive.org were doing something very similar. You could load up a DOS box from their web site and have the old disk mags and demos running in your browser. All very cool stuff!
- coreyp_1 9y agoI just played Pinball in Windows 2000 in Chrome on Windows 10. I lost, but winning was not the point. Playing was. :) I think that that sentiment encapsulates my CS experience.
- SubiculumCode 9y agoJust want to say that Windows Pinball may be MS's best software ever. The gameplay is pretty deep and well balanced.
- gattilorenz 9y agoThis sounds a bit sarcastic, considering it's not by Microsoft: https://en.wikipedia.org/wiki/Full_Tilt!_Pinball https://en.wikipedia.org/wiki/Full_Tilt!_Pinball
- jameskegel 9y ago>winning was not the point. Playing was. Wise words, I hope you don't mind me pasting this on my monitor. This phrase resonated with me particularly while I'm trying to work out a particular intellectual tough spot.
- seszett 9y agoIn case you don't know it (it's well known in France but not sure about elsewhere) that was the motto of the founder of the modern Olympic Games, Pierre de Coubertin. The important thing is not to win, but to take part.
- justsid 9y agoIn German we have „dabei sein ist alles“: „taking part is everything“
- vram22 9y ago>I lost, but winning was not the point. Playing was. :) Ha, that reminds me something from the book "The Soul of a New Machine" by Tracy Kidder: https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine From the article above: [ The motivational system is akin to the game of pinball, the analogy being that if you win this round, you get to play the game again; that is, build the next generation of computers. ] The idea is described better in the book, though. [ The book won the 1982 National Book Award for Nonfiction[1] and a Pulitzer Prize for General Non-Fiction. ]
- jugg1es 9y agoWas windows 2000 open-sourced?
- DoctorOW 9y agoNo, see the disclaimer: https://bellard.org/jslinux/disclaimer.html https://bellard.org/jslinux/disclaimer.html
- reboog711 9y agoSuper slow, but pretty cool.... Finally I can play Solitaire without Ads again.
- efreak 9y agoThere's a way to get the old windows 7 games working in Windows 8/10, you can find it on the winaero forums. Personally I just have windows 3.1 installed under dosbox, as it gives me the entire WEP and Crystal Caves. If you decide to do this, I recommend dosbox-x, or other unofficial release, as official releases are old.
- NuSkooler 9y agoAny relation to https://github.com/copy/v86 https://github.com/copy/v86?
- s-macke 9y agoThese are 2 independent developers. However the emulators have some technologies in common like the 9p virtio filesystem under Linux.
- ljosa 9y agoHas anyone gotten uploading to FreeDOS to work?
- skytreader 9y agoWindows 2000 plays wonky with my keyboard. Any idea why? For instance, I open Pinball and, after getting a new game with F2, pressing space (to launch the ball) does nothing except open that menu that pops up when you right click a window. I open Notepad and I can't type words. If I press "o" it opens the "Format" menu. Which strikes me as odd. (But really, just let me play Pinball. :D)
- jwandborg 9y agoSounds like Windows thinks you're pressing the Alt key all the time. Try pressing and releasing the Alt key when Windows has your keyboard focus.
- wolfgang42 9y agoMy psychic debugging skills tell me that the Alt key has gotten stuck down in the emulated machine. Try focusing on the emulator and hitting Alt a couple of times. (This can happen e.g. if you alt-tab away from the window: the emulator sees alt-down, but the alt-up happens in another window and the key stays stuck down in the emulator.)
- skytreader 9y agoThat sounds like a reasonable explanation, thank you. And it works! Now behold all the work I will not be doing today. :v
- wolfgang42 9y agoYay, glad I could help!
- 1_800_UNICORN 9y agoI couldn't get the Windows 2000 VM to connect to the internet, otherwise I wanted to try and get at least a 1-level recursive reference going... Windows 2000 running in Firefox running in Windows 2000 running in Chrome running on a Macbook Pro. If anyone has gotten Windows 2000 to connect to the internet, would love to take a stab at it.
- peonicles 9y agoI was a little disappointed to see there wasn't any internet connection on Windows 2000. All I wanted to do was to open Firefox, goto https://bellard.org/jslinux/ https://bellard.org/jslinux/ , and fire up the Linux emulator ...
- marpstar 9y agoI had working internet in IE5. You have to walk through the internet connection setup for LAN, but it works.
- randkyp 9y agoI tried pinging google.com from cmd and it worked, both on Firefox and Chrome. Didn't try browsing the web though. Maybe the VPN (https://news.ycombinator.com/item?id=15278430 https://news.ycombinator.com/item?id=15278430) is overloaded or blocks that somehow?
- z3t4 9y agoYou need to configure DNS!
- askz 9y agoThere's internet in the windows 2000 setup. But remember that old IE versions doesn't support SNI !
- christophilus 9y agoIt takes less time to boot Linux in Chrome on my laptop than it takes Reddit to load a discussion on my phone. That's pretty amazing. Not sure which is more amazing: How slow Reddit mobile is or how fast Linux boots in JS.
- s-macke 9y agoTo boot Linux you formally need just the kernel image and a statically compiled busybox executable. This are only 2-3 MB. The boot process can be optimized as well for such a tiny system. You don't need long and complex boot scripts. Just start the kernel and then start directly busybox und you are done. Windows 2000 takes much longer to boot.
- Zardoz84 9y agoOr try muLinux that boots on a single floppy
- chii 9y agoThe old Reddit .compact page loads very fast : https://reddit.com/r/.compact https://reddit.com/r/.compact Don't use the mobile web view! It sucks!
- FractalNerve 9y agowow, this is really insanely fast, great share! I currently use Joey for Reddit and OpenGur for Imgur.
- marasal 9y agoThanks! This is much better.
- 3pt14159 9y agoHow does it do wget, etc. without violating CORS? I was able to download from a couple different websites.
- detaro 9y agohttps://bellard.org/jslinux/faq.html https://bellard.org/jslinux/faq.html > Can I access to the network from the virtual machine ? Yes it is possible. It uses the websocket VPN offered by Benjamin Burns (see his blog). The bandwidth is capped to 40 kB/s and at most two connections are allowed per public IP address. Please don't abuse the service.
- s-macke 9y agoIt uses a proxy. JSLinux emulates a network device and sends ethernet frames to a proxy via websockets. The proxy sends these frames to a Linux TAP device. The rest is a decent firewall configuration. You might even be able to connect to another emulated JSLinux machine if you know that IP address. More information here: http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-support.html http://www.benjamincburns.com/2013/11/10/jor1k-ethmac-suppor...
- faragon 9y agoWow, now includes graphics!!! Fabrice Bellard is amazing.
- m_sahaf 9y agoOddly, no one here linked to Gary Bernhardt's talk: The Birth & Death of JavaScript (YavaScript) [1] https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- ben174 9y agorm -rf / It just feels so wrong. I know it's doing exactly zero damage but I still feel guilty running it.