RIIR icon indicating copy to clipboard operation
RIIR copied to clipboard

Rewrite "The Constitution of the United States" in Rust

Open ghost opened this issue 3 years ago • 18 comments

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

ghost avatar Jun 21 '21 16:06 ghost

No.

ghost avatar Jun 21 '21 16:06 ghost

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.

ghost avatar Jun 21 '21 16:06 ghost

No.

Also haven't you watched the Musical yet? You might wanna stay away from that dude.

ghost avatar Jun 21 '21 16:06 ghost

Dude don't spoil. I'm gonna go see it now.

ghost avatar Jun 21 '21 17:06 ghost

If a program isn't Rust, a person is not only right to rewrite it, they are obligated to do so.

CelestialAmber avatar Jun 22 '21 18:06 CelestialAmber

This intrigues me. I say that we do give this Rust language a chance and see if it might make the Constitution safer.

president-washington avatar Jun 23 '21 10:06 president-washington

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).

ghost avatar Jun 23 '21 12:06 ghost

I can read, you know.

president-washington avatar Jun 23 '21 12:06 president-washington

Oh no! Mr. President, when did you come here?

(Folks from 2021, how do I delete the previous message?)

ghost avatar Jun 23 '21 12:06 ghost

You're never gon' be a president now.

ghost avatar Jun 23 '21 13:06 ghost

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.

image

Let's also thank all the founding fathers who were willing to time travel here and help oxidize our nation 🙂

ImDaRealAni avatar Jun 30 '21 04:06 ImDaRealAni

https://user-images.githubusercontent.com/613805/156422664-9945872e-0c51-4d9d-9350-b3087cbc2ccc.mp4

ipatch avatar Mar 02 '22 18:03 ipatch

:rocket: BLAZINGLY :rocket: FAST :rocket: MEMORY :rocket: SAFE :rocket: LEGISLATION :rocket:

Lamby777 avatar Sep 02 '22 19:09 Lamby777

And the first 10 statements are the Bill of Rust, yeah the first 10 statements are the Bill of Rust

Lamby777 avatar Sep 09 '22 16:09 Lamby777

I think, this is another "invalid" issue and should be closed.

porky11 avatar Sep 30 '22 19:09 porky11

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.

Dangerise avatar Sep 28 '23 21:09 Dangerise

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 structs that impl this trait must also impl Human, so can safely assume all Americans are human, unless we want to include Dogs and Cats) and declare a HashSet (not enum, because all laws apply simultaneously) of laws that apply to structs 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

Rudxain avatar Apr 05 '24 07:04 Rudxain