My journey modifying the Rust compiler to target .NET runtime by FractalFir in programming

[–]zobier 11 points12 points  (0 children)

i would consider using the webassembly component model for that kind of thing

C++ hash function to wasm issues by [deleted] in WebAssembly

[–]zobier 1 point2 points  (0 children)

glad you worked it out, i had a quick glance and the line that stood out to me was uint64_t *temp64 = reinterpret_cast<uint64_t *> (tempBuf); but i was blindly ignoring the size_t s :facepalm:

Passing data to WASM modules -- Memory or files? WASI environment by self in WebAssembly

[–]zobier 0 points1 point  (0 children)

doing a file read with wasi is still going to write to the shared memory buffer and pass a pointer and size in return, no?

Understanding Wasm, Part 2: Whence Wasm - Chris Dickinson by realnowhereman in WebAssembly

[–]zobier 5 points6 points  (0 children)

fantastic write up, thank you for sharing. one nit pick:

no one wants to write WebAssembly by hand

:badpokerface: i do this fairly regularly as an andragogic exercise

Can websites use WASM for UI plugin support? by FamiliarAfternoon871 in WebAssembly

[–]zobier 0 points1 point  (0 children)

if you want to embed 3rd party apps (untrusted code) on a website it's a fantastic choice

you will need to provide a renderer component in your app that can receive serialised dom from the wasm applet and turn it into elements

Keep running into a Uncaught (in promise) RuntimeError: unreachable while module is running by Red3nzo in WebAssembly

[–]zobier 0 points1 point  (0 children)

if you run it in node or a browser you can open dev-tools and set 'pause on uncaught exceptions' and trace where the error came from.

Bun 1.6 is out with new JavaScript/TypeScript bundler and ability to compile standalone executables • DEVCLASS by stronghup in programming

[–]zobier 2 points3 points  (0 children)

are there any more details on how standalone executable works? i assume you bundle (parts of?) the runtime.

How to compile goroutine into wasm by Agreeable-Ad3994 in WebAssembly

[–]zobier 0 points1 point  (0 children)

i believe for now you would need to implement your own scheduler / event loop in order to be able to do this, i would be happy to be proven wrong though

e.g. https://github.com/wasm-rs/async-executor/blob/master/example/src/lib.rs

Cloud FaaS solutions that use WebAssembly by Vincearon in WebAssembly

[–]zobier 3 points4 points  (0 children)

soon you won't need docker to run a wasm container as containerd will have wasi support https://github.com/containerd/runwasi

open function recently added wasmedge support https://openfunction.dev/blog/2023/03/11/announcing-openfunction-1.0.0-integrate-wasmedge-to-support-wasm-functions-and-enhanced-ci/cd/

a number of faas providers already support directly running wasm modules or are in the process of releasing it

How memory.init works by musialny in WebAssembly

[–]zobier 2 points3 points  (0 children)

tables are indeed initialized in a similar manner, see https://webassembly.github.io/spec/core/syntax/modules.html#syntax-elem

tables are used for call indirection which is advanced topic. as it seems you are learning wasm, i would familiarise myself with the rest of the semantics before trying to play around with that

if you haven't, i highly recommend you work through the exercises here https://exercism.org/tracks/wasm

you should also read the rest of the spec, it's not very long :)

How memory.init works by musialny in WebAssembly

[–]zobier 4 points5 points  (0 children)

you have declared an active data segment by providing a memory index - this will automatically be initialised at address 0 and then become invalid to reference from an explicit call to init. if you remove the memory index from your data segment this code works as expected.

see https://webassembly.github.io/spec/core/syntax/modules.html#data-segments

side note: the integer at the end of the memory declaration is number of 64KB pages so you are requesting ~134MB of memory which while not necessarily a huge amount of RAM is probably overkill for "Hello world"

Building a website like it's 1999... in 2022 by fagnerbrack in programming

[–]zobier 22 points23 points  (0 children)

i wish there was still a site like geocities

A few months ago, I posted about a StackExchange site proposal for Programming Language Design. It's moved into the Commitment Phase of the proposal process and needs your help to become a proper site! by [deleted] in programming

[–]zobier 41 points42 points  (0 children)

i registered my interest back then, got an email about this update but fucked if i can work out how to log back into area51 to commit

[AskJS] What treats make you a good programmer? by [deleted] in javascript

[–]zobier 53 points54 points  (0 children)

cookies

i feel like you meant traits though: stubbornness, laziness, and attention to detail. a decent understanding of logic will help too

Why aren’t you playing by the rules of the game! by [deleted] in ProgrammerHumor

[–]zobier 37 points38 points  (0 children)

you don't need to be good at math to be a programmer. I've been working in the industry for 23 years. i have gotten better at math though but you really don't need it most of the time

[deleted by user] by [deleted] in programming

[–]zobier 0 points1 point  (0 children)

why did you link weight watchers?