Archive for July, 2006

Tabbed Python editing with PythonCard

July 31st, 2006 by Sjan Evardsson

While I have been partial to IDLE for developing Python I recently came across on SourceForge while looking for some help building a Python GUI. While PythonCard has plenty of tools and examples to help with GUI construction, it was the Tabbed Code Editor that really got my attention.

One thing that I look for in any development environment is the ability to open mutiple files in tabs. While IDLE is extremely useable, it lacks this feature. And yes, there are other tabbed IDE’s that can parse Python syntax, but none of them seem to do as good of a job as IDLE.

While I can’t claim that the PythonCard tabbed editor is as good IDLE in terms of hinting and code completion, (at least as far as Python builtins) it does a rather decent job of that for objects/scripts that are imported.

While I may or may not end up actually building Python GUIs with it, PythonCard has definitely found a permanent place in my toolbox.

Music from chaos

July 15th, 2006 by Sjan Evardsson

A conversation with a coworker the other day got me thinking about ways to make our “noodling” a reality. We were trying to come up with a way to generate random music (defined by octave, step, and duration), while maintaining harmonic relevance. (In other words, we want to create music, not noise.)

We decided we should start with the following propositions:

  • limiting the tones to a pentatonic scale
  • limiting the octave range to that audible to humans
  • limiting the duration of tones to a maximum of one or two whole notes

Beyond that, the discussion turned to how to generate the random values. Since I have been reading about the history of Nonlinear Dynamics (chaos) lately, my first thought was, of course, to generate the values for octave, step and duration by using a set of non-linear equations. So, of course, the first choice would have to be the Lorenz “butterfly” equations .

So, the plan is to calculate the values, convert them to MIDI values and write them out to a file using Python. Since the outcome of the equations relies on the starting conditions (Sensitive Dependence on Initial Conditions – also called the “Butterfly Effect” ) we thought that we could use starting values such as the current Temperature, Barometric Pressure and Humidity, or perhaps Date, Time and processs number, or counting Buicks, Chevys and Fords in the parking lot. Pretty much any 3 starting numbers.

China’s Firewall Breached

July 5th, 2006 by Sjan Evardsson

Researchers from the University of Cambridge computer laboratory have announced that they were able to successfully bypass the restrictions of China’s firewall, and found a DOS vector at the same time.

Richard Clayton , (UC computer lab) explained that when a keyword is found in a packet. the routers let the traffic through, but send resets to both sides of the connection. Ignoring those injected reset packets at both ends is trivial and renders the firewall completely ineffective.

On the other side of the coin, since the firewall uses stateless packet inspection to search for keywords, a forged packet containing one of these keywords, with a source and destination IP belonging to say, a Chinese goevernment website and a Chinese embassy somewhere, would effectively cut off all communication between those two endpoints for up to an hour. Unless, of course, they are also bypassing the firewall and (by doing so) the restrictions placed by the government they represent.