Skip to main content

Ralsina.Me — Roberto Alsina's website

You know more math than you think: non-decimal numbers

Yes, you do. If you are a frequent reader of this blog, then you probably already know about binary numbers, hexadecimal numbers, and sundry non-decimal numbers. You know, the kind we nerds know about. The ones that make us confuse thanksgiving and christmas because oct(31) == dec(25).

But how about nor­mal peo­ple (or as I like to call them: peo­ple)? Well, they may look at you con­fus­ed­ly if you tell them that they use way more ex­ot­ic things ev­ery day.

Let's start with the time. When you say "it's 10:30? well, that's a base-60 num­ber.

If we add days, it gets harder, because days are base-24. So "2 days, 10 hours and 30 minutes" is just a difficult way to say 2*24*60 + 10*60 +30 minutes. It's a numerical system with two different bases.

Sure, it does­n't do the cutesy thing hex does of hav­ing ex­tra sym­bol­s, like A mean­ing 10, but it's ex­act­ly that, ex­cept 20 is writ­ten "20" or "8P­M".

And how about Jan­u­ary 11th, at 5:20 PM? Well, that is al­so an­oth­er way to ex­press a num­ber of min­utes, in an even more com­pli­cat­ed mixed-base sys­tem!

January = 0 months = 0 days = 0 hours = 0 minutes
11th = 11 days = 251 hours = 15060 minutes
5PM  = 17 hours = 1020 minutes
20 = 20 minutes

Total: 16100 minutes

That way to ex­press a date us­es a mix of base 60, base 24, and base 365 (if we can, please, ig­nore leap years) or maybe base 60, base 24, base ~30 and base 12

I don't know if nu­mer­i­cal sys­tems with non-­fixed bases have a name in math­e­mat­ic­s, yet you use them, ran­dom non-­math­-per­son!

And you can even do arith­metic on them! Yes, you! You know what ex­act time it will be at "Jan 9th 2:10 + 12:15". You can even do mul­ti­-base arith­metic in your head.

And I have not men­tioned sec­onds (base 60 again), years (mul­ti­ple base 10 dig­it­s) and sec­ond frac­tion­s.

Yet, when hex and bi­na­ry are ex­plained to peo­ple in school, it's in­cred­i­bly hard to make them "get it". And once they get that if you try to ex­plain, say base-3 num­ber­s, it's con­fus­ing again.

The pain of having seen something once

It must be hor­ri­ble to have said some­thing smart, maybe even in­sight­ful, on­ce, and be la­beled for life as a vi­sion­ary, or a pun­dit, or some oth­er sim­i­lar in­sult.

Con­sid­er Clay Shirky's com­ments on this ar­ti­cle. It's ab­so­lute non­sense, based on ran­dom guess­ing.

I prom­ise this: this blog will have no in­sight on any­thing as long as I write it. I could­n't han­dle the pres­sure.

Writer's block

In­ter­est­ing thing about writ­ing a post ev­ery day: I did­n't get blocked yet. Sure, this is on­ly the 9th post, but con­sid­er­ing my pre­vi­ous post-a-­month ca­dence, and that I would just have noth­ing to write about, it's clear to me that writ­ing leads to writ­ing.

That is per­haps the most ob­vi­ous thing that not ev­ery­one no­tices: the way to do things is to do things. The way to write free soft­ware is to write soft­ware that is free. To go to Alas­ka you have to go. To Alas­ka. To write, you have to write. To do mu­sic, you have to do mu­sic. To make bread, you have to make bread.

Will ev­ery piece of bread you make be good? Will ev­ery­thing you write be good? Will you get to Alaska? No. You will fail.

But if you don't do failed crap first, then there is no way to do any­thing de­cent lat­er. I think it was Amadeo Car­ri­zo (fa­mous, old, goal­keep­er) who said about a (not so fa­mous, young, goal­keep­er) "He's not bad, but he needs to be scored on a few hun­dred times more be­fore he's good".

I have a long his­to­ry of fail­ure. I have a short sto­ry of suc­cess­es. I am work­ing on it.

Abandonment issues: rst2pdf

Of all the corpses of my pro­ject­s, there is one thatI feel worse about, which is rst2pdf. I feel bad about aband­non­ing sev­er­al, but rst2pdf was ac­tu­al­ly a use­ful tool, used by a bunch of peo­ple, and that it has nev­er gath­ered enough mo­men­tum with oth­er de­vel­op­ers is sad.

So, I will pick it up. I will spend about 4 hours a week on it. The plan is to:

  1. Gath­­er some patch­es that are lin­ger­ing on the is­­sue track­­er

  2. Fix some sim­­ple-ish bugs

  3. Make an­oth­er re­lease with 1) and 2)

And of course:

  1. Not let it fall in dis­­re­­pair again

In the meantime, here is a nice thing I just heard about. Dimitri Christodoulou has hacked rst2pdf so that it can handle the raw:: html directive.

This, dear friends is com­plete­ly nut­s, ab­so­lute­ly out of scope for any giv­en do­cu­tils tool, and just too cool :-)

I will try to hi­jack his code (prop­er cred­it and so on), and in­cor­po­rate it in­to rst2pdf.

And Dim­itri, or any­one else who wants to do cool stuff with rst2pdf: let me know! I will give you com­mit rights im­me­di­ate­ly!

Contents © 2000-2023 Roberto Alsina