commit d43f925b0db350a733f7aa6574e9867d6600b3ff Author: Case Duckworth Date: Fri Nov 6 08:17:51 2020 -0600 Initial commit diff --git a/edwin.org b/edwin.org new file mode 100644 index 0000000..b815447 --- /dev/null +++ b/edwin.org @@ -0,0 +1,13 @@ +#+TITLE: Edwin, a Gemini server in POSIX AWK (with some other bits) +#+AUTHOR: Case Duckworth + +* Foreword + +Sort of on a whim, and sort of because the only programming languages I'm /really/ comfortable in are shell and awk, I've decided to write a Gemini server in those languages. I've already written a [[https://git.sr.ht/~acdw/bollux][Gemini browser in bash]] (or written most of one; I /still/ need to add some bits for quality-of-life improvements) for much of the same reasons, so I always knew that there would come a day when I'd need to write something for the other end of the pipe. It turns out, today is that day. + +What follows is a literate Org file containing a functioning Gemini server that's as POSIX-compatible as possible. Awk handles the textual parts of the request and response, but since it can't do networking (and even GNU awk can't do TLS), I'm wrapping that core logic in a call to =socat= in a shell script. A dream of mine is to shoehorn Make in as a multiplexer, but I'm not sure if it's possible or even necessary. Let's find out!! + +* Requirements + +* Basics +** URL parsing