To my naïve #mathematical eyes, most things in #ComputerScience appear to orbit the concept of #monoid.
OAuth2 and OpenID Connect in #Haskell
https://broch.tech/posts/oauth2-openid-connect-haskell/
stumbled on it as I was struggling my way (bellow , auth my hakyll client from #mastodon)
let body =
reqBodyUrlEnc $
"client_id" =: (T.pack clientID)
<> "client_secret" =: (T.pack clientSecret)
<> "grant_type" =: ("client_credentials" :: T.Text)
url = https "mathstodon.xyz" /: "oauth" /: "token"
r <- req POST url body jsonResponse mempty
what am i doing wrong here
its mappend from #Monoid typeclass combining id and secret
as (I guess)
clientId and clientSecret are converted to Text (e.g., T.pack clientId)
Text is an instance of the Monoid typeclass
The <> operator concatenates multiple Text values together into one Text value, representing form data or URL-encoded parameters combined
//noob webdev
It was a missed sight on #ghc error message fixed now
// bad
🚀 Breaking news: Paul Khuong reinvents the wheel by giving a tired, dusty data structure a fresh coat of paint and a new 'monoid' buzzword 💡. Meanwhile, the rest of us continue using Google to search for "what is a monoid" without results, as we drown in a sea of Lisp and unread RSS feeds 📚.
https://pvk.ca/Blog/2025/08/19/monoid-augmented-fifos/ #BreakingNews #PaulKhuong #Monoid #DataStructures #TechTrends #HackerNews #ngated
Asking ChatGPT about coloring diagrams with truth values. When you write A -> B the arrow can be valid or invalid, but you still want to talk about it
Level 1: Morphisms = Proofs, Typed with Validity
You can think of these arrows as typed by a truth value — i.e., each morphism has a color: valid, invalid, plausible, context-sensitive, contradictory-but-derivable, etc.
In this sense, truth is not binary, but becomes a fiber over each morphism: a coloring or modality.
So your category becomes a fibration over a poset of truth values, or a category enriched in truth values — maybe in a Heyting algebra or relevance lattice.
I'm not sure I've ever heard it say "maybe" before, but
Random #math talk:
JRV: According to [source]* linear algebra is simply the study of factorization of matrices. Even finding the inverse of A is factoring the identity matrix with A as one of the factors.
Me: Oh. So a monoid is a group if every element is a factor of the identity element. In other words, every element "evenly divides" the identity.
#group #monoid #linear #algebra
* I forgot the exact source that was mentioned.
🚀 just uploaded to https://fpilluminated.com
Folding Cheat Sheet #8 - Folding with Monoids.
39 slides - Twelve examples.
Direct link: https://fpilluminated.com/deck/240
#haskell #scala #monoid #semigroup #fold #foldMap #combineAll #cats #fp #functional_programming
Once again I am disgusted at the #NYTimes #SpellingBee's epic vocabulary fail. According to them #monoid isn't a word, whether or not as a kind of #endofunctor.
Can you answer this quiz? Do you know what is a Monoid? #monoid
https://www.youtube.com/post/Ugkxzq98sag0VJUlxPxI9MgtujKluR1xV30q
If a #Monad is a #Monoid in the category of #Endofunctors, you *must* acquit.
Once you learned what a #monoid is, you see it everywhere.
@DevWouter @bitbonk Yeah, the Null Object pattern is really a too limiting name and also detrimental. I like to think of it more as the empty instance of a #monoid. If desigining the types that way, algorithms operating on them are more resilient and easier to maintain and understand.
#Programming language designers should seek philosophical inspiration in the humble #monoid: small, simple, comprehensible, composable, commutative, generative, homomorphic, powerful, predictable, prevalent.
Ideally, I want something pixel-aligned like #Monoid (https://larsenwork.com/monoid/) but with a bit more characters available.
* mathematically, you could distribute the population-level costs to individual points (e.g. the false negative that pushes you over a penalty threshold gets assigned the full penalty), but that doesn’t get around the practical consequences of the fact that utility no longer forms a commutative #monoid, so you can’t independently calculate each example-level utility then sum: you don’t know if you exceed the penalty threshold, or which example pushed you over the edge, until you aggregate.
An Invitation to Applied Category Theory
(2019) : Fong, Brendan and David I. Spivak
DOI: https://doi.org/10.1017/9781108668804
#__important #category_theory #database #functors #galois_connection #hypergraph #joins #logic_of_behaviour #meets #monoid
#my_bibtex
“Why Is Learning Functional Programming So Damned Hard?” [2019], Charles Scalfani (https://cscalfani.medium.com/why-is-learning-functional-programming-so-damned-hard-bfd00202a7d1).
Via HN: https://news.ycombinator.com/item?id=28188822
#FunctionalProgramming #FP #Programming #Haskell #Elm #JavaScript #Monad #Monoid #Learning #Teaching
When you sum the elements of a list ( may be by using #recursion , with mconcat #monoid ) , you assume associativity
As in a+(b+c) = (a+b)+c
Which amounts to saying that two trees on the lhs and rhs are identical!
What is the topology of a tree?