frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

What is algebraic about algebraic effects?

https://interjectedfuture.com/what-is-algebraic-about-algebraic-effects/
28•iamwil•1h ago

Comments

taeric•48m ago
I started a thread last time Algebraic Datatypes were discussed that hit a similar vein. I assert most programmers know the middle school version of "algebra" and think of it in terms of what they can do with the values they are working with.

This is in contrast to doing operations on either the "types" or the "effects" that are happening during code. So, you have to show people what are the equivalent of + and * in types and effects to show them how these can be thought of algebraically.

I still think this would be easier if a type system was made that let you use + and * in defining something. It would give an obvious path to seeing how things relate to algebra. Would almost certainly make some things harder, of course. Maybe it would be a good worksheet asking questions about stuff?

The big underline, though, is getting people to realize what algebra there is is not on the values that your code represents. It is treating something else as the value for the algebra.

andrewflnr•26m ago
OCaml (and its relatives I think) use * for type products. It's a lot trickier with sum types though because the variant tags realistically have to show up in the syntax, and that's going to really stretch any syntax that tries to use +... I guess it would sort of work if you made Variant(foo, bar) types of things usable standalone types, but that's either a product without a * or another non-algebraic level between + and *.
taeric•14m ago
Yeah, I think I agree? It did amuse me how quickly this got annoying from the existence of String and how people use it. :D

That is, I think this is what you are saying? That it wouldn't be hard to show that an Optional<String> is the same as a variable that is (String + None) or some such. But having Either<String, String> kills this, since there is no way to distinguish the left and right String types, there. Now, if you forced it to be Either<ErrorString, ResponseString>, that can work. And that nicely explains why you have to tag the types to be distinguishable from each other.

daxfohl•8m ago
It'd be good to start with a preamble "what is algebraic about boolean algebra" since most coders should be familiar with the concept. That helps clarify what is even meant by the term "algebra" in abstract contexts. Then you could show how these things relate to ADTs and effects.
oisdk•28m ago
I would encourage anyone interested in this question to check out the paper "What is algebraic about algebraic effects and handlers?" (https://arxiv.org/abs/1807.05923) which is a write-up of the lecture series linked in the post above. I don't think the paper is too difficult to understand, but I know that if you're not familiar with the subject area it might be intimidating.

While I like the above blog post, I don't think that it will be very useful to people trying to understand algebraic effects. I see a lot of explainers like this one that shy away from some of the more gnarly-looking maths terms in an effort to appear more approachable, but as a result they can end up giving imprecise or vague definitions. When coupled with some subtle mistakes I think it can leave beginners more confused than helped (for instance, this author seems to conflate a few different notions of "composition", and they seem to think that the presence of equations makes an effect algebraic, which isn't really what the term "algebraic" is referring to in a technical sense).

The paper I linked above is not easy, and it would probably take at least a few hours to understand, but that's because it takes about that long to understand the material.

Redo: A recursive, general-purpose build system

https://redo.readthedocs.io/en/latest/
1•kblissett•52s ago•0 comments

Tup: A file-based build system for Linux, OS X, and Windows

https://gittup.org/tup/index.html
1•kblissett•1m ago•0 comments

TLinFormer, a Path to Exact, Full Context-Aware Linear Attention

https://arxiv.org/abs/2508.20407
1•P_qRs•3m ago•0 comments

The American nations across North America

https://colinwoodard.com/new-map-the-american-nations-regions-across-north-america/
2•loughnane•6m ago•0 comments

AI agents still can't solve 1/3 of SWE-Bench problems. Why not? (A Case Study)

https://surgehq.ai/blog/when-coding-agents-spiral-into-693-lines-of-hallucinations
1•egilliehhc•8m ago•0 comments

The Story of Musium

https://ruudvanasseldonk.com/2025/musium
2•Bogdanp•9m ago•0 comments

Search for any movie or TV show. Follow your favorites to track their premieres

https://diditdrop.com/
1•mooreds•9m ago•0 comments

From Burwood to Bulgaria: How $1 Australian home designs are taking on the world

https://www.smh.com.au/politics/nsw/from-burwood-to-bulgaria-how-1-australian-dream-homes-are-tak...
1•skissane•10m ago•0 comments

