News for hackers. Stuff that matters.
Re:WASIX, the Superset of WASI Supporting Threads, Processes... by samsquire on Tuesday May 30, 2023 @12:25PM (#36126794)
I think we're always looking for the silver bullet that shall make computer software development easy.

The following technologies were all silver bullets:

* ActiveX, COM Object model, XPCOM

* Unified Modeling Language (UML)

* Extensible Markup Language (XML)

* Computer-aided software engineering (CASE)

* Java Virtual Machine

* Ionic, React Native, Qt, Gtk, Flutter

Something tells me that the problem is bigger than anyone can chew and the abstraction solution is sometimes more complicated than the underlying thing being abstracted.

I think WASI and WASIX is an EXTREMELY important API for the future of computing. It's a chance to create a superior operating system runtime interface.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by lifty on Tuesday May 30, 2023 @12:49PM (#36127173)
Why does it have the chance to be superior?
Re:WASIX, the Superset of WASI Supporting Threads, Processes... by samsquire on Tuesday May 30, 2023 @01:02PM (#36127360)
Compiling native application to operating systems that Wasmer is compiled for including the browser and have the code seamlessly work in all of them, I think that's really promising.

JVM forces you to write in Java or a JVM targeted language but WASM lets you compile any language that creates a WASM backend.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by vineyardmike on Tuesday May 30, 2023 @01:12PM (#36127505)
This

> JVM forces you to write in Java or a JVM targeted language

And this

> WASM lets you compile any language that creates a WASM backend

Are basically the same thing.

There’s no fundamental reason that all these languages couldn’t target JVM byte code instead of WASM. It never happened, not nearly as much as WASM backends are, but it could’ve.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by ShroudedNight on Tuesday May 30, 2023 @01:34PM (#36127818)
It seems that NIH also manifests generationally:

? -> CORBA -> RMI -> SOAP -> REST -> GraphQL?

? -> SOA -> Microservices

? -> EDI / X12 -> XML -> JSON

p-code -> ? -> JVM -> WASM

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by pjmlp on Tuesday May 30, 2023 @03:23PM (#36129324)
Before P-Code there were other ones, there were lots of bytecode based platforms.

Burroughs, all Xerox PARC, Lisp Machines, OS/400, Oberon, Limbo, original Modula-2, QuickBasic, Amsterdam Compiler Toolkit, VB, ...

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by paulddraper on Tuesday May 30, 2023 @07:29PM (#36132580)
Okay, but have you used CORBA?

Or EDI?

It's like saying we had the Model T, but people just keep inventing new cars.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by ShroudedNight on Tuesday May 30, 2023 @09:47PM (#36133559)
I have, albeit not terribly extensively. I will readily agree that there are cogent arguments for replacement that pass the Chesterton's Fence test. But I also see quite a lot of "That's too complicated to bother understanding, I'll just do my own thing"
Re:WASIX, the Superset of WASI Supporting Threads, Processes... by laxd on Tuesday May 30, 2023 @01:37PM (#36127850)
> Compiling native application to operating systems that Wasmer is compiled for including the browser and have the code seamlessly work in all of them.

And thanks to stuff like this, contemporary browsers are now so complicated that they only run on the top handful of platforms. So how is it progress? I bet JVM still runs more places than modern browsers.

> VM forces you to write in Java or a JVM targeted language but WASM lets you compile any language that creates a WASM backend.

WASM forces you to write in something that has a WASM backend just like JVM forces you to write in something that has a JVM backend. It's just the same all over again. And again.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by the8472 on Tuesday May 30, 2023 @01:28PM (#36127729)
> It's a chance to create a superior operating system runtime interface.

But they're not doing io_uring style syscall queues.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by boricj on Tuesday May 30, 2023 @05:00PM (#36130736)
> I think WASI and WASIX is an EXTREMELY important API for the future of computing. It's a chance to create a superior operating system runtime interface.

Superior operating system runtime interface and POSIX don't rhyme. The fossilization of POSIX on Unix-like systems, endlessly piling stuff on top of that creaky foundation is probably the single biggest issue holding back the future of computing.

WASIX is probably a pragmatic design if you want to run your existing Unix programs on top of WASM. If anything, it's for the past of computing.

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by syrusakbary on Tuesday May 30, 2023 @05:17PM (#36130954)
I wonder what is the system call ABI that your current operating system uses...
Re:WASIX, the Superset of WASI Supporting Threads, Processes... by boricj on Tuesday May 30, 2023 @05:47PM (#36131382)
What the system call ABI that my modern operating system ought to have is not one that thinks fork() as a fundamental primitive is fit for purpose on modern computers [1], for starters. Mind you, my grievances on the design and typical implementation of Unix-like operating systems go far beyond fork(), but it's as good an entry point as any for this discussion.

I encourage you to read the design documents for the Fuchsia operating system, especially those for the Zircon kernel [2] for a fresh, legacy-free take on a system call interface.

[1] https://www.microsoft.com/en-us/research/uploads/prod/2019/0...

[2] https://fuchsia.dev/fuchsia-src/concepts/kernel

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by tokera on Wednesday May 31, 2023 @01:28AM (#36134787)
i coded the fork syscall, so I understand all this (f.y.i. I much prefer rust to C its much better designed).

what you must realize is that one does not have to use a syscall if they don't like it in (e.g. just use rust to code your app and it will never call the fork syscall)... but taking that choice away from others who want to use it is unfair as its denying them access to the WASM ecosystem (e.g. bash)

Re:WASIX, the Superset of WASI Supporting Threads, Processes... by boricj on Wednesday May 31, 2023 @03:07AM (#36135385)
It looks like one can easily call fork() in an unsafe block from Rust [1], assuming it's provided by the target's libc.

OpenVMS for example does not provide fork(). What it does provide is vfork() by doing some internal book-keeping within the C run-time library and delaying the actual child process creation until exec() is called [2].

The POSIX specification eventually standardized posix_spawn() [3] as a partial alternative for fork() due to its numerous issues, some of which are detailed in the rationale section of its specification. Sadly, it appears its usage is not as widespread as it could be.

I'm not blaming the WASIX project for providing POSIX semantics since running POSIX-compliant programs is an explicit design goal. What I do wish is that more people realize that POSIX isn't the pinnacle of operating system interface engineering or some sort of holy scripture that shall not be questioned. It's 1970s legacy from long defunct hardware and obsolete software (think PDP-11 and Version 7 Unix) that was written down as a specification in the 1980s.

[1] https://docs.rs/libc/latest/libc/fn.fork.html

[2] https://vmssoftware.com/docs/VSI_C_RTL_REF_MAN.pdf

[3] https://pubs.opengroup.org/onlinepubs/9699919799/