google / lisp-koans

Common Lisp Koans is a language learning exercise in the same vein as the ruby koans, python koans and others. It is a port of the prior koans with some modifications to highlight lisp-specific features. Structured as ordered groups of broken unit tests, the project guides the learner progressively through many Common Lisp language features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLOS package locked under clisp

seylerius opened this issue · comments

A fresh installation of clisp, and a freshly pulled lisp-koans, do not play well together. I get this result:

% clisp contemplate.lsp 
WARNING: INTERN("RACECAR"): #<PACKAGE CLOS> is locked
         Ignore the lock and proceed
*** - An array has been shortened by adjusting it while another array was
      displaced to it.

Any advice?

Running under sbcl works fine, oddly enough.

I'm having exactly the same issue under identical circumstances. Fresh clisp and lisp-koans on OS X, if it matters.

After reading some CLISP docs and glancing through contemplate.lsp, I made some progress after spotting this bit of code:

(defun load-koan-group-named (koan-group-name)
  ;; Creates a package for the koan-group based on koan-group-name.
  ;; Loads a lisp file at *koan-dir-name* / koan-group-name .lsp
  ;; Adds all the koans from that file to the package.

clos.lsp clashes with the built-in CLOS package. I renamed clos.lsp to cclos.lsp and modified .koans accordingly. I was able to run contemplate.lsp albeit with the following warnings:

WARNING: Replacing method
          #<CLOS:STANDARD-READER-METHOD
            (#<STANDARD-CLASS VALUE-WITH-ACCESS-COUNTER>)>
         in #<STANDARD-GENERIC-FUNCTION GET-VALUE>
WARNING: Replacing method
          #<CLOS:STANDARD-WRITER-METHOD
            (#<BUILT-IN-CLASS T> #<STANDARD-CLASS VALUE-WITH-ACCESS-COUNTER>)>
         in #<STANDARD-GENERIC-FUNCTION SET-VALUE>
WARNING: Replacing method
         #<CLOS:STANDARD-READER-METHOD (#<STANDARD-CLASS SHAPE>)> in
         #<STANDARD-GENERIC-FUNCTION GET-KIND>
WARNING: Replacing method
         #<CLOS:STANDARD-READER-METHOD (#<STANDARD-CLASS COLOR>)> in
         #<STANDARD-GENERIC-FUNCTION GET-KIND>
Thinking about ASSERTS
    TEST-TRUE-OR-FALSE requires more meditation.

You have not yet reached enlightenment ...
  A koan is incomplete.

Please meditate on the following code:
   File "koans/asserts.lsp"
   Koan "TEST-TRUE-OR-FALSE"
   Current koan assert status is "(INCOMPLETE INCOMPLETE)"

You are now 0/170 koans and 0/26 lessons closer to reaching enlightenment

As the associated Pull Request has been merged it seems that this issue could be closed, no?