#monoid

2025-10-30

To my naïve #mathematical eyes, most things in #ComputerScience appear to orbit the concept of #monoid.

2025-10-07

OAuth2 and OpenID Connect in #Haskell
broch.tech/posts/oauth2-openid
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

N-gated Hacker Newsngate
2025-08-20

🚀 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 📚.
pvk.ca/Blog/2025/08/19/monoid-

2025-05-02

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

#sugihara #monoid #RelevanceLogic

2025-05-01

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.

João Esperancinhajesperancinha@masto.ai
2024-10-16

The documentation for my video on Monads, Monoids and Functors is available on Scribd everyone #kotlin #haskell #mona #monoid #functor
scribd.com/presentation/779087

2024-10-13

🚀 just uploaded to fpilluminated.com

Folding Cheat Sheet #8 - Folding with Monoids.

39 slides - Twelve examples.

Direct link: fpilluminated.com/deck/240

#haskell #scala #monoid #semigroup #fold #foldMap #combineAll #cats #fp #functional_programming

David Cantrell 🏏DrHyde@fosstodon.org
2024-09-30

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.

João Esperancinhajesperancinha@masto.ai
2024-08-24

Can you answer this quiz? Do you know what is a Monoid? #monoid

youtube.com/post/Ugkxzq98sag0V

2024-06-24

If a #Monad is a #Monoid in the category of #Endofunctors, you *must* acquit.

2023-11-29

Once you learned what a #monoid is, you see it everywhere.

2023-08-01

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

2023-07-18

#Programming language designers should seek philosophical inspiration in the humble #monoid: small, simple, comprehensible, composable, commutative, generative, homomorphic, powerful, predictable, prevalent.

en.wikipedia.org/wiki/Monoid

2023-05-04

Ideally, I want something pixel-aligned like #Monoid (larsenwork.com/monoid/) but with a bit more characters available.

Roban Hultman Kramerroban@sigmoid.social
2023-01-06

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

2021-06-18

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?

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst