From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: Anything better for delayed lexical evaluation than (lambda () ...)? Date: Tue, 13 Dec 2011 16:52:17 +0100 Organization: Organization?!? Message-ID: <877h20lb9q.fsf@fencepost.gnu.org> References: <87liqtpsl9.fsf@fencepost.gnu.org> <874nxdwkbi.fsf@rapitore.luna> <87d3bvfo5d.fsf@fencepost.gnu.org> <871usaicvi.fsf@netris.org> <87mxaycmlx.fsf@fencepost.gnu.org> <87wra1hcek.fsf@netris.org> <87mxaxihnw.fsf@pobox.com> <87obvclu92.fsf@fencepost.gnu.org> <87aa6wbp0w.fsf@pobox.com> <87fwgolgm5.fsf@fencepost.gnu.org> <8762hkbkwi.fsf@pobox.com> <87borclcem.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1323791577 13106 80.91.229.12 (13 Dec 2011 15:52:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2011 15:52:57 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 13 16:52:52 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RaUex-0003KB-VS for guile-devel@m.gmane.org; Tue, 13 Dec 2011 16:52:52 +0100 Original-Received: from localhost ([::1]:45975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaUev-0007lp-2L for guile-devel@m.gmane.org; Tue, 13 Dec 2011 10:52:49 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaUer-0007ht-4z for guile-devel@gnu.org; Tue, 13 Dec 2011 10:52:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaUei-0003e1-Sa for guile-devel@gnu.org; Tue, 13 Dec 2011 10:52:45 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:32781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaUei-0003da-GK for guile-devel@gnu.org; Tue, 13 Dec 2011 10:52:36 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RaUef-0003Cd-Ud for guile-devel@gnu.org; Tue, 13 Dec 2011 16:52:34 +0100 Original-Received: from p508e9a39.dip.t-dialin.net ([80.142.154.57]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Dec 2011 16:52:33 +0100 Original-Received: from dak by p508e9a39.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Dec 2011 16:52:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 79 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508e9a39.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:D0V+4F41SAx+fTyndQqatUxUlKI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13058 Archived-At: David Kastrup writes: > So I don't think that throwing out _distinguishing_ selling points of > Guile is necessarily doing you a favor. And the transparency with > which it integrates with its language environment and the fact that > one can continue to use its evaluator and debugger even for the > application for which it serves as an extension language, certainly is > a selling point. To illustrate, take a look at . How likely do you consider an average user to write and master such code? I am currently writing on a report about recent changes in Lilypond, and the code looks like the following (it does not work yet because \parallelMusic is not implemented well enough): ph = #(define-music-function (parser location p1 p2 p3 p4 p5) (ly:pitch? ly:pitch? ly:pitch? ly:pitch? ly:pitch?) #{ r8 $p3 16 $p4 $p5 $p3 $p4 $p5 | r16 $p2 8. ~ $p2 4 | $p1 2 | #}) \parallelMusic #'(high middle low) { \oneVoice | \voiceOne | \voiceTwo | \ph c' e' g' c'' e'' \ph c' d' a' d'' f'' \ph b d' g' d'' f'' \ph c' e' g' c'' e'' \ph c' e' a' e'' a'' \ph c' d' fis' a' d'' [...] \ph d f a c' f' \ph g, d g b f' \oneVoice | \change Staff = "down" \voiceOne | \voiceTwo | \ph c e g c' e' [...] \score { \new PianoStaff << \context Staff = "up" { << \high \\ \middle >> r8 f16 a c' f' c' a c' a f a f d f d r8 g'16 b' d'' f'' d'' b' d'' b' g' b' d' f' e' d' 1 \bar "|." } \context Staff = "down" { \low << { r16 c8. ~ c4 ~ c2 r16 b,8. ~ b,4 ~ b,2 c1 } \\ { c,2 c, c, c, c,1 } >> } >> \midi { \tempo 4 = 80 } \layout { } } So what do you see: minimal Schemeishness, minimal complexity. That's something a user could actually hope to be writing and understanding. And this "minimal Schemeishness" in spite of the music function \ph being actually written in Scheme is exactly the result of making it seamless and natural to pass in and out of Guile (including taking the lexical environment or a simulation of it along) to the user. If the user wanted to primordinarily deal with cryptic languages and their own data structures and control mechanisms instead of something approximating music notation, she would be using MusiXTeX. You may consider this sort of seamless language integration unimportant because apparently no project but Lilypond has managed approximating it given the documentation of local-eval (and now substituting an emulation of it), but at least Lilypond is not yet in the list of applications trying to get away from Guile for the sake of its users. -- David Kastrup