From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei <damien.mattei@gmail.com> Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] add SRFI-119 / language/wisp to Guile? (new patch, squashed) Date: Sat, 20 Jan 2024 23:59:56 +0100 Message-ID: <CADEOadeyL7LapjvUXk_2_5sOb7Q7H8Mw2KqrLJBvWgG9pEvUSQ@mail.gmail.com> References: <87h6w2fkz8.fsf@web.de> <1e0d07bc-dcf8-fe56-7f16-a72e5df0c20d@telenet.be> <875ybr2hk9.fsf@gnu.org> <87v8jrdmk5.fsf@web.de> <87jzzr7cba.fsf@web.de> <87v8hc8i8v.fsf@web.de> <87legrs23a.fsf@gnu.org> <209e68fd-b010-8213-6c9b-a0d1b8f0f72c@telenet.be> <87o7jf2slw.fsf@web.de> <875y5h8j04.fsf@web.de> <87il9ctzhl.fsf@gnu.org> <875y5cdyvt.fsf@web.de> <87sf7omuag.fsf@web.de> <877co1jgww.fsf@web.de> <875y3egjtd.fsf@web.de> <87sf5v67k5.fsf@web.de> <87mstf9e67.fsf@web.de> <340c71c5-9e25-d622-8b24-9c18ea373a77@mutix.org> <877ck5t370.fsf@elephly.net> <22ec8c54-fca0-b797-9c03-f2cc461dea6a@mutix.org> <CADEOadcaA0T_afO7KAEFocdERX7q0v0pvYkqHg8tAv2zDGApBw@mail.gmail.com> <87le8j4vly.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000da3bcf060f688e06" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25286"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel@gnu.org To: "Dr. Arne Babenhauserheide" <arne_bab@web.de> Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jan 21 00:00:30 2024 Return-path: <guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org> Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org>) id 1rRKKD-0006RU-2O for guile-devel@m.gmane-mx.org; Sun, 21 Jan 2024 00:00:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guile-devel-bounces@gnu.org>) id 1rRKJx-0007VP-Sv; Sat, 20 Jan 2024 18:00:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <damien.mattei@gmail.com>) id 1rRKJv-0007VC-Ne for guile-devel@gnu.org; Sat, 20 Jan 2024 18:00:11 -0500 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <damien.mattei@gmail.com>) id 1rRKJu-0002Ox-42 for guile-devel@gnu.org; Sat, 20 Jan 2024 18:00:11 -0500 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-55c08bf4cf4so242214a12.3 for <guile-devel@gnu.org>; Sat, 20 Jan 2024 15:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705791608; x=1706396408; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ylcGVBkMlzes51u+iFVXMFtKsLSYKIzO5KLF8Aa/Qx8=; b=i517j6aZ5pQE9pwHKi0TxrEyjEUxUbgqjqHu3jZwWwP2fuCGrOaMYCOD3AKbyKudce U/zQJht6armbK+OZJlF3v2J0dfpTTbfpp3MdDi55j3qngriutVLQWCsr0EZfh0z3NIw3 yuqCYr75BNTG7Nf8I8yVuMSiTQy7VrA8v5y2rx6/QKy6MlZj8M2lN0P1XzfiZ/s94gso CzE0yWmGyritn2AQ9O5B0XY/OV5zoESfXApqk7aHdWk/RDTbwbvVmk+WOdJvp65FoOam vXOPb8BrfTJuTLgTcoflQmqacUfj/pl8Dw1HSuXoV2upQsrmieLOtV47LzTZbbyvrVSb T8xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705791608; x=1706396408; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ylcGVBkMlzes51u+iFVXMFtKsLSYKIzO5KLF8Aa/Qx8=; b=Yzbpu8ISnVGVPELR76VWVKC3HqXcpUMp7SRVpBiyOUh0W6OV/0S6k00I7FcSk5AG3k pKwa0Gj6IIPTaWpg3cU4mjDQ9+ErtbNBzlbJEA/6xjzQxZwplD3jgEdApglWzWM5dtIb 9sOYGY/kDpZDQ0KZn7HLadQjChfq9vvpcBEAirQAeHKleuJsoTsFHZTHaBiyrVMLzqUR KejKMzP4vQyXUY86JLBlL69qInnqC4xiTuvuI+CNmTZXdERRi6UeUUyFvVL3UqwE90gX 8V6Iyesqyt9pTwUS+AzjvIJeJV7VE+X78GsZYD390/Q6KORVtfftVL6Cv7VcE4dDJa2V ZfNA== X-Gm-Message-State: AOJu0Yx3cVa0bqYHRfKtGUKb+U06qhT4yBD5xsy+jGEV725GC2bsd+Vx HPWkH4stk2+Y1E2Eu/E8WR2ldIkNvteHCeO20riLza/na+AYOZ18Ky71xVvEpY/jtlg0Vz5yhIR xW6AvjPdedhJKbRFz1iPrWTwT/aQ= X-Google-Smtp-Source: AGHT+IEUHJZTwxMfk8YR/9xprmY3e4LH5zgYH0vPOLqLK6MxOmG30P12uBQk9nhyIXE73hNEaEILwC98moE1+i7c61A= X-Received: by 2002:a05:6402:2937:b0:557:1196:b249 with SMTP id ee55-20020a056402293700b005571196b249mr921978edb.14.1705791607944; Sat, 20 Jan 2024 15:00:07 -0800 (PST) In-Reply-To: <87le8j4vly.fsf@web.de> Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=damien.mattei@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" <guile-devel.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guile-devel>, <mailto:guile-devel-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guile-devel> List-Post: <mailto:guile-devel@gnu.org> List-Help: <mailto:guile-devel-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guile-devel>, <mailto:guile-devel-request@gnu.org?subject=subscribe> Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22276 Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.devel/22276> --000000000000da3bcf060f688e06 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 20, 2024 at 9:07=E2=80=AFPM Dr. Arne Babenhauserheide <arne_bab= @web.de> wrote: > > Damien Mattei <damien.mattei@gmail.com> writes: > > > > by keeping the same > > number of parenthesis, but they are just differents : ( ), { }, [ ] > > and it allow the use of infix expressions. > > Is your implementation of {} compatible with SRFI-105? (curly infix) > yes it is based on SRFI-105 > Can it be used to provide proper operator precedence? (that=E2=80=99s cur= rently > not offered by SRFI-105 and would be quite an improvement) > yes there is operator precedence , an expression like : {{x - v * t} / (sqrt {1 - v ** 2 / c ** 2})} is converted in this one: (/ (- x (* v t)) (sqrt (- 1 (/ (** v 2) (** c 2))))) the operator precedence are predefined in a list ordered by priority in the source code: (define infix-operators-lst '( (expt **) (* / %) (+ -) (<< >>) (& =E2=88=A3) (< > =3D =E2=89=A0 <=3D >=3D <>) (and) (or) (<- -> =E2=86=90 =E2=86=92 <v v> =E2=87=9C =E2=87=9D) (<+ +> =E2=A5=86 =E2=A5=85) ) ) Best regards, Damien --000000000000da3bcf060f688e06 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-size:large"><br></div></div><div dir=3D"ltr"><div style=3D"font-size:larg= e"><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D= "gmail_attr">On Sat, Jan 20, 2024 at 9:07=E2=80=AFPM Dr. Arne Babenhauserhe= ide <<a href=3D"mailto:arne_bab@web.de" target=3D"_blank">arne_bab@web.d= e</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin= :0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"= ><br> Damien Mattei <<a href=3D"mailto:damien.mattei@gmail.com" target=3D"_bla= nk">damien.mattei@gmail.com</a>> writes:<br> <br> <br> > by keeping the same<br> > number of parenthesis, but they are just differents : ( ), { }, [ ]<br= > > and it allow the use of infix expressions.<br> <br> Is your implementation of {} compatible with SRFI-105? (curly infix)<br></b= lockquote><div><br></div><div style=3D"font-size:large" class=3D"gmail_defa= ult">yes it is based on SRFI-105 <br></div><div style=3D"font-size:large" c= lass=3D"gmail_default"><br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex"> <br> Can it be used to provide proper operator precedence? (that=E2=80=99s curre= ntly<br> not offered by SRFI-105 and would be quite an improvement)<br></blockquote>= <div><br></div><div><br></div><div style=3D"font-size:large" class=3D"gmail= _default">yes there is operator precedence , an expression like :</div><div= style=3D"font-size:large" class=3D"gmail_default">{{x - v * t} / (sqrt {1 = - v ** 2 / c ** 2})}</div><div style=3D"font-size:large" class=3D"gmail_def= ault">is converted in this one:</div><div style=3D"font-size:large" class= =3D"gmail_default">(/ (- x (* v t)) (sqrt (- 1 (/ (** v 2) (** c 2)))))</di= v><div style=3D"font-size:large" class=3D"gmail_default"><br></div><div sty= le=3D"font-size:large" class=3D"gmail_default">the operator precedence are = predefined in a list ordered by priority in the source code:</div><div styl= e=3D"font-size:large" class=3D"gmail_default"><br></div><div style=3D"font-= size:large" class=3D"gmail_default">(define infix-operators-lst<br><br>=C2= =A0 '(<br>=C2=A0 =C2=A0 (expt **)<br>=C2=A0 =C2=A0 (* / %)<br>=C2=A0 = =C2=A0 (+ -)<br> <br>=C2=A0 =C2=A0 (<< >>)<br><br>=C2=A0 =C2=A0= (& =E2=88=A3)<br><br>=C2=A0 =C2=A0 (< > =3D =E2=89=A0 <=3D &g= t;=3D <>)<br><br>=C2=A0 =C2=A0 (and)<br><br>=C2=A0 =C2=A0 (or)<br> <b= r>=C2=A0 =C2=A0 (<- -> =E2=86=90 =E2=86=92 <v v> =E2=87=9C =E2= =87=9D)<br>=C2=A0 =C2=A0 (<+ +> =E2=A5=86 =E2=A5=85)<br>=C2=A0 =C2=A0= )<br><br>=C2=A0 )<br></div></div><div class=3D"gmail_quote"><br></div><div= class=3D"gmail_quote"><div style=3D"font-size:large" class=3D"gmail_defaul= t">Best regards,</div><div style=3D"font-size:large" class=3D"gmail_default= ">Damien<br></div><br></div> </div> --000000000000da3bcf060f688e06--