ShivyC
Languages and libraries
compiler
SHOW HN2018
120points
11comments
#364of 2,155 in 2018
Top 17%of 2018 by points
How HN took it
MixedNo clear lean
1 positive, 2 neutral or asking, 0 mixed, 2 critical, out of 5 comments about the project. Thread score 0.00.
Execution: 0 for, 1 againstPerformance: 0 for, 1 againstIdea: 1 for, 0 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Interesting exception-oriented parser design
From 2 comments
The parser has a somewhat unusual structure: https://github.com/ShivamSarodia/ShivyC/blob/master/shivyc/parser/statement.py It's been a while since I've had to use the phrase…
userbinator on HNPython implements iterators by raising a GeneratorExit, StopIteration or StopAsyncIteration exception. Exception handling is one of the core means of control flow in python along…
dangerbird2 on HN
Objections
Using exceptions for parsing control flow is extreme and slow, e.g. multiple errors raised per for statement
From 2 comments
Using exceptions is totally common, but this seems to raise/catch/log 6 errors each time it tries to parse a `for` statement. I'm a noob when it comes to compilers, but maybe a…
lou1306 on HNThat does sound a bit extreme. (I freely admit I went by this description and never looked at the parser code myself, though some other portions I did read were pretty normal…
JasonFruit on HN
Requests
Suggestion to use a token-to-function dictionary for parsing
From 1 comment
Using exceptions is totally common, but this seems to raise/catch/log 6 errors each time it tries to parse a `for` statement. I'm a noob when it comes to compilers, but maybe a…
lou1306 on HN
Questions
Can C be parsed by branching on the next token without exceptions?
From 1 comment
The parser has a somewhat unusual structure: https://github.com/ShivamSarodia/ShivyC/blob/master/shivyc/parser/statement.py It's been a while since I've had to use the phrase…
userbinator on HN