UEFI Bindings for JavaScript

codeberg.org

116 points by ananas-dev 3 hours ago


shevy-java - 4 minutes ago

I think there are two philosophies here:

1) JavaScript must stay in the box (aka in the browser).

2) JavaScript as a general purpose programming language.

While I can absolutely understand 1), I have had wanted to access the filesystem via JavaScript, just as I do via ruby or python, for local use only. After I googled for a while, they would say that this is not possible unless one uses npm/node. I think this shows that there are use cases here and the "default" JavaScript, aka 1), does not cover these. I do not like JavaScript, but based on my own use cases, I actually favour 2) far more than 1). So from that point of view, being able to access UEFI can also be useful. So why not.

fnimick - an hour ago

Oh hey, we've reached the "Metal" stage! https://www.destroyallsoftware.com/talks/the-birth-and-death...

faxmeyourcode - 2 hours ago

Love this. An example of complete and total dominion over the machine. Great quote here too lol

> Prometheus stole fire from the gods and gave it to man. For this he was chained to a rock and tortured for eternity.

catapart - 2 hours ago

Can someone break this down for me? Looks like it's using... C? to load a js interpreter which bootstraps an API around all UEFI features? Do I have that right?

And, if so, does that mean that once the API has been bootstrapped, one could actually write an OS in js? Or are there other abstractions that would need to be migrated first?

my_throwaway23 - 2 hours ago

I presume you'll add the network stack next, so that I can use my favourite, most useful packages?

  import isOdd from "https://unpkg.com/is-odd";
eqvinox - an hour ago

> If this makes you grin, you are probably holding the torch.

What if it makes me recoil in horror? screams into the void

bayindirh - 2 hours ago

This project will go places. Like every silly project not intended for production. :)

redvulps - 2 hours ago

next step is to create a UEFI TUI using react (please don't)

sanufar - 43 minutes ago

This is hilarious lol, it’ll be any day now before we get a full JS kernel. Garbage collection could be an obstacle, but I know there have been some kernels written in Go/Java before

juancn - 26 minutes ago

This is both so impressive and cursed that I'm not sure how to feel.

pwdisswordfishy - an hour ago

Does it manage to support floats? I am not sure if those can be safely used in the UEFI environment. (I recall GRUB’s build of Lua being integer-only, and Linux avoiding the use of floating-point arithmetic in kernel mode, but I don’t remember the reason.)

edward28 - 3 hours ago

Wow, this is cursed.

GranPC - 2 hours ago

"The Birth and Death of JavaScript" is coming true after all.

vaylian - 44 minutes ago

Could this be used as a learning tool? Rebooting the computer takes so much more time compared to reloading the browser tab. And you probably can't brick your computer.

Decabytes - an hour ago

I’m always amazed and slightly envious of what programming languages with large developer bases can do. I mean if a language is Turing complete it can do anything, but JavaScript takes this to the extreme.

Mind you I never said anything about quality or performance, obviously doing everything in JavaScript comes with it’s own issues but if you were to say that someone got JavaScript running in the Linux kernel as a POC I wouldn’t even be surprised

lioeters - 2 hours ago

Turning in the widening gyre, the falcon cannot hear the falconer. The center cannot hold.. The old prophecy is coming true.

grougnax - 2 hours ago

Awesome! Everything will be rewritten in JS

Smalltalker-80 - 2 hours ago

Can't wait for browser support for this... ;-)

rafram - an hour ago

This is incredible.

ycombinatornews - an hour ago

> If this makes you grin you are probably holding a torch

Hilarious

fbnszb - 2 hours ago

Yeah, but your [developers] were so preoccupied with whether or not they could, they didn't stop to think if they should.

rezmason - an hour ago

It begins!

g051051 - 3 hours ago

"Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."

Pretty neat, though.

fenwick67 - 2 hours ago

Finally!

outadoc - 2 hours ago

I love it.

bwat49 - 2 hours ago

Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should!

madduci - 3 hours ago

But why?

dfedbeef - an hour ago

Cursed