Permalink
Browse files

*** empty log message ***

  • Loading branch information...
ktilton
ktilton committed Nov 30, 2007
1 parent 3b95fb7 commit 7a387a10a4a180f73bfe8b5b4837fb9a04e2595a
View
@@ -166,7 +166,7 @@ See the Lisp Lesser GNU Public License for more details.
;__________________
(defmethod c-print-value ((c c-ruled) stream)
- (format stream "~a" (cond ((c-validp c) "<vld>")
+ (format stream "~a" (cond ((c-validp c) (cons (c-value c) "<vld>"))
((c-unboundp c) "<unb>")
((not (c-currentp c)) "dirty")
(t "<err>"))))
View
@@ -181,7 +181,7 @@ just after CLOS instance initialization, and when a slot changes value. Any obse
is guaranteed to be called at least once during intialization even if a cell slot is bound to a constant
or if it is an input or ruled Cell that never changes value.
-It is legal for observer code to assign to input Cells, but (a) special syntax is required to defer executuion
+It is legal for observer code to assign to input Cells, but (a) special syntax is required to defer execution
until the observed state change has fully propagated; and (b) doing so compromises the declarative
quality of an application -- one can no longer look to one rule to see how a slot (in this case the
input slot being assigned by the observer) gets its value. A reasonable usage might be one with
@@ -205,8 +205,8 @@ When application code assigns to some input cell X, the Cells engine guarantees:
by the change to X and will not be recomputed.
- recomputations, when they read other datapoints, must see only values current with the new value of X.
- Example: if A depends on B and X, and B depends on X, when A reads B it must return a value recomputed from
- the new value of X.
+ Example: if A depends on B and X, and B depends on X, when X changes and A reads B and X to compute a
+ new value, B must return a value recomputed from the new value of X.
- similarly, client observer callbacks must see only values current with the new value of X; and
@@ -285,11 +285,19 @@ C GUI library, where Lisp-land activity must be propagated to the C GUI, and C G
to Lisp-land. See the Cells-Gtk or Celtk projects. Also, a persistent CLOS implementation that must echo
CLOS instance data into, say, SQL tables.
-Prior Art
+Prior Art (in increasing order of priorness (age))
---------
+Functional reactive programming:
+ This looks to be the most active, current, and vibrant subset of folks working on this sort of stuff.
+ Links:
+ FlapJax (FRP-powered web apps) http://www.flapjax-lang.org/
+ http://lambda-the-ultimate.org/node/1771
+ http://www.haskell.org/frp/
+ FrTime (scheme FRP implementation, no great links) http://pre.plt-scheme.org/plt/collects/frtime/doc.txt
+
Adobe Adam, originally developed only to manage complex GUIs. [Adam]
-COSI, a class-based Cells-alike used at STSCI to in software used to
+COSI, a class-based Cells-alike used at STSCI in software used to
schedule Hubble telescope viewing time. [COSI]
Garnet's KR: http://www.cs.cmu.edu/~garnet/
@@ -304,13 +312,12 @@ PhD Thesis in which he develops a constraint programming language or two:
http://www.cs.utk.edu/~bvz/quickplan.html
Sutherland, I. Sketchpad: A Man Machine Graphical Communication System. PhD thesis, MIT, 1963.
-Steele himself cites Sketchpad as inexlicably unappreciated prior
+Steele himself cites Sketchpad as inexplicably unappreciated prior
art to his Constraints system:
See also:
The spreadsheet paradigm: http://www.cs.utk.edu/~bvz/active-value-spreadsheet.html
The dataflow paradigm: http://en.wikipedia.org/wiki/Dataflow
- Reactive programming: http://www.haskell.org/yampa/AFPLectureNotes.pdf
Frame-based programming
Definitive-programming
View
@@ -1,4 +1,4 @@
-;; -*- lisp-version: "8.0 [Windows] (May 22, 2006 0:51)"; cg: "1.81"; -*-
+;; -*- lisp-version: "8.1 [Windows] (Sep 29, 2007 20:23)"; cg: "1.103.2.10"; -*-
(in-package :cg-user)
@@ -25,64 +25,72 @@
:main-form nil
:compilation-unit t
:verbose nil
- :runtime-modules '(:cg-dde-utils :cg.base :cg.bitmap-pane
- :cg.bitmap-pane.clipboard :cg.bitmap-stream
- :cg.button :cg.caret :cg.check-box :cg.choice-list
- :cg.choose-printer :cg.clipboard
- :cg.clipboard-stack :cg.clipboard.pixmap
- :cg.color-dialog :cg.combo-box :cg.common-control
- :cg.comtab :cg.cursor-pixmap :cg.curve
- :cg.dialog-item :cg.directory-dialog
- :cg.directory-dialog-os :cg.drag-and-drop
- :cg.drag-and-drop-image :cg.drawable
- :cg.drawable.clipboard :cg.dropping-outline
- :cg.edit-in-place :cg.editable-text
- :cg.file-dialog :cg.fill-texture
- :cg.find-string-dialog :cg.font-dialog
- :cg.gesture-emulation :cg.get-pixmap
- :cg.get-position :cg.graphics-context
- :cg.grid-widget :cg.grid-widget.drag-and-drop
- :cg.group-box :cg.header-control :cg.hotspot
- :cg.html-dialog :cg.html-widget :cg.icon
- :cg.icon-pixmap :cg.ie :cg.item-list
- :cg.keyboard-shortcuts :cg.lamp :cg.lettered-menu
- :cg.lisp-edit-pane :cg.lisp-text :cg.lisp-widget
- :cg.list-view :cg.mci :cg.menu :cg.menu.tooltip
- :cg.message-dialog :cg.multi-line-editable-text
- :cg.multi-line-lisp-text :cg.multi-picture-button
- :cg.multi-picture-button.drag-and-drop
- :cg.multi-picture-button.tooltip :cg.ocx
- :cg.os-widget :cg.os-window :cg.outline
- :cg.outline.drag-and-drop
- :cg.outline.edit-in-place :cg.palette
- :cg.paren-matching :cg.picture-widget
- :cg.picture-widget.palette :cg.pixmap
- :cg.pixmap-widget :cg.pixmap.file-io
- :cg.pixmap.printing :cg.pixmap.rotate :cg.printing
- :cg.progress-indicator :cg.project-window
- :cg.property :cg.radio-button :cg.rich-edit
- :cg.rich-edit-pane :cg.rich-edit-pane.clipboard
- :cg.rich-edit-pane.printing :cg.sample-file-menu
- :cg.scaling-stream :cg.scroll-bar
- :cg.scroll-bar-mixin :cg.selected-object
- :cg.shortcut-menu :cg.static-text :cg.status-bar
- :cg.string-dialog :cg.tab-control
- :cg.template-string :cg.text-edit-pane
- :cg.text-edit-pane.file-io :cg.text-edit-pane.mark
- :cg.text-or-combo :cg.text-widget :cg.timer
- :cg.toggling-widget :cg.toolbar :cg.tooltip
- :cg.trackbar :cg.tray :cg.up-down-control
- :cg.utility-dialog :cg.web-browser
- :cg.web-browser.dde :cg.wrap-string
- :cg.yes-no-list :cg.yes-no-string :dde)
+ :runtime-modules (list :cg-dde-utils :cg.base :cg.bitmap-pane
+ :cg.bitmap-pane.clipboard :cg.bitmap-stream
+ :cg.button :cg.caret :cg.check-box
+ :cg.choice-list :cg.choose-printer
+ :cg.clipboard :cg.clipboard-stack
+ :cg.clipboard.pixmap :cg.color-dialog
+ :cg.combo-box :cg.common-control :cg.comtab
+ :cg.cursor-pixmap :cg.curve :cg.dialog-item
+ :cg.directory-dialog :cg.directory-dialog-os
+ :cg.drag-and-drop :cg.drag-and-drop-image
+ :cg.drawable :cg.drawable.clipboard
+ :cg.dropping-outline :cg.edit-in-place
+ :cg.editable-text :cg.file-dialog
+ :cg.fill-texture :cg.find-string-dialog
+ :cg.font-dialog :cg.gesture-emulation
+ :cg.get-pixmap :cg.get-position
+ :cg.graphics-context :cg.grid-widget
+ :cg.grid-widget.drag-and-drop :cg.group-box
+ :cg.header-control :cg.hotspot :cg.html-dialog
+ :cg.html-widget :cg.icon :cg.icon-pixmap
+ :cg.ie :cg.item-list :cg.keyboard-shortcuts
+ :cg.lamp :cg.lettered-menu :cg.lisp-edit-pane
+ :cg.lisp-text :cg.lisp-widget :cg.list-view
+ :cg.mci :cg.menu :cg.menu.tooltip
+ :cg.message-dialog
+ :cg.multi-line-editable-text
+ :cg.multi-line-lisp-text
+ :cg.multi-picture-button
+ :cg.multi-picture-button.drag-and-drop
+ :cg.multi-picture-button.tooltip :cg.ocx
+ :cg.os-widget :cg.os-window :cg.outline
+ :cg.outline.drag-and-drop
+ :cg.outline.edit-in-place :cg.palette
+ :cg.paren-matching :cg.picture-widget
+ :cg.picture-widget.palette :cg.pixmap
+ :cg.pixmap-widget :cg.pixmap.file-io
+ :cg.pixmap.printing :cg.pixmap.rotate
+ :cg.printing :cg.progress-indicator
+ :cg.project-window :cg.property
+ :cg.radio-button :cg.rich-edit
+ :cg.rich-edit-pane
+ :cg.rich-edit-pane.clipboard
+ :cg.rich-edit-pane.printing
+ :cg.sample-file-menu :cg.scaling-stream
+ :cg.scroll-bar :cg.scroll-bar-mixin
+ :cg.selected-object :cg.shortcut-menu
+ :cg.static-text :cg.status-bar
+ :cg.string-dialog :cg.tab-control
+ :cg.template-string :cg.text-edit-pane
+ :cg.text-edit-pane.file-io
+ :cg.text-edit-pane.mark :cg.text-or-combo
+ :cg.text-widget :cg.timer :cg.toggling-widget
+ :cg.toolbar :cg.tooltip :cg.trackbar :cg.tray
+ :cg.up-down-control :cg.utility-dialog
+ :cg.web-browser :cg.web-browser.dde
+ :cg.wrap-string :cg.yes-no-list
+ :cg.yes-no-string :dde)
:splash-file-module (make-instance 'build-module :name "")
:icon-file-module (make-instance 'build-module :name "")
- :include-flags '(:top-level :debugger)
- :build-flags '(:allow-runtime-debug :purify)
+ :include-flags (list :top-level :debugger)
+ :build-flags (list :allow-runtime-debug :purify)
:autoload-warning t
:full-recompile-for-runtime-conditionalizations nil
+ :include-manifest-file-for-visual-styles t
:default-command-line-arguments "+M +t \"Console for Debugging\""
- :additional-build-lisp-image-arguments '(:read-init-files nil)
+ :additional-build-lisp-image-arguments (list :read-init-files nil)
:old-space-size 256000
:new-space-size 6144
:runtime-build-option :standard
View
@@ -34,12 +34,12 @@
(setf *client-log* (append *client-log* (list new-value))))))
(defun deep-queue-handler (client-q)
- (loop for (nil . task) in (prog1
- (sort (fifo-data client-q) '< :key 'car)
- (fifo-clear client-q))
- do
+ (loop for (defer-info . task) in (prog1
+ (sort (fifo-data client-q) '< :key 'car)
+ (fifo-clear client-q))
+ do
(trc nil "!!! --- deep-queue-handler dispatching" defer-info)
- (funcall task)))
+ (funcall task :user-q defer-info)))
(def-cell-test go-deep ()
(cells-reset 'deep-queue-handler)
@@ -33,6 +33,29 @@
(defobserver m-syn-b ()
(print `(output m-syn-b ,self ,new-value ,old-value)))
+(def-cell-test m-syn-bool
+ (let* ((delta-ct 0)
+ (m (make-instance 'm-syn
+ :m-syn-a (c-in nil)
+ :m-syn-b (c? (incf delta-ct)
+ (trc "syn-b containing rule firing!!!!!!!!!!!!!!" delta-ct)
+ (bwhen (msg (with-synapse :xyz42 ()
+ (trc "synapse fires!!! ~a" (^m-syn-a))
+ (bIF (k (find (^m-syn-a) '(:one :two :three)))
+ (values k :propagate)
+ (values NIL :no-propagate))))
+ msg)))))
+ (ct-assert (= 1 delta-ct))
+ (ct-assert (null (m-syn-b m)))
+ (setf (m-syn-a m) :nine)
+ (ct-assert (= 1 delta-ct))
+ (ct-assert (null (m-syn-b m)))
+ (setf (m-syn-a m) :one)
+ (ct-assert (= 2 delta-ct))
+ (ct-assert (eq :one (m-syn-b m)))
+ (setf (m-syn-a m) :nine)
+ (ct-assert (= 2 delta-ct))
+ (ct-assert (eq :one (m-syn-b m)))))
(def-cell-test m-syn
(let* ((delta-ct 0)
View
@@ -68,8 +68,10 @@ subclass for them?)
#+go
(test-cells)
+
(defun test-cells ()
(loop for test in (reverse *cell-tests*)
+ when (eq 'm-syn-bool test)
do (cell-test-init test)
(funcall test))
(print (make-string 40 :initial-element #\*))
View
@@ -19,8 +19,12 @@ See the Lisp Lesser GNU Public License for more details.
(eval-when (compile load)
(proclaim '(optimize (speed 2) (safety 1) (space 1) (debug 3))))
+
+
(in-package :cells)
+
+
(defparameter *c-prop-depth* 0)
(defparameter *causation* nil)
@@ -32,6 +36,9 @@ See the Lisp Lesser GNU Public License for more details.
(defparameter *client-queue-handler* nil)
(defparameter *unfinished-business* nil)
+#+test
+(cells-reset)
+
(defun cells-reset (&optional client-queue-handler &key debug)
(utils-kt-reset)
(setf
@@ -55,6 +62,11 @@ See the Lisp Lesser GNU Public License for more details.
(defun c-stopped ()
*stop*)
+(export! .stopped)
+
+(define-symbol-macro .stopped
+ (c-stopped))
+
(defmacro c-assert (assertion &optional places fmt$ &rest fmt-args)
(declare (ignorable assertion places fmt$ fmt-args))
#+(or)`(progn)
View
@@ -1,8 +1,8 @@
-;; -*- lisp-version: "8.0 [Windows] (Jan 22, 2007 8:01)"; cg: "1.81"; -*-
+;; -*- lisp-version: "8.0 [Windows] (Sep 14, 2007 21:56)"; cg: "1.81"; -*-
(in-package :cg-user)
-(defpackage :CELLS)
+(defpackage :cells)
(define-project :name :cells
:modules (list (make-instance 'module :name "defpackage.lisp")
View
@@ -26,7 +26,7 @@ See the Lisp Lesser GNU Public License for more details.
(defmacro c-lambda (&body body)
`(c-lambda-var (slot-c) ,@body))
-(export! .cache-bound-p)
+(export! .cache-bound-p c?+n)
(defmacro c-lambda-var ((c) &body body)
`(lambda (,c &aux (self (c-model ,c))
@@ -49,6 +49,13 @@ See the Lisp Lesser GNU Public License for more details.
:value-state :unevaluated
:rule (c-lambda ,@body)))
+(defmacro c?+n (&body body)
+ `(make-c-dependent
+ :inputp t
+ :code ',body
+ :value-state :unevaluated
+ :rule (c-lambda ,@body)))
+
(defmacro c?n (&body body)
`(make-c-dependent
:code '(without-c-dependency ,@body)
View
@@ -17,7 +17,6 @@ See the Lisp Lesser GNU Public License for more details.
|#
(in-package :cells)
-
(defmacro defmodel (class directsupers slotspecs &rest options)
;;(print `(defmodel sees directsupers ,directsupers using ,(or directsupers :model-object)))
(assert (not (find class directsupers))() "~a cannot be its own superclass" class)
@@ -197,3 +196,6 @@ the defmodel form for ~a" ',class ',class))))
(ddd (c-in nil) :cell :ephemeral)
:superx 42 ;; default-initarg
(:documentation "as if!")))
+
+
+
View
@@ -58,6 +58,6 @@
#:fm-kid-containing #:fm-find-if #:fm-ascendant-if #:c-abs #:fm-collect-if #:psib
#:not-to-be #:ssibno
#:c-debug #:c-break #:c-assert #:c-stop #:c-stopped #:c-assert #:.stop #:delta-diff
- )
+ #:wtrc #:wnotrc #:eko-if #:trc #:wtrc #:eko #:ekx #:trcp #:trcx)
#+allegro (:shadowing-import-from #:excl #:fasl-write #:fasl-read #:gc)
)
View
@@ -28,7 +28,6 @@ See the Lisp Lesser GNU Public License for more details.
(.value :initform nil :accessor value :initarg :value)
(zdbg :initform nil :accessor dbg :initarg :dbg)))
-
(defmethod fm-parent (other)
(declare (ignore other))
nil)
Oops, something went wrong.

0 comments on commit 7a387a1

Please sign in to comment.