From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 9CF1F38185E4 for ; Sat, 29 Jun 2024 15:32:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CF1F38185E4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9CF1F38185E4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719675180; cv=none; b=NkM9mVnWD7PIsnAQA5ZpewWeeP+krcEXhdXIycKNQbOpWYlaJRJnLG4xJT3FWwGPUDepFF+oB9fw66LGkVSJluY81VcfzFAuH583RZ9bniZQ5+PMkUeBJreSfvtSZoFOA9NPVwNIIUGmf4jOK1+IQOE9ZQDRQSRegsCPY+YaEec= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719675180; c=relaxed/simple; bh=/B/lPOftyYpGbqoNMgTfd/JnT6sZvu7bYcte8QpGW90=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=LZy0mFzLefNOCScQpmLPvtyFFSxKpXvdvO908sMwjXJyqg+28vyXuUFNolzUOSmk7CDJcGtgtdwzthK7OZ4utwgWwxam2Y/fEwJw1KoJ0681MZBWylR4IHviZG7AF2aDCArBDt0/SAeERw6f/BWvwbSeMziDCpaNED1LBjcQ+fU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3d562882f4cso941706b6e.3 for ; Sat, 29 Jun 2024 08:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719675178; x=1720279978; darn=sourceware.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=NmNs8/PO04bwYedvAQte1hBXsKP1xUAof2Cyrjc8k/w=; b=FbqVdNoiylflPOn14bzQeckfYAxyViitam4gXMTzTH5fr1fdyXIP8bx5AlxyHU/cCo hoViq3VozrwgVF7tIA+ifCxLGKTEatYPhnaTfLeyv97ChYpWQG69E90ICz2o9tK/qfSM cOxWYU4cbbqOPe80oMpa6pFrIY+fSpEV+exKijbW48HOzchRyGa54yq9g44g+upxZdnA 9gY3+LUSc7+fmY7LyxTPmENo2vVSSIFsf5h8Xp6UMCWDP45bsjOp028HVztuxIWhq32S qp6YTyK3hcKOplBt6DbAsGlRL78bmOSzFfHAGtPxnvBRGQ5v5NZmql8TpvNbOARYTD3h cAww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719675178; x=1720279978; 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=NmNs8/PO04bwYedvAQte1hBXsKP1xUAof2Cyrjc8k/w=; b=Y+RINZMlefBKMqAwYzVWuodpQg+PkhLBWSIVMFYk79JuTFC7yzbOIZtgB6A5RIVrND CMbrjja5axAqmLYoyi4VTV+RlcHnCwuanXscXiAgGDsXcKedqi2+eEzvQvE+3NTC46th gWMT00tdfKbd0SEo/WPU/tYJX3DoOm5N2P+CFiRoTzw2Jrhli9ZiH1hz/dZSH1UXASGq raPuhx4kUhlWmJhxtPJOUACYOs2TLGTpds6npCIa3+MTju0P/Ka5/en7Uwjz4vEOcYb5 yNT5yshxBArm5OOHD3upnJQCEhw5RN+S8CDLjuZ0m6Y3iqVihQiF6e0uDewcu8SxXWfo E6YQ== X-Gm-Message-State: AOJu0YwHHiQZM/0VDM6KUv/ff6XT9S5RDJYotOF3QPd/CeuXFvbrato+ D6tigr/pnbrFXS91JYuwvZBGZJ9yT5dLR4Dh05bsNAvGx3LOOsAlLnFTjFgZJtMFFLIO8nLMkGs 5XJ07QJkMIcPEVmT2XEpttpwqnZl78osdNDc= X-Google-Smtp-Source: AGHT+IHvrtNKqHwa2cp5kdcz9peL9ekf2AuUmpWUy1ODC3Q5uGSWBo9oLMWZL2BepzojiuKlbvJXoD/My+z49FH9/iU= X-Received: by 2002:a05:6808:308f:b0:3d2:19da:9573 with SMTP id 5614622812f47-3d6b30f7227mr1875450b6e.15.1719675176504; Sat, 29 Jun 2024 08:32:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Damien Mattei Date: Sat, 29 Jun 2024 17:32:45 +0200 Message-ID: Subject: Re: bug in kawa syntax transformer? To: Per Bothner Cc: kawa mailing list Content-Type: multipart/alternative; boundary="000000000000065862061c091492" X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --000000000000065862061c091492 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable i find a way to make it run, i wanted to post the answer later.... it works now. in summary the solution is: for a module test-foo that use module foo you have to: be at REPL and: (import (foo)) (import (test-foo)) and it is ok. but it is not the normal behavior , because as foo is already imported by test-foo the module should works without also importing foo in REPL example: test-nfx.scm: (define-library (test-nfx) ; R7RS (import (kawa base) (operators-list) (n-arity) (infix-with-precedence-to-prefix) (nfx)) (define x ($nfx$ 3 * 5 + 2)) (display x) (newline) ) #|kawa:1|# (import (nfx)) #|kawa:2|# ($nfx$ 3 * 5 + 2) 17 #|kawa:3|# (import (test-nfx)) 17 another example: #|kawa:1|# (import (Scheme+)) #|kawa:2|# #|kawa:3|# (bracket-apply #(1 2 3 4 5) 2) bracket-apply : #'parsed-args=3D(# 2) (bracket-apply #(1 2 3 4 5) 2) 3 #|kawa:4|# ($nfx$ 3 * 5 + 2) 17 #|kawa:5|# (exit) for a whole program that use Scheme+: #|kawa:1|# (import (Scheme+)) #|kawa:2|# (load "exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm") ################## NOT ################## *init* : nc=3D#(1 2 1) z=3D#(#(0) #(0 0) #(0)) z=CC=83=3D#(#(0) #(0 0) #(0)) define-overload-existing-operator : proc =3D# define-overload-existing-operator : orig-proc =3D# M=3D#(matrix@3811464b matrix@5f0a5848) =E1=90=81=3D#(#(0) #(0 0) #(0)) nbiter=3D5000 exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:145:2: warning - no known slot 'apprentissage' in java.lang.Object 0 1000 2000 3000 4000 exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:147:2: warning - no known slot 'test' in java.lang.Object Test des exemples : #(1) --> #(0.005218051056863006) : on attendait #(0) #(0) --> #(0.9937685906977904) : on attendait #(1) Error on examples=3D3.3029259361846465E-5 ################## XOR ################## *init* : nc=3D#(2 8 1) z=3D#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) z=CC=83=3D#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) M=3D#(matrix@7fb313e3 matrix@771ede0d) =E1=90=81=3D#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) nbiter=3D250000 exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:160:2: warning - no known slot 'apprentissage' in java.lang.Object exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:162:2: warning - no known slot 'test' in java.lang.Object Test des exemples : #(1 0) --> #(0.9869979600720541) : on attendait #(1) #(0 0) --> #(0.009586857552488845) : on attendait #(0) #(0 1) --> #(0.9875938547018659) : on attendait #(1) #(1 1) --> #(0.015785460599146515) : on attendait #(0) Error on examples=3D3.32027043752617E-4 ################## SINE ################## *init* : nc=3D#(1 70 70 1) but perheaps there is a solution with playing with import/require, Kawa/R7RS i will test any possible combinaison (? do not know the english term) the problem only happen with syntax transformer, if not , i would have noticed already......or someone else.... Damien On Sat, Jun 29, 2024 at 4:17=E2=80=AFPM Per Bothner wrote: > Perhaps - or perhaps it depends on unspecified behavior. > > In any case, I think you're going to have to debug this on your own. > > On 6/29/24 2:03 AM, Damien Mattei via Kawa wrote: > > i'm sure it is a kawa bug because i ported all the code to Guile and it > > works perfectly. > > -- > --Per Bothner > per@bothner.com http://per.bothner.com/ > --000000000000065862061c091492--