Live data from Hacker News

Spanish legislation as a Git repo

github.com

161–170 of 246 posts

Re: Spanish legislation as a Git repo

#161
post #75

Earlier quoted context omitted.

The German parliament even has an official git repository: https://github.com/bundestag/gesetze Looks like it's been abandoned, though. :(

The GitHub org being called “bundestag” doesn’t mean that it’s anything official. It looks like it’s made by independent activists.

Oops, I should have checked this more carefully. Thanks!

Re: Spanish legislation as a Git repo

#162
post #41

Earlier quoted context omitted.

It seems the commits aren't in proper date order. Here are some newer changes, placed before the latest commits: https://github.com/EnriqueLop/legalize-es/commits/master/?af...

It's related to commits actually having a parent-child structure (forming a graph) and timestamps (commit/author) being metadata. So commits 1->2->3->4 could be modified to have timestamps 1->3->2->4. I know GitHub prefers sorting with author over commit date, but don't know how topology is handled.

> It's related to commits actually having a parent-child structure (forming a graph) and timestamps (commit/author) being metadata.

Yeah, I think everyone is aware. It's just that the last couple dozen commits, to me, looked like commits had been created in chronological order, so that topological order == chronological order.

> I know GitHub prefers sorting with author over commit date, but don't know how topology is handled.

Commits are usually sorted topologically.

Re: Spanish legislation as a Git repo

#163
post #157

It would have been cool if the commit authors reflected the actual politicians responsible for the reforms. Find a law, run `git blame` and immediately know who’s responsible for it

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.

Re: Spanish legislation as a Git repo

#164
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...

Re: Spanish legislation as a Git repo

#165
post #61

This is really great, anyone know of a Dutch version?

https://news.ycombinator.com/item?id=47554274

yeah thats a great start, however the md files of every change are really helpful in going though history and understand steps with llms'

Re: Spanish legislation as a Git repo

#166

Great idea! I hope you did something like: $ git commit --amend --author="Author Name " --no-edit .. with the details for the author of each commit. Then, it would be simply amazing to run gource, sit back, and watch where all the noise is coming from. Gource: https://github.com/acaudwell/gource What gource looks like: https://gource.io/ I’ve long wanted to see gource applied in other sociologically-relevant contexts…

I tried using Gource and... well, the commits were not sorted by date, so the time goes all over the place.

Re: Spanish legislation as a Git repo

#167
post #157

It would have been cool if the commit authors reflected the actual politicians responsible for the reforms. Find a law, run `git blame` and immediately know who’s responsible for it

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.

Jurisdictional laws don't work that way though. It's more like a script for improvised theater. Everybody get the same text, but no one gets the same performance twice.

Re: Spanish legislation as a Git repo

#168

Earlier quoted context omitted.

The value is in the semantics git gives you for free once the data is in this shape. Right now if you want to understand how a law changed, you go to the official gazette website and read a document that says "strike paragraph 3 of article 12 and replace with the following text." You're doing the diff in your head. With this repo, git log --oneline -- spain/BOE-A-1978-31229.md gives you every reform to the Spanish Co…

Thanks for a beautiful explanation. Makes sense now that this repo enables git diff, git base to reveal changes easier.

of course, thanks for asking a great question!

Re: Spanish legislation as a Git repo

#169

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.

Cold-blooded murder ~= "compassion". Got it. Cool.

Re: Spanish legislation as a Git repo

#170
post #157

It would have been cool if the commit authors reflected the actual politicians responsible for the reforms. Find a law, run `git blame` and immediately know who’s responsible for it

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.

Post reply on HN