# Nikola v6.1.0 is out!

I am happy to announce version 6.1.0 of Nikola, a static blog/site generator is out at the usual place including downloadable plugins, bugfixes, annotations, a new Esperanto translation and more!

# Hardcore Finger Counting

Earlier today, @elnomoteta mentioned in twitter that if you count with your fingers you are in trouble, because at least you have overflows.

That got me thinking. Not about whether there is an overflow, since there is always an overflow, even if you count by electron quantum states using the whole universe, because infinity, dude, but about how high you can finger-count.

Sure, the naïve answer is ten, but that's trivial to improve. For example, here is a very simple system to count to 99 but even that is very simplistic.

If you are a computer nerd, you may think you are clever by now saying $2^{10}-1$ but really, how unimaginative is that? It's unimaginative enough that it has its own wikipedia page.

One thing I do (and I recognize it as one of my most annoying traits) is to consider unorthodox answers to questions. Because often they will show that the one asking the question has only a very vague idea of what he is asking, and exposes a ton of unexpressed assumptions.

So, computer geek, $2^{10}-1$, that is 1023. Congratulations, you have done much worse than the Venerable Bede, who in 710AD described in De Computo vel Loguela per Gestum Digitorum a system to express numbers up to 9999 using both hands.

So, let's think about the unexpressed assumptions here.

Is a finger a bit?

Hell no. A finger is a finger. Sure, it can express a bit, but it can also (in some cases) express more. For example, I have 6 fingers I can bend independently in more than one place (thumb, index, pinky).

So, I could use those to have a ternary digit (if you pardon the pun), and count to $3^6 2^4-1$ (or 11663)

If we consider it hand counting instead it's much better. For example, I could hold each hand palm-up or palm-down for 2 extra bits. That's $3^6 2^6-1$ (or 46655)
Is finger-order relevant?
So, suppose I put my left hand to the right of my right hand. Since I can tell which hand is which, because fingers are not all the same, I can count that as an extra bit, counting to 93311.
How long can I take before I show you the number?
I could say: "if a fingernail is long, that's a 3 (or a 4) depending on which finger". Sure, it will then take me days to express a number, but I just raised the number I can count to, using my fingers, to a really large number I won't bother calculating (2985983)
Do I have to keep my fingers still?
Because with one finger I could tap morse code for any number given patience, a hard surface, a resilient finger and knowledge of morse.
Can't I just keep on adding bits?
Of course. I could bite on the back of my left hand and leave a mark. I can use different hand positions other than palm up/down and straight/crossed. I could tattoo a number on the palm. I could express a URL to a site that contains a number. This is because the amount of information on a person's hand is huge.

So, sure, you can count to ten, or 99, or 1023, or 2985983. The tradeoff is, the higher your system goes, the harder it is to read, and the more previously agreed knowledge you need between the one expressing the number and the one reading it.

That's why you still count with your fingers just to 10. Because it's obvious.

# Lunchtime Nikola Feature: graphviz

Since we are in the process of adding a plugin repo for Nikola, I wanted to add a simple plugin there so that we can show how it works.

So here it is. You use this:

.. graphviz::

digraph foo {
"Idea" -> "tap tap tap" -> "Code";
}


And you get (assuming graphviz is installed, and this plugin is installed, etc.) this:

# Hola, estoy supuestamente cometiendo un delito. Policía!

Dicen las malas lenguas que el gobierno provincial de Tucumán ha prohibido el uso no oficial de la palabra Policía. Si bien no encuentro en ningún lado el decreto o lo que fuere que sea que se supone que hicieron (con lo que debo asumir que no existe) acá está mi pequeño grano de arena por las dudas:

Que conste que la policía tucumana en sí me la fuma en pipa y que el gobierno provincial de Tucumán me la fuma en narguile, pero si vamos a empezar a decir que no se pueden usar algunas palabras, la solución es usar más palabras, y usarlas más seguido.

Si me llegan a iniciar una causa (que no creo) les cuento.

Acá está la "noticia"

Así que ya saben estimados chichipíos tucumanenses, yo (Roberto Alsina) acabo de abrir una cuenta en una de las redes sociales mas grandes, que no solo usa la palabra "policía" si no que usa "policía tucumana" y la estoy usando para mandar fruta sobre ustedes. Denúncienme, por favor, que quiero ser famoso.

# Trivial Nikola Deployment Using Pancake.io and Backlift

