7 ms·
Why Law Is Law-Shaped
- eqmvii 5mo agomy favorite quote in this space has always been: the prophecies of what the courts will do in fact, and nothing more profound, are what i mean by the law.
- eru 5mo agoI guess this is not meant as a general introduction, but it would have been useful to acknowledge the differences between different legal systems somewhere at the start? (Even if it's only to argue that they aren't all that different in practice.)
- ekns 5mo agoFair point. I've added a clarification that the structural constraint holds across civil law, common law, and hybrid systems. Thanks.
- keiferski 5mo agoIn an entirely different qualitative sense, this post reminded me of the short story by Kafka, Before the Law. I won’t paste the whole thing here, but it’s a really short read: https://homepage.univie.ac.at/st.mueller/kafka_english.html https://homepage.univie.ac.at/st.mueller/kafka_english.html An article on the story: https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html
- CamelCaseName 5mo ago[flagged]
- keiferski 5mo agoHere is a longer article on it: https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html
- throw4847285 5mo agoKafka would find your attempt to explain his story with AI hilarious.
- quietbritishjim 5mo agoThanks for the interesting read. But, I have to say, I didn't understand it at all.
- bombcar 5mo agoYes, it was very kafkaesque. (I also didn't get it.)
- awesomeMilou 5mo agoExcercising your rights is a duty, responsibility and experience that is individual to everyone.
- gilleain 5mo agoYes I thought at the start it was about how our expectations of how the law works are at odds with the reality So the gatekeeper is the system keeping us from Justice - mostly money, but also other less tangible barriers. In theory, everyone gets a lawyer, in practice some people can afford expensive ones. Then the end twist got me confused.
- nemomarx 5mo agoThe end twist makes me think it's about an individual attempt to learn and understand the law, but I'm not sure what the inner gatekeepers would represent there. Something about how we want to understand The Law, capital letters, but then there's only systems we make ourselves and understand ourselves would feel properly Kafka, I suppose. But you think that would be mapped to journeying towards some kind of Law?
- jonhohle 5mo agoI’m in the middle of using the courts to get State Farm to make me whole. Even at the small claims level, the law and procedures are stacked against the non-lawyer. There is an obvious power imbalance and it’s exploited because most won’t ever make the effort to even try, and those that do will be buried with so much work as to not make the pursuit worthwhile. The story seemed pretty accurate.
- lkm0 5mo agoKafka (who apparently had a great sense of humor) seems to really enjoy writing people who die from too much second guessing. In the trial, K. keep failing by attempting to outplay the system at every step, because he thinks that he can stay above it all (don't we all). It's what you might call an awfully credible idiot plot.
- implements 5mo agoI wondered whether K’s original crime was being “the sort of person who would express excessive pride before the law” - a Minority Report style “Contempt of Court”. Or was it originally just mistaken identity?
- lkm0 5mo agoI've always been wondering if the crime matters at all. A lot of people say that going through a trial, even as a victim, is a punishment; it's the process that counts (hence "der prozess"). Perhaps the lack of a stated crime reflects that we the general public never fully understand under which specific provisions someone gets locked up. And so the actual deed may have been done before K. was born, etc.
- implements 5mo ago> A lot of people say that going through a trial, even as a victim, is a punishment … “You can beat the rap but you can’t beat the ride” (rap being the charge and ride being the whole process from arrest to acquittal: time, money and emotional trauma)
- dmbche 5mo agoBig thanks this was a wonderful read. Maybe I'll get The Trial today, I tried The Castle and didn't like it but y'know
- keiferski 5mo agoPersonally I like Kafka’s short stories more than his novels, so I’d look for a collection of those first. (And The Trial too.)
- dvh 5mo ago> Parliament cannot restate the entire legal corpus each session. IMHO the biggest mistake. It should be like that. Because right now for mere mortal it's impossible to find out if some law or paragraph is still in effect.
- qnpnpmqppnp 5mo agoHow would it work though? Also, not sure what makes it so impossible (debates on whether a given law is in effect seem pretty rare, though it does exist), but that may depend on where you come from and the applicable legal system.
- brainwad 5mo agoIt would work just like people work on docs without revision control: * Laws of the Land * Laws of the Land - Final * Laws of the Land - Final 2 * Copy of Laws of the Land - Final * Laws of the Land - Definitive Version 2026-04-29 * Laws of the Land - Definitive Version 2026-04-29 with 11 o' clock amendments It's a bad idea, there's a reason we don't recommit the whole repo every time we make code changes (any more).
- mishellaneous 5mo agothat would slow down the process considerably. it would also not be of much use to the professionals, which i guess make up the majority of those involved most of the time, and so, i guess, would not have much support. IMO a good middle ground could be attained by everyone having some understanding of the legal system. we could use school for that. i mean, we cover calculus and ancient history, it's not like covering law to some extent would be harder
- WJW 5mo agoDo you re-read the source code for your keyboard drivers each time you boot up the PC? If not, how can you as a mere mortal be expected to understand if some keys still work the same as yesterday?
- 5mo ago
- james-bcn 5mo agoAudrey Tang did a lot of things related to this whilst they were Minister of Digital Affairs of Taiwan. https://en.wikipedia.org/wiki/Audrey_Tang https://en.wikipedia.org/wiki/Audrey_Tang
- librasteve 5mo agoThey also wrote PUGS the first parser for https://raku.org https://raku.org written in Haskell
- TZubiri 5mo ago—
- fractallyte 5mo agoInteresting synchronicity: I've written a patent-drafting DSL which exactly parallels this – and which is now shaping up into an "IDE" for patent drafting... Patent texts read as prose, but are actually precisely structured legal documents. The latest developments in this domain involve LLMs to create and modify patent documents, but even though the legal profession seems to have fallen all in on it, it's essentially rather fragile and error-prone. I've gone the deterministic direction, which has opened up some very cool, previously unexplored, possibilities!
- mishellaneous 5mo ago> Patent texts read as prose, but are actually precisely structured legal documents. at that point why not just use something precise like a programming language? have there been efforts in that direction? genuine questions
- fractallyte 5mo agoI have no idea. A few months ago, for the first time in my life, I had to write a patent document. It was very complicated – too complicated. Noting the structure, I searched for tools, but found only LLMs. So I wrote my own tool. The amusing thing is, LLMs prefer the DSL-structured document!
- Garlef 5mo agoYes (not patents in particular). The name is "law as code". (My impression: various approaches; mostly academic; some small companies in the space; judging from a loose assessment wrt my career choices as a freelancer: no real business opportunity yet)
- ekns 5mo agoInteresting indeed! What have you learned from the patent space and what kinds of questions can you answer after perhaps solving that domain?
- fractallyte 5mo ago
- ChaosOp 5mo agoAs a fellow Finn (and a lawyer), super interesting work Elias! And thank you for reporting the inconsistencies you found to Finlex
- vessenes 5mo agoMan, I hated last year’s clanker-tone, and I hate this one’s too by now. I don’t want to read the word load-bearing ever again. The reminder that there’s structure and content and they’re different is a good one. Even a small legal document has this microstructure of references, inside, outside explicitly and outside by inference.
- ekns 5mo agoI get it, it's not ideal. Yet there is no one else doing this work so I put effort where I think it's most neglected - which isn't fully refined prose, imo.
- vessenes 5mo agoI appreciate the work! And I hear you; writing is a lot of work, especially if you don’t need the benefits of synthesis it gives the writer. I’ve cadged some rules somewhere for de-LLMing the text; if I can find them I’ll post a follow up link. They don’t help with structure though - and I think this is arguably the most important bit - taking the reader through a logical progression. I didn’t read carefully enough to opine on your structure, but again, thanks for doing this!
- mishellaneous 5mo agosome people would, in this case, prefer the unrefined version
- bonoboTP 5mo agoYes, at this point I can't read this kind of AI text recreationally. It is somewhat fine when I ask Claude Code to explain to me something about a codebase or to summarize and collate info and it comes out in this shape. But if you're a human and you have some human idea that you want to share, don't come to me with AI text. If you do, I don't believe that the ideas are well thought out and come from thorough human thinking and life experience. If I want to consult AI on its understanding of the law, I'll ask it myself. If it's your ideas, at least share the bullet points of the prompt it was generated from.
- vharuck 5mo ago>Retroactive amendments change the legal effect of provisions for a past period — an amendment published today can declare that it applies from last year. This retroactively alters the legal state at historical points in time. I don't (personally) agree with this. Laws should be seen as applying in cases where parties and actions have certain qualities. A retroactive law does not state, "This actually applied to past events and entities." It states, "This applies to entities with the quality of having done an action or met some quality in the past." I'm not familiar with the EU law system the article is based on. How would it handle a case where a person was found in violation of a retroactive law, and their past violating action was done along with another action that is considered illegal when done during a crime? For example, if somebody wrote that they never used illegal drugs on a government form, and a drug they had used is later retroactively declared illegal, can they now be prosecuted for having "lied" on the form?
- Joker_vD 5mo agoEuropean Convention on Human Rights, Article 7: "No punishment without law" 1. No one shall be held guilty of any criminal offence on account of any act or omission which did not constitute a criminal offence under national or international law at the time when it was committed. Nor shall a heavier penalty be imposed than the one that was applicable at the time the criminal offence was committed. This doesn't preclude "beneficial" retroactivity: e.g. if some act you're currently incarcerated for is declared legal henceforth (or deserves less maximum jail time that you've already served), then you should be released.
- psychoslave 5mo agoIf doesn't matter much for this kind of scenario. Laws come in multiple flavor. One flavor is for stating something already very consensual in the concerned community. That gives credits to law corpus as a source of justice, so people can somehow be accustomed that law is there to foster social justice through clarified terms visible by all. As opposed to unpredictable judgment of any random citizen along their mindset of the moment. Then they are laws to throw made up arcana on how laws work. Citizen are still supposed to believe that laws in the end are balanced systems taking many things into account, so mere citizen won't have time, interest, skill and talent to call law by themselves. While they need specialists as middle man, they can still be pretended to be grounded on accumulated wisdom of common sense and consensual underlying basis. There are also laws, there are their for serving a specific small class in the population, and favor their interest agaisnt all others. As they are well enshrined in the larger boilerplate corpus, there is no way to distinguish them from the others. Well, sometime of course they can be downright clear about establishing de facto inequalities to serve these interests. But they can just as well be thrown in a more diffuse way. Not all law maker are equally subtle of course. This is not a closed set, many other flavors can be identified, like, "put my name of the glorious me in the title of this law everyone and its dog will have to deal with on daily basis". Ah, and I almost forgot the flavor that make the most sense to talk about here. Make sure you have enough laws on every matter and the rest to be able to jugulate any layman who is annoying for the dominant class. Capital sentence is not indispensable, it's enough to have enough laws so basically anyone is de facto unable to not be guilty of many things, or at least can be prosecuted until they bind to the "morale order", or suicide.
- Brendinooo 5mo agoInteresting to read this a few days after reading Patel's "software brain" piece. ("the overlap between software brain and lawyer brain is very, very deep") https://www.theverge.com/podcast/917029/software-brain-ai-backlash-databases-automation https://www.theverge.com/podcast/917029/software-brain-ai-ba... (fwiw I didn't think that piece hit the nail on the head even though it was generally swinging a hammer in the direction of a nail)
- CrisMystik 5mo agoIt's not as complete as the compiler proposed by this article, but there is a tool for Italian laws which can, among other things, recognize (parse) and apply amendments: https://igsg-marker.gitlab.io/ https://igsg-marker.gitlab.io/
- dgreisen 5mo agoThis is very cool, and exceptionally well-thought-out. I particularly like how they are working with the existing legal/legislative institutions to fix the issues at their source rather than creating yet another unofficial version. We've built the Open Law Platform that governments can use to do this with their official laws. We just launched with the Maryland Secretary of State last month at regs.maryland.gov. You can see the "source code" at https://github.com/maryland-dsd/law-xml https://github.com/maryland-dsd/law-xml, and the "compiled" code at any point in time since they started using our system at https://github.com/maryland-dsd/law-xml-codified https://github.com/maryland-dsd/law-xml-codified and https://github.com/maryland-dsd/law-html https://github.com/maryland-dsd/law-html. All cryptographically signed at https://github.com/maryland-dsd/law https://github.com/maryland-dsd/law.
- rogerrogerr 5mo ago> Parliament cannot restate the entire legal corpus each session. This is probably bad for some reasons, but I have wondered about a system where the legislature does have to restate the entire legal corpus every session. Like, everything resets at the end of the year and whatever didn’t get passed in the last 12 months is no longer law. Paired with some kind of rule that says you can’t just vote to pass “everything that already exists”. In my fantasy, there would be less weird cruft in the law, and less bikeshedding about stuff that really should be done.
- dxdm 5mo agoSeems to be one of those things where you think about them for a minute and go, huh, that'd be neat, but then you think about it some more how it'd play out in the real world, and that's when it starts to get actually interesting.
- rocmcd 5mo agoMaybe not every 12 months / session, but I definitely think having a way to "sunset" certain types of laws would be a net positive on society.
- rogerrogerr 5mo ago"If no one is charged with $crime for n years, it goes away unless explicitly renewed" would fix some of the weirder laws still on the books, but by definition wouldn't really change much.
- dragonwriter 5mo agoNo, it wouldn't fix anything, but it would result it annoying periodic pro forma charges being filed. When you take a measure and tie a control function to it, you make it a target. When you do that, Goodhart’s law applies, and when the specific connection is as simple as “maintaining a criminal law requires charging someone under it with at least X frequency”, the failure mode is obvious.
- ileonichwiesz 5mo ago
- yxhuvud 5mo agoThis is a good start even if the list of actions is not complete - we have seen sections move around unchanged between totally different laws, as well as edit conflicts where a place in a text gets changed into different results multiple times at the same date. The way amendment happens is also wildly different between different jurisdictions - some replace on singular word level (like Denmark) while other replace whole sections (like Sweden). Now add targeted annotations and other commentary done by specialists into the picture and the real fun begins.
- colinhb 5mo agoI have a lot of sympathy and affection for this project. When I started working in the US Congress in 2009, I was shocked there wasn't a more concerted effort to put US code in some kind of version control system. Over time (~15 years in law and public policy in US and EU) I've come to view that kind of project as something worthwhile, and interesting, but not something that will meaningfully change how laws are created and understood. In the US, as a mixed but substantially common law system, the text of the US Code, which in the LawVM model is the tree, can remain fixed, but the interpretation of that text will still vary over time. (Same syntax, different semantics, which feels like an AI-ism as I write it.) A couple examples: I have worked in competition policy. Section 2 of the Sherman Antitrust Act has read the same since 1890 but it's operated across structuralist and consumer-welfare regimes, and the outcomes in Standard Oil, AT&T, MSFT, and more recent cases have all been shaped by those regimes. US constitutional law may be an even better example of the issue: Article I, sec. 8, cl. 3 (the commerce clause) has not been amended since 1789, but it has expanded and contracted and been reinterpreted over time (most recently with NFIB v Sebelius). Another example of the problem with a LawVM like system making "the law in force [...] knowable" is US overturning of Chevron deference on 28 June 2024. Basically, the day before, courts were expected to defer to expert agencies, constrained by the Administrative Procedures Act, in their interpretation of legislation. The day after, courts were expected to make an independent assessment. All sorts of legislative texts were unchanged, but their meaning shifted dramatically: Clean Air Act, Communications Act, etc. There are a bunch of other issues in figuring out "what the law is", like agency rulemakings in the CFR, and then instruments which sit below those, including sub-regulatory guidance, prosecutorial discretion, etc. Things which fall into this bucket: - DOJ pot enforcement - SEC no-action letters (letters which say in effect "we won't try to enforce if you do X") Altogether, my thinking of this shifted to believing that the real thing that needs to be modeled is not the US Code as a tree serialization format, but the interpretative algorithm (the things lawyers and courts do) that translates that serialized tree into decisions. That interpretive algorithm has a lot of inputs, one which is the serialized tree, but also a bunch of other stuff. As a final note, I will add that the ambiguity in legislative text is often a feature, not a bug. I have worked on legislative text that was intentionally crafted to provide different plausible interpretations to different coalition members both in the immediate context and in the long term. In summary: projects like this are good and admirable; they're likely to have more direct utility in jurisdictions on one extreme of the civil law spectrum (i.e. not the US); and in all jurisdictions there likely needs to be an interpretive mechanism that sits above the representation of legal text which has more inputs if the goal is to model what the law is at any given time.
- arjie 5mo agoHa, I really enjoy this description of the law. Very neat. Tickled my mind. It struck me a while ago that almost no present law systems have a regularization or refactoring process. It is an entirely grown object that adds epicycles and it reminds me of the way our household personal agent would record memory until we gave it a self-reflection activity. It seems like a large number of states enacted sunset legislation in the 70s and 80s and many of them got rid of it shortly thereafter. I wonder what troubles they encountered. One amusing (to me) observation using the model of edits in the OP is that if you say "Section 171 Part 3 is amended to now add the text 'never' at this location" and then later have "Section 171 Part 3 is amended to now add the text 'almost' right before 'never'" you need to have each such edit also be followed by a revalidation of the age of the entire section or you get amusing results due to the text changes. A fun read for a later afternoon, perhaps.
- dgreisen 5mo agoRegularization and refactoring is actually an integral part of most legal systems. Most jurisdictions in the US go through periodic (1-5 decade) "recodifications" of their law, where the code is reorganized to clean up all the path dependencies of the organically grown law. Restatements do something similar for common law (although they are arguably becoming less influential). Non-US jurisdictions often accomplish this by periodically repealing and replacing laws in their entirety.
- arjie 5mo agoHuh, TIL. I suppose California's proposition system does sort of interfere with this process since a standardization of rules isn't realistically possible when it touches this stuff.