#monoids

2025-10-09

revisiting lists are monoid in haskell
very simple
#ormolu doesn't like multiline html
-- loginPage :: LBS.ByteString
-- loginPage = "<html><body>\
-- \<h3>Login with Mastodon</h3>\
-- \<a href='/start'>Log in with Mastodon via OAuth</a>\
-- \</body></html>"
so you can write it as
loginPage :: LBS.ByteString
loginPage = "<html><body>\n<h3>Login with Mastodon</h3>\n<a href='/start'>Log in with Mastodon via OAuth</a>\n</body></html>"
or concat the list of these lines associatively as concat is in #haskell
ofc with overloaded strings
loginPage =
"<html><body>\n" <>
"<h3>Login with Mastodon</h3>\n" <>
"<a href='/start'>Log in with Mastodon via OAuth</a>\n" <>
"</body></html>"
his relates to #monoids because string concatenation (using ++ for lists or + for strings) is an associative binary operation with an identity element (the empty string), thus forming a monoid structure.
sidenote -- you can also do it with Data.Text.Lazy but that's besides the point

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

This is the next entry in the Late Bloomers playlist everyone! This one reached 100 views recently and it stood for a while time in the Rookies playlist. Only later people found the video interesting. Thank you! #monads #monoids #functors #kotlin #haskell

youtube.com/watch?v=_NVWfjI_Lj

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

My new video about functors, monoids and monads everyone! Watch for free on JESPROTECH. #functor #monads #monoids #haskell #kotlin youtube.com/watch?v=ShGAN0dguU

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

One more addition to "Monads are no Nomads" compilation everyone! Still checking functors on it but the next videos will be the last about talking over this subject. Then we will move on to #Monoids! Enjoying the channel so far? Plz help it by subscribing:

youtube.com/shorts/MxYB-RvZWVs

CppConCppCon
2024-03-01

We have released a new CppCon 2023 Video!

C++23: An Overview of Almost All New and Updated Features – Marc Gregoire – CppCon 2023
youtu.be/Cttb8vMuq-Y

CppConCppCon
2024-02-12

We have released a new CppCon 2023 Video!

Monads in Modern C++ – Georgi Koyrushki & Alistair Fisher – CppCon 2023
youtu.be/kZ8rbhGgtv4

CppConCppCon
2024-01-19

We have released a new CppCon 2023 Video!

Applicative: The Forgotten C++ Functional Pattern – Ben Deane – CppCon 2023
youtu.be/KDn28TZdKb4

CppConCppCon
2023-12-14

We have released a new CppCon 2023 Video!

Thinking Functionally in C++ – Brian Ruth – CppCon 2023
youtu.be/6-WH9Hnec1M

2023-11-12

Kicking us off on our first session of the morning was Matt Parker @standupmaths who shared how he's planning to break the world record for the most digits of π calculated by hand, for next π day (see his other attempts here: youtube.com/playlist?list=PLht). We also heard from Bob Huxley, who has also been thinking about π day, but this time on Mars where it turns out it's actually tomorrow! Annette Margolis then talked about her class' favourite (and least favourite) way to solve quadratic equations. John Hoskinson discussed Diffy Squares (mathforlove.com/2020/03/diffy-) and adapted them to generalised diffy N-gons - for odd N, you get repeating cycles! Nobody has ever said the word 'diffy' more times in the space of 5 minutes. Alistair Bird @outofthenorm shared about a mathematician who got inspired in the bath (but not that one), and what his discovery meant (turns out, not much, but it did inspire some nice results around Fermat's Last Theorem). Read more here: outofthenormmaths.wordpress.co Adam Atkinson talked about Misère Games, leading to his discovery of just how many semigroups of order 8 there are, inducting us all into membership of DOCTIAL (the Department of 'Crikey! That Is A Lot!'); and finally Harlan Connor got LOUD about signal processing - it's possible to have peaks in audio volume that are higher than the maximum value the system can store! #mathsjam #maths #pi #worldrecords #mars #piday #quadraticequations #classwork #teaching #diffysquares #baths #inspiration #misèregames #doctial #loud #signalprocessing #groups #monoids #semigroups #combinatorialgametheory

Oriel Jutty :hhHHHAAAH:barubary@infosec.exchange
2023-03-19

I don't know who needs to hear this, but:

Monoids are simple: A monoid is a triple (S, f, e) where S is a set, f : S×S → S is a binary function on the set, and e is an element of the set, with the following properties:

  1. For all elements x, y, z of S, f(x, f(y, z)) = f(f(x, y), z). In other words, f is associative. (This is perhaps clearer if the combining function f is written as an infix operator ⊗ instead: x ⊗ (y ⊗ z) = (x ⊗ y) ⊗ z)
  2. For all elements x of S, f(x, e) = x = f(e, x). In other words, e is a neutral element with respect to f. (Or in infix notation: x ⊗ e = x = e ⊗ x)

Examples of monoids:

  • (ℕ₀, ·, 1), i.e. the natural numbers (including 0) with multiplication and 1
  • (ℕ₀, max, 0), i.e. the natural numbers (including 0) with maximum and 0
  • (ℕ₀, +, 0), i.e. the natural numbers (including 0) with addition and 0
  • (A*, ∘, ""), i.e. strings over some alphabet A with concatenation and the empty string

#math #algebra #monoids

2023-03-16

This looks like a really nice, visual, first intro to concepts related to #categorytheory.

abuseofnotation.github.io/cate

#sets, #categories, #monoids, #orders, #logic, #functors

Credits: @abuseofnotation

#Statemachines, #Recursive Functions, validating #Paxos, hints at validating discrete real-time #PIDcontrollers, #monoids (not monads) - what more could you want?
yodaiken.com/current-draft-of-

Tom Chappelltomchappell
2022-11-09

I need an aside here to explain what is all about without having to descend into or or or, you know, everything.

2/

Client Info

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