From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [IPv6:2a0c:5a00:149::25]) by sourceware.org (Postfix) with ESMTPS id F2A823858D32 for ; Thu, 4 Jan 2024 05:47:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2A823858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bothner.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bothner.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F2A823858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a0c:5a00:149::25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704347237; cv=none; b=G5wsddTDNAcy2RMIY42g9oK4ZpRXGDFAEJtcLqbfl2E+6tzl9lbopqhBW45eFwKSWaMzg/UOFTJPydfzHnZYyPJUUkMX2L8z0wkTi7iM/hKTDQZuzd2xFTjaem77RTNh4bDnKtehYYentqxEvzza6oaUwYJaZu+fb5w2RIW8Dpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704347237; c=relaxed/simple; bh=swdoAzBY7a4oqDy7F7YNxY+P5XUmc54wmv2S817nw6s=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uI9jQ0nG4wQflZgJ2asoY7vdc+JcYFPBtiH3n7x7jD7X5tzzmtqsjc6AHIEj+PquFvaqS3apLBeu1IMabUZQt4V14A2y0mUKJNqan8/+1KMKsCwlMml4OtUR+6TXLz2ptBh+vl620qtgVT6Bfcn7wcyuoGcYrp0WiRaPejJPKpk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1rLGZT-001ZNv-7V for kawa@sourceware.org; Thu, 04 Jan 2024 06:47:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bothner.com ; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID; bh=jTgNj2gvKoc9vft09qCV8deInNWZF4MqI8lBI+G9NUU=; b=Prk7oPD5Kkx5LDRnVtNHefHnOV b5wRbOY4Xtn/zw76KyMTkw+EkWCIXhveVAek7QmpxLBoJVN5dSwfNzT3Oeocm16HETacsZDsWcsrA NjT1DYnhV+DOdisprai8m2e5idiF6yDNEcjXwVu3k/vRk8HwUITrFRvNggCA1x1pXMqf4Yi40wzkW nAsNoIK5M1XDP8nkYUjG17U9fZ2WjFO2/01D7GAzYWmi2/OQbTWIo4ogCUjaBzyMvpwkHNtN0UfsN VBVbdnrTEDxzBNQihEMNsHXYKB8evcPEAVT9qtOTyXhGm9MFjIq/r8dobAQRTbdni5BiZZy6carkJ itxJCRcQ==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rLGZS-0001Fq-G3; Thu, 04 Jan 2024 06:47:10 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (524175)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rLGZC-00ALaV-Ap; Thu, 04 Jan 2024 06:46:54 +0100 Message-ID: <8e900592-ac9b-4e91-96ad-20d601ce6e71@bothner.com> Date: Wed, 3 Jan 2024 21:46:43 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: The command line option --script Content-Language: en-US To: =?UTF-8?B?5LyK6Jek5LiA5YWJ?= , kawa@sourceware.org References: From: Per Bothner In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: On 1/3/24 19:16, 伊藤一光 via Kawa wrote: > I remember reading some explanation about the command line option > "--script", but I do not fully understand it. Yes, the Kawa documentation doesn't explain this properly. Basically, the difference is that --script causes the file to be processed line-by-line. This means that the Kawa evaluates each line in order. A "line" in this context is the minimum non-zero number of complete lines that comprise a balanced S-expressions (list) or until a reader error occurs. That line is read, macro-expanded, analyzed, compiled, and evaluated, before the following line is processed. Each "line" treated as a separate "module". This is in contrast to the default whole-file mode, where the whole file is read; all of the resulting S-expressions are macro-expanded, analyzed, and compiled to a single "module". Only after the whole file has been compiled, then the whole module is evaluated. That doesn't explain the error you're seeing, which is because of the kludge starting at line 73 in kawa/standard/set_b.java. And that in turn was to fix this issue: https://gitlab.com/kashell/Kawa/-/issues/44 This is a Kawa bug, but it isn't obvious how to fix it. The clean/simple way would probably be to remove the "kludge" in set_b.java. However, that would presumably re-introduce the issue #44. On the other hand, trace and untrace are a big kludge that don't go very well with the compiler-based model of what Kawa is about, so perhaps we should just give up on them - they only work in limited cases, anyway. I don't know what the right solution is - and I don't want to spend a lot of time on it. -- --Per Bothner per@bothner.com http://per.bothner.com/