Category Archives: Programming

Writing binary data with Verilator

So you are simulating a verilog design with Verilator and you want to output part of your design data to a file in binary format. (Example you’re outputting an image.) Continue reading

Posted in Programming | Tagged , , | Leave a comment

Printing on one line with Python

You might be used to using sys.stdout when you want to print multiple items on one line with Python. Did you know you can do the same thing with the print statement? Continue reading

Posted in Programming | Tagged | Leave a comment

Fun with C++11 Lambdas

Basic lambda syntax and usage in c++11. Illustrate the difference between context parameters passed by reference and value. Continue reading

Posted in Programming | Tagged , | Leave a comment

git diff with color words

I had these files with very very long lines of text on each line. It was paragraphs worth of words but not word wrapped. These files were stored in a git repository. Now and then, someone would change a word. … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Quick convert raw g711 uLaw audio to a .au file

I had reason to playback some raw g.711 audio data. I made the following script to convert the data to a .au file that is playable. From the AU file spec.. which is way simple by the way: You just … Continue reading

Posted in Programming | Tagged , , , , | 1 Comment

Rendering to a texture with iOS 5 texture cache api.

There are a couple examples of how to take image input, perhaps from the iPhone camera, or from your own image, fast map those image to an OpenGl texture, and then render them with an OpenGL shader. This post is … Continue reading

Posted in Programming | Tagged , , , , , | 60 Comments