Live data from Hacker News

WasmFX: Effect Handlers for WebAssembly

wasmfx.dev

11–20 of 44 posts

Re: WasmFX: Effect Handlers for WebAssembly

#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.

Re: WasmFX: Effect Handlers for WebAssembly

#12
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…

> they were all weird shit that I expect other people to use libraries for in most cases.

The theory with algebraic effects is that you'd use them to implement those libraries. Most application code won't be implementing new types of effects, but exceptions, generators, async, and who knows what else can be implemented at the library level instead of the language level.

In theory it's a single abstraction that can be implemented once in the language and then all the more complicated abstractions can be swapped out as desired, rather than the current status quo where everyone has to use whatever patterns the language designers chose (which are often rather contentious).

Re: WasmFX: Effect Handlers for WebAssembly

#14
post #10

Earlier quoted context omitted.

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…

> they were all weird shit that I expect other people to use libraries for in most cases. The theory with algebraic effects is that you'd use them to implement those libraries. Most application code won't be implementing new types of effects, but exceptions, generators, async, and who knows what else can be implemented at the library level instead of the language level. In theory it's a single abstraction that can be…

My point is that it's incredibly rare to actually need such abstractions.

Re: WasmFX: Effect Handlers for WebAssembly

#15

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...

Yes! This is why im super exited about Ocaml 5.0. The ongoing work is now to add typed effects to the typesystem.

Re: WasmFX: Effect Handlers for WebAssembly

#16
post #14

Earlier quoted context omitted.

> they were all weird shit that I expect other people to use libraries for in most cases. The theory with algebraic effects is that you'd use them to implement those libraries. Most application code won't be implementing new types of effects, but exceptions, generators, async, and who knows what else can be implemented at the library level instead of the language level. In theory it's a single abstraction that can be…

My point is that it's incredibly rare to actually need such abstractions.

Maybe it's worth investing into foundational research, instead of charging anyone who tries to do something new as frivolously chasing their own boredom.

Re: WasmFX: Effect Handlers for WebAssembly

#17
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.

Audio, too.

Re: WasmFX: Effect Handlers for WebAssembly

#19

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.

Useful things are hard to make.

Re: WasmFX: Effect Handlers for WebAssembly

#20
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…

WASM is used to implement all kinds of control flow in other languages, so here it makes a lot of sense to have a lower level abstraction.

The languages on top of WASM will still have exceptions, generators, etc.

Post reply on HN