logoalt Hacker News

Dansvidaniatoday at 9:00 AM2 repliesview on HN

Can you give an example (even if contrived) of how that would have looked ? I’m very curious !


Replies

derfurthtoday at 10:07 AM

I had the experts write markdown files that contained the rules looked somewhat like:

## 1A Rule name

Some prose explaining the rules liking to official documentation.

``` if municipality and inhabitants > 10000 then functionA else functionB ```

Then a trivial parser would extract the rules, the DSL was then handled by Lark[1]. So pretty simple, but it made collaborating with experts easier as simulated results would also output some markdown they could read.

1. https://lark-parser.readthedocs.io/en/stable/

show 1 reply
BarkenBarktoday at 10:14 AM

I am also very interested!