Author Archives: cloudnthings

An array of pointers or a pointer of arrays?

By | April 7, 2016

There is a very subtle difference in the following: int *myarray[10] v’s int (*myarray)[10] The first declaration is interpreted as an array of 10 integers, that are pointers. That is you have 1 array holding 10 pointers that are of type integer. The square brackets have a higher precedence so the myarray[10] gets defined first.… Read More »

Why is the GNU software manual so hard to read?

By | March 11, 2016

I was researching on  what “dnl” meant within a configure.ac file and my Google search showed results from http://www.gnu.org/software/m4/manual/m4-1.4.14/html_node/Dnl.html. Thinking this was the authoritative source, upon reading, I couldn’t for the life of me understand it. After searching some more, it was explained very clearly and succinctly at Stack Overflow of all places. http://stackoverflow.com/questions/3371239/autoconf-dnl-vs In configure.ac, lines commented with… Read More »

How to view va_list variables via gdb

By | March 7, 2016

Viewing variable values via gdb of a va_list is not as straight forward as gdb> p myvar. It requires a few extra steps not only in execution but in understanding. Read on if you want to know how va_* works and how to view the underlying variables. Step 1: The first step is to understand… Read More »

How 59 days was calculated from the Mastering Bitcoin book?

By | March 4, 2016

For some reason I was re-reading a particular section in a book called Mastering Bitcoin by Andreas M. Antonopoulos (http://chimera.labs.oreilly.com/books/1234000001802) and came across this paragraph: This means that a valid block for height 277,316 is one that has a block header hash that is less than the target. In binary that number would have more than the… Read More »

What’s in a block?

By | February 26, 2016

Introduction If you’ve spent some time reading up on the fundamentals of bitcoins and the block chain but felt it was way over your head, here it is from another angle. Reading the likes of: https://en.bitcoin.it/wiki/Block https://en.bitcoin.it/wiki/Transaction https://en.bitcoin.it/wiki/Block_hashing_algorithm https://en.bitcoin.it/wiki/Protocol_documentation can be a bit daunting so I’ve created some pretty pictures instead. The secret sauce at… Read More »