The Lambda Lab
/
projects
/
sam.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated examples to be compatible with new architecture.
[sam.git]
/
sam.scm
diff --git
a/sam.scm
b/sam.scm
index
93906b9
..
1d23712
100644
(file)
--- a/
sam.scm
+++ b/
sam.scm
@@
-11,6
+11,7
@@
(chicken port)
(chicken process-context)
(chicken file)
(chicken port)
(chicken process-context)
(chicken file)
+ (chicken condition)
matchable
srfi-18 ; threads
srfi-69 ; hash-table
matchable
srfi-18 ; threads
srfi-69 ; hash-table
@@
-203,7
+204,15
@@
(define (boot-sam)
(start-console)
(start-network-listener)
(define (boot-sam)
(start-console)
(start-network-listener)
- (send-message (make-actor main-beh) (make-actor system-beh))
+ (let ((system (make-actor system-beh))
+ (main #f))
+ (condition-case
+ (begin
+ (set! main (make-actor main-beh)))
+ ((exn)
+ (print "Error starting main actor. Is main-beh defined?")
+ (exit 1)))
+ (send-message main system))
(start-scheduler))
(define (print-usage)
(start-scheduler))
(define (print-usage)
@@
-222,14
+231,14
@@
(loop rest))
(((or "-n" "--hostname") hstr rest ...)
(set! sam-host hstr)
(loop rest))
(((or "-n" "--hostname") hstr rest ...)
(set! sam-host hstr)
- (loop rest)
- (((? file-exists? filename) rest ...)
)
+ (loop rest)
)
+ (((? file-exists? filename) rest ...)
(print* "Loading " filename "...")
(load filename)
(print " done.")
(loop rest))
(()
(print* "Loading " filename "...")
(load filename)
(print " done.")
(loop rest))
(()
- (boot-sam
host port main-beh
))
+ (boot-sam))
(else
(print "Unrecognised argument '" (car args) "'.\n")
(print-usage))))
(else
(print "Unrecognised argument '" (car args) "'.\n")
(print-usage))))