So, you want to publish a site and want to do it now? As in, really right now? And for free? And you are a Nikola user.

If you are a Dropbox user, open an account at Pancake.io Then set your OUTPUT_DIR to something like /home/yourname/Dropbox/Apps/Pancake.io and build. That's it. No deploy step.

Or open an account at Backlift and set OUTPUT_DIR to /home/yourname/Dropbox/Backlift/foo where foo is your site's name as configured in Backlift. Build. No deploy step.

Or open an account on DropPages.com or KISSr or Site44.com or just use a Dropbox public folder.

Each of these services has advantages and disadvantages, from lame URLs to costing money, but hey, for a quick thing they are cool. You can always upgrade to the real thing later.

## 2013-09-15 15:55

It should be obvious to anyone that taking the words of anyone, including someone you like (or even specially someone you like) without skepticism is a dangerous path. For example, you may like Gandhi's philosophy of non-violence, or admire him for whatever reason.

That is hardly an excuse to take anything he said as worth much, specially when it's about subjects he had absolutely no idea about, because he had a tendency to be absolutely sure he knew everything about everything.

For example, did you know he wrote a book about health? Here's a quote from it:

One question which I have asked myself again and again, in the course of writing this book, is why I of all persons should write it. Is there any justification at all for one like me, who am no doctor, and whose knowledge of the matters dealt with in these pages must be necessarily imperfect, attempting to write a book of this kind?

My defence is this. The “science” of medicine is itself based upon imperfect knowledge, most of it being mere quackery. But this book, at any rate, has been prompted by the purest of motives. The attempt is here made not so much to show how to cure diseases as to point out the means of preventing them. And a little reflection will show that the prevention of disease is a comparatively simple matter, not requiring much specialist knowledge, although it is by no means an easy thing to put these principles into practice. Our object has been to show the unity of origin and treatment of all diseases, so that all people may learn to treat their diseases themselves when they do arise, as they often do, in spite of great care in the observance of the laws of health.

Do you notice the bait and switch? He knows little about the matter, but he will write the book anyway because it's really about the simple subject of disease prevention. But reading it "all people may learn how to treat diseases themselves". And not just a few diseases but all diseases. That paragraph reeks of false modesty and simple dishonesty.

But hey, did you know that he could cure the plague?

I have tried this single treatment [a mud poultice] for all varieties from simple fever up to Bubonic Plague, with invariably satisfactory results.

Of course, in the next sentence it says:

In 1904, there was a severe outbreak of plague among the Indians in South Africa. It was so severe that, out of 23 persons that were affected, as many as 21 died within the space of 24 hours; and of the remaining two, who were removed to the hospital, only one survived, and that one was the man to whom was applied the mud-poultice.

I wonder what is a result less than satisfactory.

There are obvious misunderstandings of basic facts, such as how respiration works [1] what the stomach does [2] and even how many bones there are in a human chest, and there are, of course, things that are just weird:

Cocoa is fully as harmful as coffee, and it contains a poison which deadens the perceptions of the skin.
Even habitual coffee-drinkers will be unable to perceive any difference in taste between coffee and this substitute. Good and well-sifted wheat is put into a frying-pan over the fire and well fried, until it has turned completely red, and begun to grow dark in colour. Then it is powdered just like coffee. A spoon of the powder is then put into a cup, and boiling water poured on to it. Preferably keep the thing over the fire for a minute, and add milk and sugar, if necessary, and you get a delicious drink, which is much cheaper and healthier than coffee. Those who want to save themselves the trouble of preparing this powder may get their supply from the Satyagraha Ashram, Ahmedabad.
The first class, which is the largest, consists of those who, whether by preference or out of necessity, live on an exclusive vegetable diet. Under this division come the best part of India, a large portion of Europe, and China and Japan. The staple diet of the Italians is macaroni, of the Irish potato, of the Scotch oatmeal, and of the Chinese and Japanese rice. [3]
Wheat is the best of all the cereals. Man can live on wheat alone, for in it we have in due proportion all the elements of nutrition. Many kinds of edibles can be made of wheat, and they can all be easily digested. [4] [...] man can retain his strength by living on mere wheat boiled in water.

And finally, there are the bits which are not just wrong, but also absolutely fucking dangerous.

Did you know he says smallpox is not contagious, and is really a digestive tract condition?

