Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Mental oops

Who´s Hugo? Why am I call­ing Georg Hugo? Is Alzheimer com­ing for me? ;-)

Neat stuff

This is a recipe at the Python Cook­Book show­ing how to add a new di­rec­tive to re­Struc­tured­Tex­t, called code-block, which syn­tax-high­lights the block!

I just im­ple­ment­ed it in Not­ty, and now you can have the neat­est code snip­pet­s. I did have to hack the out­put a fair bit since the dis­play­ing wid­get does­n´t sup­port <s­pan> (or CSS for that mat­ter), so I had to do mas­sive search-re­places on the out­put, to con­vert to <font>. But it took on­ly half an hour to do, since Sil­verCi­ty´s out­put is very reg­u­lar.

I think I will sug­gest this to Hugo for PyD­S, con­sid­er­ing the den­si­ty of pro­gram­mers among its users :-)

reStructuredText has ONE problem

I can't find any ed­i­tor (out­side of emac­s) that has a mode for it. And it needs a mode ;-)

In fac­t, be­cause of the way it's marked, it seems a mode for scin­til­la or kate sim­ply can't be done.

The prob­lem is that, in or­der to un­der­stand what a para­graph is, you need to see the end of it, some­times (for ex­am­ple, head­ings)

So, since most high­light parsers switch when they trip on­to some­thing (say, a quote), it does­n't work.

I could, I sup­pose, do high­light­ing us­ing some­thing more evil, like de­tect­ing when the us­er ends a para­graph to set the para­graph's style, in ad­di­tion to the usu­al stuff, but it seems pret­ty hard to get right.

Happy hacking

I al­ways get this weird high when I'm cod­ing. I have no idea why. I just do.

Last night, I did­n't sleep, I was so hy­per.

Memorable flames of the past (I)

Er­ic Bi­na´s Xaw Mo­sa­ic.

Just read it.

Warn­ing: foul lan­guage

Se­vere Warn­ing: ram­pant pro­gram­mer elitism

Ex­treme Warn­ing: he´ SO right.

Contents © 2000-2021 Roberto Alsina