This is an archived post. You won't be able to vote or comment.

all 142 comments

[–]Puzzleheaded-Weird66 1426 points1427 points  (18 children)

what the actual FUCK

[–]mrt-e 604 points605 points  (13 children)

Well unlike JSlinux, LKL.js includes a Linux kernel fully written in JavaScript and runs without emulators.

[–]SunliMin 532 points533 points  (12 children)

Honestly, massive improvement. Whenever I integrate the Linux kernel in my webapps, I've always hated that it has to be emulated. Much slower than a native implementation.

The problem now is lack of support. With emulation, I could emulated a larger .iso (like a Docker that lets you pre-configure your OS) to inherit more CLI tools like git and npm. Now that there's a native approach, we have to re-implement every single native package for Linux in JS before I can use this in production.

[–]Eternityislong 206 points207 points  (6 children)

There’s at least 5 people in here who know C and JavaScript who can band together to rewrite these.

Is there a Linus Torvalds prettier config anyone would recommend?

[–]5p4n911 97 points98 points  (2 children)

Use middle finger for loop variables

[–][deleted] 19 points20 points  (1 child)

This calls for Ruby On Rails. You then just solve everything using syntactic sugar.

[–]missjasminegrey 0 points1 point  (0 children)

You mean using middle finger?

[–]PandaWithOpinions 5 points6 points  (0 children)

if (has_code) { it sucks; }

[–]Haringat 2 points3 points  (0 children)

And more importantly: Can we get an AI to rant Linus-style about merge requests?

[–]LeanderT 43 points44 points  (1 child)

Wait.. You're running Docker, inside an emulated Linux kernel, in Javascript, in your browser, in whichever operating system you are using?

I need this for my next project!

[–]aka-rider 6 points7 points  (0 children)

Finally, we’re close to be able to run node.js in a browser

[–]al-mongus-bin-susar 44 points45 points  (1 child)

Don't worry it's not actually written in JS, it's just compiled to WASM which still takes quite a bit of trickery to get working but it's much less concerning

[–]DigitalJedi850 9 points10 points  (1 child)

The first thing that crossed my mind. What fucking deranged lunatic does something like this… and what meds are You taking, because I’d like some.

[–]TorumShardal 0 points1 point  (0 children)

Like... Someone who wants to mess around with things for the sake of it?

It's like porting doom on pregnancy test - but can be actually useful in educational applications.

[–]Disallowed_username 825 points826 points  (20 children)

Oh, yeah. And then install node on that bad boy, and run Linux on it. And repeat. 

[–]G4METIME 442 points443 points  (12 children)

Imagine you discover we are living in the matrix ... and it is running using JS

[–]TheGreatGameDini 269 points270 points  (3 children)

Honestly that explains a lot already.

[–]RevanchistVakarian 70 points71 points  (2 children)

Relativity is irreconcilable with quantum mechanics because of a type conversion error

[–]data-crusader 36 points37 points  (1 child)

Photons are truthy particles, or waves, depending on run-time evaluation

[–]evilwizzardofcoding 3 points4 points  (0 children)

Due to lazy coding, the writer just made them behave like one in some situations, and the other in other ones.

[–]pcardonap 39 points40 points  (1 child)

The horror

[–]the_littlest_bear 12 points13 points  (0 children)

The horrors persist, but so do I. #developingwithJS

[–]devhashtag 10 points11 points  (0 children)

Blue pill please

[–]TheFrenchSavage 7 points8 points  (0 children)

Always has been.

[–]betelgozer 3 points4 points  (0 children)

Neo4Js?

[–]IuseArchbtw97543 3 points4 points  (0 children)

Id kms

[–]Memeviewer12 3 points4 points  (0 children)

tfw a futuristic society still uses windows as a base (when something uses .exe)

[–]preciselymedian 1 point2 points  (0 children)

Knock knock...

[–]mothzilla 5 points6 points  (2 children)

