Handling midi in Debian| Open the Black Box
This script will compute the days between dates.| Open the Black Box
While I typically use a remote shell, occasionally I’ll need use a GUI remotely. On the remote machine, create the remote server:| Open the Black Box
I like to use markdown for my course syllabus, since it’s quick and easy, and allows easy use of git to make and track updates.| Open the Black Box
Use of preprocessor macros is full of pitfalls.In fact, its user manual includes a section called “Macro Pitfalls”.One of these pitfalls revolves around operator precedence.Operator precedence problems happen when the expectations about pass-by-value, the default for C functions, are applied to function-like macros.Function-like macros are pass-by-name; the arguments are textually substituted in the macro body.This is especially confusing because both C and preprocessor functions have the...| Open the Black Box
My graduate work on SuperC made made me way too familiar with the C preprocessor’s ins and outs, more than I ever could have imagined (or wanted).SuperC’s novel preprocessing and parsing algorithms let you parse a program without having to run the preprocessor first.Solving this challenge exposed me to interesting quirks of the preprocessor and strange usage patterns that appear in the wild.I’d like to share these and bring attention to this underrated aspect of compilers, hopefully pro...| Open the Black Box
A feature of the preprocessor little known outside of hardcore C programmers is token pasting (also called concatenation). As the name suggests, token pasting lets the programmer take any two tokens in the source code and turn them into a brand new token. Developers can and do use token pasting in all sorts of clever ways. The manual for the preprocessor provides an example of using token pasting to generate code from boilerplate:| Open the Black Box