Live data from Hacker News

CatalaLang/catala: Programming language for law specification

github.com

201–210 of 301 posts

Re: CatalaLang/catala: Programming language for law specification

#201
post #195

Earlier quoted context omitted.

Then you should be able to tell us what defrauding someone of their intangible right of honest services encompasses :)

Whatever statute you're looking at likely defines "intangible right of honest services" and "defrauding."

> For the purposes of this chapter, the term “scheme or artifice to defraud” includes a scheme or artifice to deprive another of the intangible right of honest services.

That's it.

Re: CatalaLang/catala: Programming language for law specification

#202
post #185

Earlier quoted context omitted.

I don't know how many is good enough. If it's every other person, than that's bad; if it's two people since the law was written 50 years ago, I would say that's good enough in my book. Which is it? And no, cases don't often make it to the Supreme Court because the wording of the law is ambiguous. They make it to the SC because the parties disagree on legal principles and on whether laws are unconstituional or not. >…

> And no, cases don't often make it to the Supreme Court because the wording of the law is ambiguous. They make it to the SC because the parties disagree on legal principles and on whether laws are unconstituional or not. I'm not from your legal system, and yet even I know that's not right: they make it the SC because the 'losing' party disagrees with a lower judge's decision that's already been made, and makes an ar…

The GP is taking a restricted meaning of "ambiguity", where the ambiguity is within the laws relevant to the case being appealed.

But cases that go to the Supreme Court of the United States are often cases where the "ambiguity" is on how the US constitution should be interpreted and applied.

In a practical sense you're not going to be able to codify the US constitution into code. It's even a well received "feature" that constitutions are sometimes a bit ambiguous, see: https://en.wikipedia.org/wiki/Living_Constitution

Re: CatalaLang/catala: Programming language for law specification

#203
post #164

Earlier quoted context omitted.

As someone who has tried to read the Black’s law dictionary once, I must tell you that the law does use a lot of formal language.

It does, to some extent, but it's still much closer to natural language than code. Expressing the law in code would turn this dial up to 11 and then some.

Sure, but there would be all manner of services that could automatically translate law-in-code to any human language you wanted. The best part is that you could easily and automatically translate a law into, say, English, Japanese, and German. Whenever the law-in-code source changes, just rerun your translator and voila: no human intervention required (meaning faster and more accurate translations of the law into human-readable language).

You could even program the "law-in-code-to-humanspeak" translator to generate different levels of the target languages, e.g. translate into something at a 6th grade reading level vs. something at a grad school level. Again, the advantage would be the automaticity.

Re: CatalaLang/catala: Programming language for law specification

#205

It would be interesting to also "weave" in test cases. The workface of logic statements is exactly where bugs are introduced. Especially around temporal events, and that goes to formal models (and even more bugs). Typically, if there is a rule around height, there would be at least three tests¹: one taller, one equal to, and one shorter. (Without types or something, then also negative, null, and max/min boundary inpu…

This is great. I often look at unit tests to understand how to use legacy code. Seeing a law come with concrete examples that are part of the legal text, would allow us to test if a rule is logically consistent, and test our understanding as well. Sort of how you want to convince your reviewer that your code works by proving it with a unit/integration/e2e test.

End to end tests for legal frameworks?

Re: CatalaLang/catala: Programming language for law specification

#206
post #101

Earlier quoted context omitted.

Catala still produces plaintext legal documents at the end of the day but can be seen as a markup language for those documents. But because that markup language is a whole lot more precise than the legal text itself, it can be a bit more versatile. Examples of how this could be useful: - Reducing the overhead for maintaining a list of semantic translations of that legal code into other languages. Of course the offici…

> Of course the official language is the only one that is "legal" If only! Here in Canada there are two official languages. All laws are drafted, and enacted, in both English and French. Both versions are equally valid, equally binding. And, sometimes, they don't say the same thing.

Catholic Canon Law is drafted and coded in Latin, which is supposedly the only official and binding version. However, this is translated into hundreds of vernaculars! People often read it in their native language for convenience, even lawyers, but this can be fraught with peril.

Re: CatalaLang/catala: Programming language for law specification

#207

Earlier quoted context omitted.

I don't know if what you say about laws is correct, but it's certainly not a correct description of contracts. The general public is constantly confronted with utterly unreasonable legal documents: far too long, far too unclear, far too complex. The lawyers writing these, and the entities paying them, both know that the public will never read or understand them. It's pure cinicism.

Sure, but that wouldn't change if they were written in code. It would probably get much worse, in fact.

I don't think so. Any state progressive enough to adopt law-as-code might also put in place laws limiting the length and complexity of the code. It would be easier to control this aspect as code I believe.

Re: CatalaLang/catala: Programming language for law specification

#208
That's really cool!

I was puttering around with the idea of a ricardian compiler for legalese, basically a decompiler for something like this that could compile a legal text into clear logical rules. This would aid in proof checking for legal documents to ensure that they're compatible with existing law, that there are no (unintended lol) loopholes and the like. It would also be useful if you wanted to create self enforcing legal documents that can be enforced deterministically by machines, such as collateralized agreements, and finally, even though someone would still need to know legalese, it could make the development of such agreements easier for people and lower the bar tremendously.

I wonder if anyone has built anything like that, if these guys have, or if anyone has built other interesting ricardian compilers.

Re: CatalaLang/catala: Programming language for law specification

#209

Earlier quoted context omitted.

Wouldn’t that just be writing test cases against the business logic of your game?

I assume they're talking about tabletop/board games and such, not video games.

Ahh, that was the context I was missing. Indeed, makes sense for board games.

Re: CatalaLang/catala: Programming language for law specification

#210

For years I've tried to convince my lawyer friend that something exactly like this would be great to have, and then it turns out to have existed probably all the time. I think this is truly awesome. Every law should be written in a language like this, and presented publicly with syntax highlighting and consistent formatting rules. Then it should be made part of the school curriculum to learn the law language. I belie…

[dead]
Post reply on HN