I wrote a Go program to generate my blog (which is just a static site hosted on Github pages). I made it so that I could write blog posts with a "widget builder" DSL, which is a good compromise for me between customizabiity for individual pages vs being able to write 95% of everything with markdown.
The meta viewport tag disallows zooming/using your website. I had to switch to Desktop mode on my Android phone to be able to read half the content that was overflowing and not visible.
I considered Hugo, but I wanted to do my own thing mainly because I'm very fussy about the raw HTML in my site, i.e. I want to use semantic HTML5 tags as much as possible. I haven't used Hugo though so I could not say how good or bad it is.
- pages are saved as text-files-written-to-disk with git autocommits (similar to mycorrhiza[0])
- "blocks" that process parts of pages differently - similar to edna[1]
- pages editable via web interface (rudimentary phone support)
- autolinks between pages
- simple picture upload interface (^V with a pic in clipboard will upload the pic + paste appropriate markup)
- single user system, intended as a personal knowledge base
this system will replace https://j3s.sh and https://abyss.j3s.sh eventually -- all old links will redirect to the new wiki. it's been quite an undertaking, but i think the end result will be worth it :3
I'm not seeing the point here, TBH. What use-case does this author's single-binary satisfy?
1. You just want to serve static files from your blog? Install a webserver and knock yourself out in your editor, creating html and css (and maybe js) files.
2. You want to serve static files, with some dynamic crap stuffed inside here and there like the examples given in the article? Install the mod_php or equivalent for your webserver, and go mad with the editor.
3. You want fully generated content? Install one of the many backend frameworks in any language you want to use, and then go mad in your IDE.
What use-case does "one binary I wrote in Go" satisfy that isn't covered above? From everything I gleaned from the article, the PHP solution is even easier, while still technically being "one single binary".
EDIT: as an example of over-engineering, here is the authors code for a specific use-case:
> What use-case does "one binary I wrote in Go" satisfy that isn't covered above?
In .NET land, one of the top reasons to go all-in with a single exe web server would be performance. Kestrel can be unbelievably fast if you remove all of the layers of indirection like IPC and hosted SQL. I've got dynamic HTML pages that render in <100uS and that includes managing session state and other queries into SQLite.
Concerns like accidentally showing up on the front page of HN or even petty DDOS attempts can be often be ignored when you are able to serve content this quickly.
The other major reason I like it is having everything in one type system and debugger experience. I can set a breakpoint anywhere and inspect everything.
I think a lot of younger developers don't realize that there was a time where you simply FTPed your files up to a directory on a web server. If you wanted to live dangerously, you could even edit them live on the server through a shell account.
The author also says they want to be able to understand all of the components of the system. Software that needs upgrades that may not be backwards compatible is an issue. I imagine many web servers can fall under either of these concerns, including Apache and Nginx.
I'm not a fan of Go myself, but I can see how a simple Go HTTP server fits the bill.
I'm not defending Go here, but simplicity can also be used to describe not having to incur the cost of (often leaky) abstractions when things go wrong under the hood or when you need to do something different from the intended use-case(s).
For instance, PyTorch is simple until you have a __need__ (e.g., rfft/irfft with bfloat16) to drop to CUDA and, in so doing, break autograd and all kinds of other things. Now you need to write a Torch extension and handle Meta/Fake tensors and the like if you want it to work with torch.compile. A lot of the simplicity goes right out the window.
If you run into this a lot, then you're doing something sufficiently weird for the simpler solution to, well, not be simpler.
I think a lot of it is just for the author's own fun, enjoyment, and amusement. Also, golang is probably their favorite hammer. It's not efficient for me to smoke a brisket myself or make furniture by woodworking, but I enjoy it. Not everything has to have any more purpose than that.
bingo. i'm not trying to claim that everyone should do this in go -- it's just a language that i like to use. by all means, use ruby, or PHP, or Elixir, or whatever else you like!
I was using Python's Pelican static site generator for some time until I wanted to further customize the template fragments of a theme. Started running into issues and even helped fix a bug with the build command. Eventually I couldn't be bothered and wrote my own static site, except with Nextjs instead of plain HTML. Didn't take long and I don't have to mess around with awkward jinja templates anymore.
Similarly I started out with Pelican but eventually needed more fine control over the site using MDX/etc. so I migrated my site over to Astro and have been pretty happy with it.
I like the idea, but I don't like that the result is not accessible. For example, there are no headlines, lists, or paragraphs—just a huge pre, or if you remove the 'thoughtbody' class from the p element, you can see how well a screen reader can read it.
I also have extensive experience with static sites, starting from using just Apache Directory Listing (Footer, Header, SSI), to writing my own in Perl, Ruby on Rails, Go, and TypeScript, using frameworks like Astro, Next, or Zola. Apart from the Apache setup and some Perl scripts, all of them had one thing in common: I used Markdown because it is easy to transform into HTML, which means it is accessible.
Rather than a compiled blob generated from a language propped up by Google (a company famed for killing beloved projects) that is compiled and therefore unmodifiable and unrecoverable if the source or toolchain is lost, it feels like these goals would have been better served by writing it as some POSIX-compatible sh scripts, or even a (pre-packaged/no-build) JavaScript bundle — we've been trying to kill that thing for decades, and it's still kicking!
Anytime I see someone writing without any capital letters, I stop and close the page. I understood that they care more about themselves (the writer) than the reader, so I let them write without my reading, as they signaled they don't care about it. Respectable.
Yes hugo+template+isso (my Giorgi.com setup) has some hidden dependencies but you can get a fancy site in very little time.
A dynamic web site is exciting to design, but require a lot of effort… I suggest to use Python Django: it has a tutorial for a blog!
I wrote a Go program to generate my blog (which is just a static site hosted on Github pages). I made it so that I could write blog posts with a "widget builder" DSL, which is a good compromise for me between customizabiity for individual pages vs being able to write 95% of everything with markdown.
Example of DSL: https://github.com/liampulles/liampulles.github.io/blob/mast...
Blog post with more info, and my site: https://liampulles.com/moving-blog.html
My blog[1] is also generated from nothing but markdown, but I leaned on pandoc heavily for this: https://gist.github.com/lelanthran/2634fc2508c93a437ba5ca511...
---------------------
[1] www.lelanthran.com
Interesting approach, I like it!
Just FYI:
The meta viewport tag disallows zooming/using your website. I had to switch to Desktop mode on my Android phone to be able to read half the content that was overflowing and not visible.
Thanks for the feedback, I will look into this.
Awesome! I'm curious if you considered Hugo and if yes, why you preferred to build your own Go website generator :)
I considered Hugo, but I wanted to do my own thing mainly because I'm very fussy about the raw HTML in my site, i.e. I want to use semantic HTML5 tags as much as possible. I haven't used Hugo though so I could not say how good or bad it is.
From one of these user's most recent posts here https://j3s.sh/thought/blogs-rot-wikis-wait.html:
I wonder if they'll still be using a similar approach for the new site.it's still in the works, but here's the plan:
- written in golang, one binary
- custom markup lang
- very short urls (https://j3s.sh/$pagename)
- pages are saved as text-files-written-to-disk with git autocommits (similar to mycorrhiza[0])
- "blocks" that process parts of pages differently - similar to edna[1]
- pages editable via web interface (rudimentary phone support)
- autolinks between pages
- simple picture upload interface (^V with a pic in clipboard will upload the pic + paste appropriate markup)
- single user system, intended as a personal knowledge base
this system will replace https://j3s.sh and https://abyss.j3s.sh eventually -- all old links will redirect to the new wiki. it's been quite an undertaking, but i think the end result will be worth it :3
[0]: https://github.com/bouncepaw/mycorrhiza
[1]: https://edna.arslexis.io
See my comment upthread; I'm very curious why PHP would not have worked for you.
because i don't enjoy working with PHP
I'm not seeing the point here, TBH. What use-case does this author's single-binary satisfy?
1. You just want to serve static files from your blog? Install a webserver and knock yourself out in your editor, creating html and css (and maybe js) files.
2. You want to serve static files, with some dynamic crap stuffed inside here and there like the examples given in the article? Install the mod_php or equivalent for your webserver, and go mad with the editor.
3. You want fully generated content? Install one of the many backend frameworks in any language you want to use, and then go mad in your IDE.
What use-case does "one binary I wrote in Go" satisfy that isn't covered above? From everything I gleaned from the article, the PHP solution is even easier, while still technically being "one single binary".
EDIT: as an example of over-engineering, here is the authors code for a specific use-case:
And here is the equivalent in PHP:> What use-case does "one binary I wrote in Go" satisfy that isn't covered above?
In .NET land, one of the top reasons to go all-in with a single exe web server would be performance. Kestrel can be unbelievably fast if you remove all of the layers of indirection like IPC and hosted SQL. I've got dynamic HTML pages that render in <100uS and that includes managing session state and other queries into SQLite.
Concerns like accidentally showing up on the front page of HN or even petty DDOS attempts can be often be ignored when you are able to serve content this quickly.
The other major reason I like it is having everything in one type system and debugger experience. I can set a breakpoint anywhere and inspect everything.
Easier to deploy? No need for packaging everything or installing runtime stuff, just copy one file on your server and run it.
I think a lot of younger developers don't realize that there was a time where you simply FTPed your files up to a directory on a web server. If you wanted to live dangerously, you could even edit them live on the server through a shell account.
Redbean is another good candidate for accomplishing this.
The author also says they want to be able to understand all of the components of the system. Software that needs upgrades that may not be backwards compatible is an issue. I imagine many web servers can fall under either of these concerns, including Apache and Nginx.
I'm not a fan of Go myself, but I can see how a simple Go HTTP server fits the bill.
But Go is so simple!
(Points to a myriad of Go functions that do in eight or nine lines what other languages do in two)
I'm not defending Go here, but simplicity can also be used to describe not having to incur the cost of (often leaky) abstractions when things go wrong under the hood or when you need to do something different from the intended use-case(s).
For instance, PyTorch is simple until you have a __need__ (e.g., rfft/irfft with bfloat16) to drop to CUDA and, in so doing, break autograd and all kinds of other things. Now you need to write a Torch extension and handle Meta/Fake tensors and the like if you want it to work with torch.compile. A lot of the simplicity goes right out the window.
If you run into this a lot, then you're doing something sufficiently weird for the simpler solution to, well, not be simpler.
It solves the author's use case, which the article explains at some length.
I think a lot of it is just for the author's own fun, enjoyment, and amusement. Also, golang is probably their favorite hammer. It's not efficient for me to smoke a brisket myself or make furniture by woodworking, but I enjoy it. Not everything has to have any more purpose than that.
bingo. i'm not trying to claim that everyone should do this in go -- it's just a language that i like to use. by all means, use ruby, or PHP, or Elixir, or whatever else you like!
sigh
I was using Python's Pelican static site generator for some time until I wanted to further customize the template fragments of a theme. Started running into issues and even helped fix a bug with the build command. Eventually I couldn't be bothered and wrote my own static site, except with Nextjs instead of plain HTML. Didn't take long and I don't have to mess around with awkward jinja templates anymore.
Similarly I started out with Pelican but eventually needed more fine control over the site using MDX/etc. so I migrated my site over to Astro and have been pretty happy with it.
I like the idea, but I don't like that the result is not accessible. For example, there are no headlines, lists, or paragraphs—just a huge pre, or if you remove the 'thoughtbody' class from the p element, you can see how well a screen reader can read it.
I also have extensive experience with static sites, starting from using just Apache Directory Listing (Footer, Header, SSI), to writing my own in Perl, Ruby on Rails, Go, and TypeScript, using frameworks like Astro, Next, or Zola. Apart from the Apache setup and some Perl scripts, all of them had one thing in common: I used Markdown because it is easy to transform into HTML, which means it is accessible.
agreed, accessibility is something i'm hoping to fix with my wiki rewrite! that and phone formatting x_x
I really like the (let's call it) ‘ASCII look’. I would be delighted if you could share an update with the mobile-ready/accessible version.
Related:
My website is one binary - https://news.ycombinator.com/item?id=44345752 - June 2025 (1 comment)
My website is one binary (2022) - https://news.ycombinator.com/item?id=37964917 - Oct 2023 (168 comments)
My website is one binary - https://news.ycombinator.com/item?id=30937515 - April 2022 (67 comments)
Rather than a compiled blob generated from a language propped up by Google (a company famed for killing beloved projects) that is compiled and therefore unmodifiable and unrecoverable if the source or toolchain is lost, it feels like these goals would have been better served by writing it as some POSIX-compatible sh scripts, or even a (pre-packaged/no-build) JavaScript bundle — we've been trying to kill that thing for decades, and it's still kicking!
Pleasantly surprised how jovial this post was. Thanks!
This is actually a great post. Love the idea of single binary and low dependencies to keep things as lean as possible.
Anytime I see someone writing without any capital letters, I stop and close the page. I understood that they care more about themselves (the writer) than the reader, so I let them write without my reading, as they signaled they don't care about it. Respectable.
How do you feel about people who speak with accents?
> How do you feel about people who speak with accents?
You think people with accents do it on purpose?
How do you feel about people who talk to you in a fake accent for no reason whatsoever?
This looks like the same thing.
Looks like it, but it often is not.
Affectation is one thing, but the behaviour you describe is as much cultural and contextual as it is affectation. Just like an accent.
Very very much not worth thinking about too hard, except for its anthropological implications. IMO, of course.
it is likely an informal, stylistic choice, nbd honestly
good to know. so now you've closed this page now and gotten back to work? i wonder where else you read things on the internet
I believe that similar concerns/aesthetics drove the development of https://redbean.dev/
I do this with CLOG, save-lisp-and-die
Yes hugo+template+isso (my Giorgi.com setup) has some hidden dependencies but you can get a fancy site in very little time. A dynamic web site is exciting to design, but require a lot of effort… I suggest to use Python Django: it has a tutorial for a blog!
So I guess one docker image is also one binary...
A Docker container can launch a single process or multiple processes [0] (please don't do this, use docker as the separation & health checker).
In the former case we have a single executable. We can now choose to statically compile all dependencies with musl.
We can also statically compile all the assets (HTML, images) into the binary.
Then you take your Docker image and build a FROM scratch image, copy in your binary and you've got a super-lightweight container.
[0] https://www.bugsink.com/blog/multi-process-docker-images/
i have some thoughts about this >:) https://abyss.j3s.sh/hypha/docker
It's true, static sites are low energy.
[dead]