A command line image reader

After some semi-serious posts about prime numbers and factorization, now it’s time to something lighter, related with the C ASCII webcam post. Hacking NASA… Suppose you are hacking NASA website using HTML. Obviously from the textual browser lynx since you are an hacker and you only use Linux terminal. Even better, in the order, you… Continue reading A command line image reader

C code optimization of Matrix Multiplication – Part 2

Welcome in the second part of this first journey in C code optimization (first because I hope to show also FFT). We started in this post with several optimization techniques applied to the Matrix Multiplication, in particular: The result was interesting, since in the graph we could see the impact of the various levels of… Continue reading C code optimization of Matrix Multiplication – Part 2

Trial Division and Eratosthene’s Sieve

Let’s suppose you change telephone number. Almost surely the first thing you think is “is my new phone number prime?”. Since the number is small the naive method “let’s try to divide the phone number by all numbers less than it” is good (at least if you do it with the computer). You can improve… Continue reading Trial Division and Eratosthene’s Sieve

The Matrix Optimized: C code optimization of Matrix Multiplication – Part 1

I want to share an in depth experiment in code optimization the I did at least ten year ago during my PhD in high performance computing. I offer you to choice between two options: read this post or ignore this post. If you choose to skip this post your mind will stay safe, tomorrow you’ll… Continue reading The Matrix Optimized: C code optimization of Matrix Multiplication – Part 1

C ASCII webcam

In this article we’ll see how to code an ASCII webcam in C using Open CV, prompting the output in a terminal. Here you also can find a sibling article to code the ASCII webcam in javascript in a web page. The previous article already address the problem of how to transform colors in characters,… Continue reading C ASCII webcam