Live data from Hacker News

BSD on Windows: Things I wish I knew existed

virtuallyfun.com

71–80 of 115 posts

Re: BSD on Windows: Things I wish I knew existed

#71
post #62

Earlier quoted context omitted.

I guess WSL/WSL2 is Microsoft's mea culpa . :D

Notice how Windows, FreeBSD, NetBSD, and (removed in 6.0) OpenBSD all have Linux emulation/compat layers. This is in fact incredibly sad, for multiple reasons: - This is what POSIX was meant to address; there aren't all that many Linux-specific APIs that ordinary applications actually need. Proof: browse the ports/packages on any BSD; all the apps (with extremely few notable omissions) are there and working fine. - V…

This is relevant to my interests. What roadblocks did you run into when you attempted to build statically? I assume your goal was to have a single binary of Love2D so you can swap it around and not worry about glibc version? (As God intended imo; not religious but games should be one contained thing imo)

Am curious to see what it does to avoid a static build.

Re: BSD on Windows: Things I wish I knew existed

#72
post #62

Earlier quoted context omitted.

I guess WSL/WSL2 is Microsoft's mea culpa . :D

Notice how Windows, FreeBSD, NetBSD, and (removed in 6.0) OpenBSD all have Linux emulation/compat layers. This is in fact incredibly sad, for multiple reasons: - This is what POSIX was meant to address; there aren't all that many Linux-specific APIs that ordinary applications actually need. Proof: browse the ports/packages on any BSD; all the apps (with extremely few notable omissions) are there and working fine. - V…

POSIX only defines source-code level compatibility. However, all OSes are free to implement their system calls any way they want.

In order to run binaries compiled for a specific OS, you need to emulate that OS's (i.e. kernel's) ABI. There's no way around that.

The only way to achieve true binary compatibility would be to use a system-level virtual machine, ala Inferno [0] or PhantomOS [1].

[0] https://www.inferno-os.org/

[1] http://phantomos.org/

Re: BSD on Windows: Things I wish I knew existed

#73
post #62

Earlier quoted context omitted.

I guess WSL/WSL2 is Microsoft's mea culpa . :D

Notice how Windows, FreeBSD, NetBSD, and (removed in 6.0) OpenBSD all have Linux emulation/compat layers. This is in fact incredibly sad, for multiple reasons: - This is what POSIX was meant to address; there aren't all that many Linux-specific APIs that ordinary applications actually need. Proof: browse the ports/packages on any BSD; all the apps (with extremely few notable omissions) are there and working fine. - V…

Well said, I hate all that autoconf hell really. Most of my programs can be compiled pretty much anywhere (or easy ported). Not that I write big complicated stuff, but its doable. One thing is unavoidable tho, but its ok, because its special platform: #ifdef __CYGWIN__

Re: BSD on Windows: Things I wish I knew existed

#75
post #61

Earlier quoted context omitted.

Microsoft did everything, like everything and more, to kill every alternative platform on the planet. Hedging their bets with half-hearted posix support was part of that effort. If not for that MSN vs Internet fiasco, they would succeed.

I never liked that point of view, because while it is true they did their part, the OEMs and consumers also did theirs. Also as seen nowadays by many FAANG efforts, "do no evil" marketing stunts, Playstation and Nintendo with their exclusive deals, they are not alone in the desire to achieve that goal. Ironically, while UNIX won the server room, the Linux wars replacing the UNIX wars, is kind of what killed the deskt…

Well, the problem with world domination plans (Microsoft included), is that every actor has one, and they don't necessarily, ehm, align.

So the non-desktop part was lost by Microsoft, and this resulted in the world we have now, Linux derivatives and all. But for a while, sometime around 1996-2006, it definitely felt like they almost had it. This is when I began my official dev career and that summer I could barely find a non-MS stack shop.

And yes, the OSS movement didn't manage to unify the desktop. And Microsoft has nothing to do with it.

I still like the landscape much better.

Re: BSD on Windows: Things I wish I knew existed

#76
post #62

Earlier quoted context omitted.

I guess WSL/WSL2 is Microsoft's mea culpa . :D

Notice how Windows, FreeBSD, NetBSD, and (removed in 6.0) OpenBSD all have Linux emulation/compat layers. This is in fact incredibly sad, for multiple reasons: - This is what POSIX was meant to address; there aren't all that many Linux-specific APIs that ordinary applications actually need. Proof: browse the ports/packages on any BSD; all the apps (with extremely few notable omissions) are there and working fine. - V…

Nice rant. Upvoted.

Re: BSD on Windows: Things I wish I knew existed

#77

Not sure that NT kernel is inferior to UNIX/POSIX. It was by David Cutler modelled after VMS, which was state of the art at one point.

The kernel, I've been told by people more knowledgeable about this things than myself, is a work of beauty. But the layers and layers of Win32 that sit on top of it do a great job of covering that up.

Re: BSD on Windows: Things I wish I knew existed

#78
post #62

Earlier quoted context omitted.

Notice how Windows, FreeBSD, NetBSD, and (removed in 6.0) OpenBSD all have Linux emulation/compat layers. This is in fact incredibly sad, for multiple reasons: - This is what POSIX was meant to address; there aren't all that many Linux-specific APIs that ordinary applications actually need. Proof: browse the ports/packages on any BSD; all the apps (with extremely few notable omissions) are there and working fine. - V…

POSIX only defines source-code level compatibility. However, all OSes are free to implement their system calls any way they want. In order to run binaries compiled for a specific OS, you need to emulate that OS's (i.e. kernel's) ABI. There's no way around that. The only way to achieve true binary compatibility would be to use a system-level virtual machine, ala Inferno [0] or PhantomOS [1]. [0] https://www.inferno-os…

I don’t think the point was about ABI compatibility across operating systems—that’d be unreasonable. It’s more so about using POSIX API’s as much as possible to enable portability rather than relying on Linux-specific API’s that make compiling the code an unnecessarily frustrating experience. Sometimes, using Linux-specific API’s is inevitable, but in the overwhelming majority of cases, POSIX API’s work just fine and would make the code instantly more portable.

Re: BSD on Windows: Things I wish I knew existed

#79

Earlier quoted context omitted.

not really, the exe's are a.out so it's more like EMX. It's broken up like services more like HURD, and extended to 32bit on Win16. It's far more cooler being able to run on Windows 3.1

Sure, but from a user perspective? It says you could run vi/gcc/etc. in BoW, which you can easily do. I don't know why GGP would want to spend millions (surely would cost way more than millions) nor billions recreating something that already exists?

You're looking too close to the trees gcc/vi instead of the BSD forest.

BOW's only weakness is its single user mode, more so a limitation of being a Win16. If it'd been pushed harder to a NT service/client/server DLL it'd have been a much bigger player.

It's all moot, Pink/taligent died, Virtual Machines is where everyone runs their stuff these days, OS/2 had the driver/disk/filesystem stuff done right.

Re: BSD on Windows: Things I wish I knew existed

#80

Not sure that NT kernel is inferior to UNIX/POSIX. It was by David Cutler modelled after VMS, which was state of the art at one point.

Maybe after decades we have to accept that batched, concurrent I/O with asynchronous notifications is the least bad interface that can exploit the potential of modern hardware and let the simpler to use default Unix I/O model (blocking, synchronous) go. If this happens I hope we'll get a better designed API than some hacks around eBPF and io_uring.
Post reply on HN