-
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: computer science
Solution for the Random Selection Challenge
A few days ago, I wrote up two small Python Challenges. Several people have presented solutions for the first challenge, and I also posted my solution in the comments there. However, the second challenge remained unsolved, and I will present … Continue reading
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 Compilation, fuzzing, homework, Python, Testing
Leave a 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 Compilation, homework, VM
Leave a comment
Small Python Challenge No. 2 – LRU Cache
Caching is easy. Consider the cache I used to optimize the recursive spring: class _NotInDict(object): pass _NotInDict = _NotInDict() def cached(func): cache = {} def wrapper_func(*args): prev_result = cache.get(args, _NotInDict) if prev_result is _NotInDict: result = func(*args) cache[args] = result … Continue reading
Posted in Algorithms, Challenges, computer science, Programming, Python, Utility Functions
Tagged challenge, LRU-cache, Python
2 Comments
A classic programming challenge, in Python
It has become a tradition for computer scientists to create various self referential ‘strange loops’. Traditions such as writing a compiler in the language it compiles are actually quite useful – and also very interesting. This tradition also branched to … Continue reading
Posted in Challenges, computer science, Programming Philosophy, Python
Tagged challenge, Python, Quine
6 Comments
Small Python Utility Functions 2
So I finished some time ago the first assignment in Numerical Analysis. Ahh, such a joyous occasion. Why you ask? Well, because I wrote the programming assignments in Python, and not some annoying made-up pseudo-code language. I know, I know, … Continue reading
Pagerank recommends movies
So how was your Yom Kippur? After Yom Kippur ended, I sat down to write something that was nagging me for quite some time. I wanted to see what pagerank had to say about movies. I’ve always liked to picture … Continue reading
Posted in Algorithms, computer science, Math, Programming, Python
Tagged Algorithm, Graph, IMDBPy, Pagerank
1 Comment
Browser visibility-security and invisibility-insecurity
Formal languages have a knack of giving some output, and then later doing something completely different. For example, take the “Halting Problem“, but this is probably too theoretical to be of any relevance… so read on for something a bit … Continue reading
Posted in computer science, Design, Programming, Programming Philosophy, Security
Tagged Security
Leave a comment
Origami crease-patterns are NP-complete
After talking about it with someone I met, I looked it up, and it does seem to be so. There is of-course a lot of research on the subject that I didn’t yet get the chance to read, but I … Continue reading
Posted in computer science, Math, Origami, Protocols
Tagged computer science, crease patterns, Origami
1 Comment