Understandable errors in ANTLR4
There is more than one way to peel an orange!Once a colleague told me: “you can’t really generate user-friendly error messages with ANTLR. This didn’t seem right - serious parser generators must have ways to generate proper errors…Online searching has shown approaches to error handling mostly revolve around either various implementations of ANTLRErrorStrategy or “fail fast” strategy that involves overriding implementation of DefaultErrorStrategy to throw ParseCancellationException, which would c ...
Hosting Hexo.io in Heroku
When trying to set up my blog to be hosted in Heroku, I set up it so I can push int Github repo, then Heroku will pull the code and deploy it. Locally it seemed to work fine with Hexo’s server, so I was a bit surprised when my blog failed. Heroku logs have shown the following:
123456782019-11-20T22:39:25.000000+00:00 app[api]: Build succeeded2019-11-20T22:39:27.173507+00:00 heroku[web.1]: Stopping all processes with SIGTERM2019-11-20T22:39:27.241329+00:00 heroku[web.1]: Process exited with statu ...
Setting up the blog, a meta-post!
After taking a look at a couple of more “mainstream” blogging systems, I was looking for a way to do some blogging and not deal with over-engineered systems that are bloated with unnecessary features. I didn’t want to spend time in understanding the details required to actually tweak those systems and customize them to my liking.And then I found static website generators like Jekyll and Hexo. After choosing Hexo because it used a more familiar toolset, I found out that I actually understood how ...