cbaggers / cepl

Code Evaluate Play Loop
BSD 2-Clause "Simplified" License
860 stars 52 forks source link

MacOSX 10.14 Mojave CCL cepl still broken #350

Open Devon7 opened 4 years ago

Devon7 commented 4 years ago

See (ql:quickload "varjo") ; infinite loop stack overflow crash #239

$ ccl --no-init --eval '(load "~/quicklisp/setup.lisp")' --eval '(ql:quickload "cepl")' To load "cepl": Load 1 ASDF system: cepl ; Loading "cepl" ................................

Error: Stack overflow on value stack. While executing: CCL::NX-LEXICAL-FINFO, in process listener(1). Type :GO to continue, :POP to abort, :R for a list of available restarts. If continued: Skip evaluation of (ql:quickload "cepl") Type :? for other options. 1 > (list :software (list (software-type) (software-version)) :implementation (list (lisp-implementation-type) (lisp-implementation-version)) :machine (list (machine-type) (machine-version))) (:SOFTWARE ("Darwin" "18.7.0") :IMPLEMENTATION ("Clozure Common Lisp" "Version 1.12 (v1.12-25-g595a5cf) DarwinX8664") :MACHINE ("x86_64" "MacBookAir7,2")) 1 >

nklein commented 4 years ago

It seems to succeed on Catalina for me. But, I also have my own compiled version of CCL. So, maybe not helpful.

    % ccl --no-init --eval '(load "~/quicklisp/setup.lisp")' --eval '(ql:quickload "cepl")'
To load "cepl":
  Load 1 ASDF system:
    cepl
; Loading "cepl"

Clozure Common Lisp Version 1.12-dev (v1.12-dev.4) DarwinX8664

For more information about CCL, please see http://ccl.clozure.com.

CCL is free software.  It is distributed under the terms of the Apache
Licence, Version 2.0.
? (list (software-type) (software-version))
("Darwin" "19.6.0")
? (list (lisp-implementation-type) (lisp-implementation-version))
("Clozure Common Lisp" "Version 1.12-dev (v1.12-dev.4) DarwinX8664")
? (list (machine-type) (machine-version))
("x86_64" "MacBookAir5,2")
metayan commented 4 years ago

This issue appears in newer CCL and is handled in https://github.com/cbaggers/fn/issues/5 as investigated and explained in https://github.com/Clozure/ccl/issues/270

Devon7 commented 4 years ago

CEPL loads under CCL with this patch to ~/quicklisp/dists/quicklisp/software/varjo-release-quicklisp-6150bdcb-git/src/vari.glsl/variables-from-spec.lisp

--- variables-from-spec.lisp.~1~    2020-07-16 07:24:34.000000000 -0700
+++ variables-from-spec.lisp    2020-09-16 14:59:33.000000000 -0700
@@ -1,5 +1,5 @@
 (in-package :vari.glsl)
-(in-readtable fn:fn-reader)
+;; (in-readtable fn:fn-reader)

 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defvar *definitions-missing-from-glsl-spec*
@@ -9,14 +9,14 @@
       )))

 (defmacro populate-vars ()
-  (let ((vars (mapcar λ(destructuring-bind
+  (let ((vars (mapcar (lambda (_) (destructuring-bind
                              (&key lisp-name name type place-p versions
                                    (stage t) &allow-other-keys) _
                          (declare (ignore versions))
                          (assert lisp-name)
                          (let* ((lisp-name (intern lisp-name :vari.glsl))
                                 (lisp-type (parse-gl-type-name type)))
-                           `(,stage ,lisp-name ,name ,lisp-type ,place-p)))
+                     `(,stage ,lisp-name ,name ,lisp-type ,place-p))))
                       (append *definitions-missing-from-glsl-spec*
                               glsl-spec:*variables*))))

@@ -25,7 +25,7 @@
          ',(mapcar (lambda (stage-name stage-type-name)
                      (cons stage-type-name
                            (mapcar #'rest (remove-if-not
-                                           λ(eq stage-name _)
+                          (lambda (_) (eq stage-name _))
                                            vars :key #'first))))
                    (cons t *stage-names*)
                    (cons t *stage-type-names*)))
cbaggers commented 3 years ago

Thanks for taking care of this while I've been away folks! I'll try get some time to get this is this next week