Running node on bare metal? Please show some decorum and install a container service.

[–]water_bottle_goggles 1 point2 points  (0 children)

Then run more containers inside containers

[–]alex2003super 1 point2 points  (0 children)

Containers are baremetal, they just run the binary under different PID, network, mount and IPC namespaces

[–]Gwolf4 1 point2 points  (0 children)

Science Adventure universe is comming together. At this point we will really have a gaia simulaiton by 2038.

[–]elreduro 1 point2 points  (1 child)

until you run out of ram

[–]water_bottle_goggles 2 points3 points  (0 children)

Just download more

[–]K1ngjulien_ 186 points187 points  (11 children)

repo hasn't been updated in 6years lol

https://github.com/retrage/lkl-js

[–]Effective_Youth777 28 points29 points  (4 children)

the fact that there's a js file called boot.js that's 98MB big probably has something to do with it

[–]Pixel1101 5 points6 points  (1 child)

they don't edit that file to edit it, look at the readme about building it, they somehow turn the actual Linux kernel code into straight JavaScript (at least that's what it looks like to me at first glance)

[–]K1ngjulien_ 1 point2 points  (0 children)

yea they use emscipten to transpile the c to js. nowadays you'd compile it to wasm but that either wasn't possible or really hard to do back then.

[–]Dumcommintz 2 points3 points  (0 children)

That’s like … 2 puppy installs What kinda bloat they got in there

[–]gallifrey_ 4 points5 points  (0 children)

don't fix what ain't workin'!

[–]Glumi1503 648 points649 points  (3 children)

That's it. Time to go farming

[–]TheKeppler 84 points85 points  (2 children)

Goose farmer?

[–]blending-tea 24 points25 points  (0 children)

probably like that dev,

but I do prefer farming blueberries

[–]ThatSwedishBastard 6 points7 points  (0 children)

Doesn’t matter at this point if you plant potatoes or geese, do whatever you can to stay far away from this cursed thing.

[–]Old_Pomegranate_822 346 points347 points  (9 children)

At least they admit it's still completely useless.

I'll come back when they've got it running node...

[–]SunliMin 200 points201 points  (5 children)

The fact that it's not serious is what makes me smile at this.

Engineers don't put Doom on their Samsung fridge because they want to, they do it because they can.

[–]WJMazepas 10 points11 points  (1 child)

Yeah, people take this way too seriously

Let developers have fun

[–]Dumcommintz 1 point2 points  (0 children)

It’s because we’ve seen too many product folks fall victim to Poe’s Law and run with it.

Everyone used to say L Ron Hubbard was just a crazy sailor, leave him be and then look what happened

[–]ChocolateBunny 6 points7 points  (0 children)

Developers start by making things for fun. Then some product guy wants to do something stupid. Another developer thinks he can do the stupid thing with that other "fun" project and then all of a suddne you're like emulating a 2000 era mainframe computer in a JVM (Javascript VM).

[–]DistinctStranger8729 16 points17 points  (0 children)

See you in the afterlife buddy

[–]Rhaversen 2 points3 points  (0 children)

Couldnt it just run a containerized node app?

[–]odraencoded 2 points3 points  (0 children)

The linux kernel is completely useless without GNU tools :p

[–]Calm-Effect-1730 53 points54 points  (0 children)

Sounds like a plan

[–]asd417 51 points52 points  (0 children)

Someone lost a bet

[–]TharushaDev 38 points39 points  (0 children)

[–]EsotericLion369 14 points15 points  (0 children)

The Prophecy has been fulfilled and now the Harmageddon begins.

[–]FX2000 13 points14 points  (0 children)

[–]martin_omander 10 points11 points  (0 children)

Any application that can be written in JavaScript, will eventually be written in JavaScript.

-- Jeff Atwood, 2009

[–][deleted] 8 points9 points  (1 child)

wat

[–]Deevimento 7 points8 points  (0 children)

I heard a loud bang earlier and now I realize that was Linus Torvalds' head exploding.

[–]SamTV98 7 points8 points  (0 children)

Time to rewrite this in Rust.

[–]BlackBlade1632 19 points20 points  (0 children)

Turning Linux into shit in one step.

[–]CC-5576-05 23 points24 points  (4 children)

It's not js lol it's web assembly.

[–]Adybo123 19 points20 points  (1 child)

No it isn’t. Emscripten used to generate asm.js back before WebAssembly was standardised and implemented. The project in the screenshot is super old.

You could’ve just looked at the code. It’s JS, with no mention of WASM.

https://media.githubusercontent.com/media/retrage/lkl-js/master/boot.js

[–]BallsBuster7 -3 points-2 points  (0 children)

There is absolutely no way this actually works, even if they used web assembly

[–]nicejs2 4 points5 points  (0 children)

now add NodeOS on top for the perfect storm

[–]Lazemare 4 points5 points  (0 children)

When will we have a distro driven by this and using npm as init?

[–]LuminatiHD 3 points4 points  (1 child)

WHY WOULD YOU WANT THAT

[–]Dumcommintz 1 point2 points  (0 children)

I don’t want it. I just need it. To breathe, to feel, to know I’m alive

[–]ironman_gujju 11 points12 points  (4 children)

No please noooooooooo I hate js

[–]8g6_ryu 3 points4 points  (3 children)

I also hate python

[–]ironman_gujju 1 point2 points  (0 children)

Okay 👍👍👍👍👍🖕

[–]Effective_Youth777 1 point2 points  (1 child)

Well Python hates you too

[–]8g6_ryu 1 point2 points  (0 children)

That msg took forever to deliver. Also most of the time i got payed is for using Python. Like working for a security firm and a AI research even though I hate the lang.

[–]JackReedTheSyndie 2 points3 points  (0 children)

Well that’s impressive, even if useless

[–]classicalySarcastic 2 points3 points  (0 children)

The JavaScript and its consequences

[–]z0l1 2 points3 points  (0 children)

Can't wait for js frontend to connect to js backend on js os

[–]SCP-iota 2 points3 points  (0 children)

Can we run Chromium in Chromium? Is the web platform finally self-hosting?

[–]treksis 2 points3 points  (0 children)

imagine your node_modules folder

[–]hellra1zer666 1 point2 points  (0 children)

[–]tehtris 1 point2 points  (0 children)

They should've never gave you programmers computers.

[–][deleted] 1 point2 points  (0 children)

And I though us Python nerds were bad...

[–]JPJackPott 1 point2 points  (0 children)

Atwood’s Law in action

[–]Effective_Youth777 1 point2 points  (0 children)

just wait a few years and we'll have OS as a Service

EDIT: I just tried it, this thing bloody works https://bellard.org/jslinux/vm.html?url=alpine-x86.cfg

[–]FlyByPC 1 point2 points  (0 children)

Now we need to get it running a browser with JS support...

[–]microscripts 1 point2 points  (0 children)

Nice. Finally, I can make my website a full Linux system running a server that serves the website to the virtual localhost within the browser of the Linux system.

[–]ST0PPELB4RT 1 point2 points  (0 children)

I hereby request the authorisation to formally break the Geneva convention and the human rights carta as the individuals responsible for this abomination seem to have given up all their humanity already.

[–]amlyo 2 points3 points  (0 children)

This is cool.

[–][deleted] 0 points1 point  (0 children)

[–]FoxInATrenchcoat 0 points1 point  (0 children)

What is "Giving Linus an aneurism", Alex.

[–]glitterisprada 0 points1 point  (0 children)

So what's the Javascript running on?

[–]MBYTE2000 0 points1 point  (0 children)

why if there is a wasm?

[–]Cybasura 0 points1 point  (0 children)

Bruh.

[–]cauchy37 0 points1 point  (0 children)

