# 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.