| Post Aum1If7DY0b4yTFHl2 by [email protected] | |
| More posts by [email protected] | |
| Post #AuX9FewDdSfxokmUwS by [email protected] | |
| 0 likes, 0 repeats | |
| #BabelOfCode 2024Week 11 (??)Language: Textual WasmConfidence level: Medium hig… | |
| Post #AuX9Ff4N99CKE2b0eO by [email protected] | |
| 0 likes, 0 repeats | |
| On initially cracking open the MDN guide¹, *so far* it kind of seems like it o… | |
| Post #AuX9FfBSimrwa1ufhY by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc they complain about the syntax, not the composite structure.in any case, j… | |
| Post #AuXCTKQ11Sta5uvaWO by [email protected] | |
| 0 likes, 0 repeats | |
| It's not actually clear what file extension you're supposed to use for … | |
| Post #AuXCTKXoYT8MU6Zog4 by [email protected] | |
| 0 likes, 0 repeats | |
| I check out Wabt and try to build it, and… oh. There's… no cmake, on th… | |
| Post #AuXCTKeu86nyq5tTjE by [email protected] | |
| 0 likes, 0 repeats | |
| It seems I can assemble³ with:wat2wasm source.wast -o exec.wasmAnd execute wit… | |
| Post #AuXCTKkvlhcr8miI7c by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc wasmtime generates code that is competitive with C on computation-heavy wo… | |
| Post #AuXCWpWvo6MhSCpfvc by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc also wasmtime has features like "bindings" and "real multit… | |
| Post #AuXCqEfiYTC8vpCB8q by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark Bindings to what? | |
| Post #AuXDju7MA6pLOtfTqC by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc to whatever code you want; you can add host functions written in Rust that… | |
| Post #AuXEKim1InHKvqFB2m by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark Can I run wasmtime in a mode where only things that would be legal … | |
| Post #AuXGd6PaM2mBMhdui0 by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark thats effectively the default if you aren’t doing any wasi … | |
| Post #AuXGd6VxyJsdgUd0ee by [email protected] | |
| 0 likes, 0 repeats | |
| @endocrimes @whitequark Say I'm running some MDN sample code https://develo… | |
| Post #AuXGd6chZHGg1NmO9Y by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc first off: nothing but browser and node.js will provide you with the abili… | |
| Post #AuXGi1Xxrxhjj0uPc8 by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc third: the browser doesn't provide anything by default either, you hav… | |
| Post #AuXGoKlHLHgD3X949Q by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark Okay. Imagine it doesn't need to be console.log— what is the … | |
| Post #AuXHDkkNrjOat8qbYm by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc consider that wasmtime doesn't have a conception of strings (strings a… | |
| Post #AuXHEiSjqSvq5n3MO0 by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc (this actually holds true for the browser as well) | |
| Post #AuXHMoGMADJ6Ol7YmW by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc without writing the entire thing for you, this wasmtime-py example is the … | |
| Post #AuXHcodiWxQGCTgDuy by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark Okay. Let me take a different tack.I would like to be able to exami… | |
| Post #AuXHcq5P9VAEgddqiG by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark wasm has no ambient capabilities. it can’t do any kind of io… | |
| Post #AuXHcqDYfBgb5vSMQC by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark there’s a standardized set of vaguely unixy functions a runt… | |
| Post #AuXHcqJEK6DtNW6tGK by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc wasmtime automatically provides WASI APIs if your file imports the… | |
| Post #AuXHeF8xTWhUgqyPpY by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc doesn't wasmtime implement WASI including wasi-cli, which … | |
| Post #AuXHeFFL5nnx0dxVmC by [email protected] | |
| 0 likes, 0 repeats | |
| @unlambda @mcc it does but I'm not sure this would be easier for Andi to le… | |
| Post #AuXHleEqZT8mY2G6Ea by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc- you can debug wasmtime-generated code with gdb or lldb or what other nati… | |
| Post #AuXHqiZbsiK3RMO7Bw by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc Wasm is a very low-level API, it's better to think about it like "… | |
| Post #AuXHvasVv2t31RYTaK by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc I would suggest looking at WASI and also building some C programs using wa… | |
| Post #AuXI1TXu5sHG1DifdQ by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @unlambda I am not running in a browser, I am running at the comman… | |
| Post #AuXI9EdBQlIo4stB8y by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc wasmtime *does* implement the component model, FWIW: https://c… | |
| Post #AuXIBYARlVsVFSYGLQ by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @unlambda if you want do prints while not bringing in bespoke code in some… | |
| Post #AuXIEr7LlYCytDgBTk by [email protected] | |
| 0 likes, 0 repeats | |
| @tedmielczarek @mcc it does but if I start telling Andi about components she… | |
| Post #AuXIJg36LVTE0czVrs by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark "you can examine the linear memory yourself"Can I? How?Th… | |
| Post #AuXIO1dw09li8lIE7s by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @tedmielczarek The output of this program is a single integer, whic… | |
| Post #AuXIXMys2PXyvMXce0 by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc wasmtime is a JIT compiler; it abstracts away the details of how it runs y… | |
| Post #AuXJyWCnwrjvJ6ZICe by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc oh no way they made the component model real? | |
| Post #AuXJyWIpaSYnbnO6b2 by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc wait it’s. taking the wasi preview1 binary and transpiling i… | |
| Post #AuXJyWO9GgoVsHsLsu by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc this is the only practical way to ship some of the applications i … | |
| Post #AuXKMWBVg4qcBzPGls by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc I would’ve just implemented the wasi preview1 functions dire… | |
| Post #AuXKMWHtILx4VmOMiW by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc I considered that and concluded that it makes me want to slit my w… | |
| Post #AuXKMcXM3lt1tTfnea by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc doesn’t the component model wrapper add a lot of allocations… | |
| Post #AuXKNTtVg86HNXRk2q by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc I don't care lmao | |
| Post #AuXKSfI4jdU0AgPOOu by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc the applications I build are one big multiple second chunk of comp… | |
| Post #AuXKddCaq98qsb4cGO by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc I entirely avoided shipping anything that requires WASI on top of … | |
| Post #AuXOmeW3iw0jNTjfRA by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark @tedmielczarek I think this is the example you're looking … | |
| Post #AuXOmed9IZgLjT3KUK by [email protected] | |
| 0 likes, 0 repeats | |
| @unlambda @whitequark @tedmielczarek okay this is actually well compact enough … | |
| Post #AuXOmeioxUDe13hrKS by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @unlambda @tedmielczarek nobody except for spec authors and engine test su… | |
| Post #AuXOmf3Nj2fL2pKHNQ by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark @tedmielczarek I suspect there might be a simpler way to do th… | |
| Post #AuXco8H5xxEPJvKuQ4 by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc this post brought to you by externref gang | |
| Post #AuXco8N7bY3Hcc9ioS by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc wow externref is fun :D | |
| Post #AuXco8SnGSaZuCoFea by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @whitequark new and exciting ways to obfuscate your javascript(module (typ… | |
| Post #AuXco8You3PSCtd42y by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc oh this is evil, I like it | |
| Post #AulboI2kGcEfsMZfpw by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc | |
| Post #AuljsotAtAqUXJlisa by [email protected] | |
| 0 likes, 0 repeats | |
| Been reading the docs and I have a LOT to say butI've been using this lovel… | |
| Post #AuljsozuU8EWsCv6NU by [email protected] | |
| 0 likes, 0 repeats | |
| So. Creeping along with this. I am posting tihs from a bus.Learned some more ab… | |
| Post #Auljsp6e55cZD64TsO by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc Hotspot isn't really a stack machine. *Java bytecode* is written for a… | |
| Post #AuljspHzOuh9mHNXYe by [email protected] | |
| 0 likes, 0 repeats | |
| The semantics of this LISP/Forth displease me, aesthetically. You kind of go fo… | |
| Post #AulohzHyNhZxNQ1Qdk by [email protected] | |
| 0 likes, 0 repeats | |
| …because the WASM committee sorta believes nobody ever *writes* the textual f… | |
| Post #AulohzPPw1X9kVVNFA by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc is there a way to link handwritten wasm text against compiler output yet, … | |
| Post #AulohzVRZcM23CKBdY by [email protected] | |
| 0 likes, 0 repeats | |
| @rcombs @mcc is there any issue doing that? | |
| Post #AulohzbTDDAuLt901w by [email protected] | |
| 0 likes, 0 repeats | |
| Due to the byte nonsense, and it turning out there's no cross-compatible wa… | |
| Post #Aulohzuc42UHJG6Hrs by [email protected] | |
| 0 likes, 0 repeats | |
| So now I can like… actually start on this part of the project. What I'm r… | |
| Post #Auloi0DOwBW4FWtI9Y by [email protected] | |
| 0 likes, 0 repeats | |
| I imagine the above would be explained if I read the spec rather than just blog… | |
| Post #AulpRiTLEmBEXe92SO by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc last time I looked into this, I just didn't see any mechan… | |
| Post #AulpRiaQoPqqtdShVY by [email protected] | |
| 0 likes, 0 repeats | |
| @rcombs @mcc as best as i can tell, .o files are normal Wasm modules (i can run… | |
| Post #AulpVVxbhL1StZ71l2 by [email protected] | |
| 0 likes, 0 repeats | |
| @rcombs @mcc you can interconvert wasm<>wat with e.g. https://crates.io/c… | |
| Post #AulrWhTsYBHsp6tt3Y by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc hmm, either this has changed since I last looked or I'm mi… | |
| Post #AulrWhZuBm6l7nihRw by [email protected] | |
| 0 likes, 0 repeats | |
| @rcombs @mcc like for SIMD? | |
| Post #AulvDDnb5BRD555gno by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc Also (maybe relevant for the JIT comment): the stack at any gi… | |
| Post #AulvOJn19LluqW6wPw by [email protected] | |
| 0 likes, 0 repeats | |
| @mega @mcc there is the caveat that both wasm and java have the separate concep… | |
| Post #AulvVsizf0DzDqpql6 by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mega if i am writing/generating code why would i use the stack for… | |
| Post #Aulvi9hYMoFHLl0wfQ by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @mega the stack machine that JVM and Wasm have, and the SSA form that LLVM… | |
| Post #AulwUuLQFhkxuWuSMy by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @rcombs @mcc wasm-ld complains about missing relocation metadata | |
| Post #AulwUuTDmhzkIiYgWe by [email protected] | |
| 0 likes, 0 repeats | |
| @whitequark @mcc @rcombs here’s how i got it working (under nix-shell -p llvm… | |
| Post #AulwUuZFQIocbPNUv2 by [email protected] | |
| 0 likes, 0 repeats | |
| @easrng @mcc @rcombs yep looks reasonable to me! | |
| Post #Aum1If7DY0b4yTFHl2 by [email protected] | |
| 0 likes, 0 repeats | |
| Also [posting this from a donut shop in a mysterious town in Washington where t… | |
| Post #Aum1NVt7HZANntxm4G by [email protected] | |
| 0 likes, 0 repeats | |
| @simon are those regular memories or FFI memories | |
| Post #Aum1NilRPPkdjrTKPQ by [email protected] | |
| 0 likes, 0 repeats | |
| @mcc @simon there is only one kind of memory. by default there’s no memory at… |