3 ms·
A substantial part of the french social and tax system is being coded as free software. One of the teams writes the source code in YAML. It's not a programming
by maelito 8y ago
A substantial part of the french social and tax system is being coded as free software. One of the teams writes the source code in YAML.
It's not a programming language, but rather a specification for calculable parts of the law. A JS programm then generates Typeform-like simulators, a node library, and an online interactive documentation (it is now compulsory for french administrations to explain their algorithms).
I'm not sure YAML is the good long-term design choice, but as we can't afford to write our own language, it's bootstrapped the project successfully.
Here is the main file : https://github.com/betagouv/syso/blob/master/source/règles/base.yaml https://github.com/betagouv/syso/blob/master/source/règles/b...
Don't be afraid by the number of lines, it's just a collection of variables.
- titanix2 8y agoInteresting. I just hope the resulting software is less buggy than the one for army wages...
- maelito 8y agoSorry, I should have noted that for the moment it is only a simplified implementation of the latest laws. Bugs arise when you're forced to integrate rules that change over time.
- simtel20 8y agoIs something typed and better structured (e.g. protobufs) an option?
- tracker1 8y agoYou can edit YAML with any text editor... how do you edit protobuf files?
- simtel20 8y agoThere is a text format, but you can serialize YAML into protobufs. The benefit with protobufs is that by defining them you are specifying types and sub-messages etc. so when you assemble disparate pieces you get type checking at various levels.