Live data from Hacker News

WasmFX: Effect Handlers for WebAssembly

wasmfx.dev

21–30 of 44 posts

Re: WasmFX: Effect Handlers for WebAssembly

#21
post #10

I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding. It looks like the juicy details are in the Explainer: https://github.com/WebAssembly/stack-switching/blob/main/pro...

The problem with abstracting control flow has always been the ease of composition within a program. I'm not sure if algebraic effects make that better, although I like the simplest form (exceptions with resume) for error handling. It's kind of like abelian groups and hyper graphs. They generalize many domains very nicely, and are an attractive abstraction. But it turns out they're too abstract for any individual doma…

But that’s the point…? it’s webassembly not JavaScript or Python. You aren’t really expected to write any of this by hand, even if it’s basically what async functions do under the hood when you type await whatever.

Re: WasmFX: Effect Handlers for WebAssembly

#22

I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding. It looks like the juicy details are in the Explainer: https://github.com/WebAssembly/stack-switching/blob/main/pro...

Does this approach avoid function coloring? That is: do legacy calls of functions containing yield instructions just treat these as nop?

Re: WasmFX: Effect Handlers for WebAssembly

#24
post #11

the monika 'fx' is often used by graphics pipelines or rendering to mean special effects, and thus often take on the connotation of being related to graphics or rendering (e.g., javaFX). I dont think wasmfx should use this monika, as it makes it sound more graphics related than it really is. Naming and connotation of a name is important, as it frames the way people think about things.

Do you mean 'moniker'?

Re: WasmFX: Effect Handlers for WebAssembly

#25

I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding. It looks like the juicy details are in the Explainer: https://github.com/WebAssembly/stack-switching/blob/main/pro...

Any chance you still know the title of the strangeloop presentation?

Re: WasmFX: Effect Handlers for WebAssembly

#26
post #11

the monika 'fx' is often used by graphics pipelines or rendering to mean special effects, and thus often take on the connotation of being related to graphics or rendering (e.g., javaFX). I dont think wasmfx should use this monika, as it makes it sound more graphics related than it really is. Naming and connotation of a name is important, as it frames the way people think about things.

Do you mean 'moniker'?

[deleted]

Re: WasmFX: Effect Handlers for WebAssembly

#27

Earlier quoted context omitted.

That's okay; _using_ WebAssembly is getting easier bit by bit. Features like this one allow the high level programming language features you know and love to be implemented efficiently behind the scenes.

But they make making WASM implementations harder to make.

That's how the core has to be, like Vulkan, making the core harder allows for more control, a better foundation. Then we load up those core libraries with easy APIs that are super powerful and can do what was never thought possible.

Same for WebGPU.

So I think WASM is doing this exactly the right way as long as it stays powerful and flexible at the core.

Re: WasmFX: Effect Handlers for WebAssembly

#28

could exception handling be implemented with this? if so would that make the exception handling proposal superfluous?

> could exception handling be implemented with this?

Yes.

> if so would that make the exception handling proposal superfluous?

The exception handling proposal is a subset of this proposal. This proposal doesn't replace it, it completes it.

Re: WasmFX: Effect Handlers for WebAssembly

#29

Earlier quoted context omitted.

That's okay; _using_ WebAssembly is getting easier bit by bit. Features like this one allow the high level programming language features you know and love to be implemented efficiently behind the scenes.

But they make making WASM implementations harder to make.

If you are talking about things like the garbage collection, yes, but this proposal is trivial to implement.

Re: WasmFX: Effect Handlers for WebAssembly

#30
post #11

the monika 'fx' is often used by graphics pipelines or rendering to mean special effects, and thus often take on the connotation of being related to graphics or rendering (e.g., javaFX). I dont think wasmfx should use this monika, as it makes it sound more graphics related than it really is. Naming and connotation of a name is important, as it frames the way people think about things.

I think that the word "effects" might be too wide a term even in the domain of programming languages.

There are languages with (side-)effect annotations that have no continuation-like constructs whatsoever.

Post reply on HN