OCaml packages for scientific computing

This is a collection of OCaml packages that are potentially useful for scientific computing. (Disclaimer: I have only…

Use minted syntax highlighting in LaTeX with Visual Studio Code LaTeX Workshop

Syntax highlighting in LaTeX is traditionally done with listings. However, as many pointed out, this is a defective…

Update OCaml and OPAM along with packages

As a beginner of OCaml, it felt a bit unwieldy to perform an upgrade of my current environment (OCaml + OPAM +…

PEP 484 for type-aware programming

I begin to like sprinkling a few PEP 484 type hints in my Python code. Not necessarily because my code is laden with…

A comparison of some markdown publishing systems

Markdown is the new LaTeX for technical and academic writing. Although LaTeX is still the gold standard, if your writing…

Random thoughts on optimizing code for scientific computations

I have no time to write an essay, so here are some fragmentary thoughts.

  1. Scientists who deal with computationally…

I'm updating my website

I’m refactoring my academic website using the Minimal Mistakes theme to get a cleaner look. Stay tuned!

Added on…

Is there a performance difference between a macro and a global constant?

Disclaimer on 2018-11-30: These tests were performed under Julia v0.6. Due to the incompatible syntax changes brought by…

A simple fix to a common issue with Anaconda libgfortran on macOS

To compile some Fortran code that used features newer than Fortran 95, I switched the default gfortran from the conda…

Some common pitfalls in writing Fortran functions

Recently, I have been trying to port or interface some Fortran code for a project in Python. It was quite an uphill…

Installing Kanboard on macOS

Kanban is a lean method for project management that has been popular in software development and knowledge work.…

Why Python's ZeroDivisionError for floating-point type is a bad and unnecessary feature

In Python 2.7 and 3.6, dividing a floating-point number by zero results in a ZeroDivisionError:

>>> 1. / 0.…

The Sieve of Eratosthenes in Haskell: A naive implementation

I have been learning Haskell for a while. The more I am exposed to this language, the more I am amazed by the elegance…

Merge multiple EPS subfigures into a single figure using LaTeX Beamer

Some academic journals require all subfigures to be combined as one single file for submission. This may not be easy to…

Adding section numbers to LaTeX floats numbering and other tips

I have been learning to use LaTeX for some time. Now I do most of my homework assignments in LaTeX. It wears quite well…