Representation clauses in Ada

""

A record_representation_clause specifies the storage representation of records and record extensions, that is, the order, position, and size of components (including discriminants, if any). ARM12

They are very useful when interfacing with hardware. Doing this in C quickly turns into a mess of bitwise or'ing and bitshifting certain values by certain widths which might be fast, but is hard to read. Here I will try to show how this can be done in a better way in Ada, using representation clauses.

more ...

Pycrypto on FreeBSD

If pycrypto fails building for you with an error like:

# src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found
#
# # include <gmp .h>
#
# ^
#
# 1 error generated.
#
# error: command 'cc' failed with exit status 1</gmp>

You need to run these two commands to show clang where to look ...

more ...