From b1e0642c6b0885a69968104437980c44851a2b97 Mon Sep 17 00:00:00 2001 From: Rosia E Evans Date: Wed, 11 Oct 2023 00:21:27 +0100 Subject: [PATCH] Moves files to folders for navigation categories --- Resources/Input/Newer Work/ThisSite.md | 41 ++++++++++++++++++ Resources/Input/Older Work/Aardvark.md | 35 +++++++++++++++ Resources/Input/Older Work/CatTowerDefence.md | 15 +++++++ Resources/Input/Older Work/EPQProject.md | 17 ++++++++ Resources/Input/Older Work/MindMap.md | 16 +++++++ Resources/Input/University/RoboticsSociety.md | 7 +++ Resources/Input/University/SailBot.md | 14 ++++++ Resources/Input/University/aberCompSoc.md | 5 +++ Resources/Input/Work Experience/SBSWork.md | 38 ++++++++++++++++ Resources/Static/BoatingTeams.jpg | Bin 0 -> 2679746 bytes 10 files changed, 188 insertions(+) create mode 100644 Resources/Input/Newer Work/ThisSite.md create mode 100644 Resources/Input/Older Work/Aardvark.md create mode 100644 Resources/Input/Older Work/CatTowerDefence.md create mode 100644 Resources/Input/Older Work/EPQProject.md create mode 100644 Resources/Input/Older Work/MindMap.md create mode 100644 Resources/Input/University/RoboticsSociety.md create mode 100644 Resources/Input/University/SailBot.md create mode 100644 Resources/Input/University/aberCompSoc.md create mode 100644 Resources/Input/Work Experience/SBSWork.md create mode 100755 Resources/Static/BoatingTeams.jpg diff --git a/Resources/Input/Newer Work/ThisSite.md b/Resources/Input/Newer Work/ThisSite.md new file mode 100644 index 0000000..970dbec --- /dev/null +++ b/Resources/Input/Newer Work/ThisSite.md @@ -0,0 +1,41 @@ + +# This Site + +This site is a small project I worked on over the course of a few weeks while first returning back to university during my second year. Its hosted on a small [lighttpd](https://www.lighttpd.net/) server running on an old laptop from around 2003. I wrote a small C++ program that takes in MarkDown files and builds them into webpages. Everytime the server turns on it pulls from a repo, builds the code and runs it, this then builds the website and puts them in a folder for lighttpd to host. + +## The Thoughts Behind This + +During my first year at university I read a lot around the concept of [Permacomputing](http://permacomputing.net/). This is a set of ideas around reusing old computers and writing small systems that avoid [code rot](https://en.wikipedia.org/wiki/Software_rot) and use as little power as possible. +The driving idea behind this being that we've had computers that are powerful enough for most small jobs for quite a long time and realistically a lot of old e-waste is still perfectly good for these kind of small low-risk jobs and can be used in an eco-friendly way when worked with correctly. I'd been reading into Permacomputing for a decent while but never properly had the chance to experiment with my thoughts on it. + +Along with that I'd also spent time doing a module in my first year on the history of the internet and found the www's origins really inspiring, the idea of a language/system that was easy for just about anyone to learn, that was incredibly simple but super flexible. When learning about this I'd kind of started to feel like we'd lost that part of the internet. Websites are always generated with insane complexity which feels almost unnecessary when we still have that simple flexible system its all built on top of. I wanted to try and use that simple system again, to experience it for myself but also as a nice homage to it. + +## The Code +I wanted the system to be as lightweight and fast as it could be, hopefully leading to a very power-efficient result. I decided to use C++ as it was my main language and was also very fast. I was planning on writing the server code myself but found lighttpd, a relatively old and incredibly light weight server program, as I was researching good libraries and it seemed much more efficient than any of the libraries I could find were benchmarked for so I decided to use that. + +I initially planned to write a markdown parser and spent a day or two working on one, writing a [SAX-Style](https://en.wikipedia.org/wiki/Simple_API_for_XML) parser. I was unsure whether this was a workable idea for markdown but through thinking about it and planning how it would work I felt quite confident it would be much faster than a DOM parser. I soon found however that it would take most of my time up and I only wanted this to be a small project. I looked online and found [md4c][https://github.com/mity/md4c], a simple and insanely fast parser written in very low level c. It's benchmarks showed it could parse incredibly large documents in less than a millisecond which convinced me pretty quickly. It seemed much faster than any other option but also much simpler. After starting to implement this I discovered it actually parsed markdown text in the same SAX-Style system as I had planned to which made me very happy. + +After discovering this I implemented it along with code to read the filesystem and combine the resulting html with a template. This took a few revisions as I wanted to make it as flexible and reusable as possible, making little to no assumptions about the template being given. By default the code searched for an empty `
` body and placed the generated html within it and a similar thing for the `