Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre programming (publicaciones antiguas, página 24)

Fixing old tutorials

I got a mail from a read­er telling me that he could­n't down­load the sources for Not­ty, the toy app I de­vel­oped in my Rapid Ap­pli­ca­tion de­vel­op­ment us­ing PyQt and Er­ic3 ... in re­al­time! tu­to­ri­al.

So, I checked and was shocked at just how much the serv­er moves had wrecked that ar­ti­cle, which is one of my favourites!

No im­ages, bro­ken link to the sources, no syn­tax high­light­s!

So, I re­jig­gered the thing quick­ly with some search and re­place (thanks re­struc­tured tex­t!) and now it should be up to stan­dard­s, ex­cept that... it's still about Qt3 and I am not even sure it works nowa­days.

Nor­mal­ly that would be sim­ple to fix: change the code as need­ed, make it work, and be hap­py.

But the fun thing about that ar­ti­cle was that it was writ­ten in 3 hours, and it talks about how it was writ­ten in 3 hours. So, I think I may have to do keep that and add a note with a link to a cor­rect­ed/up­dat­ed one, some­day.

If you try to use quotactl on Linux...

Al­ways re­mem­ber to do this:

#define _LINUX_QUOTA_VERSION 2

Or else, your code will break in mis­te­ri­ous ways.

That's be­cause sys/quo­ta.h has this:

/*
 * Select between different incompatible quota versions.
 * Default to the version used by Linux kernel version 2.4.21
 * or earlier (in RHEL version 1 is AS2.1, version 2 is RHEL3 and later).  */
#ifndef _LINUX_QUOTA_VERSION
# define _LINUX_QUOTA_VERSION 1
#endif

Why? I have no idea. But this is true at least on Cen­tos4, I have no clue of this is al­so true for your dis­tro, but it is sooooo wrong :-(

A bit sad about this

It seems that dur­ing the big SVN con­ver­sion some da­ta were lost in com­mit­s.

So, if you check KDE's svn for the re­al­ly old stuff, it has no au­thor in­for­ma­tion.

For ex­am­ple, check this out:

http://web­svn.kde.org/branch­es/KDE/1.1/k­denet­work/krn/

I know I wrote pret­ty much ev­ery­thing there, but you are prob­a­bly not go­ing to no­tice it, and I spent a good cou­ple of years work­ing re­al­ly hard on that thing.

Sure, it was crap, but it was hard-­worked crap, and there is at least one thing I am slight­ly not ashamed of: TypeLay­out, which is still nicer than most tool­kits have, even if it was sham­less­ly copied from Lin­ux­Con­f.

But what the heck, it's old stuff.

Coming ideas

Nowa­days, the very lit­tle time I have for per­son­al projects is spent do­ing things like fix­ing lit­tle things and adding lit­tle fea­tures to Bartle­Blog [1] and think­ing how I could use GLE and mako tem­plates to cre­ate a cool nerdy tool to cre­ate chart­s.

How­ev­er, I will be hav­ing a lit­tle time for per­son­al projects in a cou­ple of week­s, and hav­ing stum­bled on­to chip­munk to­day re­al­ly got me think­ing.

It's a se­ri­ous­ly nifty 2D physics li­brary. Con­sid­er this de­mo video:

Now, what could pos­si­bly be done with it... I need to re­al­ly think.

Rater progresses (slowly)

I am hack­ing a bit on rater my dae­mon/­client to see if things are hap­pen­ing more of­ten than they should (in oth­er word­s, gener­ic rate lim­it­ing).

I had to take a few days of­f, since my broth­er got mar­ried and we all went back to San­ta Fe for that and a week­end, and then ev­ery­one else has sore throats and I am the on­ly one healthy.

But hey, it works well enough al­ready:

  • The sim­­plis­tic pro­­to­­col is done

  • The serv­er works

    • It can take hours of gib­ber­ish with­­­out prob­lem­s.

    • It can take hours of valid in­­­put with­­­out prob­lem­s.

    • It does what it's sup­­­posed to do.

  • It's stay­ing be­low 300S­LOC, which was my goal.

Miss­ing stuff:

  • Val­­grind it.

  • Client li­brary.

  • Gen­er­ic CLI clien­t.

  • A qmail-spp plug­in that us­es it.

And then, I can for­get all about it.


Contents © 2000-2024 Roberto Alsina