2009-02-05 15:22

Back from the dead.

Yes, again, two months passed and nothing on the blog. What can I say, my life takes a lot of my time.

Anyway: I will try to actually write my PyQt tutorial based on what I showed at LatinoWare (I said "will write it in a few days". Ja!), and start pushing things out every once in a while.

The only FLOSS I did was some bugfixes for rst2pdf which is desperately needing a new release.

Hopefully march will mean a bit more time for free software and writing.

On other areas:

  • KDE 4.2 is really good. Beats 3.5 for me, like for most anyone else that was not convinced yet.
  • I want to try my hand at a couple of plasmoids (yes, I do have at least one semi-original idea)

So, see you soon, dear readers. Maybe. Probably.

2008-11-01 10:16

Blogging from Latinoware again

Last night while eating one of the Python Brazil guys told me about the Lightning Talks session taking place today.

Since I am basically insane, I was convinced to do my first lightning talk:

  • In spanish in front of a purely brazilian audience
  • Creating it while having breakfast 1 hour before the event
  • After exceeding the allotted 50! minutes 2 days ago

So, in short, I was terrified. I got there, sat at the back, start listening.

I was 4th in order.

1: doctests (nice)

2: pronounceable passwords (nice)

3: MVC in gtk... I didn't understand a word, and ran out of time.

So, I am now thinking nobody will understand me at all, so I will slow down, run out of time, and will then give the worst lightning talk ever.

I'm next up. My topic: how to build a spreadsheet in 5 minutes.

Amazingly, it worked rather well, the "MC" asked me for a copy of the code, and said it was a neat example. Noone looked horrified or ROFLing, so I am at least somewhat happy about it.

Here is the code for you, too: ssin5min.tgz

I would do it again. But if I am doing it again here, I am learning portuguese first.

2008-10-30 16:59

Blogging from LatinoWare

Just finished speaking about PyQt programming in LatinoWare.

It went ok, but I ran out of time, so no Q&A, and I couldn't show about 20% of the code. :-(

Anyway, here is the code in its different stages, so you can see the "evolution" of a simple PyQt app. I will probably turn it into a real tutorial in a few days and post it.

Here is the guide I was using for myself when doing the presentation:

    1. App backend (1/todo.py)
    2. Basic window with a treewidget Columns Task/Date/Tags
    3. Compile archivo .ui, show how it works
    4. Template for main.py
    1. Load backend data in the task list
    2. Show interaction is broken
    1. Explain signals/slots
    2. Show difference between 1/main.py 2/main.py
    3. Explain autoconnect, show on_lista_itemChanged
    4. Show task persistence working
    1. Fix tree decorations
    2. Make items editable
    3. Explain changes in on_lista_itemChanged
    4. Explain the problem with editing date and tags inline
    5. New idea: use a dialog to edit tasks (editor.ui)
    6. Explain layout managers
    1. Show changes in main.py
    1. Actions
    2. Show actions in designer
    3. Show actions in main.py
    1. Tray
    2. Show tray class in main.py
    3. Show tray behaviour
    4. Show differences in main.py

2008-10-20 11:59

A hard-to-block spammer: I need help.

Many of my clients have been spammed by La Capitana Real Estate lately. And I mean many. Hundreds.

However, they seem to have found a way to spam that works. And that sucks.

They have created a Google Group, added all their victims there, and let google do the dirty work.

What's the problem?

  1. Google group mails are not blockable at SMTP-level because their senders contain a sort of hash and the recipient address, and no group name. That's incredibly stupid in google's part.
  2. The messages they send are huge (6MB and up) so spamassassin can not process them. The SA docs say this will not happen because of "the economics of spam". Well, it happens when you make google do it!
  3. I don't want to go back to the old days of keeping a local queue-level address blacklist. That's awful!

I have complained to google, I have complained to the spammers, even by phone. They use the standard defense of "we are just inviting people". "They can unsubscribe if they want to". "This is not spam"

Noone does anything.

What's the next step? I can't blacklist google groups!

2008-10-09 21:54

Reading: goodreads.com

If you read this blog on the website (and you do, because my feed is garbage ;-) you may have noticed a goodreads.com widget on the right.

It's not that my reading habits are interesting to anyone, since I have become a very shallow reader in the last two years or so (a terrible, terrible involution caused by all the free scifi ebooks floating around), but I love that site. In the past I posted some book-related stuff here, but it was always sort of guilty about it, posting things my readers (few as they are) probably don't give a damn about.

With goodreads, I have a way to vent my shallow opinion about my shallow readings. I need the same thing for movies.

Also, it's a much more reasonable thing than all that "now listening" idea. Who care what you are listening? It lasts for 3 minutes! A book is something you have in your head for at least a couple of days! It is so much more meaningful.

2008-10-09 21:54

rst2pdf: presentations

I have been thinking about using rst2pdf to create presentations. I finished exposing PDF transitions today, and that part works nicely.

Still needed:

  • Some sort of "page decoration" feature.
  • Handout support? I think this would work nicely with some sort of "conditional" directive. I need to think about it some more.

I intend to have that done for next friday, and release then.

2008-10-02 11:02

Programming and Life plans.

First a huge announcement: I will not release anything tomorrow. For the first time in 6 weeks, no friday release from me!

Now, let's see what I'm planning.

  1. I will be at LatinoWare 2008 speaking about PyQt. The usual free beer offer: if you mention this blog, I will buy you 1 (one) not very good beer. Being in Brazil, that's probably a Brahma.

  2. rst2pdf development is slowing down. The easy stuff is all done. There are some things I can do, though:

    • Expose transitions to the writer (good for presentations)
    • "Background" forms (again, for presentations)
    • A mini-language exposing the canvas, so there is a useful "raw" mode.
    • Using svglib instead of uniconvertor to handle SVG (but keep uniconvertor for other vector formats)
    • Redoing lists, which have a shaky code and bad layout
    • Fix half a dozen bugs
    • Make it work more like a unix app when in unix (respect environment vars, for example)

    However, I am taking a little time off from it, and going to try reviving other projects. Focusing in rst2pdf for two months did wonders for it. Let's see if it can be repeated!

  3. Try some more code golfing. I helped Nubis from PyAr reach the lowest-score of 74 in the grid challenge. This is really fun stuff.

  4. I need more money. We have spent lots in ... plumbing. Yup. Two years of savings spent on that. So, I need money. If you read this blog and want to make me happy, get me freelance work. It can be sysadmin stuff, it can be programming, it can be babysitting. I am good at all three things. Contact me. I'm easy to find, and I am cheap(ish).

  5. No, I am not starving. No, I am not in money problems. Yes, my company is doing very well, but it's an investment, not a cash cow (yet).

2008-10-01 16:57


I spent a few hours today round Code Golf and here's a neat thing I did.I think this is python's shortest possible factorial:

f=lambda x:x<2or x*f(x-1)

You may say it's not correct, because f(1) returns True, but int(True) is 1, so it's almost there ;-)

And here's a surprisingly readable (as long as you know pascal's triangle) and not too long answer to their choose challenge:

while c<k:a*=n-c;c+=1;a/=c
print a

2008-09-24 18:13

What may be in rst2pdf 0.9...

If I manage to make it work well: Math!

Here's how it looks:


It does not require TeX. It is not an image. It does require external software, and it does require you to write TeX syntax.

If you are a reportlab user: this is a platypus flowable.

As usual, it's not me that's doing the heavy lifting. I am just good at using other tools.

With a little luck, it should be usable this friday.

Contents © 2000-2019 Roberto Alsina