frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Algebraic Effects for the Rest of Us

https://overreacted.io/algebraic-effects-for-the-rest-of-us/
20•satvikpendem•3d ago

Comments

HeyImAlex•59m ago
Do effect systems actually avoid colored functions? Don’t most typed effect systems require the used effects in the signature?
codebje•39m ago
When you need to use an effect, you need it in the type. If you directly call a function using some other effect, it propagates into your function. So far, so colourful.

But you can have generic effects. Your arguments and return type can specify "any effect", indicating your function can use a type with any effect safely, or can be used in any effect context safely.

Passing an async value to a function doesn't mean that function must now also be an async function. It can be a "for all effects, do the thing" function. The code duplication problem is gone.

mrkeen•35m ago
No, they are function colouring. That's the point.

Someone writes a post lamenting red and blue functions, and everyone eats it up.

Substitute colour for something meaningful and the idea becomes idiotic.

"Top level function declares that it is non-blocking, but when I try to call a small blocking function from it, I have to change the declaration to blocking???"

Yes, yes you do.

Total functions can't call non-total functions.

Deterministic functions can't call nondeterministic functions.

Non-IO functions can't call IO functions.

brabel•26m ago
Yes, this article is doing a bad job at explaining why you would want effects, and one of the main advantages is exactly that it becomes part of the type system, essentially coloring every single function with a set of effects it needs to be called. As the article used JavaScript it shows what untyped effects would look like, which in my opinion is awful. If you want to use algebraic effects today, I highly recommend Unison. If you’re on the JVM, Flix is doing major advances with effects!

https://www.unison-lang.org/

https://flix.dev/

satvikpendem•36m ago
Oh neat, I'm in the second chance pool.

I submitted this because I've been getting really interested in effect systems, especially now that OCaml 5 has a working production quality example they'd been iterating on for years prior. I wanted to see what it'd look like in Rust too so maybe one day we can get rid of async function coloring, and with OxCaml by Jane Street maybe we could see how that would look in practice.

Another reason for submitting this is that React actually has a quite robust effect system, that people don't necessarily realize they're using one every day if they use hooks.

epolanski•33m ago
Everything he lists is solved by effect-ts [1] bar, obviously, the language support (effect has its own fiber-based runtime like ZIO's scala).

I've been using it for 5+ years and my 4 men team can scale to supporting 6 different products (each running millions $ in business, sometimes daily), as we reuse the same patterns and architecture. This would not be possible without Effect, even though I'm lucky to have terrific engineers as colleagues, we just wouldn't be able to without the endless goodies from Effect.

The amount of features is basically endless, as effects and runtimes weren't enough, from SQL to AI, from effectful schemas (encoders/decoders), first-class OTEL support, CLI, debuggers, editor extensions, and many others. There's still countless modules I have yet to see or use.

Runtimes are available for each platform, including cloudflare workers.

There's absolutely nothing in TypeScript land to have such a wide scope.

v4 will also bring durable workflows (I'm already using v4 beta and that feature in prod) and many other goodies. That's quite important for us needing to have procedures that need to survive redeploys, crashes, etc.

I would never go back to writing standard TypeScript.

There is a learning curve, but you can adopt it incrementally. Nobody adopting it has ever gone back.

That being said, it would be great if there was a proper effect-based language (I've seen few projects like Effekt, but there's way too many things missing) as TypeScript is verbose, and effect adds its own verbosity.

[1] https://effect.website/

satvikpendem•24m ago
Effect is pretty nice, I'm not sure how worth it it is for the frontend, but I've heard good things on the backend, but sadly I don't use TypeScript for backend work, mainly Rust, and would love to see something like that there. I'm not sure how much Rust's type system would make it possible though however.

I know parts of Effect like its schema are incrementally adoptable but if you use it substantially with many of its features, isn't it viral in a sense? In that you need to do things the Effect way and wrap libraries into Effect functions?

Trung0246•31m ago
For some funsie here's my fully working delimited continuation in C with effect handler example: https://godbolt.org/z/3ehehvo6E

No ASM involved so technically portable (although it depends on built-in).

Flix equivalent (copy paste to https://play.flix.dev/):

    eff Pick {
        def pick(): Int32
    }

    def body(): (Int32, Int32, Int32) \ Pick = {
        let a = Pick.pick();
        let b = Pick.pick();
        let c = Pick.pick();
        (a, b, c)
    }

    def handlePick(f: Unit -> a \ ef): List[a] \ ef - Pick =
        run {
            f() :: Nil
        } with handler Pick {
            def pick(_, resume) =
                resume(1) ::: resume(2) ::: resume(3)
        }

    def main(): Unit \ IO =
        println(handlePick(body))

SQLite is all you need for durable workflows

https://obeli.sk/blog/sqlite-is-all-you-need-for-durable-workflows/
497•tomasol•14h ago•251 comments

Algebraic Effects for the Rest of Us

https://overreacted.io/algebraic-effects-for-the-rest-of-us/
23•satvikpendem•3d ago•9 comments

Snowboard Kids 2 is 100% Decompiled

https://blog.chrislewis.au/snowboard-kids-2-is-100-decompiled/
174•GaggiX•3d ago•64 comments

Perry Compiles TypeScript directly to executables using SWC and LLVM

https://www.perryts.com/
79•0x1997•4h ago•62 comments

Notes from the Mistral AI Now Summit

https://koenvangilst.nl/lab/mistral-ai-now-summit
355•vnglst•15h ago•142 comments

MCP is dead?

https://www.quandri.io/engineering-blog/mcp-is-dead
198•nadis•9h ago•175 comments

Print with dozens of colors: Our new open-source ColorMix for PrusaSlicer

https://blog.prusa3d.com/our-new-open-source-colormix-model-in-prusaslicer-and-easyprint_136079/
138•rented_mule•3d ago•26 comments

What It Takes to Preserve Floppy Disks

https://spectrum.ieee.org/floppy-disk-data-preservation-archives
33•pseudolus•2d ago•8 comments

Naphtha shortages in Japan

https://www.nippon.com/en/japan-data/h02783/
104•takakaze•5h ago•63 comments

A new register allocator for ZJIT

https://railsatscale.com/2026-05-27-a-new-register-allocator-for-zjit/
26•tenderlove•2d ago•0 comments

Shift will clean homes for free to train future robots

https://www.theverge.com/ai-artificial-intelligence/939765/ai-training-data-startup-shift-free-cl...
129•evilsimon•12h ago•183 comments

The dead economy theory

https://www.owenmcgrann.com/p/the-dead-economy-theory
947•WillDaSilva•16h ago•1096 comments

It's hard to justify buying a Framework 12

https://www.jeffgeerling.com/blog/2026/its-hard-to-justify-framework-12/
280•watermelon0•17h ago•470 comments

Citing 'severe' math deficits, UC faculty demand a return to SAT tests for STEM

https://www.latimes.com/california/story/2026-05-27/uc-math-professors-demand-return-of-sat-for-s...
574•brandonb•1d ago•775 comments

The Last Technical Interview

https://steve-yegge.medium.com/the-last-technical-interview-bc13ddcf4564
103•headalgorithm•12h ago•78 comments

OpenRCT2 v0.5.1 "Swamp Castle" released Last version to support Windows 7

https://openrct2.io/blog/2026/05/openrct2-v0.5.1-released
5•jandeboevrie•2h ago•0 comments

Show HN: Tiny-vLLM – high performance LLM inference engine in C++ and CUDA

https://github.com/jmaczan/tiny-vllm
135•yu3zhou4•12h ago•11 comments

Show HN: Open-source private home security camera system (end-to-end encryption)

https://github.com/secluso/core
55•arrdalan•9h ago•14 comments

Liquid AI reveals 8B-A1B MoE trained on 38T

https://www.liquid.ai/blog/lfm2-5-8b-a1b
181•simjnd•15h ago•69 comments

Bijou64: A variable-length integer encoding

https://www.inkandswitch.com/tangents/bijou64/
223•justinweiss•17h ago•78 comments

Ember.js 7.0

https://blog.emberjs.com/ember-released-7-0/
64•satvikpendem•8h ago•14 comments

Is AI causing a repeat of frontend’s lost decade?

https://mastrojs.github.io/blog/2026-05-23-is-AI-causing-a-repeat-of-frontends-lost-decade/
334•xyzal•20h ago•287 comments

Ho-scale slot car racing in the Santa Cruz Mountains

https://stewartraceway.org/
3•HoldOnAMinute•3d ago•0 comments

Math-to-Manim

https://github.com/HarleyCoops/Math-To-Manim
47•georgewsinger•2d ago•6 comments

On Rendering Diffs

https://pierre.computer/writing/on-rendering-diffs
166•amadeus•13h ago•54 comments

What Is a Dickover?

https://daringfireball.net/2026/05/what_is_a_dickover
304•tambourine_man•8h ago•119 comments

The mysterious Hy3 LLM is topping OpenRouter Model Rankings by a large margin

https://minimaxir.com/2026/05/openrouter-hy3/
127•freediver•1d ago•100 comments

You can just say it

https://noperator.dev/posts/you-can-just-say-it/
311•antirez•16h ago•159 comments

GTA 6 Developers Unionize

https://rockstarintel.com/gta-6-developers-announce-rockstar-games-union/
665•AndrewKemendo•16h ago•448 comments

Show HN: TV Explorer. Adding advanced UI to free online TV

https://tvexplorer.live
146•dtagames•15h ago•41 comments