From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 0918A3858D28 for ; Mon, 9 Oct 2023 21:07:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0918A3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5347e657a11so8279452a12.2 for ; Mon, 09 Oct 2023 14:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696885648; x=1697490448; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HqntTnla7VwpP1/M9A2LCszIg3TgtihvCP+6821QswA=; b=CDYvXv3caBMgLyOUYbu5GIMjqPJhb2IUoF/8a64HtF8KTKes5pszAvCiHdDtt5smrm se68T4DA2YT4jrMU+5nn2r20GsNVP1dqLLXSZuCBm24BfOWpzncvEXtetJkd57nIJgFg S/9gksf6aAINvWE1vOVuAcwxu3eA9NBAKSY8JKm/57TZB+g6rZRpoRKGFbu17uBWtdoM O2JlEOUwaeQowZ/bcXBFB9P2wVK/tcv5pQKhOFNw6d2WQBhlxP818J6S1/JKIMp0HlTA otETd+T5mzHocVxYIK6um+mr5cn2v90txKNSnvMEb0Lec2uxXOPP2m1Ddn5hyHtJiN3J GJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696885648; x=1697490448; h=content-transfer-encoding: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=HqntTnla7VwpP1/M9A2LCszIg3TgtihvCP+6821QswA=; b=ZrzmIbSFMak8TUIeuzHR2mwa7snoKpCIJmYoReH0F42HgLnLrlRS3tFfJqA/xAzezf SkNIuBj8PcGHqBHsCWpXz/Mkv7+HkR92QjS2NBDX8TgLnuQAjTXynh/GOAxdxLhf0zV1 g67F63XXJfXvhBuS3BkHSm57nz0Cr3yWzhx51hOjBUQp+91F6kpN4QzhD1EWz0LeN7IW CNp4gFpBr8FedVmFAZQrIUtputUgN2ztJz7gaU7KQ7u5pSL3Lx3ofIRMFiwjeXS155bQ sKiHr599PVNAR5kGMpcTMmz+ADg6bhi+ghz/JrDH8M3jNLC6eank3yImkkaNT0bQVJfO XxPQ== X-Gm-Message-State: AOJu0Yww88yrqpYGM2W0odm0XjfOXMkinitqKzk0wQk3RxzOQ+WlUE9Y RwjOCJKAvqvPmBSInarJlONtBZk6Uv94/F5/3yXZjs1+ X-Google-Smtp-Source: AGHT+IEyWmhd9Dn2cY7qZOWCiSKsRkV7i3ieZGg0zjyvnETZURFjgi0amuDWZmEffnxFnRRKCgznsDVQ9e1RMshBSVI= X-Received: by 2002:a50:ee8b:0:b0:530:e180:ab9a with SMTP id f11-20020a50ee8b000000b00530e180ab9amr14681588edr.3.1696885647520; Mon, 09 Oct 2023 14:07:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Damien Mattei Date: Mon, 9 Oct 2023 23:07:16 +0200 Message-ID: Subject: Re: unrecognized pattern operator list To: Panicz Maciej Godek Cc: kawa mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: GRASP ,amazing code , would be wonderful for teaching. On Mon, Oct 9, 2023 at 10:26=E2=80=AFPM Panicz Maciej Godek wrote: > > For what it's worth, I wrote my own implementation of match for Kawa and = use it in GRASP: > > https://github.com/panicz/grasp/blob/main/src/language/match.scm > > It is derived from the now withdrawn SRFI-200 document that I submitted a= t some point: > > https://srfi.schemers.org/srfi-200/srfi-200.html > > (it contains a fairly detailed description of the implementation of the m= atch macro, both in syntax-case and syntax-rules) > > Anyway, it doesn't seem to be causing any conflicts with Kawa's built-in = match, so you cloud try adapting it to your taste. > > pon., 9 pa=C5=BA 2023 o 22:18 Damien Mattei via Kawa napisa=C5=82(a): >> >> one of problem is coming from the special syntax of kawa that use >> [ ] where others scheme don't and incompatible with SRFI 105, this >> limits some use. >> like: in type[] or match with patterns looking like ([_ y] ... >> this would be a good idea to have an option in Kawa that allow >> replacing those [ ] by normal ( ) or even be compatible with the 2 >> syntaxes should be possible >> >> in my case i dislike 'match form and do not using typing in scheme >> when available so this not a big problem in my codes but for now i do >> not know how to modify the SRFI-105 reader for be compatible. It is >> also possible to parse it with SRFI 105 and after modify again the >> code to set back the transformed [] in () again in [] in 'match and >> type[] .... >> >> >> On Mon, Oct 9, 2023 at 4:48=E2=80=AFPM Damien Mattei wrote: >> > >> > hello, >> > >> > in this code belonging from Guile and Racket version: >> > >> > (match (list index1-or-keyword-eval-pos index2-or-keyword-eval-pos >> > index3-or-keyword-or-step-eval-pos) >> > >> > >> > >> > >> > ;; {a <+ (make-vector 7 0)} >> > ;; '#(0 0 0 0 0 0 0) >> > ;; > {a[$ $] <- #(1 2 3)} >> > ;; > a >> > ;; '#(1 2 3 0 0 0 0) >> > ((list (=3D=3D slice) (=3D=3D slice)) >> > (container-copy! container-eval >> > 0 >> > expr-eval) >> > >> > i have this error: >> > unrecognized pattern operator list near ((list (=3D=3D slice) i2 (=3D= =3D slice)) >> > slice is defined like that: >> > >> > (define $ '$) >> > (define slice $) >> > >> > what is the equivalent syntax for kawa? >> > >> > damien