Draft

One mystery solved

Draft of 2016.08.03

May include: GPAIlearning in public&c.

Continued from Mutating Register Machines

Well, I’ve figured out what the mysterious Clojure function was, which concerned me so much when I saw it in the printout of my working Artificial Chemistry. The -' function is rendered, when you print it with println, as __SINGLEQUOTE:

user=> (println -')
#object[clojure.core$__SINGLEQUOTE_ 0x74815841 clojure.core$__SINGLEQUOTE_@74815841]
nil

Why would this be?

Because Clojure innocently converts every hyphen in a function name into an underscore automatically for you. That’s why

user=> (defn foo-bar [] 9)
#'user/foo-bar
user=> (println foo-bar)
#object[user$foo_bar 0x26251361 user$foo_bar@26251361]
nil
user=> (println +')
#object[clojure.core$_PLUS__SINGLEQUOTE_ 0x247c5a03 clojure.core$_PLUS__SINGLEQUOTE_@247c5a03]
nil

The name of the function -' is rendered as __SINGLEQUOTE.

More soon!