Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hi margaritamike,
- With the help you provided, we have done most of the work needed to add SBCL to Kattis. However, I have a question for you since I am not a LISP guy.
- If someone wants to submit a program over multiple files, what is the "best" way to include one file in the other?
- I managed to make a two-file submission work in the following manner:
- file "hello.lisp" has the following contents:
- (defconstant HELLO "Hello World!")
- file "main.lisp" has the following contents:
- (load (merge-pathnames "hello" *load-truename*))
- (format t "~a~%" HELLO)
- These files are compiled (to hello.fasl and main.fasl) and all four (source and compiled) files reside in /src/.
- We then run the program by doing "/usr/sbin/sbcl --noinform --non-interactive --load /src/main"
- It would be nice to have that "load" command be just '(load "hello")'. The reason I have added the "merge-pathnames" is to say "look for the file in the same directory as this file". But I use this load because when we invoke sbcl, our working directory is not /src, and it cannot find "hello" with the "simple" load.
- Is the solution I came up with reasonable? Or is there a simpler one that I'm missing?
- Best,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement