-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload.scm
41 lines (29 loc) · 957 Bytes
/
load.scm
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
;;; load.scm -- Load the system
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Utilities ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (reset)
(ignore-errors (lambda () (close)))
(ge (make-top-level-environment))
(load "load"))
(define (load-module subdirectory)
(let ((cur-pwd (pwd)))
(cd subdirectory)
(load "load")
(cd cur-pwd)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;; Load Modules ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(for-each (lambda (m) (load-module m))
'("lib"
"core"
"figure"
"graphics"
"solver"
"perception"
"learning"
"content"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Initialize ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define c (if (environment-bound? (the-environment) 'c) c (canvas)))
(define (close) (ignore-errors (lambda () (graphics-close (canvas-g c)))))
(set! *random-state* (fasload "a-random-state"))
(initialize-scheduler)
(initialize-student)
'done-loading