Hacker News new | ask | show | jobs
by neya 2540 days ago
I just finished writing my own in-house static site builder in Elixir. I come from the Ruby land. If you thought Ruby was awesome, then you would LOVE Elixir. I was hesitant at first, thinking "not another language.." but once I gave it a shot, I stopped looking back.

I'm an individual consultant with a very small team. Without Elixir, many projects that I've finished in weeks would have taken me months. This is a seriously under-rated language that would make you wonder why didn't you give it a shot earlier. It's that good.

My static site is now way faster than Jekyll or Middleman. I didn't re-write it for speed, speed was just a nice side-effect. I wrote it mostly for the language's flexibility.

With Ruby, which Middleman and Jekyll both use, you need to think in the traditional OOP way and sooner or later, you will hit the limits of the language itself. Whereas, with Elixir, everything is taken care of by guards. This is really one of the nicest codebases I've ever written in a while. This is in comparison to my earlier codebase which was written in Ruby, and I had to do all sorts of things like install a library to make the language more scalable. That was the ugliest hack I've ever done. [1]

Imagine, a Wordpress clone, only it runs on your computer and generates static files (this was my goal) but, written in less than a month by one person, working a full time job, with the same fit and finish of Wordpress.

Elixir is amazing.

[1] https://github.com/aetherknight/recursive-open-struct

2 comments

> My static site is now way faster than Jekyll or Middleman.

What? You mean the generation step is faster?

Yes. Correct.
That's cool. Why didn't you use Wordpress?
With WordPress, you need a server at all times and the HTML is generated each time you try to access your site. Sure, you can use caching plugins, but it only makes things complex. Eg. You need to now keep those plugins updated at all times, along with WordPress itself. A static site doesn't need a server and can work right off a CDN. It's blazingly fast and it's virtually unhackable. There are no security updates whatsoever you need to keep track of.
Thanks. Not sure why I got downvotes for asking a question though.

Also, I recently built http://blog.winricklabs.com for example which uses my own static site generator. I didn't use wordpress just because it'd be overkill.

Precisely! Good job, looks interesting, similar goals.