Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

281–290 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#281

Earlier quoted context omitted.

Do you have any examples where ambiguity is truly beneficial? For all the examples I can think of, the most beneficial outcome is removing the law altogether.

Speed limits is one example.

How so?

I would have thought that is a good example of a law placing an upper limit on risk in a very black and white way.

Maybe exemptions for passing on single lane roads might be a net reduction of risk but I can’t think of any other grey areas.

Re: CatalaLang/catala: Programming language for law specification

#282
post #274

Earlier quoted context omitted.

Why would you want every law that applies to children to explain what a child is? Why stop at child, perhaps each law should include a definition of every word it contains, right? That would certainly make every law much more readable for the masses. The text of the law is meant to be understood by the people that it applies to, i.e. everyone living in the locality which passed said law. Expressing law in a formal la…

Having EULAs and many types of contract be code would be a huge upgrade. For one, it'd make them a lot shorter. You could use inheritance or composition to refactor out repetitive boilerplate, which is 90% of what EULAs are. The thing you see would only be the places where it deviates from a base EULA that you could study once. For another, it would catch bugs automatically. I have caught bugs in contracts drafted by…

Programming languages and other formal languages add boilerplate, they never remove it. Compare pseudocode for an algorithm with the actual implementation: it will almost always be much shorter.

All of the rest of what you mention could be achieved with plain language contracts exactly as well. Nothing prevents the software industry from getting together and producing a base EULA that all others refer.

Except of course for the fact that it would be utterly impossible to convince companies to agree to such an endeavor, whether in code or plain language or any other way. Especially since the purpose of EULAs is not to be clear, but to confuse end users with verbiage.

Re: CatalaLang/catala: Programming language for law specification

#284
Law is a mess, in part because its authors take shortcuts. For example, from the first example on CatalaLang's README.md:

> If the property was acquired by gift [and various conditions apply], then for the purpose of determining loss the basis shall be such fair market value. [emphasis added]

I think (and I'm not a lawyer or a tax expert) that this means that the basis of an asset can have a different value for the purpose of determining gain or determining loss. Wow, basis isn't just a number, although one might not notice this if one didn't read the six emphasized words.

But the Catala code seems to completely ignore this. Oops. I filed an issue:

https://github.com/CatalaLang/catala/issues/514

In a real use case, I imagine that substantial refactoring of the parts that consume basis might be needed when one notices that the basis is not a number.

Re: CatalaLang/catala: Programming language for law specification

#285
post #189
post #89

Earlier quoted context omitted.

Yeah, there’s no way that a modern computer could outdo the logical accuracy and processing power of our 300 year old legal system. Court rooms and arguing and paperwork, much more efficient than silicon.

Trying to measure it for "logical accuracy" and using ideas like "processing power" so very deeply demonstrates how little you understand what actually is happening.

You have a bunch of judges, none of which are immune to racism and corruption, giving out their version of the law from big oak benches while a suspect is held against their will in jail for however long. I think a computer can do better.

Re: CatalaLang/catala: Programming language for law specification

#286
post #236
post #43

Earlier quoted context omitted.

I partly like this idea in theory, but believe it is literally 100% impossible to come up with a better "test suite" than "the actual court system?"

I don't want me or my male family members to be labelled sex-offenders whilst you "test" the "court system" to see if the laws work as intended. All because some overzealous prosecutor wanted to be "tough" on "toxic masculinity".

Oh, I mean, Black man here -- I 100% agree with you that there are serious and deep problems with how things are done now; I just have very little faith that any hypothetical nerd testing like we're talking about here will do much better.

Re: CatalaLang/catala: Programming language for law specification

#287
post #17

I don't think there's much of a problem with actually reasoning about a law's text that a computer can help solve. The complicated bit is weighing equities, which still requires humans and lawyers.

Absolutely. Although the clarity by creating algorithms from tax tables can be helpful, and sometimes the wording seems ambiguous. Although you probably also need lots and lots of examples. (It is as if you need unit tests!)

Most tax-related rules in the US are specified in an XML-based business rules language. That's partly how tax prep companies are able to get rules that don't finalize until 12/31 into products that have to ship 6 weeks later.

Re: CatalaLang/catala: Programming language for law specification

#288

Earlier quoted context omitted.

Agreed. Although I don't think this is a bad idea, I think of the idea of perfectly defined laws and perfectly enforceable laws are terrifying. If every law on the books today were able to be perfectly enforced and perfectly monitored, our lives would be utterly miserable. I'm not going to argue that's a problem with laws vs. enforcement, but either way, our society is built around ambiguity and unequal enforcement o…

Do you have any examples where ambiguity is truly beneficial? For all the examples I can think of, the most beneficial outcome is removing the law altogether.

Two easy examples:

- Fair use law (there are thinks which clearly are and are not fair use but in between there is huge gray area where you can not really formulate generic precise rules which work reliable).

- Parent law (which has a lot of issues especially given how it's applied, but design wise you fundamentally have ambiguity about questions like when something is "enough added innovation" to be patentable as fundamentaly "the degree of inovativeness" is purely subjective.)

- Insult, is also very subjective. Define it as "only when insult was intented" would be bad, but similar would be "always when the person felt insulted" and even "if intended and felt insulted" has issues.

- Self defense it's in many jurisdiction based on the person feeling threatened, but in jurisdictions with sane law it also involves stuff like "a generic person would also have felt threatened", but then you still have to consider person specific circumstances.

- or lot of stuff around what counts as insider information, e.g. for insider trading

Re: CatalaLang/catala: Programming language for law specification

#289

Earlier quoted context omitted.

Do you have any examples where ambiguity is truly beneficial? For all the examples I can think of, the most beneficial outcome is removing the law altogether.

Speed limits is one example.

in many countries speed limits are quite clear cut

through "clear cut" here sometimes still involve an assessment of danger which fundamentally isn't 100% objective

and e.g. in germany you are only allowed to "drive as fast as it's save" even if the speed limit is higher (and that is a common occurrence, e.g. resident areas tend to be 30km/h zones but you have to slow down at nearly every crossing because anything else wouldn't be save and if you do an accident at a crossing driving 30km/h in such a zone you are very likely very much screwed (depending on damage done).

So I guess, yes speed limits in a certain way, too.

Re: CatalaLang/catala: Programming language for law specification

#290
post #64
post #34

Completely unrelated to Catalan (Català), the language spoken in Catalonia (Catalunya). I think if someone wants to google a question about this, "catala language beginner hello world" won't help them much.

You'd write "catalalang" just like you write "golang", if you really need. I think in most context, search engines would be able to infer the context.

Smart…
Post reply on HN