Live data from Hacker News

Spanish legislation as a Git repo

github.com

51–60 of 246 posts

Re: Spanish legislation as a Git repo

#51
post #4

This is brilliant. I wish this were available for all legislations. There's so many inefficiencies that are trivially solved with existing tech frameworks.

Our nonprofit, Open Law Library, is working on this exact problem. It is definitely not trivial, but it is very doable. We partner directly with governments to help them implement so the git repos become the canonical record (rather than just an unofficial mirror).

Maryland just launched their regs on our platform:

https://regs.maryland.gov (https://github.com/maryland-dsd/law-xml-codified)

Feel free to reach out (email in bio) if you would like your community to publish their official laws on GitHub!

Re: Spanish legislation as a Git repo

#54

I think this is great. Only limit of git is I can't imagine "git blame" works. It would be nice to know who voted for and against each patch. Git isn't structured for collaborative commits.

> Git isn't structured for collaborative commits.

Git isn't structured for collaborative commits, but community-wide conventions kind of "patches" support for it on top of the git message body, via "Co-Authored-By: name " which IIRC most platforms support, and the convention itself initially comes from Linux kernel development.

Re: Spanish legislation as a Git repo

#55

[flagged]

I think it was "okay" even before that law to be euthanized. However, the law adds a "a legal, systematic, balanced and guarantee response to a sustained demand of today’s society such as euthanasia".

But yes, it seems it is included indeed: https://github.com/EnriqueLop/legalize-es/blob/master/spain/... (which seems to have been well written enough to not needing any changes [so far])

Very glad my country is so compassionate with people that we can facilitate things like things when needed.

Re: Spanish legislation as a Git repo

#57
post #34

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…

Laws intent are often clarified in courts through judgments. If you can overlay the judgements on top of the corresponding law, at correct points in time, I think that will have value. It might, for example, show which laws were referenced the most and which needed to be clarified the most. It might give insights into what legal language constructs stood the test of time and which had to be repeatedly clarified.

Laws are often cascaded as well. Specifically in this case, Spain is subdivided into Comunidades Autonomas - each have their own elected parliament. And inside those are cities with their own local laws.

So while this project does track laws, is there any facility to determine which laws from which bodies are relevant to a specific activity in a specific location?

Re: Spanish legislation as a Git repo

#58
post #34

Earlier quoted context omitted.

Laws intent are often clarified in courts through judgments. If you can overlay the judgements on top of the corresponding law, at correct points in time, I think that will have value. It might, for example, show which laws were referenced the most and which needed to be clarified the most. It might give insights into what legal language constructs stood the test of time and which had to be repeatedly clarified.

Laws are often cascaded as well. Specifically in this case, Spain is subdivided into Comunidades Autonomas - each have their own elected parliament. And inside those are cities with their own local laws. So while this project does track laws, is there any facility to determine which laws from which bodies are relevant to a specific activity in a specific location?

> And inside those are cities with their own local laws.

No, cities don't have their own laws, but the autonomous communities do have some influence in some laws and regulations (not all), like the amount of income tax you have to pay and so on. But cities within the autonomous communities don't have their own laws.

Re: Spanish legislation as a Git repo

#59
post #45

Neat. I wonder if there are commercial products that are formal specifications of laws, decisions, etc. Such that you can reason on them via solvers etc.

I think it's a rite of passage for every developer who ever touched the ecosystem of law to also wonder the same. Probably even since the invention of "business programming" there been developers wondering this. Many has attempting, so far, I don't think anyone succeeded.

But I'm sure someone at some point might figure it out, you never know :)

Re: Spanish legislation as a Git repo

#60

Congratulations! This is a very cool project. A few years ago there were similar ones -- browse gitlaw. In Brazil we have lexml, a standard to describe the law and their changes over time. It's surprisingly complex.

Hah! XML strikes again. :-)

I understand that Spain was a participant in LexML as well... I gather they've since converted to something else?

Post reply on HN