-
Recent Posts
Recent Comments
Archives
- June 2011
- February 2011
- January 2011
- December 2010
- April 2010
- March 2010
- February 2010
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- February 2007
Categories
- Algorithms
- Assembly
- C
- Challenges
- Compilation
- computer science
- Cryptography
- CSS
- Databases
- decompilation
- Design
- Fractals
- Game Development
- Geometry
- gotchas
- Graphics
- Group Theory
- Humour
- Javascript
- Linux
- Math
- Miscellaneous
- Optimization
- Optimization
- Optimization
- Optimization
- Origami
- Personal
- Programming
- Programming Philosophy
- Projects
- Protocols
- Python
- rants
- Research
- Security
- Sound
- startup
- Statistics
- Teaching Programming
- Testing
- Uncategorized
- Utility Functions
- web-design
Category Archives: Python
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 exponentiation, memory usage, Programming, Python
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 Computer trouble, High Load, memtest, Programming, Python, Testing, Ubuntu, Voodoo
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 Assembla, Expression Trees, Game, Logic, Programming, PyKoan, Python, Zendo
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 class decorators, Programming, Python, Python 3000, Singleton
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
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 gc, memory leak, Python, reference cycle, undefined
Leave a comment
Issues in writing a VM – Part 3 – State and Memory
When implementing the VM, I had to keep track of state. The state of the VM includes the registers, virtual variables and memory. Fortunately, keeping track of state information is pretty easy. Basically, it amounts to having a dict, where … Continue reading
Posted in Design, Programming, Python
Tagged Distorm, memory, Python, sparse list, VM
Leave a comment
Issues in Writing a VM – Part 2
Writing a VM capable of executing expression trees is different from writing a VM for executing assembly instructions. Here I’ll cover several issues stemming from this difference. The first group of issues involve generality. Supporting a specific instruction set is … Continue reading
Posted in Algorithms, Assembly, computer science, Programming, Projects, Python
Tagged delay slot, Disassembly, Distorm, Python generators, vial, VM
7 Comments
The Case Against Floating Point ==
While working on the clipping bug, I had to do some floating point comparisons. To handle this virtual mine-field, I used simple precision comparisons. Not surprisingly, I wanted to know what’s ‘the right way’ to do this in Python. When … Continue reading
Posted in Programming, Python
Tagged Float, Floating Point Comparison, Floating Point Division, Programming, Python
3 Comments
Various Small Python Helpers
I’ve been working lately with arkon on various projects related to diStorm. One of these projects involved writing a solid Python API around an existing C API. This C API uses a lot of flags as arguments and return values … Continue reading
Posted in Programming, Python, Utility Functions
Tagged Programming, Python, Utility Functions
5 Comments