[Smallpox] is caused, just like other diseases, by the blood getting impure owing to some disorder of the bowels; and the poison that accumulates in the system is expelled in the form of small-pox. If this view is correct, then there is absolutely no need to be afraid of small-pox. If it were really a contagious disease, everyone should catch it by merely touching the patient; but this is not always the case. [...] This has given rise to the superstition that it is a contagious disease, and hence to the attempt to mislead the people into the belief that vaccination is an effective means of preventing it.

Oh, vaccination! You see, this book was published in 1921. By 1921, smallpox was already disappearing in Europe because vaccionation worked. And smallpox vaccination had worked for decades. He either knew nothing about how effective it was, or did not care.

I think the problem here is, unsurprisingly, that to someone with Gandhi's background vaccination was evil and just couldn't be accepted as something positive.

Vaccination is a barbarous practice, and it is one of the most fatal of all the delusions current in our time, not to be found even among the so-called savage races of the world.

[...]

Moreover, vaccination is a very dirty process, for the serum which is introduced into the human body includes not only that of the cow, but also of the actual small-pox patient. An average man would even vomit at the mere sight of this stuff. If the hand happens to touch it, it is always washed with soap. The mere suggestion of tasting it fills us with indignation and disgust. But how few of those who get themselves vaccinated realise that they are in effect eating this filthy stuff!

[...]

As has been well said, cowards die a living death, and our craze for vaccination is solely due to the fear of death or disfigurement by small-pox. [5]

[...]

I cannot also help feeling that vaccination is a violation of the dictates of religion and morality. The drinking of the blood of even dead animals is looked upon with horror even by habitual meat-eaters. Yet, what is vaccination but the taking in of the poisoned blood of an innocent living animal? Better far were it for God-fearing men that they should a thousand times become the victims of small-pox and even die a terrible death than that they should be guilty of such an act of sacrilege.

And there you have it, the classical moral arithmetic of the religious: it is better for your son to die in horrible suffering or be disfigured than for a drop of cow serum to be injected in him. How's that for non-violent?

Fuck that shit, Gandhi. Fuck that shit.

 [1] "The oxygen of the air which we inhale purifies this blood and is assimilated into it, while the nitrogen absorbs the poisonous matter and is breathed out." -- Gandhi
 [2] "If the stomach ceases to work even for a single moment, the whole body would collapse." -- Gandhi
 [3] My great-grandparents came to Argentina from Italy a few decades before this book was published. If someone called them vegetarians, they would probably smack you in the head with prosciutto.
 [4] Except, of course, by those who can not digest wheat.
 [5] Hell yeah!

# 42

42 (forty-two) is the natural number immediately following 41 and directly preceding 43. The number has received considerable attention in popular culture as a result of its central appearance in The Hitchhiker's Guide to the Galaxy as the "Answer to The Ultimate Question of Life, the Universe, and Everything".

—Wikipedia

Ahora es también la respuesta a "¿Cuantos años lleva Roberto tratando de llegar a ser adulto?"

Algún día me va a salir. Mientras tanto, se cumple un año de este plan y como ya pasó un año, hablemos de esas cosas que ya sé hacer. O mejor no, porque en una de esas resulta que no sé hacer nada, y no hay que hablar de cosas feas en un cumpleaños.

Ha sido un lindo año en muchas cosas, no perfecto, pero lindo. Empiezo el 42 junto a mi familia, comiendo tostadas con spianatta y tomando café rico. Eso ya es bastante.

# Being an Inclusive Project (and how GitHub saved my day)

I have posted over 50 posts here about Nikola and most of them contain something like "Nikola, my static blog/site generator". Well, that's not the case anymore. From now on I will say "a static blog/site generator". Why? Let's see.

For starters, it's no longer true that I wrote it. Although I am still pushing more code that anyone, there are 54 other contributors. That number is astonishing. Why? Because I estimate there are around 200 Nikola users. That means the ratio of contributors to users is incredibly high.

That is probably explained because the way you build a site using Nikola is very programmer oriented. You could describe a static site generator as a sort of "site compiler" and not be far off the mark. Many of the benefits, like you can host your page sources in github! are completely misterious to non-programmers. So, I expected that number to be high, but, having a 25% user=>developer conversion rate? That's bizarre.

So, I suspect I did some things well with this project [1], and wanted to think them out loud, and try to further them.

One thing I think I did well was that it's an inclusive project. If you propose something you are getting heard and I am giving the proposal a fair shake. I may reject it, but not out of hand, but instead after some thought. And if I am unsure, it's accepted. I would rather get something I am not fond of than drive out a contributor [2] because I may change my mind, but a contributor that's gone is not coming back.

