I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript? Or maybe at least Typescript-to-WASM compiler to skip JS output?
Reaching the Unix philosophy's logical extreme with WebAssembly
31–40 of 142 posts
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#32Earlier quoted context omitted.
Only if the NAND gate is expressed as a file
Okay… please… someone implement ‘nand’ and write a script that does something simple using only it.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#33The UNIX philosophy’s logical extreme is the NAND gate. Does one thing, does it well, and can be composed into arbitrary applications.
One thing? It does a logical and and then negates the result. The shell doesn’t really let users compose commands this way, but alias NAND="AND | NEG" Also, a NAND command would need to have 2 stdin ’s.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#34I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript? Or maybe at least Typescript-to-WASM compiler to skip JS output?
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#35The UNIX philosophy’s logical extreme is the NAND gate. Does one thing, does it well, and can be composed into arbitrary applications.
One thing? It does a logical and and then negates the result. The shell doesn’t really let users compose commands this way, but alias NAND="AND | NEG" Also, a NAND command would need to have 2 stdin ’s.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#36The UNIX philosophy’s logical extreme is the NAND gate. Does one thing, does it well, and can be composed into arbitrary applications.
One thing? It does a logical and and then negates the result. The shell doesn’t really let users compose commands this way, but alias NAND="AND | NEG" Also, a NAND command would need to have 2 stdin ’s.
Sorry? Take a second to think about what you're saying.
In what conceivable sense is "doing a logical and" one thing while "doing a logical nand" isn't?
You can equally claim that
x & y
is really just (x ↑ y) ↑ (x ↑ y)Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#37I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript? Or maybe at least Typescript-to-WASM compiler to skip JS output?
I mean probably, yeah, but why? You'd still need JS to involve the DOM with anything, and that's the performance expensive stuff, so might as well just do the whole thing in JS.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#38I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript? Or maybe at least Typescript-to-WASM compiler to skip JS output?
At that point, why even bother with React? Just write a real user interface.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#39Earlier quoted context omitted.
Okay… please… someone implement ‘nand’ and write a script that does something simple using only it.
https://nandgame.com/
I don't know how I feel about the message "This is optimal!" displaying when you use one NAND gate to build an inverter at level 2. Level 1 forces you to build an NAND gate out of (1) an AND gate, plus (2) an inverter. It feels like it'd be more optimal to just reuse that inverter.
(And then level 3 is an AND gate, the other primitive† you started with...)
† Technically, you start with two primitives, implementing f(a, b) = a ∧ b and g(a,b) = ¬(b ⟶ a). You also get the ability to provide 0 and 1 as fixed inputs, thus ¬a ≡ g(a,1). What you lose after implementing the NAND gate is the ability to provide a fixed 1 input - instead, you are informed that you assume all gates automatically draw from this. Worst of all possible worlds.