
Recent Posts
Recent Comments
 __del__ magic method dangers in Python 2 and infinite loops on Python Gotchas 1: __del__ is not the opposite of __init__
 python – What is the __del__ method, How to call it?ThrowExceptions – ThrowExceptions on Python Gotchas 1: __del__ is not the opposite of __init__
 destructor  ¿Cómo puedo limpiar correctamente un objeto de Python? on Python Gotchas 1: __del__ is not the opposite of __init__
 destructor  Come faccio a pulire correttamente un oggetto Python? on Python Gotchas 1: __del__ is not the opposite of __init__
 How do I correctly clean up a Python object? – inneka.com on Python Gotchas 1: __del__ is not the opposite of __init__
Archives
 July 2020
 March 2020
 August 2012
 July 2012
 June 2012
 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
 webdesign
Category Archives: computer science
10 Awesome Theorems & Results
When I look back at various mathematical courses I took, most have at least one theorem that I really liked. Usually I like it because the proof has a surprising trick, sometimes it’s because of the unexpected conclusion, or maybe … Continue reading
The mathematics behind the solution for Challenge No. 5
If you take a look at the various solutions people proposed for the last challenge of generating a specific permutation, you’ll see that they are very similar. Most of them are based on some form of divmod usage. The reason … Continue reading
Posted in Challenges, computer science, Programming, Python
Tagged base systems, factorial, Knuth, Math, permutations
Leave a comment
Small Programming Challenge no. 5 – Generating a Permutation
I thought of this one quite a long time ago, and I believe that the idea behind it is pretty nice mathematically. I got the idea for it from Knuth’s “The Art of Computer Programming”. The challenge is simple: write … Continue reading
10 Python Optimization Tips and Issues
Following my previous post on Optimizing Javascript, I thought I’d write a similar post regarding Python optimization.
Posted in computer science, Design, Optimization, Programming, Python
Tagged memory, memory usage, optimization, Programming, Python
8 Comments
My solution to the counting sets challenge
A few days ago, I wrote up a challenge – to count the number of sets a given set is contained in. In the comments, I touched briefly on the original problem from which the challenge was created, and I’ll … Continue reading
Posted in Challenges, computer science, Python
Tagged challenge, Programming, Sets, Solution
5 Comments
Fractals in 10 minutes No. 6: Turtle Snowflake
I didn’t write this one, but I found it’s simplicity and availability so compelling, I couldn’t just not write about it. In a reddit post from a while ago, some commenter named jfedor left the following comment: A little known … Continue reading
Small Python Challenge No. 4 – Counting Sets
This is a problem that I encountered a short while ago. It seems like it could be easily solved very efficiently, but it’s not as easy as it looks. Let’s say that we are given N (finite) sets of integers … Continue reading
Computing Large Determinants in Python
Story: For my seminar work, I had to calculate the determinant of a large integer matrix. In this case, large meant n>=500. You might say that this isn’t very large and I would agree. However, it is large enough to … Continue reading
Posted in Algorithms, computer science, Math, Programming, Python, Research
Tagged Float, Fractions, Matrix Determinants, Numerical Analysis, Programming, Python
2 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 highschool, 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
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