Live data from Hacker News

Compiler for the M language of the French DGFiP

gitlab.inria.fr

51–60 of 68 posts

Re: Compiler for the M language of the French DGFiP

#51
post #34

Earlier quoted context omitted.

This is cute, but this isn't how things work in the US. Money talks :)

And though a tooth may bend the purest coin, remember too how gold will knead reason and virtue themselves like dough.

I guess that's a quote. Where's it from?

Re: Compiler for the M language of the French DGFiP

#53

Earlier quoted context omitted.

It's rare that I (an American) get to help out others by translating something, so I will post my translation here. "Four years after the first publication by DGFIP, I have the pleasure of announcing that the source code permitting the calculation of taxes on revenue is finally reusable (recompilable by others)! To use this algorithm in your application, follow this link... It took us 1.5 years (with my coauthor Raph…

Native French speaker here (Québécois). Minor nitpick: Your translation of "jeux de tests" to "test games" is incorrect. The word "jeu" can indeed mean "game", but it can also mean a group of things. A better translation would be "test suites", "test sets" or similar.

Bastille, tabernacle!

Re: Compiler for the M language of the French DGFiP

#54
post #5
post #2

Very good news. Consider signing the petition to make all publicly funded code free: https://publiccode.eu .

is there an initiative like this in the US?

is there an initiative like this in the US?

It depends, and varies greatly by location.

Anything created by the federal government is public domain by law. However, not all federal agencies make their code public. Some, understandably. Others, our of budget constraints or ignorance. In theory, you could file a FOIA request to get the code, assuming it's not classified.

Other levels of government can be problematic. In part, because cities and towns can copyright things they create, while the federal government cannot.

For example, the City of Chicago and some other cities have data portals open to the public. Their utility varies.

Smaller cities, however, are less likely to understand the important or value of making data public.

Back when governments started switching to data processing a lot, I belonged to an organization called Investigative Reporters and Editors. It had lots of guides for extracting data from local governments. I remember lots of newspapers rushing out to buy computers are nine-track tape readers so they could sort through the information.

Re: Compiler for the M language of the French DGFiP

#56
post #5

Earlier quoted context omitted.

is there an initiative like this in the US?

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 erroneously tried to apply capital gains tax where it didn't apply at all, and tried to tax us for the full sale price of the house as though we had bought it for $0 and flipped it. It took months of back and forth to fix the issue, despite everything having been clearly documented.)

Second, calculating tax liability is just the first step. Actually submitting tax returns electronically required a third party for a long time, and I believe it still does for all but the most straightforward returns. There's absolutely no reason for that to be the case, other than the outsize influence of lobbying money.

That's without getting into all the loopholes, dodges, and hand-waving that make it possible for someone like Trump to avoid paying taxes entirely most years, while those of us who they know can't afford to lawyer up are the ones they try to collect from.

Re: Compiler for the M language of the French DGFiP

#58

Earlier quoted context omitted.

It's rare that I (an American) get to help out others by translating something, so I will post my translation here. "Four years after the first publication by DGFIP, I have the pleasure of announcing that the source code permitting the calculation of taxes on revenue is finally reusable (recompilable by others)! To use this algorithm in your application, follow this link... It took us 1.5 years (with my coauthor Raph…

Native French speaker here (Québécois). Minor nitpick: Your translation of "jeux de tests" to "test games" is incorrect. The word "jeu" can indeed mean "game", but it can also mean a group of things. A better translation would be "test suites", "test sets" or similar.

Thank you for your help! I did it totally on the fly without a dictionary and I enjoyed learning this word from you :)

Re: Compiler for the M language of the French DGFiP

#59

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.

Re: Compiler for the M language of the French DGFiP

#60
You may be interested in what the Dutch Tax & Custom Agency is doing: they built a DSL to express tax calculations. Here you can find the case study: https://resources.jetbrains.com/storage/products/mps/docs/MP...

Personally I work in the Language Engineering area and it seems obvious that you want tax lawyers and accountants to interpret the tax code and translate it into “code”. Is just that you also want “code” to be obvious for them and support by proper tooling, which catch all inconsistencies.

I would also love to interview the author of this and the work for mon-entreprise. While I understand French, I also have these interviews in English to reach more people

Post reply on HN