Show HN: MathB.in – Mathematics pastebin written in Common Lisp
github.com
github.com
I have now updated the Nginx configuration to block arbitrary headers coming from the remote client and explicitly pass only a limited set of headers to Hunchentoot. So now I have something like this in the Nginx reverse proxy configuration:
proxy_pass_request_headers off;
proxy_set_header Accept $http_accept;
proxy_set_header Content-Length $http_content_length;
proxy_set_header Content-Type $http_content_type;
proxy_set_header If-Modified-Since $http_if_modified_since;
proxy_set_header Referer $http_referer;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Forwarded-For $remote_addr;
I will push this configuration to the GitHub repository too sometime this weekend.Commit: https://github.com/susam/mathb/commit/0dcedc0
Nginx configuration: https://github.com/susam/mathb/blob/main/etc/nginx/https.mat...
Given that it's not that old, and it's still actively used I wonder why people never include it in the list of recent Common Lisp code bases, for new users to take a look.
It's always the same recommendations.
Until now, the source code published on GitHub has usually been a few versions behind the live website running at https://mathb.in/ but I am hoping that in future, I will keep the source code on GitHub as recent and as updated as possible.
The process of the rewrite was roughly like this: simplifying HTML, CSS, and JavaScript code first, then switching from MathJax v2 to MathJax v3, then making corresponding changes in the JavaScript code, then replacing the custom Markdown + LaTeX demultiplexing logic with TeXMe that is specifically designed to solve this problem, and finally rewriting the server-side functionality in Common Lisp. The last activity had roughly six phases of development: writing some of the utility functions I would need later (e.g., parsing posts, storing/retrieving posts, etc.), writing tests, presenting the home page, processing the post submission, presenting post pages, and performing post validations.