Live data from Hacker News

UEFI Bindings for JavaScript

codeberg.org

71–80 of 117 posts

Re: UEFI Bindings for JavaScript

#71

[dead]

Are em-dashes really that common to use or did I just start noticing them after LLMs became popular for rewriting comments? Not implying your comment is LLM generated, clearly it isn't but asking as a genuine question.

Pretty dang common. OS X and macOS (and maybe iOS and iPadOS, though I'm not certain) have been autocorrecting "--" into "—" for over a decade. Windows users have been using Alt codes for them since approximately forever ago: https://superuser.com/q/811318.

Typography nerds, which are likely overrepresented on HN, love both em dash and en dash, and we especially love knowing when to use each. Punctation geeks, too! If you know what an octothorp or an interrobang are, you've probably been using em dashes for a long time.

Folks who didn't know what an em dash was by name are now experiencing the Baader-Meinhof phenomenon en masse. I've literally had to disable my "--" autocorrect just to not be accused of using an LLM when writing. It's annoying.

Re: UEFI Bindings for JavaScript

#72
post #71

Earlier quoted context omitted.

Are em-dashes really that common to use or did I just start noticing them after LLMs became popular for rewriting comments? Not implying your comment is LLM generated, clearly it isn't but asking as a genuine question.

Pretty dang common. OS X and macOS (and maybe iOS and iPadOS, though I'm not certain) have been autocorrecting "--" into "—" for over a decade. Windows users have been using Alt codes for them since approximately forever ago: https://superuser.com/q/811318 . Typography nerds, which are likely overrepresented on HN, love both em dash and en dash, and we especially love knowing when to use each. Punctation geeks, too!…

⌥- produces a – as well. That's sometimes easier than typing `--` and hoping for the best.

Re: UEFI Bindings for JavaScript

#73
post #71

Earlier quoted context omitted.

Are em-dashes really that common to use or did I just start noticing them after LLMs became popular for rewriting comments? Not implying your comment is LLM generated, clearly it isn't but asking as a genuine question.

Pretty dang common. OS X and macOS (and maybe iOS and iPadOS, though I'm not certain) have been autocorrecting "--" into "—" for over a decade. Windows users have been using Alt codes for them since approximately forever ago: https://superuser.com/q/811318 . Typography nerds, which are likely overrepresented on HN, love both em dash and en dash, and we especially love knowing when to use each. Punctation geeks, too!…

It really is. We dash-users are the real and most important victims of the AI revolution. I hope someday our story will be told (by the machines)

Re: UEFI Bindings for JavaScript

#74
post #56

Earlier quoted context omitted.

Who needs to garbage collect? Just leak memory until the system dies! That strategy seems to be good enough for claude code, anyway.

If it’s good enough for missile guidance systems, it’s good enough for me.

I don't have real context here, but I can imagine that a platform where the hardware costs millions of dollars, will be booted up in "Production" exactly once, and is guaranteed to be physically destroyed before it hits 1 day of uptime, just "Give it 128GB of RAM and YOLO (literally)" is great advice!

Note: 128GB of DRAM may add another million dollars to the build cost by 2027 at the current derivative of the $/GB curve

Re: UEFI Bindings for JavaScript

#75
post #51

Earlier quoted context omitted.

> And, if so, does that mean that once the API has been bootstrapped, one could actually write an OS in js? I bet somebody has done that. https://www.google.com/search?q=os+kernel+in+javascript Seems like a small number of hobbyists have attempted. I've heard of people doing this with other high level languages. Basically you need enough low level code to bootstrap a VM. Once you have that, you can make the high leve…

Automatic Garbage Collection in a kernel probably won't work: I vaguely remember hearing about someone trying to use .Net in the Windows kernel. The big problem is garbage collection: If I remember correctly, the fact that "any" operation can fail with an out of memory exception was a huge problem. Another problem was that random pauses for garbage collections in the kernel had major stability issues. In short, I hop…

> I vaguely remember hearing about someone trying to use .Net in the Windows kernel.

Microsoft did that, it was called Longhorn. That release cycle was long delayed and they abandoned most of its ambitious projects, especially C# in the kernel, and the result was Windows Vista.

GC was not the only reason for the failure of that project. Someone could write a book about it. A lot of it was actually more about the organization of people. I also had heard from insiders that lack of ahead of time compilation was an issue. The other issue I remember hearing about was a complaint that Windows components were not layered cleanly and they ended up with circular dependencies when they tried to rewrite them.

I think it's possible to write a kernel with GC, and to still be judicious about memory usage with a GC language. And I say that as someone who happens to think that a big issue with modern software is that too many programmers are spending their whole education and career to depend on GC without thinking about it carefully. That is to say I'm already a skeptic of high-level languages and GC, but I will still afford that it is technically possible.

Re: UEFI Bindings for JavaScript

#76

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.)

Floating point was not supported in the Linux kernel to avoid having to save/restore FP registers.

Re: UEFI Bindings for JavaScript

#77

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…

You are missing one option:

0) JavaScript must be abolished from the browser

Re: UEFI Bindings for JavaScript

#80

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?

You don't need a JS bootloader to write an OS in JS. The bootloader just drops the machine into some memory address for it to start executing your OS init script. that bit could be a Javascript interpreter. You can't do much with the architecture in Javascript though, because it doesn't allow you to map memory directly to your types (unless there's some ungodly nonesense I'm not aware of) so you'll have to drop into…

You should be able to write a meta circular VM in JavaScript that targets bare metal without any C or asm.
Post reply on HN