add lisp packages

This commit is contained in:
2020-12-05 21:29:49 +01:00
parent 85e20365ae
commit a6e2395755
7272 changed files with 1363243 additions and 0 deletions

28
lisp/ess/etc/ESSR/R/mpi.R Normal file
View File

@@ -0,0 +1,28 @@
## simple Message Parsing Inerface
.ess_mpi_send <- function(head, ...){
dots <- lapply(list(...), function(el) {
if (is.null(el)) "nil"
else if (is.logical(el)) {if (el) "t" else "nil"}
else as.character(el)
})
payload <- paste(dots, collapse = "")
cat(sprintf("_%s%s\\", head, payload))
}
.ess_mpi_message <- function(msg){
.ess_mpi_send("message", msg)
}
.ess_mpi_y_or_n <- function(prompt, callback = NULL){
.ess_mpi_send("y-or-n", prompt, callback)
}
.ess_mpi_eval <- function(expr, callback = NULL){
.ess_mpi_send("eval", expr, callback)
}
.ess_mpi_error <- function(msg) {
.ess_mpi_send("error", msg)
}