Emmy and the EurOffice Spreadsheet
EurOffice, the AGPL licensed collaborative document editing software which runs its spreadsheets in the browser, can be extended via plugins using JavaScript.
Emmy, the Clojure Algebra System, compiles to ClojureScript and is included in scittle-kitchen.
The animation below shows a spreadsheet using the EurOffice-Emmy-plugin.
EurOffice is a fork of OnlyOffice. The Emmy-plugin is based on its Html-plugin. The same Clojure calculations that are demonstrated in the spreadsheet are also shown below. They are explained in more detail in the prologue of the civitas-hosted Emmy book.
(define ((L-harmonic m k) local)
(let ((q (coordinate local))
(v (velocity local)))
(- (* 1/2 m (square v))
(* 1/2 k (square q)))))#'mentat-collective.emmy.helloeuroffice/L-harmonic(define (proposed-solution t)
(* 'a (cos (+ (* 'omega t) 'phi))))#'mentat-collective.emmy.helloeuroffice/proposed-solution(->infix
(simplify
(((Lagrange-equations (L-harmonic 'm 'k))
proposed-solution)
't)))"- a m ω² cos(ω t + φ) + a k cos(ω t + φ)"Of course the EurOffice plugin processes not just Emmy but any Scittle-Clojure code.
At this point in time, while obviously possible, the local installation of EurOffice and subsequent registration of plugins is rather involved and not for the novice. It is described in the Readme. Nonetheless, my hope is that the evolving EurOffice stack will eventually provide an easy to use local plugin system. The Emmy-plugin will then be distributed to any EurOffice user as just a single easy-to-register zip-file.