Top all-time · #15425
amelia.how
Personal blog · amelia.how/postsprogrammingmath
amelia.how is a personal blog at amelia.how about programming and math. Since 2022, 5 different Hacker News readers have linked it 6 times, most often “Parsing layout, or: Haskell's syntax is a mess”. No feed was found, so read it on the site itself.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
HN readers link Amelia's posts on Haskell's layout rule, which uses indentation in place of braces and semicolons, and on how a parser has to handle that layout. The comments discuss this material without judging the writing.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Parsing layout, or: Haskell's syntax is a mess3 people · 4 mentions · first linked 2023-01-09
What Hacker News says?
From the point of view of writing a parser, Haskell's whitespace syntax seems like a hack. So, the grammar is defined with braces and semicolons, and to implement significant whitespace, the lexer inserts opening braces and semicolons at the start of each line according to some layout rules. That's not the hacky part; what makes it a hack is that to insert closing braces, the lexer inserts a closing brace when the p…
Comment linking /posts/parsing-layout.html
on “I learned Haskell in just 15 years”Submitted Parsing layout, or: Haskell's syntax is a mess as a story · 3 points
HN discussionHaskell also inserts semicolons, but it has a different rule, which I think is a bit interesting. If the current line starts on the same line that the previous expression started on, then a semicolon is inserted at the beginning of the current line. There are also some messy rules about opening and closing braces being inserted. So, this: do expr1 expr2 do expr3 expr4 Ends up being parsed as though it were written l…
Comment linking /posts/parsing-layout.html
on “Python with Braces”Submitted The Semantics of Evaluation and Continuations as a story · 3 points
HN discussionUpdated URL: https://amelia.how/posts/parsing-layout.html
Comment linking /posts/parsing-layout.html
on “Parsing layout – problems with Haskell's syntax”Submitted Efficient Instance Resolution for Agda as a story · 2 points
HN discussion