Live data from Hacker News

Spanish legislation as a Git repo

github.com

131–140 of 246 posts

Re: Spanish legislation as a Git repo

#131
post #13

This is great. Compare it to British legislation which is frankly a mess of patches. Example picked fairly much at random, this law was originally passed in 1990 and has been "patched" regularly: https://www.legislation.gov.uk/ukpga/1990/18/section/9 Laws being passed are these ludicrous sets of patches: https://www.legislation.gov.uk/ukpga/2015/9/part/1

Let's hear your solution to the mess.

Re: Spanish legislation as a Git repo

#132
post #56

Earlier quoted context omitted.

There are laws that prevent you from committing suicide?

It was assisted suicide. Meaning the government helps you to commit suicide.

Generally legal assisted suicide doesn't mean "the government helps you commit suicide" - it means it's not illegal for a doctor assisting a patient to commit suicide.

Re: Spanish legislation as a Git repo

#133

Earlier quoted context omitted.

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 comp…

[flagged]

We all die, so I suppose for some of us, "good death" is better than "forced to be alive although you don't want to". Worth remembering where the word comes from:

> Euthanasia (from Greek: εὐθανασία, lit. 'good death': εὖ, eu, 'well, good' + θάνατος, thanatos, 'death') is the practice of intentionally ending life to eliminate pain and suffering.

Re: Spanish legislation as a Git repo

#134

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…

This is brilliant. I had thought about this for a long while, you see laws that are just "go to law 132 and amend paragraph 4, then go to law 24 and amend paragraph 9". Basically "laws" are recorded as diffs, and then it's up to the reader to put up the final product in their heads. They should be doing it this way!

Re: Spanish legislation as a Git repo

#136

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 looked into this a while back and IIRC, the consolidated legislation doesn’t cover all legislation but only a handful.

Also, in my experience (having built in this space before), regulations aren’t really the issue. Court rulings are, because there’s no open data for them in Spain. And the potential users for a paid product (legal professionals) already know the law; the key players (big law firms) have their own databases of annotated and verified court rulings and other documents.

Re: Spanish legislation as a Git repo

#137

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…

This is really cool. I've thought about it for a long time as well but never had the idea of just using git, which is equal parts genius and "obvious" in hindsight, as most great ideas are.

I think the corollary that comes to mind is that reforms, with their git commits, are incrementally valuable if they refer to other parts of the legislation, previous commits, etc. to give more context as to the intent at the time of the law. So maybe there's a way to distill the legislative process into more PR and commit-oriented work—likely ex post as you did here, but perhaps in the future as part of an actual workflow.

And then maybe I'd pitch the idea to some technologically-inclined local government.

Re: Spanish legislation as a Git repo

#138
I love it. This is a step in the right direction to have a transparent database of existing laws and be able to consult them with your AI or anything capable to reason about them and explain the status quo of our national laws. I would love to see a similar setup for other countries.

Re: Spanish legislation as a Git repo

#139
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?

yes: Comunidades Autonomas can only defined laws as "permitted" by the central government under a Estatuto de Autonomia (Autonomy statute? not good with legal jargon), which is effectively a law of its own. So at the central level the law says "in this particularly region, matters of education are dealt with regionally", and then that's when regional laws apply. Same from local laws. In essence, all laws emanate from the central government, but the central government decides to delegate some areas; technically, they could always take it back.

Re: Spanish legislation as a Git repo

#140
post #29
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.

Everyone in government knows what Track Changes is. The standard format of a piece of legislation in British-influenced systems is a diff. The tech field does not have secret knowledge that the rest of humanity lacks.

I was thinking the same thing. I feel like people in software tech always think they have secret powers that experts in other fields can't imagine.
Post reply on HN