[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
little:
https://gitorious.org/taylan-guile/reactive/
(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)
recalculated
$2 = 5
guile> (get/tainted v2)
$3 = 5
guile> (set! x 1)
guile> (taint! v)
guile> (get/tainted v2)
recalculated
$4 = 6
guile>
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"
usage.
Taylan
- Re: A couple of questions about goops method parameters, (continued)
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/03
- Re: A couple of questions about goops method parameters, Nala Ginrut, 2014/09/05
- Re: A couple of questions about goops method parameters, Carlos Pita, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05
- Re: A couple of questions about goops method parameters, Taylan Ulrich Bayirli/Kammer, 2014/09/05
- Re: A couple of questions about goops method parameters, David Thompson, 2014/09/05
- Re: A couple of questions about goops method parameters, Neil Jerram, 2014/09/07
- Re: A couple of questions about goops method parameters,
Taylan Ulrich Bayirli/Kammer <=
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, Taylan Ulrich Bayirli/Kammer, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, Marko Rauhamaa, 2014/09/05
- Re: A couple of questions about goops method parameters, Taylan Ulrich Bayirli/Kammer, 2014/09/05
- Re: A couple of questions about goops method parameters, Marko Rauhamaa, 2014/09/05
- Re: A couple of questions about goops method parameters, Marko Rauhamaa, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/05
- Re: A couple of questions about goops method parameters, Marko Rauhamaa, 2014/09/05
- Re: A couple of questions about goops method parameters, Panicz Maciej Godek, 2014/09/06