Sunday, July 17, 2016

Correlation between lazy evaluation in programming and quantum mechanics

Yeahhh! I understand! The essence of quantum mechanics is that the location of a particle is lazy in the sense that it's always undefined. Until we force it to change its state and become known. And action forcing it to change its state from anything to a certain one is measurement or observation.

Now, compare it to laziness in programming and in particular to lazy evaluation in Haskell: the size of a lazy array is undefined and it can be anything.  Only when a certain number of elements is requested from it, it gets evaluated and becomes certain. In other words, when we observe it, it changes its state.  Isn't it beautiful?

Thursday, July 14, 2016

Update on my JWT library in Rust "frank_jwt"

I've updated my Rust library called frank_jwt and now it supports RS256, 384 and 512 signing algorithms. For signing a message a full file name of private *.pem key should be provided. Similarly, for decoding a message it expects a full path of a public *.pem key.