From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Taylan Ulrich Bayirli/Kammer Newsgroups: gmane.lisp.guile.user Subject: Re: A couple of questions about goops method parameters Date: Sun, 07 Sep 2014 17:27:48 +0200 Message-ID: <87ha0je9hn.fsf@taylan.uni.cx> References: <1409905923.9245.5.camel@Renee-desktop.suse> <871trpridm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87ppf9g76m.fsf@taylan.uni.cx> <8761gzen4a.fsf@ossau.homelinux.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410103690 32486 80.91.229.3 (7 Sep 2014 15:28:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2014 15:28:10 +0000 (UTC) Cc: Carlos Pita , David Thompson , "guile-user@gnu.org" To: Neil Jerram Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Sep 07 17:28:05 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQeNn-0004aK-SD for guile-user@m.gmane.org; Sun, 07 Sep 2014 17:28:03 +0200 Original-Received: from localhost ([::1]:38512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeNn-0000hO-Cu for guile-user@m.gmane.org; Sun, 07 Sep 2014 11:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeNd-0000hB-Ip for guile-user@gnu.org; Sun, 07 Sep 2014 11:27:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQeNc-0005tc-BG for guile-user@gnu.org; Sun, 07 Sep 2014 11:27:53 -0400 Original-Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:44318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQeNc-0005lx-2g for guile-user@gnu.org; Sun, 07 Sep 2014 11:27:52 -0400 Original-Received: by mail-lb0-f171.google.com with SMTP id 10so6750842lbg.30 for ; Sun, 07 Sep 2014 08:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=oxi2ohY8bGVIH/rFIzZ9yy33+MN2afSeFIVOl2+YEOQ=; b=K1h56WKDdFEgt6s/ae547r02lRPTZrF8WSj5ZOBw9qWPxPNhmi9aCyhPc2JkgJBFG2 o1GabxyZbRwNoYy3AS0vrbc8zIsBWM5jn7zI/nfI5Mj3iMA9IU6DLUokTUT6ysShfU3+ U+AAb5bWG+OL2NzmJ+3IDtJW4GzeVmkSiOA/X/nm2LML1xp0ezlWguH27HmbS0++cFWV OqJgvsN2uDHqsYTZhBUraHaXMlGLx1pWgQj1LyvBfZ/pwAdLkrr757L6Qkql54VLVT/d mVQ6G5prMBVwJH7Q33d4C2VS1Nj5VE7Dtb83MX7E9OLSjl0056To3el6s6fJKMAN7w6G jzCA== X-Received: by 10.112.135.137 with SMTP id ps9mr22634347lbb.24.1410103670869; Sun, 07 Sep 2014 08:27:50 -0700 (PDT) Original-Received: from taylan.uni.cx (p200300514A1DE4E60213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a1d:e4e6:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id wv3sm2523105lac.35.2014.09.07.08.27.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Sep 2014 08:27:50 -0700 (PDT) In-Reply-To: <8761gzen4a.fsf@ossau.homelinux.net> (Neil Jerram's message of "Sun, 07 Sep 2014 11:33:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22b X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11484 Archived-At: Neil Jerram 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