Category Archives: Programming

Small Python Interactive Interface Trick

Not too long ago, I helped someone with some research work, and one of the research tools was also used from the Python interactive prompt. The interface used was handy enough for development: intuitive, readable, short, and useful. Still, for … Continue reading

Posted in Programming, Python, Research, Utility Functions | Tagged , , , | 9 Comments

Open Question No. 1: Persistent Predicates?

Lately I’ve been developing a website. One issue that I’ll probably need to address in the near future is “persistent predicates”. By “persistent predicates” I mean the problem of treating predicates as data. Consider the following situation: you are developing … Continue reading

Posted in Design, Programming | Tagged , , , | 6 Comments

Starting from Scratch – Part 1

About a month ago, someone I met asked me if I could give him C programming lessons. To protect his privacy I won’t talk about him much, besides saying that he is a serious guy and he doesn’t know programming … Continue reading

Posted in C, Programming, Teaching Programming | Tagged , , | 5 Comments

Fractal Memory Usage and a Big Number

In a previous post I said I’d talk about 4**(4**(4**4)). First, about the number. I first saw it mentioned in a math lesson back in high-school, when the teacher wanted to demonstrate estimation abilities. He wrote it on the board, … Continue reading

Posted in Algorithms, computer science, Fractals, Math, Programming, Python | Tagged , , , | 1 Comment

My Bad Memory, High Load, and Python

About a month ago the new Ubuntu 8.04 was released and I wanted a clean install. I downloaded an image and burned it to a CD. Just before installing, I tried “check CD for defects” and found a few. Turns … Continue reading

Posted in Personal, Programming, Python, Testing | Tagged , , , , , , , | 1 Comment

PyKoan – The Logic Game

As you can probably tell, I’m back from my undeclared hiatus. I’ve got lots of stuff to talk about, and I’ll be starting with PyKoan, one small project I’ve been working on lately in my spare time. A few weeks … Continue reading

Posted in Game Development, Math, Programming, Projects, Python | Tagged , , , , , , , | Leave a comment

Singleton: my use-case for class decorators

It seems that class decorators will finally be making an appearance in Python 3 and Python 2.6. I’ve thought about using them from time to time, but the use-cases weren’t that common. However, I did find myself writing a lot … Continue reading

Posted in Programming, Python | Tagged , , , , | 2 Comments

Python + Curses + Numpy -> Ascii Art Rotating Cube

Well, the title says it all, or at least most of it. If you are still not convinced, a picture’s worth 500 dwords: / |\ / | \ / | \ // | \\ / | \ / \ \ … Continue reading

Posted in Graphics, Programming, Python | Tagged , , , | 5 Comments

Some Assembly Required No. 1

I’ve been working on some of the instruction tests in vial, and I wanted to test the implementation of LOOP variants. My objective was to make sure the vial version is identical to the real CPU version (as discussed here). … Continue reading

Posted in Assembly, Challenges, Programming, Testing | Tagged , , , | 2 Comments

Python Tidbits

Memory Leaks With the advent of the Python’s garbage collector, it would seem that Python programs should not leak memory. However, this is not always the case. With just a bit of circular references, you can find yourself leaking quite … Continue reading

Posted in Programming, Python, Utility Functions | Tagged , , , , | Leave a comment