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.

Monday, June 13, 2016

How to build a client-library in a programming language of your choice.

Recently I've finished the alpha version of a library-client in Rust for IMAP protocol. It's available at github at

If you wanted to create the same kind of client library for another protocol, say, FTP, how would you go about it? Here's the steps.

1) Pick a programming language.

2) Find the libraries that have already been implemented for FTP in this language. Examine them. Are they big? How much time will need to build your library? Can you beat them?

3) Do the same thing but for the libraries in other programming languages.

4) Grab the specification of FTP. Usually most of the network specifications can be found at After you've gotten it, read it.

Wednesday, May 25, 2016

Payoneer sends http links instead of https

When loading money from Payoneer to your card, it sends a link with http instead of https.

However, the https link also works. That is, just copy an http link into a buffer and replace http with https and you're all set.

Saturday, May 21, 2016

I've built

I've built and launched my travel blog in Clojure/Postgresql, it's available at It's not finished yet, but already functioning. 

Sunday, May 15, 2016

How I tried to deploy an Elixir/Phoenix framework web app and didn't manage to do that

Lately I've been trying to deploy a simple Elixir/Phoenix application-blog to a Digital Ocean server and it hasn't panned out. Over the course of a few days I hasn't managed to do that, although, I did feasibly deploy Haskell and Rust applications a little while ago and that took me less than a day and which I also was doing for 1st time.

With Phoenix it was different. I've had bunch of errors deploying my application with Exrm and if it wasn't one thing, it was another.  I'd fix the bugs but then others would pop up. Besides, the documentation on their official website and in the blogs is getting outdated fast.

The straw that broke the camel's back was a bug in a dependency which I got on a server but didn't have locally. Locally, however, the application worked.

Now I'm thinking of switching back to Clojure, Haskell or Rust for this project and returning to Elixir/Phoenix later when it becomes more mature because now, version 1.1.4, it's a disaster which catastrophic consequences. 

Tuesday, May 10, 2016

When working on some project, there's advice acquired by experience which I try to follow. I've mentioned it before. And it is: when there're multiple choices of how to implement something and you don't know which one is better, choose either the simplest one or, of they both are about the same, choose anyone without too much thinking.

Later you might change your mind and choose another option or improve what you've chosen or, possibly, get rid of it. And that's ok because what matters mostly is speed.