From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 325253858D1E for ; Sun, 8 Oct 2023 09:15:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 325253858D1E 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-x530.google.com with SMTP id 4fb4d7f45d1cf-533e7d127d4so6116030a12.3 for ; Sun, 08 Oct 2023 02:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696756543; x=1697361343; 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=Yh8s+RJ+B+4Cfs3WoHgWfxG/bYIBj830KESgeXOCv0w=; b=XEY5bUFmQmKMJoyhn4Xf1kOxSCdxBNo9LB8jeKQAg8VrDRwX5uPJK+sdFwK2liLhQF ulxGD3T1Rd0UJcDfHlzsJ371cEXO1z+zJmdAST0d8WUiZw8LHW1Blo7lWzENjL2n+R8r iSmlq1B8bTZXnBjvDNXRqPbJoe2ChyDwmWlkY/W/Vo0U7sozNjH6yQ1tfgPxFJdzVr7w k5xBLdqEh4AY8JX+mPDJnXtwVmL6uXWXoTsuRvvZEcri99E/RsJU6yQKqPHeO2uPaEPS s7HesQTC3iBG5bh6M1/YrUEJtywUGRCaRndYXLmv+EKCQiJYiG99zmieMbbQ1FsZjqnn oycw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696756543; x=1697361343; 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=Yh8s+RJ+B+4Cfs3WoHgWfxG/bYIBj830KESgeXOCv0w=; b=abGZz6h2Oj8DSMBltsOyfBs5rfAfDWd96vDQaXDgX8h9NLNY4ECWsWcU9/nhVr/HCG ZPjH18PX4noK6bQi+cM6zBKM1oPWFwn3kn3as8hpu3ZuESuvciGY5Icoy+dqdP+tRCkl nEtxYKfLpkRD7cmX3/IT5Fhzjp7dCP65DvppKAanHm6HCJjPNwbQGyM9P65IJ0sHoLj0 +PR6Ah8c7CT+O31s9RptXRuexp9bkAZZ166WSHQrUWbIcvDxfORPxr6LHP1u3z1ZX+Qe KvHwZYlkIogdVCb6iOAYK2MphtcaXeFKGL9HzieFz1WbgRdVDx1FxsDsbv+46JUBCA54 tugg== X-Gm-Message-State: AOJu0YzGRd6F3m/ylUX3W1Vrj+XVi3KokSFwKrkk1X6p3Z5EuZ0biII6 N3GbVugZbZM1vzarqI4jZZfiJ/dYScms7BaDPy0cCy98 X-Google-Smtp-Source: AGHT+IGsPqF9J8ihqWwwFmb331tp14V+wClpE2UHo5QkQ5A/60zy3BCXW5+rDyeA0gHDhRKILmNgunoWFkHRMkze32E= X-Received: by 2002:aa7:c549:0:b0:525:6e47:10f6 with SMTP id s9-20020aa7c549000000b005256e4710f6mr11358697edr.22.1696756542445; Sun, 08 Oct 2023 02:15:42 -0700 (PDT) MIME-Version: 1.0 References: <2dee812b-56a9-bba0-bb63-666f8866007b@bothner.com> <60ec5fc4-bad7-97f6-dbf8-455e787e3380@bothner.com> In-Reply-To: From: Damien Mattei Date: Sun, 8 Oct 2023 11:15:31 +0200 Message-ID: Subject: Re: unrecognized syntax: type[args] To: Per Bothner 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,KAM_SHORT,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: and anyway,in scheme+ , in future all the SRFI-105 converter to scheme will be done outside the scheme implementation ,even if there exist already a srfi-105 implementation for a particular scheme because the optimisation must be done before compilation the process will be: curly-infix-neoteric -> scheme prefix -> optimiser for $bracket-apply$ ,$nfx$,... -> scheme compiler (kawa,racket,guile,bigloo....) and this solve the problem of the scheme implementation that rarely implement SRFI105 note that the optimiser i'm currently writing is in scheme and as it is external i can write it any scheme, Kawa for example or racket or guile , and use it with another scheme+ implementation (guile or racket) On Sun, Oct 8, 2023 at 11:02=E2=80=AFAM Damien Mattei wrote: > > nothing is perfect but i have a solution,i do not know all the non > R*RS syntax special features of kawa, i will assume type[] will have > to be replaced in a program in Kawa by ($bracket-apply$ type) to use > this feature, also a vector as [1 2 3] should be written #(1 2 3) . > This is not a big deal. Because my curly-infix2prefix parser can not > deal with those syntax, they conflict with SRFI 105. > After in my code i need to replace $bracket-apply$ that is already use > in Kawa by bracket-apply for example (also in my code $bracket-apply$ > is a procedure and it is incompatible with type that must not be > evaluated as argument and i do not want to go back when > $bracket-apply$ was a macro in my code). Those modifications will not > touch the Kawa source code ,only my code and still preserve SRFI 105 > features and i hope all Kawa special syntax features as my > reader-parser is external to Kawa.(i also writing an optimiser that > act before the code is pass to the scheme compiler as Scheme+ create a > lot of slow down that can be optimize before, especially infix with > precedence parsing could be done before compilation and not at runtime > but this is not special to kawa but to all scheme implementation of > scheme+) > > On Sun, Oct 8, 2023 at 10:11=E2=80=AFAM Damien Mattei wrote: > > > > it is hard to modify without touching or breaking deeply the kawa code > > or my code because $bracket-apply$ is coded in java in > > BracketApply.java > > do you know a way to rename $bracket-apply$ it. The standart scheme > > way i know does not work, the cause seems to be that it is java behind > > , it is not a macro ,not a procedure: > > #|kawa:9|# $bracket-apply$ > > #> > > i ideally want to rewrite $bracket-apply$ and be able to reuse in it > > the code of the previous definition of $bracket-apply$.... > > > > first problem is to rename this "object" $bracket-apply$ in kawa ? > > > > On Sat, Oct 7, 2023 at 6:59=E2=80=AFPM Damien Mattei wrote: > > > > > > yes it is what i was understanding and verifying: > > > > > > https://www.gnu.org/software/kawa/tutorial/Types.html > > > > > > > > > |kawa:21|# (define x (int[] 1 2 3)) > > > #|kawa:22|# x > > > [1 2 3] > > > > > > i discover that: > > > #|kawa:23|# (define x (($bracket-apply$ int) 1 2 3)) > > > #|kawa:24|# x > > > [1 2 3] > > > > > > yes i can redefining , that was in my code , but it fails, probably > > > one of my definition used it before redefinition , i will test that > > > and in the worse case use another keyword than $bracket-apply$ when > > > curly-infix2prefix.scm parse the [ ] and convert it in prefix.... > > > > > > On Sat, Oct 7, 2023 at 6:42=E2=80=AFPM Per Bothner = wrote: > > > > > > > > In Kawa $bracked-apply$ is a pre-defined macro - but it is not hard= -wired. > > > > You can re-bind it to something else. You probably should. > > > > Either that, or change the reader to conervt foo[args] to something= different. > > > > -- > > > > --Per Bothner > > > > per@bothner.com http://per.bothner.com/