Re:Valtan: Common Lisp to JavaScript Compiler
by bachmeier on Friday April 03, 2020 @06:52PM
(#22774706)
Thanks. I wasn't aware of showTree.
Most R users don't realize everything in R can be written as a function, due to its Scheme roots. Example:
if (3 > 2) { print("hello") }
can be rewritten with backticks on the if:
`if`(3 > 2, print("hello"))
If the first argument is false, you need a third argument
`if`(3 < 2, print("hello"), print("go away"))
Essentially, the backticks replace some parens you'd use in Scheme, and then you can add some alternative syntactic sugar to write in Algol style.
Re:Valtan: Common Lisp to JavaScript Compiler
by disgruntledphd2 on Saturday April 04, 2020 @05:18PM
(#22781593)
Yup.
If you look in the source for R (in C), you will note that all of the data structure names end with Sexp.
https://stat.ethz.ch/R-manual/R-patched/library/codetools/ht...
http://dan.corlan.net/R_to_common_lisp_translator/