6 ms·
There are also a repository containing some laws in markdown format on GitHub. They even used PRs for actual changes proposed by the parties in the parliament.
by nikeee 2y ago
There are also a repository containing some laws in markdown format on GitHub. They even used PRs for actual changes proposed by the parties in the parliament. Also, the commits have their proper date, so you can `git blame` on the laws and even see which president signed-off that change.
Sadly, it is unmaintained.
https://github.com/bundestag/gesetze https://github.com/bundestag/gesetze
- bilekas 2y agoI do think you're putting the horse before the carriage here.. It's just info, which is public .. What are you worried about ? Edit : I see you're focus is on another thing completely. Share it, could be a great topic also.
- LorenDB 2y agoSee also the US Constitution in GitHub: https://github.com/JesseKPhillips/USA-Constitution https://github.com/JesseKPhillips/USA-Constitution
- fashion-at-cost 2y agoNice. I kinda wish they went all the way and modified the commit details to have the actual authoring dates for each amendment/etc. Anyone know how well git plays with pre-epoch timestamps?
- eru 2y agoI just poked around a bit. So git was first created with u32 time in mind only. However because of the looming year-2038 problem, they are working on expanding that. Apparently git internals are almost ready to support more interesting timestamps. However, much of the git tooling and UI (like command line parsing and output) refuses to deal with pre-epoch timestamps. I briefly tried with git 'porcelain' and also via libgit2, but it's all a bit annoying. In summary, I think you'd need to hack up at least some of git's tooling to make everything work, but it wouldn't be heart surgery, because the internals are already nearly ready for this kind of change.
- fc417fc802 2y agoThings get ugly if you go back far enough that you need to account for jurisdictions which no longer exist switching between calendars at different times from one another. I don't know how well Unix timestamps will fare for dates prior to approximately the 1600s. At least you won't need to worry about figuring out historical leap seconds.
- eru 2y ago> Things get ugly if you go back far enough that you need to account for jurisdictions which no longer exist switching between calendars at different times from one another. I think that would be a 'timezone' conversion you do at display time. Internally, it's still stored as a unix timestamp.
- veqq 2y ago> how well git plays with pre-epoch timestamps? Tangentially, most RSS readers don't play nicely. A lot of webtooling doesn't like featuring e.g. old poetry etc. with the actual dates e.g.: https://alexalejandre.com/poetry/ https://alexalejandre.com/poetry/ I got a few e.g. newsboat to update their handling though.
- majkinetor 2y agoI usually convert to markdown from PDF local laws when I need them as a reference for the functional specification. That way its easier to pinpoint to exact section of the thing. Its not easy to convert general law to markdown, it involved online converters and manual fixes. Currently experimenting with marker [1] on local LLM hardware and so far it is the best out there. [1]: https://github.com/VikParuchuri/marker https://github.com/VikParuchuri/marker
- jandinter 2y agoI maintain a repository with all German legal acts which is up to date: https://github.com/jandinter/gesetze-im-internet https://github.com/jandinter/gesetze-im-internet I scrape the official website (https://www.gesetze-im-internet.de https://www.gesetze-im-internet.de) once a week. The repository contains the "official" XML files with a formatting that is more focussed on presentation than on the logical structure of the legal acts, unfortunately (https://www.gesetze-im-internet.de/dtd/1.01/gii-norm.dtd https://www.gesetze-im-internet.de/dtd/1.01/gii-norm.dtd). Some time ago, someone from the digital service of Germany reached out and asked about my use case. Maybe there will be an official version of a "Git law" repo someday...
- tapia 2y agoNice work. Maybe you could do some preprocessing of the XML data, so that you actually have a diff of the content and not the whole XML block.
- jandinter 2y agoI thought about it, but decided against pre-processing: The repo is meant to be an archive, and the XML spec can be looked up. If I were to introduce a new structure by pre-processing the files, I think that might be a plus for reading, but not for archiving. Whoever has a concrete use case (the "Digebu" website above looks great!), can write their own pre-processor for that use case.
- couscouspie 2y agoWhat did you tell him about your use case? I'm asking as I don't agree on the underlying assumption a use case was needed. I consider the value of transparency and public information for a democratic society as evident.
- jraph 2y agoThe question might not have been about the transparency, but more about the choice of having it as a git repository, or whether there are actual tools based on the git repository. Arguably, the git repository is unusable for the majority of people, so it cannot be an answer to transparency in itself, some user-friendly tools based on it might. I'm also interested in the response btw :-)
- tricoteuses 2y ago[dead]
- mrweasel 2y agoGerman laws might work different, but I'm not really under the impression that software version control is really that compatible with law making. In source code we replace or modify the parts that doesn't work in place. Many laws does not work like that, they are a labyrinth of add ons. A new law is introduced with wordings like "This replaces the words "small businesses" with "nuclear rockets" in the law on "Workplace safety of fishing vessels of 1992", §12, section 3, line 5. No amount of version control will ever find these changes.
- amai 2y agoThese wordings are basically a manual description of a diff. They wouldn't be necessary if version control would be used for laws. I actually think version control is an absolute necessity for laws.
- harvey9 2y agoMight work in some systems but England has Case Law stacked on top of statutes. That's tricky to turn back into code.
- throwaway290 2y ago> They wouldn't be necessary if version control would be used for laws. So a country only needs to rewrite all the laws to adopt versioning, cool. In reality both have can be used, commits to see what changed by whom and wordings that says what changed
- ZuLuuuuuu 2y agoThis kind of digitization is great. I don't know if they are doing it, but I always thought that it should be easy for regular citizens to see the historical reasons why a law or regulation exists. Because there is sometimes a good reason why a regulation exists, but nobody knows it.
- zesterer 2y agoI don't know, something tells me that lawmaking-by-git is somehow less accessible to the 'regular citizen'.
- monsieurbanana 2y agoSlapping a UI on top of that seems easy
- jampekka 2y agoLaws are usually passed with longer texts that explain why the law was passed. These are consulted by courts if there are issues in interpreting a law.
- 47282847 2y agoThis is more important than readers may think as laws especially in civil law jurisdictions are meant to be applied based on intent, and not by the letter.
- thu 2y agoI maintain a web site where I re-render to HTML a scrapped version of the (consolidated version of) the Official Belgian Journal[0]. One of the nice thing about having an underlying structured representation of those texts is that I can also render them to e.g. Markdown[1]. I've experimented about generating the Markdown files corresponding to multiple versions (archives) of a given text and committing them to the same Git repository to be able to see diffs or blames[2]. I would like to assign the proper dates to each commit, but given there are texts in e.g. 1791, it's not possible. 0: https://refli.be/fr/lex https://refli.be/fr/lex 1: https://github.com/hypered/iterata-md https://github.com/hypered/iterata-md 2: https://github.com/hypered/iterata-archive https://github.com/hypered/iterata-archive
- Defletter 2y ago> They even used PRs for actual changes proposed by the parties in the parliament. Also, the commits have their proper date, so you can `git blame` on the laws and even see which president signed-off that change. This is something I'm very interested in for a different use case: model legislatures. The infrastructure and tooling for model congresses and parliaments is very limited: largely relegated to wikis and Google Docs. And that's fine, but it becomes a problem long term with tracking and archival. We had a situation where our model parliament did not own the Google Doc for a particular treaty with another model legislature. It was changed out from under us, which is not ideal. But that brings into question ownership of Google Docs, and what happens if that person withdraws from the game. Another issue is respecting and maintaining the creativity of those who play. People put a lot of effort into their bills with the fonts, formatting, layout, and imagery they use. It would be a shame to erase all that effort by converting it a bland wall of text a la markdown. Markdown also has its issues: if the legislature removes an entry of an ordered list, how do you prevent markdown from renumbering the list? And the ways around this involve extending markdown, or using plaintext (eg: https://www.apache.org/licenses/LICENSE-2.0.txt https://www.apache.org/licenses/LICENSE-2.0.txt) Another solution could be QuillJS (https://quilljs.com/ https://quilljs.com/), which serialises into a JSON array of Deltas. However, this would make any kind of git-diff difficult to read. You'd need a custom differ, which is not impossible, but that may be a lot of work and may not be supported on git sites like Github. Another issue is that, if you're using commits-as-enactments, then that probably means using the commit message (or notes) for the enactment's text. To what extent is that supported? As in, how long can commit messages be before it starts wreaking havoc on git clients? Will my Github tab or GitKraken client crash if I view the commit history? Could the commit message itself contain a serialised QuillJS document? What if that document contained a base64-encoded image?