Posts about kde (old posts, page 6)

2004-10-15 11:11

Now, this is news to me.

Tavia seems to be another KDE web browser.

I say nice.


Because of a question on the PyKDE list, asking for a more complete HTML widget using Qt (not kdelibs) I am looking at kdenox, which is supposed to be a Qt-only (QT/E) konqy. Perhaps ripping off the khtml piece of it won't be too hard, and then it can be sip-wrapped.

Probably nothing will happen with it, but I am looking ;-)

2004-10-13 16:03

Adventures in Hi-Fi

As I blogged earlier I am writing a game (and yes, it's pretty much playable already).

One thing I didn't mention is that I never wrote a game before. Yeah, I know everyone does it as one of his first projects, but I never did.

So, there are some things I really have no clue about [1], like sound and moving graphics around.

For the graphics stuff, QCanvas is just fine and dandy, but to make things bloop and warble and squeak when the time is right, I found Qt's sound support somewhat depressing.

Come on, NAS? Who uses that? And what about music? I had no idea.

So, I started trying to follow one of my leading principles of development: find a way to make it Someone Else's Problem (TM).

The usual way to do that is finding a library that handles the problem, write minimal glue, stick it to the side of the program, tell the program that's his new arm, and forget about it quickly.

Here's what I found.

Mi Dios!

I thought I should start by adding one of those annoying little tunes every game has. It's just a game tune, I don't want to have to include a 3MB OGG file for it, so I wanted an instrument-based format.

I remembered MIDI tunes. You may know them as ringtones nowadays, but they used to be just cheesy tunes generated by your SBPro's FM generator, not your phone.

In fact, I remember having a little proggie called playmidi, that would do that in Linux.

Well, it seems that in the past few years, either sound cards have forgotten how to play them, they fell out of fashion, or something, because the only things I found that could play MIDI are monstrosities that require a 9MB digital instrument set. And how was I to include that along with my 25KB game???

So, what's next? I had a C64, so...

MOD me up!

MOD files are like MIDI files, only the MOD includes it's own instrument set, called samples, and instructions on how to repeat and alter those samples to make a tune.

Good news: there are nice-sounding, funny MOD files that are about 30KB in size.

Better news: There is a popular library to play them! It's called Mikmod, and your distro has it (and it's a dependency for KDE's multimedia packages too).

Even better news: It has support for playing simple sounds (samples in mod lingo) by calling a couple of functions.

Awesome news: It includes a software mixer so you can just tell it to play this, then play that, then that, and a tune in the background, and everything sounds at the same time.

So, we have a winner. This baby can handle everything I need for the game!

But... is that a snake in your pocket?

I can't find a Python binding for it. I am sure as soon as I post this article someone is going to come up and tell me, here they are, moron! But I just can't find any.

So, I decided to do something I wanted to do already and learn to use Pyrex. Pyrex is a tool to write python extensions, with almost-free access to C libraries, in an almost-python language (only minor syntax differences).

That way, I could write a Python module to use Mikmod.

You know what? It was almost scarily simple [2]. I didn't wrap all of Mikmod [3] because I don't need it, but now I can do stuff for games and apps almost trivially.

Even more: Pyrex has awesome distutils support, so building the extensions, usually a pain in the rear, is trivial (mostly you just copy and delete stuff, with some search and replace).

One thing I found I did nicely is this: Mikmod requires you to call Mikmod_Update every once in a while so it fills the soundcard's buffer with stuff to play. If you don't, it skips.

So, I just started a thread that loops and takes care of it. You don't even have to know about it to use the extension. Oh, sure, if your Mikmod is not threadsafe, it breaks. Well, get a decent Mikmod package, then.

How does it look?

Here's a whole noisy proggie

#Load the modules
import mikmod, time
#Init the library
#40 voices, 20 for music, 20 for random sounds (overkill)
#Enable sound, starts the thread that pushes sound, too

#Create a module, that is, a music track

#Load two samples, just a couple of noises

#Start playing the song

#For the duration of the song, each second, make some noise


#Close the mikmod library, stop the thread, etc.

[1] As if that would surprise anyone!
[2] On the other hand... waiting for stuff to compile... how quaint.
[3] Actually, I am wrapping almost all of Mikmod, I am just not exposing it to Python because I don't need it.

2004-09-10 14:01

Shopping for a notebook

Ok, I want to retire my notebook. It's about to turn 10 years old, which is about 270 in notebook years, so it's time.

I've been researching a bit, and here's my requirements:

  • Cheap. About USD 950 would be fine
  • Small.
  • Light.
  • Enough power to run KDE decently.
  • Should work with linux. Nothing very fancy, but it being able to suspend would be nice ;-)
  • DVD reader, CD writer. DVD writer would be nicer but consider cost.

