holy shit so much coding


(warning; lots of rambling in the first half, i'll be sure to mark the code section)
so a few months ago, i read an article[0] by j3s titled "my website is one binary". to summarize, she wrote about how her entire website is just (you guessed it) one binary. and it kind of amazed me, in a way. well, multiple.


  1. i suck at frontend webdev, so anything custom made without frameworks is always awesome
  2. my public-facing blog uses a static-site generator (jekyll[1]), and i literally had no clue where id start to make one lol.

so to see a dev handroll their own webserver, and actually have a pretty neat result, i was shooketh!
i found neocities, made an account, and...
that was a few months ago. i didnt touch neocities for a while. now, after working at $INTERNSHIP im a bit jaded with the whole modern tech ecosystem. i don't really know how to describe it either, but my thoughts are kind of like this:

i craved (or needed) a true return to form. something to center myself, feel like a 90s c-wizard-gray-beard person. something that i truly built end-to-end, understood, wrestled with, hated, loved, all that jazz.
and then i remembered jes's article. and thus this blog was born!
i didn't want to take the full plunge of self-hosting a public webserver yet, so this was a good compromise: build a static-site-generator and host it here (on neocities, btw).

project requirements v0


my main requirements were as followed:

immediate backtrack


(genuinely, modern frontend webdev has to be a social experiment ran by the devil.)

project requirements v1


my main requirements were as followed:

baby steps


okay! i have a project idea! i have motivation! i have caffeine! i have channeled rage! now... what do :/
so i started with the most basic "thing" i could think of: make an html template, and add a title to it programatically.
and, after relearning some parts of go (chat why is knowing what to name a module so hard), i did it!

baby leap


well, can't celebrate too early. just outputing a single html file is fun for a few seconds, but the ghost of programming past whispered in my ear "you still have the rest of the project dummy".
so, on to figuring out how to convert markdown to html!
y'all, when i tell you, dont ever try to write a true markdown parser from scratch, i mean it. holy shit.
i did learn some stuff![2]
but yeah, writing a markdown parser was so daunting, i was literally about to give up and find some markdown library to do things for me lol.
then, i realized: who said my posts need to be in markdown? why not just pick the easy parts of markdown and screw the rest?
thus! my custom .blog format was born.
it's pretty similar to a .md, just a few differences here and there, but writing it honestly isn't bad. (don't look at my parser code though, it makes me feel ashamed :( )

tween step


okay, so i had an html template, i had a fake markdown format, now what? well, lots of "bookkeeping":
but alas!

where we are today


this blog works? and kind of well-ish? i like the format, its easy for me to make changes, and it's pretty fweaking fast (thanks go!).
total time was about 10 hours of active dev time, so not bad i think!
(if i remember to) i'll document some stuff for myself, and id love to integrate this into a webserver binary. and, i really want to stick with this experiment of using alternative social media sites, i think it'll be worth it. ill need to keep squashing bugs in the meantime though!
anyways, lots of ramblings.
stay weird!
-bytes
ps: as soon as i rendered this blog, i ran into a bug and had to fix it LOL.
list looked like this:
  1. ...
  2. ...


links