Live data from Hacker News

A Modern Compiler for the French Tax Code

arxiv.org

121–130 of 136 posts

Re: A Modern Compiler for the French Tax Code

#121

I've been asked to write parser of _my_country_law_ and something that's capable of doing diffs and putting it together (diff+original=>newest version) docs without knowledge in that domain after seeing sample doc I've estimated it on something like 1 week of work (XD) month later I've been crying and having like 20-30% done this shit has been so sensitive (insanely error prone) and debugging was time costly. I think…

yeah complex tax laws often have interrelated and cocontingent things to compute the final tax on.

Is this deduction before or after your AGI, whats the maximum % of AGI that it can be, does taking the deduction lower your AGI and thus the max percentage of AGI that it can be?

Re: A Modern Compiler for the French Tax Code

#122

I remember when the US tax code was going to be simplified so that an entire tax return form could be printed on a post card.

Here in NZ we got rid of almost ALL deductions the tax system is so simple that almost all people with one job pay exactly the right tax through employer PAYE (as someone who runs a small company I do my PAYE with 1 line of spreadsheet formulae, it's easy). This means most people don't need to file, if you want to it's a 1-2 page web form, and, starting last year, the IRD will do it for you anyway and directly credit…

What do you do about interest on savings accounts or capital gains on stocks?

Re: A Modern Compiler for the French Tax Code

#123

Earlier quoted context omitted.

Here in NZ we got rid of almost ALL deductions the tax system is so simple that almost all people with one job pay exactly the right tax through employer PAYE (as someone who runs a small company I do my PAYE with 1 line of spreadsheet formulae, it's easy). This means most people don't need to file, if you want to it's a 1-2 page web form, and, starting last year, the IRD will do it for you anyway and directly credit…

What do you do about interest on savings accounts or capital gains on stocks?

The bank takes it out at a standard rate - when you open an account you tell them your marginal rate, if you get it wrong it's obvious to the IRD.

We have no tax on capital gains (we should, it badly distorts our markets, leaves too much money in real-estate).

Re: A Modern Compiler for the French Tax Code

#124

> In France, income tax is computed from taxpayers' individual returns, using an algorithm that is authored, designed and maintained by the French Public Finances Directorate (DGFiP). This algorithm relies on a legacy custom language and compiler originally designed in 1990, which unlike French wine, did not age well with time. This interesting. When it comes to legacy code we think of COBOL and FORTRAN most of the t…

We have it right here. Hacker News is written in the Arc programming language, which was developed by Paul Graham and Robert Morris.

https://en.wikipedia.org/wiki/Arc_(programming_language)

Re: A Modern Compiler for the French Tax Code

#125
post #103

Earlier quoted context omitted.

The last century has seen a huge increase in the quantity of law that is written out explicitly in statutes [1], rather than being worked out on a case-by-case basis according to the common law method. This is an attempt to “improve the language” as you have suggested, but it has not made the law easier to comprehend. Detailed statutes make it harder for lawyers to build up a coherent picture of the entire legal syst…

Again, this points to poor scoping, an imprecise language and a broken system. According to your assertion it's currently impossible for even professionals to know what should be considered in scope. This should be the trivial basis of a legal case, not the difficult and dubious extended research result of paid professionals.

Yes, that is my assertion – it’s impossible to verify that you have considered and correctly interpreted all relevant law, although it should be rare for professionals to make a mistake, especially after extended research. I’m curious as to what makes you think this problem can be solved trivially? Formal verification is hard enough for algorithms over the integers.

Re: A Modern Compiler for the French Tax Code

#126

Earlier quoted context omitted.

DSLs in general, say in banking system, e commerce apps etc.

Well, this is (one of my) areas so here goes. DSLs are a concept, not an implementation. As implemented they can vary from chained procedure calls to actual sub languages with lexers and parsers (and I tend to consider the latter to be 'proper' DSLs, but that's just my view). To have a 'proper' DSL I reckon you need two things, and understanding that a thing can and should be broken out into its own sublanguage, and…

Thanks a lot! This is very useful information and follow up books.

Re: A Modern Compiler for the French Tax Code

#127
post #109

During one of those rabbit hole journeys I discovered that Dutch Tax authorities use MPS, a DSL creation language/tool by JetBrains [1] It makes me wonder, why haven't DSLs caught up? Their claim that it allows developers spend more time implementing the business logic makes sense. But somehow that promise hasn't been realised. I'm curious to know from those who tried DSLs. [1] https://www.jetbrains.com/mps/documenta…

They do? That's bloody awesome... there's something to this country I love, despite the bad weather and worse food :) Can you share the resources you found?

JetBrains has a DSL creation language called MPS (Meta Programming System)[1]. I stumbled upon it while exploring their various offerings. I haven't played around with MPS but came across Dutch Tax system's use of MPS in their case studies, it's near the end of the page [1].

You will find a decent info to get started here[2]

[1] https://www.jetbrains.com/mps/ [2] https://www.jetbrains.com/mps/concepts/domain-specific-langu...

Re: A Modern Compiler for the French Tax Code

#128
post #64

Earlier quoted context omitted.

Hi, OP here :) I've come to the same conclusion about programming language creation. However, for a very large organization, it makes sense to have a team in charge of language tooling (see Dropbox/Python, Facebook/Hack/Flow, Apple/Swift). Which is why I'm trying to convince the French state that they should have such a team of permanent people.

I worked in a similar kind of role recently, in a large public retail company. The only advice I'd give would be to lean hard on finding, maturing, and then advertising end-user champions. Cross-department / -traditional boundary products are frustratingly difficult to push top-down, as the leader of the space that "owns" the product (i.e. IT) doesn't directly see the value, because they're not the end user (business…

Quite insightful! Being a part of product teams, I've noticed "platform" teams struggle and the reasons have mostly been not doing what you've pointed out above. As in, instead of working with their customers (i.e., other product teams) to identify their problems and fix them, they would push down their generic platforms down the throat. It invariably didn't end well.

I tend to think that platform/framework teams within a large orgs should be run as a B2B SAAS, at least with that mindset.

Also, if a platform team isn't run well, it ends up being the first one on the chopping block during layoffs. Uber laid off an entire developer-platform team earlier this year. One casualty was the Screenflow team, a promising product that didn't gain wider adoption due to terrible marketing/evangelism.

Re: A Modern Compiler for the French Tax Code

#129

I've been asked to write parser of _my_country_law_ and something that's capable of doing diffs and putting it together (diff+original=>newest version) docs without knowledge in that domain after seeing sample doc I've estimated it on something like 1 week of work (XD) month later I've been crying and having like 20-30% done this shit has been so sensitive (insanely error prone) and debugging was time costly. I think…

Do you plan on open-sourcing it, or do you have any recommendations for similar projects/research? Very excited about the computational law space.

I don't think I could legally do that

Re: A Modern Compiler for the French Tax Code

#130

I've been asked to write parser of _my_country_law_ and something that's capable of doing diffs and putting it together (diff+original=>newest version) docs without knowledge in that domain after seeing sample doc I've estimated it on something like 1 week of work (XD) month later I've been crying and having like 20-30% done this shit has been so sensitive (insanely error prone) and debugging was time costly. I think…

Who was the client? I ask because my state's legislature has a staff that reviews proposed legislation and then maintains the revised official laws. If I was tasked with doing diffs, I'd first interview them, try to make their jobs easier.

Private Persona
Post reply on HN