freenode/#abcl - IRC Chatlog
Search
13:36:21
pjb
letest1: if as I assume, it's a String, then interpreter.eval must be reading the string into a sexp. In that case, it will read only one sexp. So robertm's suggestion is the right one, you should wrap everything in a single progn to have only ine sexp in the string.
13:38:17
pjb
letest1: another thing would be to use LIST instead of PROGN, to get the values of each expression in lispCode.
14:11:43
letest1
@pjb, thanks. The value of lispCode is indeed String. I'm going to have a coffee and try with wrapping progn to lispCode.
15:30:20
letest1
(load "file.lisp") tries to load a file from the project root /target directory. So typical Java. So to make it seamlessly load a file located in the same folder I have to copy all the lisp files in the target directory with a Maven plugin.
15:54:57
pjb
letest1: what's the current value? (setf *default-pathname-defaults* #P"./") should use the current working directory. But I don't know if that means "same folder". What do you mean by "same folder"?
15:56:48
pjb
letest1: if you want to load files from another file, then first you should consider using asdf.
15:57:15
pjb
letest1: but if this is really what you want to do, you can use *load-pathname* (or *load-truename*).
15:58:06
pjb
(load (merge-pathnames "file.lisp" (or *load-pathname* (error "You should load this file, not just evaluate the form."))))
16:11:10
letest1
thanks @pjb. What I want to do is to define an "index.lisp" file where I load a number of lisp files and retrieve the value of a certain expression that depends on the other files. So, after building the project with Java, it copies the lisp source files under "target/classes/abcl".
16:13:25
letest1
Now all the source files are at runtime under "target/classes/abcl". But if I load file1.lisp from file2.lisp with (load "file1.lisp"), it throws a 'file not found' error'. That is because it tries to load from target and not from target/classes/abcl.
16:15:57
letest1
I can of course write a function then adds "classes/abcl" to the given file name and calls load. But if there are more elegant options, I listen.
17:15:38
pjb
You could (let ((*default-pathname-defaults* #P"classes/abcl/")) (mapc 'load '("file2" "file3" …)))