This blog

I started this blog to share some of my ideas and passions! Hope you like it. I’m trying to keep with the rythm of one (elaborated) post per month. Here are the technologies used:

Hakyll

This blog uses Hakyll, a static blog generator in Haskell. The blog posts are written in markdown and stored in GitHub, allong with all the rest of the website. They are rendered by Hakyll: after typing a blog post I simply type:

$ site build
$ site deploy

No database! This is a great advantage because when you store your posts in a database, you never know in which format they are stored. There is much more chance to loose them. Writing them in markdown and storing them on your computer synchronised with GitHub makes them much more reusable.

Math posts

For posts embedding math equations such as this one, I use MathJax, as described in this post. I can include some Latex formulas, like this one:

\(x(t) = \alpha e^{-at} + \beta\).

It is rendered from the following code, included directly in the .md file:

 $x(t) = \alpha e^{-at} + \beta$

For posts embedding graphics such as plots, I write them in Rmarkdown. For example, the following graphic:

is generated from this code (without the backslash):

```\{Rplot}
require(stats)
D = 150
T = 10
t = seq(0, 80, 0.01)
x = -D*exp(-(t/T))+D
v = (D/T)*exp(-(t/T))
plot(t, x, type="l", main="Evolution of position through time", xlab="time (s)", ylab="position (m)", xlim=c(0,80), ylim=c(0, D+10),  xaxs = "i", yaxs = "i")
abline(h=D, col="red")
text(2, D-3, "D", 1, col="red")
```

They are rendered directly by Hakyll using a small utility I developped, Hakyll-R.

Haskell posts

For posts embedding Haskell code, I write them in literate Haskell (.lhs), which is also supported by Hakyll. I can then either render them in Hakyll, or run then with ghc! Unfortunately for the moment I didn’t find a way to “weave” the post, that is to run the code snippets that are included and insert automatically the corresponding output (in this case a picture).

Publications

I store all my publications in a centralized file on a github repo in bibtext format (along with a list of papers that I reference often). This repo is then added to any project that needs it as a GIT submodule, for example my CV, papers, blog posts…

My publication list is using this technique: I use pandoc-citeproc to generate it, using:

Comments