From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei 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: 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> <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" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jan 21 00:00:30 2024 Return-path: 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 ) 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 ) 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 ) 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 ) 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 ; 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: --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 wrote: > > Damien Mattei 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 =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



On Sat, Jan 20, 2024 at 9:07=E2=80=AFPM Dr. Arne Babenhauserhe= ide <arne_bab@web.d= e> 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 curre= ntly
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

=C2= =A0 '(
=C2=A0 =C2=A0 (expt **)
=C2=A0 =C2=A0 (* / %)
=C2=A0 = =C2=A0 (+ -)

=C2=A0 =C2=A0 (<< >>)

=C2=A0 =C2=A0= (& =E2=88=A3)

=C2=A0 =C2=A0 (< > =3D =E2=89=A0 <=3D &g= t;=3D <>)

=C2=A0 =C2=A0 (and)

=C2=A0 =C2=A0 (or)
=C2=A0 =C2=A0 (<- -> =E2=86=90 =E2=86=92 <v v> =E2=87=9C =E2= =87=9D)
=C2=A0 =C2=A0 (<+ +> =E2=A5=86 =E2=A5=85)
=C2=A0 =C2=A0= )

=C2=A0 )

Best regards,
Damien

--000000000000da3bcf060f688e06--