Live data from Hacker News

Germany's laws on github, machine-readable and ready to be forked

github.com

41–50 of 78 posts

Re: Germany's laws on github, machine-readable and ready to be forked

#41
post #40

Gesetze sind Prosa, sie enthalten keine maschinenlesbare Semantik. (Laws are prose, they contain no machine readable semantics) And there was me hoping they had fixed that ! Ahwell, one step at a time :)

Rewriting law to be machine-readable as in "instructions a machine can understand" would be quite a task I suppose. Interesting project though. Would that even be possible? How well does the law map on the black and white logic of a computer?

Sometimes, I fantasize about turning that around. What if parts of the law (say, fiscal law sounds like a candidate) are chosen to be as black and white as the logic of a computer?

Policymakers could get automated compile errors when trying to craft conflicting laws. They could instantly compute what the effect of a law change is on this and that demographic or persona.

Re: Germany's laws on github, machine-readable and ready to be forked

#42
post #40

Earlier quoted context omitted.

Rewriting law to be machine-readable as in "instructions a machine can understand" would be quite a task I suppose. Interesting project though. Would that even be possible? How well does the law map on the black and white logic of a computer?

Sometimes, I fantasize about turning that around. What if parts of the law (say, fiscal law sounds like a candidate) are chosen to be as black and white as the logic of a computer? Policymakers could get automated compile errors when trying to craft conflicting laws. They could instantly compute what the effect of a law change is on this and that demographic or persona.

> automated compile errors when trying to craft conflicting laws

That just made my day :)

It's actually a good idea, I think. I'm just not exactly sure whether that would work because laws govern the real world and in the real world, logic isn't binary.

However, such laws would at least be understandable for mere programmers ;)

Re: Germany's laws on github, machine-readable and ready to be forked

#43
post #37

Start with the IP-related laws. They seem to have some of the most aggressive ones in the world, which could explain why the Pirate Party there is also the fastest growing branch.

I doubt it. Germans started getting sued for illegal downloads right when DSL grew popular (a decade ago), without any political response. We also have no software patents; we can still (CMIIW) freely share copyrighted works with friends, just not with the public; we can crack what wouldn't otherwise run.

The only part that is so terrible and draconic that everybody knows about it is the GEMA, which is concerned with music and loyalties.

Re: Germany's laws on github, machine-readable and ready to be forked

#44
post #9

Awesome stuff. I couldn't find anywhere though: is this an 'official' project, or is it just someone who processed the XML forms into markdown? Also, this: "All German citizens can easily find an up-to-date version of their laws online." And it's only 130 megs of markdown when zipped (246 unzipped)! A mere 4,737,628 lines[1]! Surely you have time to read it, right? And therefore be a well-informed, law-abiding citize…

I think this is where "German citizens can easily find an up-to-date version of their laws online" :

http://www.bgbl.de/Xaver/start.xav?startbk=Bundesanzeiger_BG...

Re: Germany's laws on github, machine-readable and ready to be forked

#45
post #42

Earlier quoted context omitted.

Sometimes, I fantasize about turning that around. What if parts of the law (say, fiscal law sounds like a candidate) are chosen to be as black and white as the logic of a computer? Policymakers could get automated compile errors when trying to craft conflicting laws. They could instantly compute what the effect of a law change is on this and that demographic or persona.

> automated compile errors when trying to craft conflicting laws That just made my day :) It's actually a good idea, I think. I'm just not exactly sure whether that would work because laws govern the real world and in the real world, logic isn't binary. However, such laws would at least be understandable for mere programmers ;)

    data Offense = MensRea | ActusReus
    CriminalLaw :: [Offense] -> Punishment
    ExtenuatingCircumstances :: CriminalLaw -> [Circumstance] -> ExtenuatingEffect -> Punishment

Re: Germany's laws on github, machine-readable and ready to be forked

#46
post #37

Start with the IP-related laws. They seem to have some of the most aggressive ones in the world, which could explain why the Pirate Party there is also the fastest growing branch.

I doubt it. Germans started getting sued for illegal downloads right when DSL grew popular (a decade ago), without any political response. We also have no software patents; we can still (CMIIW) freely share copyrighted works with friends, just not with the public; we can crack what wouldn't otherwise run. The only part that is so terrible and draconic that everybody knows about it is the GEMA, which is concerned with…

Yeah, and now the GEMA want Kindergardens to pay fees for singing child songs that are in the portfolio of the GEMA. ridiculous!

Re: Germany's laws on github, machine-readable and ready to be forked

#47
post #28

There was a great discussion on HN previously about this topic which also explains why a straight git implementation isn't viable for US law; I'm not sure if doing the same with Germany's laws would be similarly difficult: http://news.ycombinator.com/item?id=3968653

Thanks for the link. I read the following from that earlier discussion and immediately thought, isn't this what the Darcs version control system was designed to do? "What you have to do is to just record the conflict and create two parallel universes, one in which the conflict has been resolved using branch A and another one in which the conflict is resolved using branch B. You then keep these two universes alive and…

Normaly you work out consequetials so if amedment to a law a and amadement b contradict if amendement a is passed then b is deemed to have been defeated.

Re: Germany's laws on github, machine-readable and ready to be forked

#48
Sorry semi-OT humour but this is one of the very few times were you can actualy fork with the law and come out ontop :).

Sadly though alot of laws due to changes and word-smith pervertions can be hard to understand and in that it would be nice if there was some universal way to express law's that you could get any law in any country and express. That would be immpressive though hard to do. Only comparision would be picture based traffic signs, that is somewhat as close to universal with regards to laws as can get.

Be nice when all the countries have there laws up in such a way. Will make grepping alot more fun and probrbaly be the birth of lgrep (law-grep).

Re: Germany's laws on github, machine-readable and ready to be forked

#49
post #40

Earlier quoted context omitted.

Rewriting law to be machine-readable as in "instructions a machine can understand" would be quite a task I suppose. Interesting project though. Would that even be possible? How well does the law map on the black and white logic of a computer?

Sometimes, I fantasize about turning that around. What if parts of the law (say, fiscal law sounds like a candidate) are chosen to be as black and white as the logic of a computer? Policymakers could get automated compile errors when trying to craft conflicting laws. They could instantly compute what the effect of a law change is on this and that demographic or persona.

What and remove the ability of thier lawyer collegues vast sums of money to interpret the fuzzy nature of the law :-)

Re: Germany's laws on github, machine-readable and ready to be forked

#50
post #19
post #14

If only they'd accept pull requests.

"You are encouraged to open pull request. Of course only valid legistation voted on by the Bundestag will be merged."

> Of course only valid legistation voted on by the Bundestag will be merged.

And I was excited for a moment...

Post reply on HN