-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICP.system
76 lines (56 loc) · 1.88 KB
/
ICP.system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
(defparameter +code-dir+ "ICP:Code:")
(defparameter +data-dir+ "ICP:Data:")
;;; package definitions
(eval-when (load eval compile)
(unless (find-package :icp)
(make-package :icp))
(unless (find-package :frames)
(make-package :frames))
(unless (find-package :dmap)
(make-package :dmap))
(unless (find-package :log)
(make-package :log))
(unless (find-package :casper)
(make-package :casper)))
(use-package '( :log :dmap :frames :icp :casper))
(defun probe-warning (pathname)
(if (probe-file pathname)
(format t "~%Found ~A" pathname)
(format t "~%~A not found." pathname)))
(defun sls (&key directory subdirectory filenames (extension "lisp")
test)
(let ((path (if subdirectory
(format nil "~A~A" directory subdirectory) directory)))
(loop for filename in filenames
for comp = (format nil "~A~A.~A" path filename extension)
do (if test (probe-warning comp) (load comp)))))
(defun load-utilities (&optional test)
(sls :directory +code-dir+
:subdirectory "Utilities:"
:filenames '("tables"
"logging"
"toList")
:test test))
(defun load-icp (&optional test)
(sls :directory +code-dir+
:filenames '("micro-frame"
"micro-dmap"
"micro-icp"
"micro-casper")
:test test)
)
(defun load-data (&optional test)
(sls :directory +data-dir+
:filenames '("micro-casper"
"frames"
"phrases"
"associations" )
:extension "data"
:test test))
(defun load-source (&optional test)
(load-utilities test)
(load-icp test))
(defun setup ()
(load-source)
(load-data))
(format t "~%Run (SETUP) to setup everything.")