S

Sandy Maguire

reasonablypolymorphic.com · Personal blog · on HN since 2016

Sandy Maguire is a Haskell programmer who writes on type systems, language design, protobuffers, and how to write technical posts.

What HN saysHN commenters link his critiques of Elm and protobuffers as arguments against those tools, and point to his free book on computer science from first principles.
72HN people shared it
29linked it in comments
70stories submitted
3.3Kstory points
7 months agolast shared
2016people per year2026

Most-shared posts

  1. 1
    Elm is Wrong
    10 people · 349 points · first shared 2016 · 207 comments on HN
  2. 2
    Arguing against using protobuffers
    6 people · 554 points · first shared 2018 · 307 comments on HN
  3. 3
    Protobuffers Are Wrong
    6 people · 244 points · first shared 2018 · 210 comments on HN
  4. 4
  5. 5
    Higher-Kinded Data
    4 people · 8 points · first shared 2018 · discussion on HN
  6. 6
    Why Is the Web So Monotonous? Google
    3 people · 323 points · first shared 2022 · 245 comments on HN
  7. 7
    Haskell2020 Is Dead, but All Hope Is Not Lost (2019)
    3 people · 93 points · first shared 2020 · 63 comments on HN
  8. 8
  9. 9
  10. 10
    A Book About: How These Things Work
    2 people · 16 points · first shared 2019 · 1 comments on HN
  11. 11
    Arrows to Arrows, Categories to Queries
    2 people · 6 points · first shared 2025 · discussion on HN
  12. 12
  13. 13
    Freer Monads, More Better Programs
    2 people · 3 points · first shared 2019 · discussion on HN
  14. 14
    Jujutsu Strategies
    2 people · 1 points · first shared 2024 · 1 comments on HN
  15. 15
    Review: Syntax-Guided Synthesis
    2 people · 1 points · first shared 2022 · discussion on HN

What HN people wrote when they linked it

