RIIR
RIIR copied to clipboard
Rewrite "The Constitution of the United States" in Rust
Folks! I just time traveled. I hath heard that popular language makes things safe. I'm thinking about rewriting the whole constitution in Rust. Should I do that?
i bethink 'twill maketh the amendments much saf'r.
Your Obedient Servant A. Ham
No.
Damn it Jefferson. What if I write another 51 papers to promote it? The Rusty Papers?
I'm gonna go persuade Burr to help me.
No.
Also haven't you watched the Musical yet? You might wanna stay away from that dude.
Dude don't spoil. I'm gonna go see it now.
If a program isn't Rust, a person is not only right to rewrite it, they are obligated to do so.
This intrigues me. I say that we do give this Rust language a chance and see if it might make the Constitution safer.
Yo Jefferson! I just watched the Musical today, and it was quite beautiful indeed.
Did you see how they made Mr. Washington bald? It's so funny (but it's on point of course, don't tell him).
I can read, you know.
Oh no! Mr. President, when did you come here?
(Folks from 2021, how do I delete the previous message?)
You're never gon' be a president now.
Who's going to rewrite the Articles of Confederation in Rust? That was the "original" Constitution of the United States. Can someone task Benjamin Franklin to rewrite a draft of the preamble of the Articles of Confederation in Rust? I have attached the source of the original preamble.
Let's also thank all the founding fathers who were willing to time travel here and help oxidize our nation 🙂
https://user-images.githubusercontent.com/613805/156422664-9945872e-0c51-4d9d-9350-b3087cbc2ccc.mp4
:rocket: BLAZINGLY :rocket: FAST :rocket: MEMORY :rocket: SAFE :rocket: LEGISLATION :rocket:
And the first 10 statements are the Bill of Rust, yeah the first 10 statements are the Bill of Rust
I think, this is another "invalid" issue and should be closed.
It seems so strange to see something about musical here
I also enjoy musicals and I've watched Hamilton online , it's a pity that I may not live to see Hamilton in a theatre if I don't leave China
Rustaceans wrote the other 51 !
By the way ,I do like Non-Stop best.
In all seriousness, I believe it's theoretically possible to rewrite unambiguous legal texts in any programming language with a type system.
Since laws apply to humans, we can define traits such as Human
and American
(all struct
s that impl
this trait must also impl
Human
, so can safely assume all Americans are human, unless we want to include Dog
s and Cat
s) and declare a HashSet
(not enum
, because all laws apply simultaneously) of laws that apply to struct
s that impl
the American
trait.
We can then write an algorithm to validate (at runtime) that all citizens are following the law, and send (with async
) the Police
otherwise.
We could also write the protocols that the police must follow, including delegating tasks to the Judicial_Branch
.
Heck, we could rewrite the entire USA
(and the World
) in Rust!!! We could finally implement the ultimate "Hello world"
program: A program that broadcasts "Hello World"
to every sentient being in the World
!!!111