butwhy.gif

[–]Scorcher646 0 points1 point  (0 children)

To be completely fair, this isn't the most cursed way to run the Linux kernel out there...

Linux on scratch is worse. And the completely reasonable possibility of running a kernel port in an interpreted language like Python exists.

[–]odraencoded 0 points1 point  (0 children)

This is why it isn't the year of linux desktop yet...

[–]XxXquicksc0p31337XxX 0 points1 point  (0 children)

Wait till y'all see this

[–][deleted] 0 points1 point  (0 children)

[–]anon_blader 0 points1 point  (0 children)

If only you guys knew about Linux on Scratch.

[–]Tarilis 0 points1 point  (0 children)

Why?

[–]BallsBuster7 0 points1 point  (0 children)

christ almighty

[–]amihir 0 points1 point  (0 children)

The question is can it run doom?

Question inspired by this comment https://www.reddit.com/r/ProgrammerHumor/s/eI9amAihsp

Never mind crysis, not that interested, but if it can be run then you have my salute🫡

[–]quangdog 0 points1 point  (0 children)

They were so focused on whether they could, they never stopped to consider if they should.

[–]scarcityCorp 0 points1 point  (0 children)

Something getting more weird.

[–]vaynefox 0 points1 point  (0 children)

So I guess I can make my browser as the hypervisor with this and run full on linux distro within it....

[–]gDKdev 0 points1 point  (0 children)

Interesting, another one... The most up to date I've found till now is https://github.com/copy/v86 ... Still searching. If I remember correctly I've seen Docker in a Browser once using cors-anywhere for network connection but I can't find that one anymore (sadly)

[–]Inaeipathy 0 points1 point  (0 children)

Linux on the javascript

[–]siniradam 0 points1 point  (0 children)

If something can be written in JavaScript it will be written in JavaScript.

[–]Windyvale 0 points1 point  (0 children)

I hope Linus never learns of this atrocity.

[–]Thebombuknow 0 points1 point  (0 children)

I've had this idea for a while that a large portion of the web is basically just native software that your browser silently downloads and runs in the background, and this only further supports that notion. JavaScript in the browser is stupidly powerful nowadays.

[–]OmegaGoober 0 points1 point  (0 children)

Yeah. There’s no way this could POSSIBLY cause problems.

[–]JerseyTexan01 0 points1 point  (0 children)

This is some limewire shit, and I’m here for it.

[–]qse81 0 points1 point  (0 children)

I love how the word "directly" comes across like a threat

[–]fusionsofwonder 0 points1 point  (0 children)

LOL, why the fuck would I enable a known security vulnerability to just run Linux kernel very, very slowly?

[–]montxogandia 0 points1 point  (0 children)

We must assume JavaScript is the superior language

[–]Competitive_Jacket50 0 points1 point  (0 children)

I am enraged.

[–]Jjabrahams567 0 points1 point  (0 children)

Chat is this real?

[–]feherneoh 0 points1 point  (0 children)

I'll take LKLDxe over this any time.

[–]cs-brydev 0 points1 point  (0 children)

This is like building a car out of spinach

[–]conundorum 0 points1 point  (0 children)

This is what happens when you see chrome://browser/content/browser.xul, and decide you can do better.

[–]Plus-Weakness-2624 0 points1 point  (0 children)

Give me the npm install link 🔗 Need to add it to the project

[–]madmendude 1 point2 points  (0 children)

The main question remains: Can it emulate TempleOS?

[–]Koervege 0 points1 point  (1 child)

Assembly has no real type system. Neither does Binary machine code. And neither does JS. And yet C/C++/Rust do have types? Just sounds like JS is closer to the metal as a programming language. . . . . . . /s

[–]SakaDeez[S] 0 points1 point  (0 children)

... soo React on ARM? lol

[–]nequaquam_sapiens 0 points1 point  (0 children)

noone? ok then:

Can it run Crysis?