I had a very strange experience the other day, I found myself wanting to reach for PHP.
I spent many long years as a PHP programmer, so part of it was muscle memory, but then I realized part of it was a real strength of PHP. I wanted to collect some email addresses from folks, and I really didn't feel like compiling a static binary and worrying about the libc version and chosing a port and copying a systemd file and creating an nginx virtual host. None of those steps are particularly hard, mind you, but you have to have an app so it's worth it, not a snippet or a throwaway script. But then again, snippets and throwaway scripts are often the beginnings of great apps!
The thought of typing something like $_SERVER["HTTP_HOST"] cured my predicament rather quickly, but I noticed I was onto something. I've been doing the nginx-and-systemd dance a long time, but if you're just starting out, it's really powerful if you can just type "echo" and then read something in the browser. I'd just discovered the mummy webserver and it was just so clean, and I'd looked into nimcr for scripts... and I was like, I wonder if I could put these together. Shouldn't take more than a day or two.
Well, it took a bit longer than that, but now you can easily take some source code and put it into mummy, and keep most of the performance! And the source... of a mummy... is a pharao. And pharao start's with PH, like PHP. It was meant to be.
There's lots of examples and instructions on how to set pharao up in production in its repository:
https://github.com/capocasa/pharao
But if you just want to give it a spin on your computer, do this:
$ nimble install pharao
mkdir www
pharao -W:www
# www/foo.nim
echo "I have been entombed"
And now open localhost:2347/foo.nim in the browser, and I hope that you, too, will have been entombed.
And the source... of a mummy... is a pharao. And pharao start's with PH, like PHP. It was meant to be.
Yeah, I can relate. Name based development is all I'm doing... Lexim, Ormin, Karax, Malebolgia, Atlas, Nimony, ... :-)