Skip to content

Instantly share code, notes, and snippets.


The following was sent to the JACL e-mail announcement list on 2021-02-26.

Hello everyone, and a belated happy 2021 to you! I hope your year has been off to a good start.

It's been almost a year since JACL became public, and nearly as long since any other announcement or release, so I thought to share three major related educational and design developments. The project is very much alive, just mostly in my head :-)

First, while I haven't made significant tangible progress on the JACL compiler or runtime since last year, I have continued to research and study implementation techniques. I have prototyped several schemes for efficient and JavaScript-friendly multiple-value returns, consuming relevant literature (mostly from the Scheme community) along the way. I have also studied and experimented with CLOS, and to speculate about how best to support a maximum of CLOS functionality without compromising JACL's calculated relationship with the JavaScript platform. One interes

View mv.lisp
(defconstant mv-limit 20)
(defparameter *mv-expected* 1)
(defparameter *mv* (make-array mv-limit))
(defun mv (&rest vals)
(do ((i 0 (1+ i))
(vs vals (cdr vs)))
((or (eql i *mv-expected*) (null vs))
View fb.clj
(defn fizzbuzz [n]
(let [fb (str ({0 "fizz"} (mod n 3))
({0 "buzz"} (mod n 5)))]
({"" (str n)} fb fb)))
View permute.js
const removeAt = (xs, i) => xs.filter((x, j) => j !== i);
const permute = xs => xs.length
? xs.flatMap((x, i) => permute(removeAt(xs, i)).map(ys => [x, ...ys]))
: [[]];
View mv.lisp
(defconstant mv-limit 20)
(defparameter *mv-expected* 1)
(defparameter *mv* (make-array mv-limit))
(defun mv (&rest vals)
(do ((i 0 (1+ i))
(vs vals (cdr vs)))
((or (eql i *mv-expected*) (null vs))
View mv.clj
(def mv-limit 20)
(def ^:dynamic *mv-arr*)
(def ^:dynamic *values-expected* 1)
(defn values [& vals]
(when (thread-bound? #'*values-expected*)
(dotimes [i (set! *values-expected*
(min *values-expected* (count vals)))]
Build wiki.html with:
emacs --batch -f org-html-export-to-html --kill
#+OPTIONS: toc:nil
#+BEGIN_SRC emacs-lisp :exports none
(defun hyperorg/sort ()
(goto-char (point-min))
(goto-char (1- (search-forward "*")))
View promise_test.R
adderModule <- function(id, sleepFor, n) {
moduleServer(id, function(input, output, session) {
output$sum <- renderText({

testServer QA Notes

testServer() is a new function for testing the behavior of reactives inside of Shiny server functions and modules.

Server and module functions

Server functions define the reactive behavior of Shiny applications. Together with UI functions, server functions define a Shiny application. Server functions are R functions such as the following:

server <- function(input, output, session) {
View boot.lisp
;; in JACL package; use JACL from COMMON-LISP and switch to COMMON-LISP
(%let ((cl-pkg (\. (%js "Package") (|get| (\. '#:common-lisp |name|)))))
(\. cl-pkg (|usePackage| cl:*package*))
(%setq cl:*package* cl-pkg))
(\. *package* (|exportSymbol| (\. 'defmacro |name|)))
(%js "(~{}.setMacro().fvalue = ~{})"
(%lambda (env form name params &rest body)
;; TODO Use %PROGN instead of %LET