tHog

DIARY 2012

(2011)

DECEMBER

NOVEMBER

OCTOBER

AUGUST

JULY

JUNE

MAY

APRIL

MARCH

FEBRUARY

JANUARY

2012

Fri, Jul 13

<21:24 EEST> Magic smoke! I do not recall seeing and hearing this friend of every electronics hobbyist before in such a big scale, but there it was: my 80-watt PSU going down for the last time, having lost count of its capacitor surgeries.

In fact, in the past couple of days, it had been making intermittent cracking, but I had shrugged it off as just a loud case of your regular PSU whine. Besides, it had sounded rather nice on the background of a Villa Nah album. I simply assumed it would soon be in need of yet another elca replacement, but then a violent rattle proved otherwise. The power brick had been lying on a block of wood to protect the plastic carpeting from heat, and it sounded like it wanted to take off. Soon it was all over with a considerable puff of smoke.

Later autopsy revealed considerable burning and electrolytic leakage all over the case. I guess it had to end sooner or later for this guy from 2004. Remarkably though, my latest replacement elcas were intact, so I salvaged them for later.

I guess I must finally admit that this PSU had been operating at its very limits; for example, there was not enough juice for the CD/DVD drive while flooring the CPUs and GPUs. OTOH, I have a nominally 110-watt brick powering a 108-watt GPU, and it is only somewhat warm, compared to the obvious overheating of the little guy. So now would be a good time to get a bigger one; I found a 150-watt one for less that another one of those 110ers.

Wed, Jul 4

<21:07 EEST> It has been a couple of days with a fair deal of intensity and frustration. Nothing Earth-shattering, but a couple of interesting occasions nevertheless. Better start with a simple chronology, then.

Saturday afternoon was a time for an exceptional sense of accomplishment. For a lot of my time, I seem to have an urge of doing something more or less useful; this was one of the rare times when I felt I had earned a few hours of just enjoying the victory.

In fact, it was Friday night when I completed one of the tougher Project Euler problems, one I had left unsolved back in 2007. Despite this, I had left myself a few pages and a few scripts of pretty solid theoretical development. It turned out I had simply been missing an efficient algorithm for finding the number fo divisors. Nothing too technical, and that particular problem did not seem like a big deal.

However, I had a feeling it could be done much more elegantly. Incidentally, most of my notes had been leading to this, with a starting point in the prime factorization of numbers. One of my stranger approaches had been Lagrange multipliers, which could not directly solve a discrete number-theoretical problem, but in some way the idea had felt solid. As it turned out, someone else had also thought of it, so I returned to that approach. It would be useful for the harder version of the same problem. Before bedtime, I scribbled down the basic approach, ready for coding in the morning. It did not actually use Lagrange multipliers, but looked around the optimal area instead to find candidate solutions with integers.

So, on Saturday, it did not take long to put these ideas into Python code. It was one of those times that often happens with Python, where you already know exactly what the code should do, so it will work almost immediately. It was solving 110 that gave me that grand sense of elation. I knew I had been right all this time, and my past frustrations had not been in vain. While Lagrange did not provide the actual solution, it was nice to see that someone else had thought about it too — I imagine it is much more typical of physicists, as you can find it behind a lot of basic theory, besides being used directly.

Later on Saturday, I spent many a frustrating hour with a much easier problem; again, I had run into the limitations of my Python knowledge, even when the basic algorithm was fine. As a starting point, I would simply test if a number belongs to a given list of numbers. Since this did not work out as intended, I considered an algebraic approach, as the list was defined by applying simple formula on integers. This turned out a little faster, and I did end up with a correct solution, but it was still a little inefficient to my tastes. Later, I noticed that most others had solved it by the basic list lookup method; there were many advanced ways in Python to make it faster. A simple one was using a set instead of a list, one of the many different "arrays" in Python with each having their own strengths and weaknesses.

Interestingly enough, while a Python list is probably closest to an array in most languages (with integral indices), a set is not indexed. This was not a problem here, and it made me think about functional programming a little more — I should forget about running through numbers in a strict order, and instead try to find big-picture connections between data sets. Then again, a lot of Project Euler problems look for the smallest possible solution, so it makes sense to start from the bottom. Besides, I sometimes find that a for loop is much faster than the equivalent map construct.

Anyway, this was enough tedium for a while, and I withdrew from Euler for Sunday. I also realized a theatre rehearsal is coming up (I am temporarily back as the JYT sound guy) and I should prepare my audio gear. I recalled borrowing an M-Audio Microtrack recorder back in, well, 2007, and I had been thinking of buying something like that. The Zoom H4 had been in my mind a lot, and after hours of irksome consideration, I went and bought the improved version H4n on Monday, in time before the rehearsal.

I must admit this was partly due to laziness. I do not feel like lugging my laptop around, with a rather bulky external sound card, simply to record or play files. I can rarely concentrate on actual editing and composition on the set, though that has often been deemed necessary in the last-minute crunches before the premiere. The Zoom would also be great for final playback, as opposed to burning a CD for just a few shows. I have yet to explore all its capabilities, but so far I am very positively surprised. My theatre sound work would have been so much easier with something like this all along.

<21:59 EEST> So, there is a little production coming along, and I feel completely lost. This time it has been about two years since my last theatre gig, though of course I have been working with music almost all the time in some way. However, this time I also feel a social sense of being lost, as I do not know any of the others too well. Of course, this is also connected to my general disconnect with JYT in recent years. On the plus side, there is me and everyone else's general experience with these things, which includes acknowledging that it all starts with an undefined mess, and gradually takes shape.

While wondering about all this, I have been busy emerging a lot of audio software. Unfortunately, some of my past favourites like Soundtracker and Rezound have not been maintained, and I may have to look for alternatives. I now have Soundtracker basically working, in most its GTK+ 1.2 glory; alas, no Gnome for that, thus no envelope editing. In any case, it is not a good long-term solution. There seem to be other trackers still under development, but none of these are quite to my liking; for example, I cannot understand the need to copy the early 1990s interface, tied to something like a 640x480 fixed window, instead of using a proper X toolkit.

On the other hand, you could say that the whole idea of trackers is just pining for the early demoscene days. One place where I still find them convenient is building up soundscapes from samples. It would be tedious on a multitrack editor, and it would be overkill to use something like a sequencer and a sampler. A tracker has just enough of a sequencer and a sampler together in a nice package to make something like this in no time.


Risto A. Paju