Same thing about granting commit rights: want them? You get them with the first successful PR by just asking.

Today there was another step on this direction: I am not the sole admin anymore. No longer is https://github.com/ralsina/nikola the canonical repo, it's now https://github.com/getnikola/nikola. The website? Not http://nikola.ralsina.me but http://getnikola.com, paid for 5 years. Added two admins to everything (the awesome damianavila and Kwpolska). Gave up sole control of a loooong list of things [3] and now I can get run over by a bus and things should not bitrot.

It protects those 54 other contributors and few hundred users from my ever losing heart or interest, which is a real risk, and should be alleviated.

I think the most important bit about converting users into contributors though, is that you just need to be friendly. And Nikola is largely a friendly project. And that's made it a lot of fun for the past year or so.

I once read that if you refused to use code written by assholes you could not boot any OS. Well, that may be true, but that doesn't mean being an asshole is OK. This is a small project that does a small thing. But at least I feel confident it's not written by assholes. And that's a victory in itself.

OTOH there are some major defficiencies still. Diversity is good in some areas (geographically, for instance) but AFAIK the percentage of women contributing to the codebase is 0% and I have no idea why, and I would love to improve that.

So, lots of work done, lots more to do. That's a good position to be in, I think.

 [1] Alternative explanation: I did some things so badly I have driven out 99% of the user base.
 [2] Within reason.
 [3] Github's checklists on Issues are great
 [4] Within reason.
 [5] Optional.
 [6] Not really.

# Clarín: Donde 2500 dólares es barato, pero $7000 es caro Hoy Apple sacó dos teléfonos nuevos, el iPhone 5c y el 5s. Resulta que están a la venta por U$S 99 con contrato. Entonces Clarín al toque saca la nota "¿Qué teléfonos se consiguen en Argentina por 99 dólares?"

Yo sé que pretender que un periodista sepa de lo que escribe, sepa multiplicar, sepa buscar en Google y encima lo dejen publicar lo que averigua es jodido, pero...

• Sale U$S 99 subsidiado • Liberado sale U$S 579
• Para comprarlo a U$S 99 tenés que sacar un contrato de dos años de más o menos U$S 99 mensuales

O sea que comprar uno te sale 579 dólares, o (en combo con dos años de servicio) 2500 dólares.

Hasta ahí lo que no averiguó el periodista (o si lo sabe no lo escribió, o si lo escribió no se lo publicaron).

Veamos ahora el otro lado de la nota. Menciona el Samsung Galaxy S4. Es un teléfono más que comparable con el iPhone 5c, que es más o menos el iPhone 5 con carcaza de colores.

Veamos, cuánto sale un S4 acá?

• Sale $4499 • Para comprarlo a ese precio tenés que sacar un contrato de$139 (en Movistar, por ejemplo)
• También lo podés sacar con un plan "control" más barato y te sale $5499 Según Clarin, esto quiere decir que sale 500 y 850 dólares (de paso, un S4 liberado en USA? 1000 dólares. Liberado acá? 24 cuotas de$320 en Frávega, saquen sus propias cuentas).

En realidad, lo correcto es que sale (en combo con 18 meses de servicio) $7000. Si querés equiparar los términos de servicio:$7836 con dos años de servicio.

Sí, el servicio en USA es mejor que acá. Pero no podés decir, así suelto de cuerpo, que $7836 es más que U$S 2500. A menos que seas Clarín.

UPDATE querés una buena relación precio/producto? Te podés comprar un Huawei Y300. Es más lenteja, es más gordo, es de plástico, pero sale 100 dólares en serio, liberado, y es más o menos lo que era un teléfono flagship de hace 18 meses, ponéle un Galaxy S2, más o menos, que los que lo compraron con subsidio todavía lo están pagando.

# Nicoletta: Nikola's little sister

Last night I saw this post by James Harding explaining how to make a simple static blog using Flask.

It got me thinking... how hard would it be, and how much code would it take, to write the same functionality with as few dependencies as possible?

So, instead of breakfast and lunch I got a coffee and a sandwich, and you guys get Nicoletta a minimalistic static blog generator.

The dependencies are:

And how much code was it? I had guessed 25 lines, and was off by a lot, it's 40. I could cheat a little and bring it down to 25, but hey, what's the point?

The code is up at github and should be self explanatory. If it's not, just ask here in the comments.