NHacker Next
login
▲Why Law Is Law-Shapedlawvm.org
70 points by ekns 5 hours ago | 46 comments
Loading comments...
keiferski 3 hours ago [-]
In 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

An article on the story: https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html

dmbche 9 minutes ago [-]
Big 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
lkm0 19 minutes ago [-]
Kafka (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.
quietbritishjim 2 hours ago [-]
Thanks for the interesting read. But, I have to say, I didn't understand it at all.
Al-Khwarizmi 1 hours ago [-]
It's part of a novel, so it has a larger context. The parable is not intended for you, the reader, but for the protagonist of the novel Josef K., who is spending time in a futile effort. I'd say it's basically about futility of seeking unattainable answers, and frustration. But it's probably not meant to be 100% understood, as Josef K. is a confused character full of doubts (like Kafka's characters tend to be), the purpose of the parable is not to dispel his doubts but to entrap him more in the frustration.
nemo 1 hours ago [-]
Having worked a large bureaucracy, when we'd sometimes get into some catch 22, I used to quote the line "I am only taking it to keep you from thinking you have omitted anything" sometimes to a friend who also knew the short story, and we'd laugh.
gilleain 2 hours ago [-]
Yes 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 2 hours ago [-]
The 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 36 minutes ago [-]
I’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.
awesomeMilou 2 hours ago [-]
Excercising your rights is a duty, responsibility and experience that is individual to everyone.
bombcar 2 hours ago [-]
Yes, it was very kafkaesque. (I also didn't get it.)
brazzy 1 hours ago [-]
Keep in mind that the story is actually embedded in Kafka's "The Trial", and discussed by two characters within that story, who have very different views of its meaning.

I think it is very deliberately written to be impossible to "understand". If you think you have found its clear and unambiguous meaning, you're wrong.

CamelCaseName 2 hours ago [-]
Like the other replies, I also didn't understand it, so I asked Gemini. Forgive my use of AI, but I can't seem to summarize it any better.

> Permission is a Trap: The gatekeeper never uses physical force. The man fails because he accepts the psychological deterrence. He waits for external approval instead of acting.

> Systems are Designed to Stall: Bureaucracy exists to keep individuals waiting. Complying with arbitrary rules and being infinitely patient yields absolutely zero results.

> Your Path is Individual: The gate was made only for this specific man. By deferring to authority, he surrendered an opportunity tailored entirely to him.

> Action Over Compliance: The story is a warning against passive obedience. The system will gladly let you sit outside and rot if you never force the issue.

I don't understand #3, but the rest, especially #4 really ring true.

keiferski 1 hours ago [-]
Here is a longer article on it:

https://courses.cit.cornell.edu/hd11/BeforeTheLaw.html

dgreisen 30 minutes ago [-]
This 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, and the "compiled" code at any point in time since they started using our system at https://github.com/maryland-dsd/law-xml-codified and https://github.com/maryland-dsd/law-html. All cryptographically signed at https://github.com/maryland-dsd/law.

rogerrogerr 21 minutes 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 2 minutes ago [-]
Seems 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.
CrisMystik 45 minutes ago [-]
It'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/

Brendinooo 45 minutes ago [-]
Interesting 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-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)

james-bcn 3 hours ago [-]
Audrey 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
eqmvii 2 hours ago [-]
my 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.

ChaosOp 2 hours ago [-]
As a fellow Finn (and a lawyer), super interesting work Elias! And thank you for reporting the inconsistencies you found to Finlex
vessenes 2 hours ago [-]
Man, 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 1 hours ago [-]
I 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 14 minutes ago [-]
I 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 12 minutes ago [-]
some people would, in this case, prefer the unrefined version
eru 3 hours ago [-]
I 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 1 hours ago [-]
Fair point. I've added a clarification that the structural constraint holds across civil law, common law, and hybrid systems. Thanks.
dvh 3 hours 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.

stephen_g 31 minutes ago [-]
> Because right now for mere mortal it's impossible to find out if some law or paragraph is still in effect.

Where and how? Pretty sure our Federal and State Governments here in Australia publish the current in-force law (original Act amended with all amendments) - I assumed that was normal, do they not do that elsewhere?

See for example the Telecommunications Act (1997) [1] but current version amended to October 2025 (the most recent amendment). Then you click ‘All Versions’ and you can read any of the 116 or so versions back to the original in 1997.

1. https://www.legislation.gov.au/C2004A05145/latest/text 2. https://www.legislation.gov.au/C2004A05145/latest/versions

victorbjorklund 49 minutes ago [-]
That would make some things more difficult. For the same reason we use Git to be able to work on multiple things at the same time.

Let’s say you have tax law and the particular law is thousands of paragraphs long. You have multiple changes to the law going on at the same time (totally unrelated stuff in different parts of the law). It’s going to be really hard now because each of the 15 changes need to update its own texts as soon as any other of the proposals get changed and it’s going to affect exactly which order they are voted on etc.

Much easier to just say propasal A changes paragaraph 33 and proposal B changes paragraph 475

arcbyte 1 hours ago [-]
I feel this sentiment. I think its a good one.

The approach I take is that every law should expire after a standard, unchangeable time - probably several terms of Congress, say 6 years to account for one full Senate turnover.

Congress can just repass verbatim old laws if they wish - its already written and can be a simple, fast vote. Or we can have debate over outdated provisions like we should have.

qnpnpmqppnp 3 hours ago [-]
How 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 1 hours ago [-]
It 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 2 hours ago [-]
that 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 1 hours ago [-]
Do 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?
vharuck 2 hours 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 1 hours ago [-]

    European 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 1 hours ago [-]
If 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.

fractallyte 2 hours ago [-]
Interesting 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 2 hours 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

Garlef 1 hours ago [-]
Yes (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)

fractallyte 2 hours ago [-]
I 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!

ekns 2 hours ago [-]
Interesting indeed! What have you learned from the patent space and what kinds of questions can you answer after perhaps solving that domain?
fractallyte 1 hours ago [-]
Patents are a much smaller space than the vast legal one in the article, so it's tractable for a human. The raw DSL spec length is roughly comparable to Lua or Go. It's a genuine grammar, with types and an AST; but no conditionals, control flow, expressions, etc. like a regular programming language.

A patent document can be represented in a graph. That opens it up to various transformations, refactoring, and validation – all mathematically rigorous! This is far more reliable than asking an LLM to check a document.

Using git enables not only regular diffs, but also structural diffs, which compare legal elements rather than just lines.

The LSP (yes, that too!) makes drafting much easier, with autocomplete and validation as I type.

I plan to open-source the DSL, and the tool that processes its files and outputs jurisdiction-aware, nicely formatted documents...

TZubiri 2 hours ago [-]
—