Hello world!
This website has been set up for publishing technical articles. The last time I maintained a personal website was in the early 2000s, so I might be a little bit rusty.
For creating this website I was looking for something simple. Something that lets me write articles in Markdown and supports syntax highlighting. In the end I decided to generate this website with Hugo. It uses the Kiera theme with some minor tweaks for now, the theme is pleasantly minimalist.
The only mildly interesting thing about this web site is the 404 page. It renders a random maze to show how truly lost you are.
To generate the maze a depth-first recursive backtracking algorithm is used. Below you can find an excerpt of the most important part of the JavaScript code.
let carveFrom = function(cell) {
// Mark the current cell as visited
visited.push(cell)
let neighbours = getNeighbours(graph, cell)
// For all the neighbours
while (neighbours.length > 0) {
// Choose one randomly
let randomIndex = Math.floor(Math.random() * neighbours.length);
let neighbour = neighbours.splice(randomIndex, 1)[0];
// If it has not been visited yet
if (visited.indexOf(neighbour) == -1) {
// Create a path to this neighbour
paths.push([cell, neighbour]);
// And invoke the routine recursively
carveFrom(neighbour);
}
}
}