🏠 Board Index | ⚔️ Language Wars Containment Zone | λ Haskell Den | Σ Type Theory General | 🐾 Off-Topic / Nya~
Logged in as: Guest[Register][Login]
📌 [PINNED MOD WARNING] — TypeClassCat, Head Moderator
This thread has been locked THREE (3) times and reopened due to community petition each time. Users engaging in personal attacks, tortilla-based slurs, or category-theory gatekeeping will be issued formal warnings. FluffyBinder's posting privileges are currently under review. The Burrito Manifesto has been moved to the wiki. Do NOT derail this thread further debating the manifesto's canonicity. Any post containing the phrase "your analogy eats my garbage collector" will result in an immediate 48h ban. You know who you are. — TypeClassCat 🐾
🔐 Thread Lock/Unlock History
LOCK #12024-11-03 02:14 UTC — Reason: "Ratio of ASCII diagrams to actual arguments exceeded board limits." Locked by TypeClassCat.
UNLOCK #12024-11-04 09:30 UTC — Petition signed by 47 users. Reopened with warning.
LOCK #22024-11-07 18:55 UTC — Reason: "GaloisCat's post #31 constituted a threat to the tortilla-based abstraction layer. Discourse nuclear." Locked by TypeClassCat.
UNLOCK #22024-11-09 12:00 UTC — Emergency mod council vote (3-2). LambdaKitten dissented.
LOCK #32024-11-14 23:59 UTC — Reason: "The Manifesto. The entire Manifesto." Locked by TypeClassCat.
UNLOCK #32024-11-17 08:00 UTC — "Fine. FINE." — TypeClassCat (note contains no further justification).
CURRENT STATUS: 🔒 LOCKED (FINAL — No further petitions accepted)2024-11-21 04:44 UTC
📜 In Defense of The Burrito Analogy 🔒 LOCKED x3
Posted by FluffyBinder • Category: Language Wars Containment Zone • Tags: #monads #burrito-theory #haskell #controversy
Views: 14,887
Replies: 63
Participants: 28
🔒 Locked x3
📊 Community Poll: Is the Burrito Analogy Valid?
Burrito Believers vs. Galois Purists
✅ Yes, burritos are valid (156 votes) ❌ No, this is mathematical sacrilege (174 votes)
Poll closed. Community remains irreconcilably divided. nya~
Page: 1 2 3 4 5 (final) 63 posts total

[ NOTE: This is my fifth attempt to post this defense. The previous four were eaten by the forum software, which I maintain is running on an impure IO monad. Ironic. ]

Alright. ALRIGHT. I am tired of seeing "monads are not burritos" posts proliferate across this board like unchecked side effects in an imperative program. I am here today, once and for all, to provide a RIGOROUS, FORMAL, AND DEFINITIVELY CORRECT defense of the Burrito Analogy. Buckle your tortillas. nya~

PART I — What Even IS a Burrito? (A Formal Definition)

Let us begin with first principles. I propose the following type signature:

data Burrito filling = Burrito { tortilla :: Wrapper , filling :: filling -- type parameter! she's right here! , salsa :: Maybe Salsa -- optional effects! , guac :: IO Guac -- impure. always impure. } class Monad m => BurritoMonad m where wrap :: a -> m a -- return: put filling in tortilla bind :: m a -> (a -> m b) -> m b -- >>=: open burrito, apply fn, re-wrap flatten :: m (m a) -> m a -- join: burrito within a burrito → one burrito

You see? It's right there. The tortilla is the monadic wrapper. The filling is the type parameter. return wraps a value in a fresh tortilla. >>= opens the burrito, applies a function to the filling, and produces a new burrito. This is not a metaphor. This is a homomorphism.

PART II — The Diagrams (please do not skip the diagrams)

BURRITO MONAD STRUCTURE — Figure 1 ════════════════════════════════════════════════════════════ return :: a → Burrito a ┌─────────────────────────┐ │ 🌯 TORTILLA WRAP │ │ ┌─────────────────┐ │ │ │ filling :: a │ │ ← your value lives here, nya~ │ └─────────────────┘ │ └─────────────────────────┘ Burrito a (>>=) :: Burrito a → (a → Burrito b) → Burrito b ┌─────────────┐ ┌─────────────────────┐ │ 🌯 Burrito a│ ──────> │ f :: a → Burrito b │ │ ┌───────┐ │ unwrap │ │ │ │ a │ │ filling │ ┌───────────────┐ │ │ └───────┘ │ apply f │ │ 🌯 Burrito b │ │ └─────────────┘ │ └───────────────┘ │ └─────────────────────┘ join :: Burrito (Burrito a) → Burrito a ┌────────────────────────────┐ │ 🌯 OUTER TORTILLA │ │ ┌──────────────────┐ │ │ │ 🌯 INNER TORTILLA │ │ ← burrito-ception │ │ ┌───────────┐ │ │ │ │ │ a │ │ │ │ │ └───────────┘ │ │ │ └──────────────────┘ │ └────────────────────────────┘ ↓ join ↓ ┌────────────────┐ │ 🌯 ONE BURRITO│ │ ┌───────────┐ │ │ │ a │ │ │ └───────────┘ │ └────────────────┘ (the outer tortilla is discarded. this is mathematically sound.) (please do not @ me about the IO monad. i know about the IO monad.)

PART III — Responding to "But IO String doesn't CONTAIN a String"

I have heard this argument. I have heard it seventeen times in this thread alone across its various unlocked incarnations. My response:

-- The IO monad is a SEALED burrito. -- You cannot open it yourself. The runtime opens it for you. -- This is not a flaw in the analogy. -- This is a FOOD SAFETY CONCERN. -- -- newtype IO a = IO (RealWorld -> (RealWorld, a)) -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- The kitchen. The burrito is being MADE. -- You cannot eat it until it exits the kitchen. -- -- Complaining that IO doesn't "contain" a value is like complaining -- that a burrito at a restaurant doesn't contain food -- because it hasn't arrived at your table yet. -- -- The burrito EXISTS. It merely exists in the kitchen (IO). -- nya~

I rest my case for Part III. Counterarguments welcome. Wrong counterarguments will be refuted with additional diagrams.

PART IV — The Monad Laws as Burrito Laws

MONAD LAWS → BURRITO LAWS ══════════════════════════════════════════════════════ Left Identity: return a >>= f ≡ f a "If you wrap a filling in a tortilla, then immediately unwrap it and apply a function... just apply the function. Do not create unnecessary burritos. This is wasteful." Right Identity: m >>= return ≡ m "If you unwrap a burrito and re-wrap the filling with no changes... you have the same burrito. Obviously." Associativity: (m >>= f) >>= g ≡ m >>= (\x -> f x >>= g) "The order in which you compose burrito operations does not matter, as long as the sequence is the same. This is a BURRITO RESTAURANT INVARIANT. Your burrito tastes the same regardless of who assembled which layer when." QED. (Quite Edibly Demonstrated.) 🌯

I will be posting the full Burrito Manifesto in the Resources section. Please read it before replying. Thank you. nya~ 🌯🐱

-- FluffyBinder =^.^= "A monad is just a monoid in the category of endofunctors. A burrito is just a monad in the category of foods. Therefore: QED. nya~" [CGPA since 2021 | Burrito Theory Evangelist | she/her]
FluffyBinder wrote:
"The tortilla is the monadic wrapper. The filling is the type parameter. This is not a metaphor. This is a homomorphism."

I cannot believe I have to type this AGAIN.

FluffyBinder. Dear. Sweetpaw. The word "homomorphism" does not mean "thing that is vaguely similar to another thing." A homomorphism is a structure-preserving map between algebraic structures. You cannot declare your diagram to be a homomorphism by labeling it as one. That is not how mathematics works.

Furthermore: your data Burrito filling is NOT a valid monad instance. A monad in category theory is a triple (T, η, μ) where T is an endofunctor on category C, η is the unit natural transformation, and μ is the multiplication natural transformation, satisfying the coherence conditions. Your "join" operation that discards the outer tortilla has never been demonstrated to satisfy the associativity coherence diagram. Show me the commutative square or I am leaving this thread.

Also: guac :: IO Guac? You gave your Burrito datatype an IO field? That is not a monad. That is a data structure containing a monadic action. Those are different things. I am so tired.

-- What you THINK you've proven: BurritoMonad m => m a ≅ Monad m => m a -- (False) -- What you've ACTUALLY shown: Burrito filling ~= Reader filling ??? -- (Unclear) ~= Identity ??? -- (Generous interpretation) ~= Sealed container with aesthetic choices ??? -- (Most accurate)

The burrito analogy breaks down catastrophically for Writer, Cont, ST, and literally any monad transformer. What is a WriterT String (MaybeT IO) a in your culinary framework? A burrito inside a maybe-burrito inside an IO-kitchen? This is not a useful mental model. This is a recipe for a stomach ache.

I am giving this thread 12 more posts before it collapses into incoherence. I have set a reminder. >:3c

-- GaloisCat (ↄ∘f∘(cat girl)) = (ↄ∘cat girl)∘f [Functoriality. Look it up.] "The map is not the territory. The burrito is not the monad." [CGPA since 2019 | Category Theory Purist | she/her | NOT a burrito]

ok genuine question from someone who learned Haskell two months ago — can the burrito analogy really not explain the IO monad or is GaloisCat being dramatic (loving affectionately)

like FluffyBinder's "sealed burrito in the kitchen" explanation actually helped me understand why you can't extract a value from IO without unsafePerformIO?? the burrito arrives at your table when the runtime runs the program. the kitchen is RealWorld. i thought that was a good analogy actually

also the diagrams are really cute. i saved them. sorry

-- PurrλKitten /ᐠ . ᴗ . ᐟ\ "still learning! please be nice to me nya~"
PurrλKitten wrote:
"the burrito arrives at your table when the runtime runs the program. the kitchen is RealWorld."

PurrλKitten, you are perfectly lovely and I have no quarrel with you. You saved the diagrams?? That's sweet. But listen to me carefully:

The problem with the analogy helping you is that it's helping you build a leaky abstraction. Now you think IO is about kitchens. Six months from now, when you encounter IORef, you will try to make sense of it through the kitchen framework and it will fall apart. Analogy debt is real. I have seen it destroy promising cat girls' understanding of functional programming.

The correct mental model for IO a is: a description of a computation that, when executed by the runtime, produces a value of type a and may perform effects. That's it. No kitchens. No tortillas. Just types and semantics.

I say this with love. The burrito is a trap. FluffyBinder is the trap-layer. I am merely the concerned party.

-- GaloisCat (ↄ∘f∘(cat girl)) = (ↄ∘cat girl)∘f "Distinguished from FluffyBinder on the basis of rigor." >:3c
🔒 THREAD LOCKED — TypeClassCat: "ASCII diagram-to-argument ratio has exceeded forum Policy §4.7(b). Thread locked pending review. Both of you calm down." Nov 03, 2024 · 02:14 UTC
🔓 THREAD UNLOCKED — 47 user petition. TypeClassCat: "...fine. But I'm watching." Nov 04, 2024 · 09:30 UTC

We're back! Thank you everyone who signed the petition. 47 signatures!! I love this community. nya~ 🐾

GaloisCat raises the issue of monad transformers. Fair. Let me extend the analogy:

MONAD TRANSFORMER BURRITO STACK ══════════════════════════════════════════════════════════════ WriterT String (MaybeT IO) a ┌──────────────────────────────────────────────────────┐ │ IO KITCHEN (outermost — runtime handles this) │ │ ┌────────────────────────────────────────────────┐ │ │ │ Maybe BURRITO (nullable — might be Nothing) │ │ │ │ ┌──────────────────────────────────────┐ │ │ │ │ │ Writer BURRITO (with receipt/log) │ │ │ │ │ │ ┌──────────────────────────────┐ │ │ │ │ │ │ │ filling :: a │ │ │ │ │ │ │ └──────────────────────────────┘ │ │ │ │ │ │ [String log attached to exterior] │ │ │ │ │ └──────────────────────────────────────┘ │ │ │ └────────────────────────────────────────────────┘ │ └──────────────────────────────────────────────────────┘ Translation: A burrito that might not exist, that comes with a receipt, that was made in a kitchen. (This is a Chipotle order at 11:47pm on a weeknight.) (MonadFail instance: the app says "order placed" but Nothing arrives. You have only the log of your sorrow.)

I have spent the past 18 hours writing the full Burrito Manifesto. It addresses monad transformers, Applicative burritos, the Arrow burrito conjecture, and contains a formal proof that Cont r a is a "deconstructed burrito where the customer specifies the restaurant." Link will be in the resources section. nya~

-- FluffyBinder =^.^= [CGPA since 2021 | Burrito Theory Evangelist | she/her] "I wrote a manifesto. No regrets."

[ MODERATOR NOTICE ]

FluffyBinder, I need you to understand something. When I said "the thread is reopened," I did not mean "please immediately post a diagram of a Chipotle order as a formal model of monad transformer stacks." I want to be very clear that I reopened this thread because 47 people asked me to, not because I personally endorse the Burrito Analogy in any form.

I would also like to note that a "Burrito Manifesto" is exactly the kind of content that caused Lock #1. I am reading it now. I have concerns. I will post a formal moderation decision once I have finished what appears to be a 47-page document. Who writes a 47-page burrito manifesto. Who.

GaloisCat — please do not respond to the Chipotle diagram with a commutative square, I know that is what you are drafting right now, I can feel it.

Continuing to read the Manifesto. Page 12. There is a section titled "The Free Monad Taco." I need a moment.

-- TypeClassCat [HEAD MOD] /\_____/\ ( >^.^< ) "I am so tired. But I am here. Because someone has to be." ( ) | | [CGPA Moderator since 2019 | she/her | nya~ (reluctantly)]
TypeClassCat wrote:
"GaloisCat — please do not respond to the Chipotle diagram with a commutative square"

TypeClassCat, I was not going to do that.

I was going to respond with a commutative cube. The 2-categorical structure demands it.

-- The Chipotle Order as a Natural Transformation failure: -- -- Let F = "expected burrito" functor -- Let G = "actual delivery" functor -- η : F ⟹ G (the natural transformation from expectation to reality) -- -- Naturality square for "topping selection": -- -- F(toppings) ──η_toppings──> G(toppings) -- | | -- F(f)| |G(f) -- | | -- F(order) ──η_order──────> G(order) -- -- This diagram does NOT commute when GrubHub is involved. -- G(order) = Nothing at 12:17am with a $3.49 "service fee" -- QED. The burrito analogy breaks down at the delivery layer. -- (This is actually a valid critique of IO, now that I think about it.) -- ... -- I want it noted that I am NOT agreeing with FluffyBinder.

I am NOT agreeing with FluffyBinder. I am merely demonstrating that even MY counterargument contains burrito-adjacent content and I find this deeply upsetting.

-- GaloisCat "The diagram does not commute. Neither does my patience." (ↄ∘f∘(cat girl)) = (ↄ∘cat girl)∘f | NOT a burrito | >:3c

I have read the Manifesto.

All 47 pages. The appendices. The "Burrito Laws as Platonic Ideals" section. The acknowledgements (she thanked a tortilla). The footnote on page 38 that says — and I am quoting directly — "if you do not accept the burrito analogy you have never truly understood love."

FluffyBinder. I need you to understand that the Cont r a monad is NOT a "restaurant where the customer specifies the chef." The continuation monad represents a computation that, given a function from a to r, produces an r. The "restaurant" metaphor implies a service relationship that is completely absent from the denotational semantics. You cannot run a continuation monad at a Chipotle. Chipotle does not take callbacks.

HOWEVER.

Page 23. The section on the State monad. "A burrito that remembers what toppings it has had." I... will not say this is correct. But I will say I sat with it for forty minutes and was unable to formally disprove it in a way that felt satisfying. This bothers me enormously. I am going to go touch grass. I have not been outside since Tuesday. This thread has done something to me.

I am giving the Manifesto a provisional 2.5/5 burritos. The IO section is wrong. The State section is disturbingly defensible. The Free Monad Taco chapter is unhinged but technically internally consistent. Do not tell FluffyBinder I said any of this.

-- GaloisCat "2.5/5 burritos. This does not mean I endorse burritos." >:3c [I went outside. There was a food truck. It served burritos. I do not accept this.]
📋 MOD ACTION — TypeClassCat issued formal warning to GaloisCat for "threatening the tortilla-based abstraction layer with excessive mathematical rigor in a way that destabilized community cohesion." Warning contested. Warning upheld on appeal (2-1). Nov 07, 2024 · 18:32 UTC
🔒 THREAD LOCKED #2 — TypeClassCat: "I'm not explaining this again. The Manifesto has its own gravity now. 24h cooling off." Nov 07, 2024 · 18:55 UTC
🔓 THREAD UNLOCKED #2 — Emergency mod council vote 3-2. LambdaKitten dissented: "I've read the Manifesto. Lock it forever." Nov 09, 2024 · 12:00 UTC

I've been on this board since 2020 and I want to offer a veteran perspective: we do this exact thread every 8-11 months. The last time it was "In Defense of Applicatives as Sandwiches." The time before that it was "The Pizza Functor: A Case Study." Before that there was the infamous "Bagel Comonad Incident of 2021" which we do not speak of.

The Burrito Analogy discourse follows a very predictable monad:

newtype BurritoDebate a = BurritoDebate { runDebate :: CommunityState -> (a, CommunityState, [WarningLog]) } instance Monad BurritoDebate where return a = BurritoDebate $ \s -> (a, s, []) m >>= f = BurritoDebate $ \s -> let (a, s', log1) = runDebate m s (b, s'', log2) = runDebate (f a) s' in (b, s'' { lockCount = lockCount s'' + 1 }, log1 ++ log2) -- The debate itself is a monad. -- We are all living inside the BurritoDebate monad. -- There is no exit combinator. -- TypeClassCat is our runtime.

Anyway I'm team FluffyBinder but I think GaloisCat's 2.5/5 rating shows genuine growth. I'm proud of both of them. nya~

-- MittensInMonadicBliss =^w^= "I have seen things you people wouldn't believe." "The Bagel Comonad. We don't talk about the Bagel Comonad." [Veteran | she/they | nya~]

FINAL ANNOUNCEMENT: THE BURRITO MANIFESTO v2.0 IS NOW AVAILABLE.

I have incorporated all feedback. GaloisCat's concerns about the Cont monad have been addressed in a new appendix: "Appendix F: The Continuation Monad as a Restaurant That Calls You Back (Drive-Through Semantics)." The IO section has been revised with a more rigorous treatment. The "Burrito Laws as Platonic Ideals" section has been expanded to 14 pages. I have added a glossary.

The Manifesto is now 63 pages including appendices, two proof sketches, and one (1) actual formal proof of the left identity law for the Reader-as-Wrap-Tube interpretation. MittensInMonadicBliss helped. Thank you Mittens. nya~ 🌯🐾

I believe this is the most complete treatment of the Burrito Analogy in the existing literature. I am also aware that this is the most cursed sentence I have ever typed. Both things are true.

.=^.^=. / 🌯 \ THE BURRITO MANIFESTO v2.0 | ~nya~ | "A Rigorous Defense of Food-Based Monad Pedagogy" \_______/ FluffyBinder (2024) | | | 63pp. incl. appendices ^ ^ ^ Available in the CGPA Resources Wiki
-- FluffyBinder =^.^= [CGPA since 2021 | Burrito Theory Evangelist | she/her] "I wrote a 63-page manifesto about burritos and monads. I would do it again. I will probably do it again. nya~" 🌯

[ FINAL MODERATOR STATEMENT BEFORE LOCK #3 ]

I have read Manifesto v2.0. All 63 pages. The appendices. "Appendix F: Drive-Through Semantics." The glossary, which defines "tortilla" as "the monadic structure, agnostic of filling, providing the computational context" in a way that is almost respectable. The formal proof of left identity, which is... correct. It is a correct proof. I do not know how to feel about this.

Effective immediately, the Burrito Manifesto v2.0 will be added to the CGPA Resources Wiki under the category Contested Literature / Pedagogy. It will be labeled "Unconventional but internally consistent. Read at your own risk."

FluffyBinder: I am proud of you in a way I refuse to articulate further.

GaloisCat: Your "2.5/5 burritos" review has been screenshotted by 34 users. You have become part of the lore.

MittensInMonadicBliss: "The debate itself is a monad" is the most insightful thing posted in this thread. You deserve a badge.

I am locking this thread for the third and final time. There will be no petition. There will be no emergency mod council. I have pre-emptively abstained from my own vote. The Manifesto is in the wiki. The community has spoken (split 47/53). We are done here.

The Burrito Analogy remains officially unendorsed but officially archived by CGPA moderation. This is the best outcome anyone could have hoped for. nya~ (I said it. Don't make a big deal of it.)

-- TypeClassCat [HEAD MOD] /\_____/\ ( >^.^< ) "nya~ (one time. just this once.)" ( ) | | [CGPA Moderator since 2019 | she/her | Enforcer of Calm]

FluffyBinder.

The proof on page 44 is correct. I checked it three times. The State monad section is defensible in a way that makes me question the foundations of my objections. Appendix B's treatment of fmap as "applying a function to the filling without touching the tortilla" is — against all my priors — not technically wrong.

I maintain that the burrito analogy is pedagogically dangerous, theoretically imprecise, and culinarily irresponsible. I maintain this firmly and without reservation.

That said.

[ GaloisCat has attached a file: counterexample_draft.pdf — 31 pages ]
[ Description: "A Rigorous Critique of the Burrito Manifesto, With Diagrams. Also Some Places Where It Is Not Entirely Wrong." ]

This is not a concession. This is peer review. There is a difference. Do not tell anyone I wrote this. nya.

-- Final word, for the record: -- The Cont monad is still not a restaurant. -- IO is not a kitchen. -- These are facts. -- ... -- The State monad MIGHT be a burrito. -- I said what I said. -- >:3c
-- GaloisCat "The State monad might be a burrito. I said what I said." ≽^•⩊•^≼ [2.5/5 burritos. Provisional. Under review.] "nya." (lowercase. once. never again.)
📜 THE BURRITO MANIFESTO v2.0
FluffyBinder • 63pp. incl. appendices • CGPA Resources Wiki • Category: Contested Literature / Pedagogy
"Unconventional but internally consistent. Read at your own risk." — TypeClassCat (Mod)
📖 Read the Burrito Manifesto →
🔒
[ THREAD LOCKED — FINAL ]
This thread has been locked by the moderator and will not be reopened.
"The Manifesto is in the wiki. GaloisCat has written a peer review. The community is split. We have reached equilibrium. This is as good as it gets."
— TypeClassCat, Head Moderator • 2024-11-21 04:44 UTC
📖 Burrito Manifesto v2.0  •  📄 GaloisCat's Peer Review  •  ⚔️ Language Wars Zone
📊 Thread Stats
Total Posts63
Times Locked3 (final)
ASCII Diagrams14
Manifesto Pages63pp
Peer Review Pages31pp
Views14,887
Mod Notices7
🌯 Burrito Score
2.5 / 5 🌯
Official GaloisCat Rating™
"Provisional. Under review."