Code works when run as a file, but not from REPL

Sounds a bit like Initialization of R fails on julia 1.1