Live data from Hacker News

Spanish legislation as a Git repo

github.com

171–180 of 246 posts

Re: Spanish legislation as a Git repo

#171

Earlier quoted context omitted.

Your enthusiasm is remarkable.

I come from a society that doesn't value compassion that much, so now when I live in Spain which has a lot of it, it's hard not to feel good about it. Wish it was the same in more places in the world, we're all human after all.

It shows.

Re: Spanish legislation as a Git repo

#172

One idea behind the PoC Right to Privacy Act is having tests. A recurring theme with conservative Justices is clarity of legal text. Testing may not exhaust all scenarios but it is useful to see where loopholes may exist or whether a bill that sneaks in while you aren't paying attention is unfavorable to your values. https://github.com/righttoprivacyact/bill/blob/main/tests/te...

Laws are there to inform the land how the dominant class expect to be served. At least in theory the dominant class could be the working class or the majority, mind you. In practice you generally get a better idea looking at what small network core founded the country, generally through bloody wars or genocides.

Re: Spanish legislation as a Git repo

#173

Earlier quoted context omitted.

No by(e)-laws in Spain? Certainly a thing in the UK, Ireland and I believe US and Canada. Is that a common law thing?

"By-laws" is typically the name of the rules/"laws" inside of a company or organization, I'm not familiar with that word in the context of "nation-wide criminal/civil laws". Regardless, cities do not have their own "local laws" in the way your comment made it seem. We have national laws, and minor differences in various autonomous communities, since they have some legislative power to control their own industry, comm…

> inside of a company or organization,

Corps and cities are very similarly structured. Each are charted at the start, with corps getting governed by boards and c-suite types while cities have mayors and city council types. Both file paperwork to exist within the state. Both are subject to state laws, but are allowed to make up regulations specific to them as long as they are within the state's laws.

In the end, it's all just paperwork, at least in the US

Re: Spanish legislation as a Git repo

#175

Earlier quoted context omitted.

And even more useful would be unit-tests -- here is a loophole and here is the law preventing it. Whenever a law is about to be changed/removed, run all the tests to make sure no regressions.

Tests for correctness, self similarity, duplication of concerns, contradictory statutes, edge case detection, cruft or outdated laws that muddy the waters... If the full compliment of software development practices were applied to legislation and ordinances we would be living in a very different world.

oh gawd, code is law is back. or is it law is code?

Re: Spanish legislation as a Git repo

#176

Nice! I was just implementing this for CA state bills. Is the parsing/uploading code shared somewhere else? Definitely the kind of idea that would have been below my activation energy pre-Claude. I think this approach should be standard, I have always wondered why the source of truth for these documents is not moved to a repo like git.

my first reaction cynically would bet that government really doesn't want the people to know exactly what the laws are. a more generous reason would be nobody in law is truly technical enough to understand it let alone implement it.

Re: Spanish legislation as a Git repo

#177

I built a pipeline that converts all Spanish state legislation into version-controlled Markdown. Each law is a file, each reform is a real git commit with the historical date. 8,642 laws, 27,866 commits. The idea: legislation is just patches on patches on patches. Git already solves this. Instead of reading "strike paragraph 3 and replace with...", you get an actual diff. The repo is the product. Browse any law, git…

I’ve had the idea of playing with our laws and trying to ask questions about their growing volume and complexity. This is timely and dope Enrique - mil gracias!

Re: Spanish legislation as a Git repo

#178

I'm surprised the world is not running a system where laws are formally encoded using some DSL that would allow making decision (guilty/not guilty) using formal logic. Perhaps there is not much interest from law making/enforcing parties for this either.

That's a common fantasy of developers who haven't touched grass in a while.

Why is it a fantasy to have a fair system with no room for interpretation?

Re: Spanish legislation as a Git repo

#179

Well done. I believe that Governments should have a Open Licence for copyright purposes like exists in the UK that allows Govt docs to be used for commercial purposes without issue. I would want to propose a step forward there so that the next generation of this open licence actually has a data set approach to making data sets available - possibly at cost. Governments are losing the ability to charge for nominal item…

Legislation is out of copyright. Unofficial consolidated versions may be a different matter.

Re: Spanish legislation as a Git repo

#180
post #125

Earlier quoted context omitted.

It's a rehashing of Leibniz's "Calculemus!". It's not a fully stupid idea, many rules can be automated and indeed have already been. The things that courts still have to decide manually are the leftovers that require more human judgment.

This pipe dream will soon be replaced by "let's have the first degree of judgment be ChatGPT; human judges should only deal with appeals".

Sounds like every self-driving startup
Post reply on HN