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 064833858D1E for ; Sun, 8 Oct 2023 09:03:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 064833858D1E 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-534659061afso5888543a12.3 for ; Sun, 08 Oct 2023 02:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696755787; x=1697360587; 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=L0mXIZQMYdeXfnI6vDacG6KgxFVos4kBzwS462yHYdM=; b=VOtzrcvr9mmt84Bt/zIAhdzCJ+cD9fzpOrwnmZ8vtQ37AW6P2lbawc9UJsuCsITUlG zH7m6d65vU/VNDn8F7JXO/Iie2dgph9damD930z2qwG0bf9pPa6ZnJJ86Q2yx5Hf3LFN oEOGlpQqgjtltNmXONHiEfhl4f17jJDkfItymOU2YfRSW0ntJo3g2tA0z6HKSNhGZYk+ GdFjQsNcDX6bmM083fhIMmantJ3qY2jKdfRFiIoQSDVusFeoKdm0rz2QI9E5/Alga8T1 AnxJUpBpwpjDD8UXKG1iMHNybPobNxW+hUSpFU+oSXZ75qf/jFzcGe07XUIbWAxO+BQt cirg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696755787; x=1697360587; 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=L0mXIZQMYdeXfnI6vDacG6KgxFVos4kBzwS462yHYdM=; b=Mvv5denGUSmi8Cl8CRaThL5bbUeiaIQmv+mMxBWs4e73olXj3eWXK1/wrWCPMZQ65q g/yDwOBvRBf1jclhUutfokMRNLoLlVmx0k4blTV5BGEOQS4JKcjzOTZJUrNazDW9enoa ZYt7qSPPna5jrvRktM9SIcdEaBRryQkjGfxVZSUozCRo4CX0XZd9Bc7mwLQEXB93vC9A Ih3lEesSZqMvnWYo7jK38oGy0Q5Hh0HYgkLUnkaCVG3YNy8fQtKfvkXH4XuRhRF86NAe nz4LPMJtzSpadN1QuzWqx1ypYm0u3RnvFJFcZ1bDRuhcDdD5i4bqNy8fm3oZDUmE6Q0h Z8yQ== X-Gm-Message-State: AOJu0YygVmHeMUBsgiTQiZkBRq5CivJo0Kz8UEDSdI05lEweWJm7w5RA KlK93GyvFdOMLVzFe4JmZzokTBhVNqaQGh2Xqp6wCycnDKA= X-Google-Smtp-Source: AGHT+IHAkaMu6e6FhidyYaMNFZDfkWulJsd3g13GEsfMMAsv+BgKgSO9EPNP0JkZGoTF2mBULEDMJ1gZaYxIWiNGfMw= X-Received: by 2002:a05:6402:28b1:b0:530:be79:49e7 with SMTP id eg49-20020a05640228b100b00530be7949e7mr10967717edb.37.1696755786551; Sun, 08 Oct 2023 02:03:06 -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:02:54 +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: 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 wr= ote: > > > > > > In Kawa $bracked-apply$ is a pre-defined macro - but it is not hard-w= ired. > > > You can re-bind it to something else. You probably should. > > > Either that, or change the reader to conervt foo[args] to something d= ifferent. > > > -- > > > --Per Bothner > > > per@bothner.com http://per.bothner.com/