The shortest ooc quine
👋 This page was last updated ~12 years ago. Just so you know.
A few days ago I posted an ooc quine. But while browing HackerNews, I found an even shorter one. The shortest!
Here it is, in its full glory
Can't see anything? That's an empty file. It will compile and run just fine. ooc doesn't require a main function - you can just shove code in there that will run at the program's initialization. If there's none, no big deal! It'll just not run anything.
That's one nice side-effect of simple design.
Here's another article just for you:
A dynamic linker murder mystery
I write a ton of articles about rust. And in those articles, the main focus is about writing Rust code that compiles. Once it compiles, well, we're basically in the clear! Especially if it compiles to a single executable, that's made up entirely of Rust code.
That works great for short tutorials, or one-off explorations.
Unfortunately, "in the real world", our code often has to share the stage with other code. And Rust is great at that. Compiling Go code to a static library, for example, is relatively finnicky. It insists on being built with GCC (and no other compiler), and linked with GNU ld ().
not