[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple of questions about goops method parameters

From: Taylan Ulrich Bayirli/Kammer
Subject: Re: A couple of questions about goops method parameters
Date: Sun, 07 Sep 2014 17:27:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Neil Jerram <address@hidden> writes:

> IIRC, Metafont does that; but obviously it isn't intended as a general
> language.  Are there more general languages that solve equations like
> this?

>From what I know, Prolog.

Other than that, Scheme. ;)

Apart from David's FRP implementation, I worked on the following a

(Warning: I might force-push commits to that repo at times.  It's not
"ready for consumption.")

I don't consider it complete, and it might be broken.  Some simple
examples work:

guile> ,use (reactive base)
guile> (define x 0)
guile> (define v (make-value () x))
guile> (define v2 (make-value (v) (display "recalculated\n") (+ v 5)))
guile> (get/tainted v2)
$2 = 5
guile> (get/tainted v2)
$3 = 5
guile> (set! x 1)
guile> (taint! v)
guile> (get/tainted v2)
$4 = 6

As you see, it's not purely-functional, and it requires explicit
"tainting" of root values.  After that, though, requesting any value
which directly or indirectly depends on that root will ignite a
recalculation of the graph of dependent values up to the requested one.

I continuously get confused while trying to reason about the precise
behavior of this system (even though it's very small), and had grave
bugs in it at times (actually I just fixed one while writing this
because I did a wholesale clean-up on the repo and re-uploaded it at the
above link).  Therefore, please don't trust that module for "real"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]