2012-12-25 09:21

Windows is *HARD*

I am on vacation, by the sea. So, I don't have my usual internet connectivity. I decided to buy a 3G modem and decided purely based on price, ending up with a ZTE modem provided by Claro.

On Windows, it works well enough:

  1. Plug it in
  2. Get the autostart window
  3. Start the installer
  4. Click Next a few times
  5. Reboot
  6. Start the client to connect
  7. Click on the "world" icon
  8. Wait a little
  9. Internet!

I tried it on windows first because I assumed it would work on my wife's computer, and I could do an ad-hoc wifi network so I could connect mine. Well, no.

So I tried it on Ubuntu. It does work too:

  1. Plug it in
  2. Say I am in Argentina
  3. Say it's a Claro 3G service
  4. Go to Network Indicator
  5. Click on "Claro 3G"
  6. Wait a little
  7. Internet!

And yes, I can do an ad-hoc connection and provide service to everyone else. Plus I don't have an unclosable window laying around all the time.

2012-12-21 15:45

Walking or Running in The Rain

I always am amazed by people suggesting that walking in the rain keeps you dryer than running. Just saw an answer to this. Check it out, it's nice:

I have also seen it debunked experimentally, by MythBusters. But let's try a different approach: intuitive math. Intuitive math is tricky because it usually is wrong, but hey, it's fun.

Apparently, we all agree that how wet you get correlates to your speed. Otherwise, the question is pointless because the answer is "walk or run, but take an umbrella", while true, is cheating, right?

So, for those slower-is-better proponents: go and walk very, very, very slowly. You may notice that you end completely soaked before you finish walking. If you didn't, you are still walking too fast.

On the other hand, if you were to go at 1000000 km/h we all agree you would only get some drops in your frontside, right? Which would not soak you. Right? And most importantly, is constant regardless of your speed, because it's just the average amount of water contained in a man-shaped prism from point A to point B, and you get that water in your front if you go slow anyway.

Assuming the speed/soakiness curve is roughly monotonous, it's clear that the maximum soakiness is when you go slowest.

If it's not monotonous, then the question is roughly unanswerable, since it would involve there is an optimal speed and it's worse to go either faster or slower than that, which means the answer is something like "jog" which is not what you want.

So, go fast, go dry.

2012-12-20 12:53

Nikola Wordpress Importer Improvements

Thanks to having users trying to actually import data from wordpress, the wordpress importer plugin for Nikola, my static site generator got a couple of new features.

  • It will try to maintain your URLs via redirects

    If your post was in /2012/1/2/a-post/ and now it will be in /posts/a-post.html it will create a redirect from the former to the latter.

  • url_map for comment migration

    It will create a CSV file containing the old,new full URLs so that you can move your disqus threads to the right places.

Also, master works with docutils 0.10 which broke in the last release.

For these reasons, there will be a 5.0.1 release today or tomorrow.

PS: if you want to see a few sites using Nikola, now you can.

2012-12-18 16:58

Rst2pdf 0.93 released

A bit ahead of schedule, I just uploaded version 0.93 of rst2pdf a tool to convert restructured text into PDF files.

Here are some of the changes in this version:

  • Fixed Issue 447: Double-sided always starts on the right (By Rob Ludwick)
    • Removed --first-page-even as it was not used anywhere.
    • Added --first-page-on-right
  • Fixed Issue 464: support alignment via :class: in image directives.
  • Fixed Issue 482: Line blocks with indented parts get extraneous spacing
  • Fixed Issue 470: Support for :target: in figures.
  • New style "image" to be applied to image directives.
  • Fixed Issue 485: Better styling support for figures/images (spaceBefore/After)
  • Support rst2pdf [inf [outf]] syntax to be more compatible with rst2*
  • Implemented Issue 389: New --strip-element-with-class option
  • Fixed Issue 474: CellStyle1 is not there in reportlab 2.6
  • Removed default padding from DelayedTable, which looked bad on headers/footers.
  • Improvements to the math directive (font color and size)
  • Better support for styling literals.
  • Fixed Issue 454 (Splitting failure)
  • Regressed Issue 374 (some literal blocks get oversplit)
  • Switched from svglib to svg2rlg
  • Removed uniconvertor support
  • Fixed Issue 477: Sink footnote separator (patch by asermax)
  • Fixed Issue 473: Support "code" directive like an alias of code-block.
  • Fixed Issue 472: Implemented MyImage._unRestrictSize
  • Fixed Issue 471: Respect class in lineblocks.
  • Fixed Issue 455: New pisa/xhtml2pdf has very different imports
  • Marked Issue 358 as fixed.
  • Fixed Issue 410: always include full lines in code-blocks (mmueller patch)

2012-12-17 16:20

Nikola is Python 2 1/2 ready

On my free time, lunch hours, and such I have been tweaking Nikola, my static site generator to make it python 3 friendly. Well, I somewhat-accidentally-my-dog-made-me-do-it may have committed a lot of that into master.

So, right now, things may be somewhat broken on python2 and somewhat working a little on python3.

