Monthly Archives: January 2008

Manually fuzzing my own compiler

As I mentioned before, I had to write a compiler for simplified CPL. An obvious requirement was that the compiler generate correct code. A less obvious requirement, but important none-the-less, was that after a syntax error, the compiler will keep … Continue reading

Posted in Compilation, computer science, Programming, Projects, Python | Tagged , , , , | Leave a comment

A second look at the dragon fractal

At first when I drew the (twin)dragon fractal, I had a small bug. I used the base 1+i instead of 1-i. This also generated a very similar looking beast. Thinking about that for a while, made me curious. Just like … Continue reading

Posted in Fractals, Graphics, Programming, Python | Tagged , , , , | 1 Comment

Writing a Quad Interpreter

My compilation homework is writing a compiler from simplified CPL to Quad, a made up assembly language. The compiler was going well, and when it started to emit code, I naturally wanted to test it. The problem is, I work … Continue reading

Posted in Assembly, Compilation, computer science, Personal, Programming, Python | Tagged , , | Leave a comment

Folding an origami swan

I believe the swan is one of the most common origami folds. I think that almost every origami book has instructions for a swan. Well, I was playing around with the standard crane (the wing flapping bird), and came upon … Continue reading

Posted in Origami | Tagged , | Leave a comment

New theme

I usually try to avoid meta posts, and I don’t like Ars Poetica. (Maybe I do like it in programs though, but only to a limited extent.) However, as you can probably see, I’ve updated the theme of the blog. … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Fractals in 10 minutes no. 3 – The Dragon

When first I looked through the pages of the book “Hacker’s Delight”, I found myself looking at the chapter about bases. There I learned a very curious fact – with the digits of 0,1 and the base of -2, you … Continue reading

Posted in Fractals, Math, Programming, Python | Tagged , , , , | 3 Comments

Using zpint in Cryptography Homework

Originally, I wrote zpint to help me with my algebric structures homework. For those not familiar with it, it allows you to do computations modulo p the same way you do for ints. Not surprisingly, I found myself using it … Continue reading

Posted in Cryptography, Math, Programming, Python | Tagged , , | Leave a comment

New origami bug fold

While playing a little bit with paper, I started playing with the water bomb base. I then moved into the frog-base (I think) whice has some potential for bugs: 4 long limbs, elongated body, and four shorter flaps. Here are … Continue reading

Posted in Origami | Tagged , | 2 Comments

LRU cache solution: a case for linked lists in Python

The reason I put up the LRU cache challenge up, was that I couldn’t think of a good solution to the problem without using linked lists. This has been pointed to by Adam and Erez as well. Adam commented on … Continue reading

Posted in Challenges, Design, Programming, Python | Tagged , , | 3 Comments