Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t figure out how to run Kenzo #127

Open
guillaumebrunerie opened this issue Oct 3, 2016 · 3 comments
Open

Can’t figure out how to run Kenzo #127

guillaumebrunerie opened this issue Oct 3, 2016 · 3 comments

Comments

@guillaumebrunerie
Copy link

I’m trying to run Kenzo but it doesn’t seem to work. This is probably an issue with me rather than with Kenzo, as I don’t know much about Lisp (in particular how packages/systems/modules work) but I would welcome any help.

I have installed SBCL (locally, as I do not have admin rights), cloned the Kenzo repository, and simlinked Kenzo to ~/.local/share/common-lisp/source/Kenzo.
Now, from the command line I run sbcl, then in the prompt (require :asdf) and then (require :kenzo). The first time it did a lot of things, and now it only returns
("abbreviations" "macros" "various" "classes" "combinations" "chain-complexes" "chcm-elementary-op" "effective-homology" "homology-groups" "searching-homology" ...)
I guess that’s ok, and that it has been loaded.

But now how do I use it?
I tried running the first line of 00_Overview.ipynb in the sbcl prompt, namely (def m23 (moore 2 3)), but it fails with the following error:

* (def m23 (moore 2 3))
; in: DEF M23
;     (DEF M23 (MOORE 2 3))
; 
; caught STYLE-WARNING:
;   undefined function: DEF
; 
; caught WARNING:
;   undefined variable: M23

;     (MOORE 2 3)
; 
; caught STYLE-WARNING:
;   undefined function: MOORE
; 
; compilation unit finished
;   Undefined functions:
;     DEF MOORE
;   Undefined variable:
;     M23
;   caught 1 WARNING condition
;   caught 2 STYLE-WARNING conditions

debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "main thread" RUNNING {10028DE963}>: The variable M23 is unbound.

If I try (moore 2 3), I get
debugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD "main thread" RUNNING {10028DE963}>: The function COMMON-LISP-USER::MOORE is undefined.

I also tried things like (kenzo:moore 2 3) but then I get
debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR in thread #<THREAD "main thread" RUNNING {10028DE963}>: Package KENZO does not exist.Stream: #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {1000189D43}>

What am I missing?
Thanks!

@gheber
Copy link
Owner

gheber commented Oct 11, 2016

Kenzo defines a package called "CAT". You should call cat-init before doing anything else. For example,

C:\Users\gheber>sbcl --eval "(ql:quickload :kenzo)"
This is SBCL 1.3.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

WARNING: the Windows port is fragile, particularly for multithreaded
code.  Unfortunately, the development team currently lacks the time
and resources this platform demands.
To load "kenzo":
  Load 1 ASDF system:
    kenzo
; Loading "kenzo"

* (in-package "CAT")

#<PACKAGE "CAT">
* (cat-init)

---done---
* (def m23 (moore 2 3))

[K1 Simplicial-Set]
*

Does that work for you?

The Jupyter notebook hides some of the initialization work.

@guillaumebrunerie
Copy link
Author

It works, thanks!
Maybe that should be added to the README file?

@gheber
Copy link
Owner

gheber commented Oct 12, 2016

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants