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

In som test: using relative pathname and a string as directory #42

Open
Yehouda opened this issue Apr 3, 2020 · 0 comments
Open

In som test: using relative pathname and a string as directory #42

Yehouda opened this issue Apr 3, 2020 · 0 comments

Comments

@Yehouda
Copy link

Yehouda commented Apr 3, 2020

in som/examples/test.lisp, test:

  1. The argument filename default to a relative pathname, which works only if the current directory happens to be the right one. It needs to use asdf:system-relative-pathname to make sure it always gets it.

  2. The last argument to do-som-by-filename is a string, that ends being passed to make-pathname as the directory argumnet. But when make-pathname gets a string as a directoyr, it must be a top level directory, so it gets an error. It needs to pass a proper directory, for example
    (pathname-directory (asdf/system:system-relative-pathname "clml.som" "examples/")).

I change the definiton of test as below, and then it ran without a problem:

(defun test (&key (filename (asdf/system:system-relative-pathname
"clml.som" "examples/animal.dat")))
(declare (optimize (speed 3)))
(do-som-by-filename
filename
"hexa"
"gaussian"
24 ;; x size of map
16 ;; y size of map
123 ;; random seed
10000 ;; total length of study
5 ;; alpha x 100
2400 ;; radius x 100
10
(pathname-directory
(asdf/system:system-relative-pathname "clml.som" "examples/"))))

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

1 participant