I've been looking tenderly at a Averatec 3220. It seems to fulfill all the requirements except it seems not to work so well with Linux.

Before anyone say it's not powerful enough: My desktop has a slower CPU (A Duron) and I like it just fine.

The screen is rather smallish, but that's part of being small and light, I consider the 12" screen a plus.

If anyone knows of a better system in this price range (the Averatec can be found for about USD 890 or so), or of a cheaper way to get one, please comment here!

2004-09-03 18:49

Back in the saddle

Should start posting stuff again now. Wait, this is a post! Talk about a self-fulfilling prophecy!

Lots of things happened in this very long break, so I won't bother even mentioning any of them, except one, which I promised to.

I am in love. And I will, as promised (to her), post a little love letter in my blog, and invite comments.

Since the long postless period probably means nobody reads my page anymore except when finding it via google, I invite anyone reading it in planetkde or wherever, to go to my page using the handy link that should be somewhere around this text, and post a comment if you want.

Be nice, please, because deleting comments from pycs is somewhat of a chore.

And here it goes:

Rosario, I love you. Sometimes you think I don't, but that's just because my skills of facial and verbal expression are awful. I love you when you act silly, or pout, or say wild stuff.

I don't love you because you pout or act silly, but pouting and sillyness is simply the accent, loveliness is the language that you speak, and I can't do anyhting but listen to it.

These last two months have been mostly happy for me, and when they weren't, they were happier than they would have been without you, and I hope you felt the same thing.

Now you blush, girl.

Comming soon, the usual technical drivel.

2004-06-17 14:57

Would a sock suck if a sock could suck?

Clee: it's really quite simple, IMVHO.

If the goal of planetkde is to syndicate blogs about KDE, then you should only aggregate feeds that are about KDE. The goddess knows mine isn't, except occasinally (you should use this one instead (it is boring and empty, though).

However, if the goal of planetkde is to syndicate the blogs of kde-related people, then you just aggregate them (with the agreement of the blogger) and that's that.

If someone posts something strange or sad or whatever, the others can post replies, encouragements, whatever, and life goes on.

Since it's your site, you are the one that chooses. I would prefer the second approach, though.

2004-06-08 11:47

Planet KDE suggestion

Boudewijn Rempt's blog is at the link, it has a RSS feed, and he's hacking Krita.

Where can one mail suggestions for planetkde blogs?

2004-06-07 17:13

Good news, Bad news

Good news: It seems I have been accepted to teach a PyQt tutorial at akademy.

Bad news: a kitten I had adopted last monday died on saturday night. She was a sick kitten, and had a respiratory infection. Antibiotics helped for a few days, she looked very happy on friday, but on saturday she woke up weaker, and nothing I or the veterinarian did helped.

She died on my lap that night.

I am a grown up, and I had only had her for 5 days, so this shouldn't be important at all, but it is :-(

2004-06-04 21:51

Late congress report

Last week, I gave a conference [1] about KDE in the first free software congress of Argentina.

I can't even remember how many "first(whatever)linux" of "first(whatever)free software(mumble)" events I have attended. one of these days, I expect to attend a second, and in a decade or so a third, but it seems orgnizing one of these things, even when they work nicely, is tiring work.

