4 ms·
>All that remains is a static C program. That what i mean in "verbose cryptic C". Machine-generated C is huge and hard to comprehend in its entirety, with recur
by FrozenVoid 9y ago
>All that remains is a static C program.
That what i mean in "verbose cryptic C". Machine-generated C is huge and hard to comprehend in its entirety, with recursion and continuations practically impossible.
It is just a step above from dis-assembled programs. C isn't some magic format that prevents bugs or ensures safety(in fact opposite of that, the larger the code the more bugs it will produce).
- lispm 9y agoWhich Lisp compiler output to C have you seen?
- FrozenVoid 9y agoMany Lisp and Scheme compilers have C output. Embeddable Common Lisp https://common-lisp.net/project/ecl/ https://common-lisp.net/project/ecl/ GNU Common Lisp http://www.gnu.org/software/gcl/ http://www.gnu.org/software/gcl/ ManKai Common Lisp https://common-lisp.net/project/mkcl/ https://common-lisp.net/project/mkcl/ Clasp (C++ interop )https://github.com/drmeister/clasp https://github.com/drmeister/clasp ThinLisp https://sourceforge.net/projects/thinlisp/ https://sourceforge.net/projects/thinlisp/ https://github.com/aoh/owl-lisp https://github.com/aoh/owl-lisp Bigloo Scheme CHICKEN Scheme Gambit Scheme https://github.com/justinethier/cyclone https://github.com/justinethier/cyclone RScheme SCM Stalin
- lispm 9y agoWhose output have you seen?
- FrozenVoid 9y agoAn example is GNU common lisp Run the below fizzbuzz with /usr/bin/gcl -batch -c-file -compile $1(below file) (declaim (optimize (safety 3) (debug 0) (speed 3))) (defun is-mult-p (n multiple) (= (rem n multiple) 0)) (defun fizzbuzz (&optional n) (let ((n (or n 1))) (if (> n 100) nil (progn (let ((mult-3 (is-mult-p n 3)) (mult-5 (is-mult-p n 5))) (if mult-3 (princ "Fizz")) (if mult-5 (princ "Buzz")) (if (not (or mult-3 mult-5)) (princ n)) (princ #\linefeed) (fizzbuzz (+ n 1)))))))