Nikola

This blog is built with Nikola, a Python-based static blog/site generator in the spirit of the more well known Ruby-based Jekyll. It’s my first time using it ever, and my first time setting up any kind of internet facing website for some time. I’m liking it so far — it doesn’t get in the way much, and I can tailor the writing experience as much as I’d like. This is what the overall setup I ended up with looks like:

Setting up Nikola

Pretty straightforward:

$ pip3 install nikola
$ mkdir blog
$ cd blog
$ nikola init

nikola init asked a few questions about the blog (address, title, etc.). It also offered the option to set up a comment system and I chose disqus, although I expect I won’t be getting much in the way of comments anytime soon.

After this, you’ll get a blog root with the following interesting files:

  • conf.py, where all the blog configuration lives. You’ll need to change this to switch themes, etc.
  • posts/, a directory where each file will result in a published post (unless marked as a draft). Posts can be written in reStructuredText (which is the default) or a variety of formats. I use Markdown.
  • pages/, a directory where each file will result in a one-off page in the resulting site. Pages need to be added to a map in conf.py too.

Writing posts and keeping the blog updated

You can create a post by running nikola new_post in the blog root. But you can also just create a new .md or .rst file in the posts/ directory, as per the above.

After each change, the blog must be rebuilt with nikola build. This updates the static version in output/. Then, changes may be deployed to the configured web root (specified in conf.py, same as as everything) with nikola deploy.

I’m lazy so I ended up writing a wrapper that just rebuilds and redeploys the whole thing when something changes:

cd /home/$USER/blog
when-changed conf.py pages posts -c 'nikola build && nikola deploy'

when-changed is a Python util based on inotify, installable with pip3 install when-changed.

I then added the resulting script as a service to systemd to make sure it’s always running in the background.

Serving the static pages

As mentioned above, nikola deploy deploys the static content to the web root (/var/www/blog), which nginx then dutifully serves in flancia.org.

This blog is HTTPS only, so I set up a redirect for port 80 in nginx. I’m using letsencrypt for the HTTPS certificate.

That’s it, nothing fancy here.

Ancillary stuff

  • I use git for versioning posts and the blog scaffolding required by Nikola. I push it to a private gitlab repository from time to time as a way of backing up and being able to also write posts easily when I don’t have an internet connection.
  • I use vim for writing posts. It’s old school, but I’m still the happiest writing in vim — and in particular editing in vim. For some reason I really enjoy using vim and I otherwise don’t use it for writing nowadays, as most of my writing at work is based on Google Docs. Being able to base my writing experience on vim was the main driver towards going the full geek approach instead of using something like Wordpress or even Medium.
  • I wrote a sort of throwaway parser in Python to port my previous private diaries/idea dumps from a set of loosely structured monolithic Google docs to individual Markdown posts. I need to translate, edit and censor them, though, which is going to be the bulk of the work if I ever go that way (I’m still partially unsure about the kind of things I would like to write about here), so writing this script may have been yet another exercise in procrastination in a sense. At least it was fun.

All this is running in a $10/mo. micro dedicated server. Seems to work well enough.

Beatboxing

L. has a university schoolmate/fellow student that beatboxes as if it is equivalent to whistling. He’ll beatbox down the hall, or in public spaces.

I think this would probably make a pretty decent Curb Your Enthusiasm or Seinfeld episode. It’s not like there’s anything wrong with it — I mean, well, it is a bit disruptive and distracting, but it’s only more so than whistling by convention, so I think I see how someone could end up thinking it’s borderline OK to do it in public like this. But it is borderline, so it’s in a somewhat interesting space to discuss or consider.

I Googled “is beatboxing in public acceptable” and Google didn’t return a good hit. Perhaps it’s even weirder than I think it is, and people that beatbox in public don’t come up very often in the wider world. Or perhaps everybody is beatboxing all the time, and it’s so common I shouldn’t find it weird, but I’m unaware of it altogether because of not being that young anymore — so people don’t do it around me.

Bologna

We arrived in Bologna 3h later than originally planned due to a mix up when changing trains in Milano, so we couldn’t see it in daylight for as long as we’d liked — we had to leave early the next morning to go to Rimini to visit a friend. It still managed to leave several impressions in us, even with very little time available to sightsee.

First, how we got there so late: it turns out that there are two different trains headed to Bologna that leave Milano at 13:20; a fast (1h) and expensive one, and a slow (2h50m) and cheap one. We had tickets for the fast one, yet somehow managed to get on the slow one. Takeaway: always check the train code on Trenitalia displays instead of jumping on what seems to be the right train to your destination. I guess this explains why every Italian train station always seems to have 100+ people staring at the boards expectantly and carefully. There’s also the fact that they only really show you the right platform for your train a few minutes in advance. All in all, several factors came into play to cause confusion and we ended up stuck in a very slow and very packed train for a few hours. It turned out alright in the end — at least we were going in the right direction, and there was no ticket check. I was unsure if our ticket was going to be considered valid by the inspector; it was for a different train, but for a more expensive one to the same destination, so it was relatively open for interpretation.

An aside here — in retrospect, I was pretty vocal in the train about how I felt like a dork taking the slow train instead of the fast train we had tickets to. I usually communicate quite freely in Spanish with L., as it’s not that transparent to German speakers usually, and try not to be too loud or anything. But later on I felt a bit bad about my public complaints, as Italian speakers around us may have gotten the gist of what I was saying; and after the 2h50m of pretty uncomfortable travel it became apparent that a significant fraction of the passengers had taken the train all the way to Bologna, probably because it was cheaper than the faster ride we had bought. So I got to feel socially clueless on top of awkward and privileged.

We walked a bit around Bologna in the evening; it was two degrees and foggy, which to me after a while feels colder than five below because of the humidity. Our noses were runny and I was very hungry, but we got to see a few of the towers that Bologna is renowned for (full disclosure: I knew very little about Bologna before visiting, aside from the fact that it has a very old university) and also one of the weirdest churches I’ve seen: San Petronio.

San Petronio is like two churches in one. You can tell right away something is amiss as you get to its square (Piazza Maggiore) and see its facade: the bottom half is posh marble, like most of the big Italian basilicas (think the Duomo in Milan) and the top half is a rather shabby looking brick, more the look that you’d expect in a country church from the Middle Ages. And, as it turns out, this is because they basically just ran out of money when building it. This happened to many churches, but this one never really recovered — it’s unclear at this point to me if they are still trying to finish it or they’ve just given up. In any case, I think it adds to its charm — its interior has the same kind of dissonance built in, as it’s just huge and it looks even bigger by virtue of being pretty much empty. It doesn’t really even have a pew (second disclosure: I had no idea how “church benches” were actually called until I googled it a minute ago), just a bunch of wooden chairs with woven straw seats.

I’m not a huge fan of the concept of churches overall, at least not in modernity, so in a weird way a part of me likes it more just because it wasn’t finished; I’d like to think someone, sometime, used their money for something better than building yet another church. It would be nice if, for once, that someone didn’t just buy another huge brick of gold with the head of the pope stamped on it or something. Although, on further reading on the subject, it turns out the popes may have plotted against it being completed (as it was designed to dwarf St Peter’s), so perhaps the Bolognese nobles were more likely to go with something else for stamping on their gold bricks even if they were not into using their money for the greater good.

Anyway, we thought it was special.

Wikipedia

I think I have a Wikipedia addiction.

Ever since I was a kid I loved picking up encyclopedias and just browsing, but Wikipedia has allowed me to take this to a whole new level. I’ve always been a curious person, and I’ve always sort of had lots of interests without seeming able or willing to go deep into them. Idle browsing of Wikipedia kind of suits me perfectly.

I wonder to what extent this has been counter-productive; it’s so much easier to read the article in Wikipedia on some subject instead of going deeper (and, say, studying the subject with some degree of seriousness). Ideally reading the Wikipedia article would be the first step towards more reading on the subject, and I guess sometimes it is. But it seems like perhaps I’ve missed out on learning more about some subjects just because reading the Wikipedia article gives me such a “kick”.

In any case, I enjoy knowing random bits of information about many subjects, so it’s not all bad. I may just try to keep written down notes on topics that I find interesting so I can go deeper into topics that I go back to more often.

Machine Learning

So, I’ve been trying to learn Machine Learning. It’s been an open subject for me for years; I remember going to university to learn computer science (which took me a long time to begin with — a story for another day perhaps) already with the fuzzy idea of going into Machine Learning.

Prior to that I had studied Literature/Linguistics, and already I had the fuzzy idea there of specializing in Neurolinguistics. In the end I only did some introductory subjects on the matter before dropping out. Dropping out is sort of what I do, by the way. I’m trying to change this aspect of my personality, and actually starting this blog has to do with that.

Anyway, I’ve always been interested in ML, but for several years now I’ve been content with reading Wikipedia on it from time to time. And to sit back and sort of spectate about how the field has been advancing. Only a month ago I decided to get into it more seriously, and I’ve been doing the well-rated (and by now sort of classic) Coursera course on the matter (Andrew Ng’s). It’s been great fun, and I intend to do it to completion (not to drop out this time). What comes after that, I’m not completely sure right now, but that’s sort of exciting on its own right.

Scaruffi

File under “sites I’d really like to read, but I haven’t read yet”.

  • Scaruffi‘s site. He writes about many of the same topics I find interesting, and has been doing so for decades now.

https://www.scaruffi.com/nature/ seems particularly interesting. That plus all his work on music.

This New York Times’s article on him is probably a good primer on the scope of his work, and may have been what originally got me interested in his work — although I’ve been postponing diving into it for a while now, so who knows by now.

Evolution

I seem to think about evolution quite often. It sometimes seems fantastic we’re all around, and we got here by a stochastic process of mutation and selection starting from inorganic molecules. I mean, I totally believe in it, but when you really think about it it’s fascinating. The probabilities affecting the events that needed to take place, and the timeframes involved, are just too tiny/huge for human experience to be able to reliably have intuitions about them.

My interest in evolution may have to do to some extent with my interest in the nature of consciousness. Theory of consciousness seems to be a mine field — but really I’ve only read a few papers about it and a lot of Wikipedia articles. I should read up more on it. And in turn theory of consciousness is related with the topic of knowledge, and why we search for it — why we search for meaning in the void, and we try to build it into anythiing we create with inert mass when don’t find it already there. I sometimes wonder if humanity’s goal, if it can have one, is not (or should not be) to spread consciousness throughout the universe; and evolution’s goal, if it can have one, may be the same.

I very often resort to evolution I think about why people, or indeed animals, behave the ways they behave. It seems as if we’re somehow burdened by behaviours that were evolutionarily successful at some point, but are now outdated — or perhaps just co-evolved with positive traits and sort of stuck around so far. Violence, in my mind, is one of these traits or behaviours. It seems obvious to me that a humanity without violence would be a better humanity; in particular if traits that may be correlated with the capacity for violence, like drive and innovation, are somehow left unchanged by whatever process is used to erradicate the associated ills. I have a (fuzzy) idea for an article about this topic that I may write at some point; about how violence pervades society and may be just a disease in our genes that needs to be handled more effectively than we’re doing so far. I’m thinking of this also in relation to things like #MeToo, which is a reaction to the sexual violence that seems to permeate the current world, and victimizes mainly women.

Music

This should be an easy one. An easy post, I mean. It’s harder to put together the willpower to start with a post about an original idea. Music perhaps I can do.

I play a bit of piano. Really not much. I started “only” two years ago. I know only very basic stuff; a few simple songs, some classical, some pop. I’m self-teaching, which I’m sure really is as terrible an idea as people usually make it out to be. But I enjoy the feeling of teaching myself things, even if it’s suboptimal. At least it doesn’t seem impossible — I feel like I’m (slowly) getting better, and I do seem to be getting a better understanding of music at some level, which is what I mainly set out to do I guess. I don’t think I’ll ever be a professional musician, of course, but then again I don’t think I care. I’m fine with being an amateur (this will be a recurring assertion in this blog I’m sure, I should write a post about amateurism - or just make it my pseudonym?).

How self-serving is to write? Writing about oneself clearly is. But which writing is really not about oneself, or about what one has lived, or what one thinks or considers important?