Compare commits
3 commits
ca1f56e11a
...
3adec5d44a
| Author | SHA1 | Date | |
|---|---|---|---|
| 3adec5d44a | |||
| 723db45515 | |||
| 84e9a2bfc5 |
5 changed files with 68 additions and 4 deletions
|
|
@ -181,7 +181,8 @@
|
||||||
#:ptr #:get #:put
|
#:ptr #:get #:put
|
||||||
#:in #:next
|
#:in #:next
|
||||||
#:call #:call-if #:call-while #:comp #:lit #:val
|
#:call #:call-if #:call-while #:comp #:lit #:val
|
||||||
#:<comp #:reg #:regc #:reg-lisp #:/>
|
#:<comp #:reg #:regc #:/>
|
||||||
|
#:lisp #:reg-lisp
|
||||||
#:setup-builtins
|
#:setup-builtins
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
@ -230,10 +231,12 @@
|
||||||
|
|
||||||
(f:reg 'reg #'f:reg-code)
|
(f:reg 'reg #'f:reg-code)
|
||||||
(f:reg 'regc #'(lambda () (f:reg-code 'f:comp-word)))
|
(f:reg 'regc #'(lambda () (f:reg-code 'f:comp-word)))
|
||||||
(f:reg 'reg-lisp (lambda () (f:reg (f:popd) (f:compile-lisp (f:popd)))))
|
|
||||||
|
|
||||||
(f:reg '/> #'(lambda () (iter:stop f:*input*)) 'f:comp-word)
|
(f:reg '/> #'(lambda () (iter:stop f:*input*)) 'f:comp-word)
|
||||||
|
|
||||||
|
(f:reg 'lisp (lambda () (cons (f:compile-lisp (f:popd)) f::*buffer*)))
|
||||||
|
(f:reg 'reg-lisp (lambda () (f:reg (f:popd) (f:compile-lisp (f:popd)))))
|
||||||
|
|
||||||
;;;; forge-code word definitions
|
;;;; forge-code word definitions
|
||||||
|
|
||||||
(defun setup-builtins ()
|
(defun setup-builtins ()
|
||||||
|
|
|
||||||
25
scopes-substrate.asd
Normal file
25
scopes-substrate.asd
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
(in-package #:asdf-user)
|
||||||
|
|
||||||
|
(defsystem :scopes-substrate
|
||||||
|
:author "cyberconcepts.org Team <team@cyberconcepts.org>"
|
||||||
|
:license "MIT"
|
||||||
|
:version "0.0.1"
|
||||||
|
:homepage "https://www.cyberconcepts.org"
|
||||||
|
:description "Communication substrate."
|
||||||
|
:depends-on (:alexandria :cl-dotenv :cl-readline :com.inuoe.jzon
|
||||||
|
:flexi-streams :ironclad :local-time :log4cl
|
||||||
|
:lparallel :qbase64 :serapeum :str
|
||||||
|
:scopes-core)
|
||||||
|
:components ((:file "config" :depends-on ("util/util"))
|
||||||
|
(:file "substrate/substrate"
|
||||||
|
:depends-on ("config"))
|
||||||
|
(:file "util/util"))
|
||||||
|
:long-description "scopes/substrate: Communication substrate, sort of new core."
|
||||||
|
:in-order-to ((test-op (test-op "scopes-substrate/test"))))
|
||||||
|
|
||||||
|
(defsystem :scopes-substrate/test
|
||||||
|
:depends-on (:scopes-substrate)
|
||||||
|
:components ( (:file "test/test-substrate"))
|
||||||
|
:perform (test-op (o c)
|
||||||
|
(symbol-call :scopes/test-substrate :run)))
|
||||||
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
(asdf:load-system :scopes)
|
(asdf:load-system :scopes)
|
||||||
|
|
||||||
(in-package :cl-user)
|
(in-package :cl-user)
|
||||||
#+ecl
|
(use-package :trivial-package-local-nicknames)
|
||||||
(use-package :ext)
|
|
||||||
|
|
||||||
;;; real scratch area
|
;;; real scratch area
|
||||||
|
|
||||||
|
|
|
||||||
12
substrate/substrate.lisp
Normal file
12
substrate/substrate.lisp
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
;;;; cl-scopes/substrate - communication substrate.
|
||||||
|
|
||||||
|
(defpackage :scopes/substrate
|
||||||
|
(:use :common-lisp)
|
||||||
|
(:local-nicknames (:async :scopes/util/async)
|
||||||
|
(:config :scopes/config)
|
||||||
|
(:util :scopes/util))
|
||||||
|
(:export #:*root*
|
||||||
|
#:add-action #:config))
|
||||||
|
|
||||||
|
(in-package :scopes/substrate)
|
||||||
|
|
||||||
25
test/test-substrate.lisp
Normal file
25
test/test-substrate.lisp
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
;;;; cl-scopes/test-substrate - testing for the scopes-substrate system.
|
||||||
|
|
||||||
|
(defpackage :scopes/test-substrate
|
||||||
|
(:use :common-lisp)
|
||||||
|
(:local-nicknames (:substrate :scopes/substrate)
|
||||||
|
(:message :scopes/core/message)
|
||||||
|
(:t :scopes/testing))
|
||||||
|
(:export #:run)
|
||||||
|
(:import-from :scopes/testing #:deftest #:== #:!=))
|
||||||
|
|
||||||
|
(in-package :scopes/test-substrate)
|
||||||
|
|
||||||
|
(defun run ()
|
||||||
|
(let* ((t:*test-suite* (make-instance 't:test-suite :name "substrate")))
|
||||||
|
;(load (t:test-path "config-substrate" "etc"))
|
||||||
|
;(substrate:setup)
|
||||||
|
(unwind-protect
|
||||||
|
(progn
|
||||||
|
(test-basic)
|
||||||
|
)
|
||||||
|
(t:show-result))))
|
||||||
|
|
||||||
|
(deftest test-basic ()
|
||||||
|
;(substrate:send msg)
|
||||||
|
)
|
||||||
Loading…
Add table
Reference in a new issue