After a slow start, Europe's reusable rocket program shows signs of life

https://arstechnica.com/space/2025/09/after-a-very-slow-start-europes-reusable-rocket-program-sho...
1•rbanffy•11m ago•0 comments

What Is Blueskyism?

https://www.natesilver.net/p/what-is-blueskyism
4•ImJamal•11m ago•3 comments

UK Millionaire exodus did not occur, study reveals

https://taxjustice.net/press/millionaire-exodus-did-not-occur-study-reveals/
19•mooreds•12m ago•4 comments

Human-Oriented Markup Language

https://huml.io/
2•vishnukvmd•12m ago•0 comments

Studying Lee Robinson, Cursor's New VP of Developer Experience [audio]

https://scalingdevtools.com/podcast/episodes/studying-lee-robinson-cursors-new-vp-of-dx
2•mooreds•12m ago•0 comments

Long-term decline in montane insects under warming summers

https://esajournals.onlinelibrary.wiley.com/doi/10.1002/ecy.70187
1•PaulHoule•13m ago•0 comments

Architectural mechanisms of a universal fault-tolerant quantum computer

https://arxiv.org/abs/2506.20661
1•rntn•14m ago•0 comments

New AI Tool Predicts Which of 1k Diseases Someone May Develop in 20 Years

https://www.scientificamerican.com/article/new-ai-tool-predicts-which-of-1-000-diseases-someone-m...
1•Brajeshwar•15m ago•0 comments

A Mysterious Jupiter-Sized Planet Is Heading Toward Our Solar Neighborhood

https://modernengineeringmarvels.com/2025/09/20/a-mysterious-jupiter-sized-planet-is-heading-towa...
2•Brajeshwar•15m ago•0 comments

Brilliant Books to Demystify the Brain

https://bigthink.com/books/5-brilliant-books-to-demystify-the-brain/
1•Brajeshwar•15m ago•0 comments

The "New Economic Geography", now middle-aged [pdf]

https://www.princeton.edu/~pkrugman/aag.pdf
1•Terretta•15m ago•0 comments

Convert Any Files and URLs to Markdown

https://2md.run/
1•songtianlun1•16m ago•0 comments

Breakneck: China's Quest to Engineer the Future

https://danwang.co/breakneck/
2•ibobev•19m ago•1 comments

Taiwan has long been the top provider of screws to the United States

https://www.nytimes.com/2025/09/22/business/taiwan-manufacturing-trump-tariffs.html
2•perihelions•19m ago•1 comments

Small Safety Improvements in the C++ 26 Core Language

https://www.modernescpp.com/index.php/small-safety-improvements-in-the-c-26-core-language/
1•ibobev•19m ago•0 comments

Reducing binary size of (Rust) programs with debuginfo

https://kobzol.github.io/rust/2025/09/22/reducing-binary-size-of-rust-programs-with-debuginfo.html
1•ibobev•20m ago•0 comments

H-1B visa flight fares surge India->US as 4Chan blocks bookings post Trump order

https://www.indiatoday.in/india/story/h1b-visa-flight-fares-surge-india-us-4chan-blocks-bookings-...
1•ohjeez•23m ago•0 comments

From Supercomputers to Wind Tunnels: NASA's Road to Artemis II

https://www.hpcwire.com/off-the-wire/from-supercomputers-to-wind-tunnels-nasas-road-to-artemis-ii/
1•rbanffy•25m ago•0 comments

Every Watershed Deserves a Rock Opera

https://www.sierraclub.org/sierra/2025-3-fall/critic-s-notebook/every-watershed-deserves-rock-opera
1•toomuchtodo•25m ago•1 comments

A common bacterium that can reduce the spread of dengue fever

https://ourworldindata.org/wolbachia-neglected-tropical-diseases
2•alphabetatango•26m ago•1 comments

Aulico – Track Markets with AI

https://www.aulico.com
1•rattoscaccomatt•27m ago•0 comments

Fatal Climbing Accident on Mount Shasta Claims One Life

https://www.siskiyou.news/2025/09/15/fatal-climbing-accident-on-mount-shasta-claims-one-life/
1•wslh•27m ago•0 comments