montgomery_r · 2024-02-18
Was it this one? https://reasonablypolymorphic.com/book/preface - it does what you describe, at least! All the best for your search….
erpellan · 2019-04-24
Everything here looks awesome! Except gRPC... I thought gRPC was great until I had to use it in anger. JSON or CBOR for me! https://reasonablypolymorphic.com/blog/protos-are-wrong/
acobster · 2017-07-31
Great article! I have no experience with Elm but I'm much more likely to try it out now. I'm curious to hear your thoughts on this though: http://reasonablypolymorphic.com/blog/elm-is-wrong
chriswarbo · 2023-07-20
> Could you clarify (or provide more reading on) how the other systems like delimited continuations, algebraic effects, and monads differ from Zig async + how they could be adapted in a similarly unopinionated/low-level way? The key requirement for all these is an ability/API to defer and resume execution (indeed, delimited continuations are sometimes described as "resumable exceptions"). In higher-level languages we'd just assume the presence of first-class functions/closures, and use those to describe these features. I'm less familiar with how that looks in a very low-level language like Zig, however these "async frames" appear (to my naïve eyes) to be analagous; hence why I'm interested whether one of those more-general primitives could be provided instead (the answer might be no!). As for clarification on those features, here's a quick attempt. Firstly, note that all of these approaches are basically APIs to construct, consume, and combine (deferred) computations: they are unopinionated on how those computations get run (e.g. the user could supply a "main loop", or whatever). Delimited continuations are like exceptions, except the stack (AKA continuation) is passed to the handler, which may choose to resume it. We can implement coroutines/async/yield/etc. by having handlers which put their continuation in a queue and pop off some other one to resume instead; we can get data parallelism by resuming a continuation many times; we can get backtracking by remembering old…
ggm · 2022-08-04
This has to invoke Betteridges law of headlines. As one who had the great fortune to be part of networking in the UK in the 70s and 80s, including a stint in UCL-CS working at the end of the SATNET/ARPANET years (UCL was the uk end of the ARPAnet of the day, with an IMP, and then a BBN butterfly, and a large tranche of addresses held I believe in conjunction with the UK signals directorate of the Ministry of Defence) -I can tell you its a bit from box A and a bit from box B. It worked better than a lot of us (X.25!) thought. It worked a lot better than the code a lot of us were working on (the OSI/GOSIP model) USENET was both worse and better than online communities. The 1984 RAND report on the social behaviours in EMail remain true to this day, discussing flaming and trolling behaviours. https://datatracker.ietf.org/doc/html/draft-irtf-hrpc-association-11 is an indication of how important the questions have become. Also see https://reasonablypolymorphic.com/blog/monotonous-web/index.html which is at https://news.ycombinator.com/item?id=32348519
glittershark · 2021-02-26
I think it probably falls more into the category of removing a restriction rather than a new feature, but I'm still waiting on HKTs - not for traits (as a former die-hard haskeller, I have been gradually converted to the side of "rust doesn't need a Monad trait") but for data types. There's a design pattern in haskell called "Higher-Kinded-Data"[0] where you parametrize a datatype on a type-constructor, and use that to generically define either partial or total versions of that data type- something like (in rust syntax): struct Person<F> { pub name: F<String>, pub age: F<u32>, } where you can then have `Person<Option>` be a person that may or may not have all fields filled, and `Person<Box>` be a person with all fields definitely filled. This is something I find myself reaching for surprisingly frequently when writing rust, and I feel like it's a missed benefit of implementing higher-kinded types. [0]: https://reasonablypolymorphic.com/blog/higher-kinded-data/ All that said, I'm really excited to have const generics land! Props to all the amazing work by withoutboats and the entire rust team.
adenozine · 2021-02-01
https://reasonablypolymorphic.com/blog/elm-is-wrong/ Here's a good starting place. Look for some discussions about typeclasses and read for yourself. Ask yourself if you'd bet on this person, and if you'd build critical tools for your org with a tool dictated by them. I have no ill will for Elm. I'm grateful it exists and that we can all learn. I'd never invest in it though, it's too much a risk for things that could affect my ability to put food on the table quickly enough. I'm not a frontend guy, so if some crazy frontend bug happened and crunched up my landing page or any of my forms, I'm not confident that I could debug it fast. I hate to say it, but honestly I think TS has to be the future of front end web. It's simply too solid to consider very many other options. The one-man-running-the-show act kinda works for small things, like Tarsnap is a great example. But for languages that are powering business frontends, I can't have some goofball with a bad opinion holding up progress on something important.
082349872349872 · 2024-08-03
For non-twitter, I was looking the other day at https://reasonablypolymorphic.com/blog/syntax-guided-synthesis/index.h… , which unfortunately points at a dead page related to https://sygus.org/comp/2019/ , but seems related?
3523582908 · 2024-07-09
I am a fan of the dev branch strategy [1], where I have a specific commit that holds all my customizations that I rebase off of. This blog post has it set up such that git automatically ignore pushing the dev commit, but I haven't really gotten that far yet. I just rebase my branch off current main when I'm ready to push. [1]: https://reasonablypolymorphic.com/blog/jj-strategy/index.html#the-dev-…
elbear · 2024-02-28
Wow, this sounds like something with a lot of potential. It also makes me think the book Algebra-Driven Design[1]. That coupled with what you're describing sounds like a powerful combination. [1]: https://reasonablypolymorphic.com/blog/algebra-driven-design/index.htm…
sshine · 2023-12-17
The article that explores these recursion schemes is: Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire https://maartenfokkinga.github.io/utwente/mmf91m.pdf There is a review of this article, although it is quite readable in and of itself: https://reasonablypolymorphic.com/blog/recursion-schemes/index.html
mjan22640 · 2023-07-05
This is an occurence of co-Blub paradox https://reasonablypolymorphic.com/blog/coblub/index.html
ghostwriter · 2023-02-12
A good example would be [1], where covariance and contra-variance are offered to you by the language due to its relation to OOP and the need for subtyping for it, whereas you'd probably be better off if you forgot about their existence (most of the times) and designed everything with Invariance and higher-kinded data [2]. [1] https://docs.scala-lang.org/tour/variances.html [2] https://reasonablypolymorphic.com/blog/higher-kinded-data/
tines · 2022-03-30
Haskell does monomorphization as well. See https://reasonablypolymorphic.com/blog/specialization/
Zababa · 2021-12-20
The big difference here is the cost: > In the particular example of (/=), there isn’t even any cost. There are ~50 packages that define (/=), and the solution is just to delete those definitions. Yes, it’s churn, but I personally am willing to send a patch to each package. If you’re the maintainer of such a package, email me and I’ll just go fix it for you. The author also developped a semi-automatic tool for this migration: https://reasonablypolymorphic.com/blog/comby/. While as some people said, breakage is breakage, having a very easy migration path helps with that. However, there's one point that isn't talked about here: code that doesn't get update often. Lots of small changes like that can be very annoying for code like that, but I don't see a good solution here (except to never deprecate anything).
iddan · 2021-05-25
A similar concept named "Tactics" was explored in Haskell. https://reasonablypolymorphic.com/blog/towards-tactics/ HN Discussion: https://news.ycombinator.com/item?id=24759649
leshow · 2021-04-19
It's not just luke, here's a couple more, two of these I remember in particular the others are just from a google search https://reasonablypolymorphic.com/blog/elm-is-wrong/ https://dev.to/kspeakman/elm-019-broke-us--khn https://blog.bitsrc.io/elm-and-why-its-not-quite-ready-yet-2c516a81e25… https://medium.com/@cscalfani/the-biggest-problem-with-elm-4faecaa58b7… I've come to view Elm as someones personal compiler project. If you are good with the decisions made then you're going to have a fine time, otherwise you probably won't
willtim · 2021-03-30
Designing a serialisation format has a lot similarities with designing a programming language: data types, declarative/ease-of-use versus full control, abstractions, static versus dynamic memory areas, optimising representations etc. There is definitely room for a variety of formats depending on the use cases; and many are unhappy with the current incumbent: https://reasonablypolymorphic.com/blog/protos-are-wrong/ But yes, it's a lot of work and they probably should document what the trade-offs are that they have made.
User23 · 2020-07-20
Well here’s one example: https://reasonablypolymorphic.com/blog/protos-are-wrong/index.html. Another is the frat boy hazing code review culture. Heck there are plenty of noogler’s first code review memegens floating around. It’s totally not bullying it’s just joking right?
endgame · 2018-10-25
I used to like .proto, but I found this article recently and it made me reconsider: http://reasonablypolymorphic.com/blog/protos-are-wrong/index.html
Athas · 2018-03-03
I have been looking at Elm as an example of how to engineer the ergonomics of a functional language, and how far one can come with a focus on simplicity and consistency. Unfortunately, it also looks like it is becoming an example of the problems of going too far. I don't actually mind Elm's weaknesses as discussed in the Elm Is Wrong essay[0] - these look like an ordinary technical trade-off - but the social consequences of how Elm is managed seem a little more subtle. [0]: http://reasonablypolymorphic.com/blog/elm-is-wrong
cel1ne · 2017-05-08
Why not Elm on google turns up this: http://reasonablypolymorphic.com/blog/elm-is-wrong I think the basic gist was that it's type-system is far from complete.
lmm · 2016-11-11
Monads for all your I/O yeah, probably kind of dumb. Monads as a tool for dealing with cross-cutting concerns? Ridiculously useful. http://reasonablypolymorphic.com/blog/ideas-and-men has some basic examples.
Noseshine · 2016-11-08
There are two threads about Elm on reddit's /r/programming right now. This is one of them, the other one ís about "Elm is wrong" (http://reasonablypolymorphic.com/blog/elm-is-wrong) Reddit: https://www.reddit.com/r/programming/comments/5bsanc/elm_is_wrong_reas… I found it interesting because I have not myself looked into Elm yet but kept it in the back of my mind to do so some day, since thus far I only ever read extremely positive opinions.
SarikayaKomzin · 2020-11-06
This is ones of those essays that pops up on Hacker News every so often, and I'm always happy to reread it. Regardless of how the technologies have changed or if the prognostications were correct, this article is about timeless and relevant themes. Abstraction is the most powerful force within the human mind. It is perhaps solely responsible for the world we've built around us. But it is also absolutely terrifying how increasingly reliant we are on it. "Contemporary culture is a two-tiered system, like the Morlocks and the Eloi in H.G. Wells's The Time Machine, except that it's been turned upside down. In The Time Machine the Eloi were an effete upper class, supported by lots of subterranean Morlocks who kept the technological wheels turning. But in our world it's the other way round. The Morlocks are in the minority, and they are running the show, because they understand how everything works." We are more and more surrounded by technology that the majority of us don't understand even at a fundamental level (for the record, I include myself in the Elois). More often than not, these technologies are essentially taken for granted as magic. While no reasonable person should expect everyday people to understand the inner workings of their handheld supercomputers or their cable TV box, we would all be better off if we better understood the fundamental building blocks of the technologies we are surrounded by -- whether that's basic logic gates, the simple patterns of…
comex · 2019-06-06
Despite being functional, Elm is quite minimalist when it comes to type system features. For example, functions can have generic type parameters, but there's no good way to require that the type be able to support certain operations, e.g. being printable as a string. Haskell's solution to this is "typeclasses", which are the same thing as Rust "traits" and Swift "protocols", and somewhat similar to Java "interfaces". Elm has a handful of builtin typeclass-like things that work by compiler magic, but there's no way to define your own. For a somewhat colorful rant about this, see "Elm Is Wrong": https://reasonablypolymorphic.com/blog/elm-is-wrong/ Elm is also very opinionated, e.g. the compiler itself restricted the ability to bind to JavaScript libraries to only approved organizations: https://discourse.elm-lang.org/t/native-code-in-0-19/826 The community is also fairly toxic; check out this passive-aggressive response by the /r/elm moderators to a (mildly worded) blog post complaining about the aforementioned restriction: https://www.reddit.com/r/elm/comments/9a0hc6/elm_019_broke_us/e4sdtg0/ Personally, I decided I would never touch Elm again after reading that.
kragen · 2020-02-17
Neat, and it looks like it's under a 3-clause BSD license, too: https://github.com/isovector/reasonablypolymorphic.com/blob/master/LIC… And it's tackling pretty advanced material — a bunch of category-theory stuff that I have no idea about. This is exciting! It looks like maybe it's unfinished: https://reasonablypolymorphic.com/book/tying-it-all-together.html ends, "Really, we’re just getting started," and then (the current version of) the book ends. What a cliffhanger ending! It doesn't seem to yet cover circuitry; the hardware it discusses seems to be a two-tape Turing machine, much like BF. The author seems to have been simulating the machine by hand to generate the included execution traces. I had a hard time finding the source at first: https://github.com/isovector/reasonablypolymorphic.com/blob/master/sit… has a bunch of attribute-embedded &-escaped SVG (including XMLPIs!) that he almost certainly didn't type like that. That file is duplicated at https://github.com/isovector/reasonablypolymorphic.com/blob/master/doc… in the same format. As it turns out, the source for that post is in https://github.com/isovector/reasonablypolymorphic.com/blob/master/sit… with embedded Haskell to produce the SVGs. The build scripts looks like they might be in https://github.com/isovector/reasonablypolymorphic.com/tree/master/src and…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close