I've come to appreciate `var` and `let` blocks in Nim that I believe come from Pascal syntax:
let
mnist = load_mnist(cache = true)
# Training data is 60k 28x28 greyscale images from 0-255
# Change shape from [N, H, W] to [N, C, H, W], with C = 1 (unsqueeze). Convolution expect 4d tensors
X_train = ctx.variable x_train.unsqueeze(1)
...
However unlike Pascal syntaxes (and Ada), Nim remains less verbose and feels less "straight jacketed" for it. It's odd but while it encourages safer code than C its doesn't feel quite as stifling. You can do most any pointer manipulations you might need, but using builtin functions (i.e. `addr` or `unsafeAddr`) rather than symbol operators.1: https://news.ycombinator.com/item?id=25242926 2: https://github.com/mratsim/Arraymancer/blob/master/examples/...