frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Monoid-Augmented FIFOs, Deamortised

https://pvk.ca/Blog/2025/08/19/monoid-augmented-fifos/
13•todsacerdoti•2h ago

Comments

seanhunter•38m ago
For people who haven’t done abstract algebra, don’t be put off by the word “monoid”. A monoid in algebra is just a set with some associative binary operation and an identity element. Mathematicians in the 19th and 20th centuries realised you can study these types of structures and prove things which are true for all of them rather than having to do each one separately, and that led to “abstract algebra”.

So for example, if I have the integers and multiplication, this is a monoid[1]. The identity element is zero, which is an integer, and multiplication is an associative binary operation. It takes two integers and returns an integer.

Once you realise you have a monoid, if you do maths that only relies on the monoid properties then it applies to all monoids, so you could drop a different monoid in there and everything would still work. This ends up being very much like how typeclasses work in Haskell or traits in Rust.

[1] For the curious, it’s not a “group” because the integers don’t have multiplicative inverses. If I have x=2, there is no integer that I can multiply that by to get 1. Integers with addition on the other hand is a group, which is a monoid with the additional property that inverses are present.

bern4444•27m ago
> The identity element is zero

I think the identity element would be 1 for integers and multiplication, right?

0 would be the identity element for integers and addition.

aranchelk•20m ago
That and also why start with multiplication? String concatenation, addition, list concatenation all make more intuitive sense to a working programmer.

What's a straightforward way to combine a bunch of numbers? Just keep multiplying them to get a resulting volume in an ever-higher dimensional space.

AI might worsen diagnostics for physicians

1•BumperMike•7m ago•0 comments

Record label is trying to silence me

https://www.youtube.com/watch?v=zBq_krhKbW4
1•nialse•11m ago•0 comments

Show HN: An unstyled, flexible form validation library for Vue 3

https://github.com/tu6ge/vue-uform
1•tu6ge•13m ago•0 comments

Oregon Activist Using Decades-Old Policy to Stall Rural Green Energy Projects

https://www.propublica.org/article/irene-gilbert-oregon-solar-green-energy-policy
1•petethomas•15m ago•0 comments

Show HN: Emacs Helm Interface for Raindrop.io

https://github.com/masutaka/emacs-helm-raindrop
1•masutaka•18m ago•0 comments

Google's AI mode is using Reddit to train itself, hello? credibility?

https://neilpatel.com/blog/reddit-seo/
1•sanskarix•23m ago•1 comments

Dangers of AI

https://bryanhogan.com/blog/dangers-of-ai
1•bryanhogan•23m ago•0 comments

The app that reduces your app use [video]

https://www.youtube.com/watch?v=X3ARnEaEbhw
2•calmbonsai•28m ago•2 comments

The Weight of a Cell

https://press.asimov.com/articles/cell-weight
1•hexhowells•28m ago•0 comments

Show HN: Because I Kanban

https://taskstax.com
2•natewww•30m ago•0 comments

India's Got Time

https://indiadispatch.com/p/india-has-time
1•jnord•33m ago•0 comments

Cursos not being truthful again How do folks deal with cursor lying?

1•cintusshied•34m ago•1 comments

A Nation of Lawyers Confronts China's Engineering State

https://www.theatlantic.com/ideas/archive/2025/08/china-america-tariffs-trump-economy/683895/
3•mhga•34m ago•0 comments

Grepcidr3: High performance search for IP addresses and CIDR ranges

https://github.com/jrlevine/grepcidr3
1•zdw•37m ago•0 comments

Some Tricks for List Manipulation

https://doisinkidney.com/posts/2019-05-08-list-manipulation-tricks.html
1•todsacerdoti•37m ago•0 comments

Understanding Python Namespace Packages

https://pythonkoans.substack.com/p/koan-7-the-unburdened-village
2•meander_water•40m ago•0 comments

China's Genocide and the Eliticide of Uyghur Scholars

https://thediplomat.com/2025/08/chinas-genocide-and-the-eliticide-of-uyghur-scholars/
4•mhga•41m ago•0 comments

Guide to Operating Self-Hosted LLM Providers in CI Pipelines

https://kianjon.es/#guide-to-operating-self-hosted-llm-providers-in-ci-pipelines
1•cpfiffer•41m ago•0 comments

Best performance and fastest memory with the new Amazon EC2 R8i instances

https://aws.amazon.com/blogs/aws/best-performance-and-fastest-memory-with-the-new-amazon-ec2-r8i-and-r8i-flex-instances/
1•phonon•43m ago•0 comments

Empty homes are on the rise. Why not use them for the housing shortage? (UK)

https://www.bbc.co.uk/news/articles/c3r413l5n57o
1•mmarian•44m ago•0 comments

Type-Machine

https://arthi-chaud.github.io/posts/type-machine/
2•todsacerdoti•47m ago•0 comments

Show HN: STIX – Institutional positioning in US equities revealed as a score

https://stix-v1.onrender.com
1•STIX_Trading•50m ago•0 comments

When Interest Rates Built the American Empire

https://thefourthturningpoint.substack.com/p/when-interest-rates-built-the-american
2•Qwertymango_13•54m ago•2 comments

Click to hide elements from any website Chrome Extension

https://chromewebstore.google.com/detail/zapit-click-to-remove-ele/ojgbipkkmfaiafopdfopmkjpeppdpkec
1•muhammedilyasy•56m ago•0 comments

Vagus nerve cells moderate immune response to mitigate damage

https://medicalxpress.com/news/2025-08-unusual-allies-vagus-nerve-cells.html
1•Gaishan•1h ago•0 comments

Was this too unhinged to send to an investor?

https://twitter.com/ryanwangx98/status/1958023493624226109
1•ryankrumbholz•1h ago•1 comments

Amazon Q Developer for VS Code: Remote Code Execution with Prompt Injection

https://embracethered.com/blog/posts/2025/amazon-q-developer-remote-code-execution/
3•kerng•1h ago•0 comments

US Marshalls asked to safeguard Maryland data center survey crews

https://www.cbsnews.com/baltimore/news/maryland-powerline-project-piedmont-us-marshals-survey-property/
2•longitudinal93•1h ago•0 comments

China blocked all HTTPS connection abroad for 1 hour in midnight

https://gfw.report/blog/gfw_unconditional_rst_20250820/en/
44•kotri•1h ago•9 comments

Why Mobile Apps Deserve Their Own CMS

https://www.resyncbase.com
1•ifeoluwak•1h ago•2 comments