This one was organized by Usuaria, a non-profit for computing diffusion [2] , and they had some interesting sponsors, including Red Hat, Sun, and Microsoft.

Yes, that Microsoft.

Sadly, I couldn't assist the conference by the MS executive, because I missed about half of the congress for work.

My KDE stuff was shown at a smaller room, about 35/40 people. Since there was very little time (45 minutes) and I wanted to keep some for Q&A, I mostly showed simple stuff, like DCOP, some of the new apps, like Quanta.

I spoke a lot about rather the philosophical thrust of KDE development, how KDE tends to search for a technological solution to the UI problems, on the grounds that later, when everyone is using the API, if the UI changes and the API doesn't everyone wins.

Nothing special, really, and not one of my best ones, so my earlier nerviosism was warranted ;-)

I attended some other conferences, I remember one about comparing MTAs (he called Qmail difficult, so I didn't like it much ;-), one about Free Software economics by a guy from Maastricht [3] which was quite good.

Another one was by a Novell executive, who spoke about J2EE and .NET from a free software perspective.

Or rather, spoke about J2EE for a while, then mentioned Mono because he was running out of time ;-)

I met my third KDE developer! [4] Pupeno was there. Pupeno: you look like a younger, redheaded RMS. And your pants made me dizzy.

I couldn't tell you that personally. I like them :-)

I could tell this was a Linux even because hlf the people there had longer hair and/or longer beards than I do, when in regular events it's unlikely 10% do.

Met a few of the old fellows from my LUG in Santa Fe, one of them seems to enjoy suits now ;-)

But I bet since a few paragraphs above everyone is still having the word Microsoft bouncing in his head.

Yes, they were a sponsor. Further: they were, by far, the largest one.

I got a Microsoft pen, a copy of Unix Services for Unix, a brochure, and a canvas bag with Microsoft's logo embroidered.

Said bag is now the bed of my new kitten, Nini, which I adopted monday (but that's another story).

UPDATE: Someone who was there reminded me that I also got a box containing a fairly nice tukey sandwich, a brownie, and a small bottle of coca cola, so, thank you, Microsoft!

And no, I didn't have to sign anything to get the sandwich, not a NDA, not a license, and no, it wasn't wrapped in a bag saying "if you open this bag you agree..."

[1] Is there a less pretentious word in english for this? In spanish I say I give a "charla" which means a conversation, a chat. Of course in english that's not right.
[2] No, I don't know what they do, although I gave classes in their classrooms for 6 months)
[3] Where D'Artagnan died (if he had existed, of course)
[4] Yes, I have only ever met three guys involved in KDE development. That makes one every 1.5 years.

2004-06-03 10:22

There goes Captain Beto, through space!

Here is a new realtime PyQt tutorial. For those who have not seen the first one, here's the main idea:

  • I decide I want to write something
  • I write it (somewhat) quickly.
  • I write a description of what I am doing, as I am doing it, and slap some timestamps.

In this particular instance, on a discussion at the dot I had to open my mouth about how writing a spatial file manager is easy.

Well, here's a piece of one. In particular, it's a sort of simple spatial file browser since it doesn't manage files at all, but it's a start ;-)

2004-05-27 11:13

Silly description of internal state

As mentioned before I am speaking about KDE today in a congress.

I always get very jittery when I have to speak to an audience. Which, to someone that teaches 3 or 6 3-hour classes a week, is pretty stressing.

On one hand, I am pretty sure I can speak about the life of crabs for two hours and have the people thank me on the way out. I am pretty good at this.

On the other hand, I have a tendency to underprepare when it's a once-off affair (like today).

I don't like using slideshows, so I just hook my comp. to the screen and start speaking.

I don't have notes.

I don't have a set of points planned.

So, every time I speak, it is a different thing. Which is good. But it makes me very nervous.

What will happen if today I fail to figure out what to say? What happens if I come 20 minutes short? Well, nothing happens, I just stretch the Q&A section a bit and let them go get free food earlier.

But it still makes me nervous.

Contents © 2000-2019 Roberto Alsina