Live data from Hacker News

Compiler for the M language of the French DGFiP

gitlab.inria.fr

61–68 of 68 posts

Re: Compiler for the M language of the French DGFiP

#61

Earlier quoted context omitted.

In the US, you calculate your own income tax, don't you? Like in Canada. The "source code" to the calculations are the paper forms which specify the calculations, making them transparent.

People are downvoting without explaining, so I'll take a shot. First, yes, we calculate our own income tax, but the IRS also calculates it separately, and if the two disagree, they selectively decide whether to come knocking. (For example, they once tried to bill me $300,000 for a tax year when my net income was just over $100,000, because of multiple clerical errors -- we had sold a house, and they had both erroneou…

> if the two disagree

If the two disagree in a calculation matter, the calculations spelled out in the tax form should be upheld as the gold standard as to which side made the calculation error.

> they had both erroneously tried to apply capital gains tax where it didn't apply at all

Was this issue due to paper tax forms doing a calculation one way, but the IRS's implementation doing it another way?

Most recently, I screwed up by claiming a credit that was not allowed. However, the conditions for it are documented; I was wrong. This is where code could help, in order to clarify obtuse language in the requirements. Obviously, the government runs code which checks the conditions that determine whether a nonzero amount can be claimed in some field, so it's just another calculation. Still, it would be better for that to be crystal clear pseudo-code and not the fragment of some actual implementation.

Re: Compiler for the M language of the French DGFiP

#62

Something seems off with the current repo being pointed to. The repo Readme says: This work is based on a retro-engineering of the syntax and the semantics of M, from the codebase released by the DGFiP. Sounds like an external re-implementation, of the "original" release here: https://framagit.org/dgfip/ir-calcul That original release says it's under a free license too. Wonder why there's a re-implementation?

The repo that you're linking to isn't an implementation of the M compiler. Rather it's the rules/definitions that are used to compute the income tax (« Impôt sur le Revenu »). The M compiler reimplementation linked in this submission allows you to actually execute those rules and perform simulations.

Thanks, that's good info. :)

Re: Compiler for the M language of the French DGFiP

#63
post #5

Earlier quoted context omitted.

is there an initiative like this in the US?

Doubt it. The Intuit and HR Block lobbying dollars make sure our tax system is complicated enough to keep their businesses booming.

Don’t forget the very lucrative business of “reducing tax exposure” where small firms get millions by knowing the smallest loopholes.

Re: Compiler for the M language of the French DGFiP

#64
post #47

Related : the french administration has built a custom language for another big set of tax rules, those that dictate our social security system (which collects 500 billons of € / year) It's presented on https://publi.codes but unfortunately we've not translated it yet. The language keywords themselves are in french, by design, to bridge the law and its official implementation. It's not yet used to compute taxes, just…

> the french adminstration's code must by law be made public

And this time, the code isn't printed on paper and send by post mails, which is a neat progress ;).

See, https://www.nouvelobs.com/rue89/rue89-nos-vies-connectees/20... (in French) on how “making code public” was just a few years ago.

Re: Compiler for the M language of the French DGFiP

#66
The french administration ( once the best in the world, circa 1850-1900 ) is failing almost everywhere : education, police, justice, and so on. The only thing that works very well in the french administration is taxes recovery. They help you fill your taxes, the internet site is working well (you don't have to be scammed by turbotax), you can send a mail with a question and have the answer on the next open day. Really good Job guys !

Re: Compiler for the M language of the French DGFiP

#68

Earlier quoted context omitted.

People are downvoting without explaining, so I'll take a shot. First, yes, we calculate our own income tax, but the IRS also calculates it separately, and if the two disagree, they selectively decide whether to come knocking. (For example, they once tried to bill me $300,000 for a tax year when my net income was just over $100,000, because of multiple clerical errors -- we had sold a house, and they had both erroneou…

> if the two disagree If the two disagree in a calculation matter, the calculations spelled out in the tax form should be upheld as the gold standard as to which side made the calculation error. > they had both erroneously tried to apply capital gains tax where it didn't apply at all Was this issue due to paper tax forms doing a calculation one way, but the IRS's implementation doing it another way? Most recently, I…

> the tax form should be upheld as the gold standard

Should, yeah.

> Was this issue due to paper tax forms doing a calculation one way, but the IRS's implementation doing it another way?

No, it was straight up wrong, and could only have been human error. As far as I can make out, their calculation only made sense if you took the full printed tax return and lost the back half of it. (And also ignored the part of the law that says capital gains tax doesn’t apply if you lived in a home more than two years before selling).

Post reply on HN