83 points · by theocs · 11y ago · 10 comments
"compiling at runtime is the basis of Lisp's use as an extension language in programs like Emacs"
This Excel capability is an extremely cool demonstration of where ClojureScript's self-hosting capability can take us. Seems like there's no stopping it. Kudos to Christian Felde!The real question is how do you sell the ClojureScript "macro" to an end user that, ultimately, doesn't care how the answer in the spreadsheet is arrived at, so long as it is correct.
You can bind to arbitrary data regions using named items. For example:
cljs.user=> (add-binding-named-item "A1:B2" "binding-id" println)
nil
{:rc 2, :cc 2, :type matrix, :id binding-id}
cljs.user=> (get-binding-data "binding-id" println)
nil
{:rc 2, :cc 2, :type matrix, :id binding-id, :data [[1 2] [3 4]]}
cljs.user=> (set-binding-data! "binding-id" [[2 3] [4 5]])
I wouldn't mind adding a blocking variant of these functions, and use async internally to make that happen. But, not there yet.