aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2022-10-09-quine.smd
diff options
context:
space:
mode:
authorMartin Ashby <martin@ashbysoft.com>2024-12-21 22:18:18 +0000
committerMartin Ashby <martin@ashbysoft.com>2024-12-21 22:18:18 +0000
commit82e7ac75954c973a5c59a02684788c0fb26e14dd (patch)
treea1b09939f30bc4c232e69f980c2a47e48625ee1d /content/posts/2022-10-09-quine.smd
parentff323f79e03174e4cdf2a709c095ff83e7ea3669 (diff)
downloadmfashby.net-82e7ac75954c973a5c59a02684788c0fb26e14dd.tar.gz
mfashby.net-82e7ac75954c973a5c59a02684788c0fb26e14dd.tar.bz2
mfashby.net-82e7ac75954c973a5c59a02684788c0fb26e14dd.tar.xz
mfashby.net-82e7ac75954c973a5c59a02684788c0fb26e14dd.zip
Bump zine 0.3.0 -> 0.8.0
Fix a lot of associated breakage Fix broken rss.xml file as highlighted to me by Matthijs van der Wild (thanks!)
Diffstat (limited to 'content/posts/2022-10-09-quine.smd')
-rw-r--r--content/posts/2022-10-09-quine.smd12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/posts/2022-10-09-quine.smd b/content/posts/2022-10-09-quine.smd
new file mode 100644
index 0000000..827e86c
--- /dev/null
+++ b/content/posts/2022-10-09-quine.smd
@@ -0,0 +1,12 @@
+---
+.title = "Quine",
+.author = "Martin Ashby",
+.date = @date("2022-10-09T13:11:52+01:00"),
+.layout = "single.shtml",
+.custom = {"comments": true},
+---
+
+A [quine](https://en.wikipedia.org/wiki/Quine_%28computing%29) is a program that takes no input, and it's output is it's own source code. A quine-relay is a program that outputs the source code for another program, and when that next program is run it outputs the source code of the first program. I recently saw [this quine relay](https://github.com/mame/quine-relay) program which was super impressive as it goes through 128 languages like this!
+
+Having recently learned some [Rust](https://www.rust-lang.org/), I thought I'd write a simple [quine in rust](https://code.mfashby.net/martin/rust-quine). It wasn't actually as difficult as I imagined, this took about 25 minutes. The rust standard library has a really convenient function `escape_default` which made it pretty easy!
+