In any case, feel free to try it out, and let me know what to fix.

2012-12-16 20:25

My Life as a Mad Scientist

My son finished kinder, so they had a special celebration, a graduation ceremony where they gave the kids a medal, a diploma, they sang a song, that kind of thing. But this school has a tradition. Parents always give their kids a surprise present at the end of kinder.

In this case, we did a play. With almost every parent acting, singing, playing music, juggling, and more. My role? Mad scientist. I had 4 lines, I funbled one, but hey, you can't deny I got the look nailed, man.

http://www.habiaunavezfotosyvideos.com/girasoles2012/Girasoles2012/Egresados_2012_files/Media/IMG_1103/IMG_1103.jpg?disposition=download

Yes, those are blacklight light-up eyeglasses. Yes they are as annoying to everyone else as you would imagine.

2012-12-15 16:02

Easy Solutions to Easy Problems

A few days ago my son went to a kid's barbershop where they do things like play Scooby-Doo in a Playstation while they get a haircut. He liked it so much that he decided to take matters in his own hands. With scissors.

https://pbs.twimg.com/media/A-LTmydCMAAc8e1.jpg:large

Daddy, I may have cut some hair.

But you know what? Easy problems have easy solutions. And I have a hair clipper.

https://pbs.twimg.com/media/A-LTWWlCMAAPuTx.jpg:large

Son, I may have cut some hair too.

2012-12-13 22:44

La Tierra Hay Que Lavársela de Las Patas

¿Por qué vivís ahí?

¿Por qué no vivís en otro lado?

Preguntáte eso. Yo me lo pregunté en el 2000 y me fuí. Dejé mi departamento, dejé mis muebles, dejé mis libros, dejé mi ropa, dejé mi laburo, dejé mi novia, dejé mi tele, dejé alguna deuda, dejé mis mates, y me fuí.

Yo no estaba contento adonde estaba. Tenía algo asegurado, pero era lo mismo que ya tenía, y tenía treinta pirulos, y lo había tenido desde los veinticinco. Tenía mi trabajo en la facu, tenía mi jefe que me estaba cayendo mal, tenía mi lugarcito, en un barrio que no me gustaba, tenía mi novia, que no me hacía feliz, tenía alguna deuda de expensas, tenía un departamento inescriturable con una hipoteca impagable.

Y tuve una oferta de laburo y me fuí, y no volví nunca más. Habré pasado una semana en los últimos doce años allá, para casamientos, y nacimientos, y una charla que dí en la FICH, pero he pasado más tiempo en Cruz del Eje, o en Mar del Plata, o en Londres, o en Carmelo, que allá.

Y tuve una oferta de laburo, y me hice un bolsito y me fuí, y pasaron cosas, muchas están escritas acá en este sitio, y cambié, e hice cosas, y me casé, y tuve un pibe, y viajé, y fuí feliz, e infeliz, y me cagué de hambre, y me ha ido bien, y me ha ido mal, y me enfermé, y no me curé, o sí, y engordé, y se me cayó el pelo, y escribí, y borré, y gané.

Porque gané. Porque todo eso no me hubieran pasado si tuviera mi departamentito, mi ropa, mi tele, mi laburo en la facu, mis libros, mis muebles, mi novia. Me hubieran pasado otras cosas, claro, pero no éstas, y yo, yo, soy este tipo que le pasaron estas cosas, y no otras.

Vos no sos el lugar en que estás, ni el lugar donde naciste, ni la familia que tenés, vos sos lo que te pasó y lo que hiciste. Y lo que te pasó ya está, pero lo que te va a pasar es casi todo culpa tuya, y lo que hiciste más.

Escucho todo el tiempo gente quejándose de donde están. Que es feo, que es inseguro, que es esto, que no es lo otro, que su laburo es una bosta, que sus compañeros son unos garcas, que los maltratan, que sufren.

¿Por qué vivís ahí?

¿Por qué no vivís en otro lado?

¿Que sos, viejo? ¿Cagón?

Viví, pibe.

2012-12-13 22:11

Rst2pdf progress

I have set for myself a priority list of bugs that bother me in rst2pdf, my tool to convert restructured text into PDFs in order of decreasing shamefulness.

I have been fixing a few today (early morning + late night hack) so the following is now correct:

  • Use of included stylesheets
  • Vertical spacing of indented lineblocks
  • Use of :target: in figure directives

There are 46 open issues but I am not planning on fixing them all. My personal hitlist has 10 more bugs in it, but regardless of how many I fix, I intend to release anyway, because:

  • Last release is broken with latest reportlab
  • Last release is a bit broken with docutils 0.10 which will be out soon
  • Last release was over six months ago

And that last one is the critical one. Working at Canonical has shown me that release cadence is good. Specially in a project where trunk is very rarely broken (like rst2pdf) there is no reason for slow release cycles. Rst2pdf should release monthly.

I fully intend to take that approach, so the next release will be done on December 21st.

Contents © 2000-2019 Roberto Alsina