i find a good rule with syntax-transformers, no matter r7rs or not... you can use them in modules but when comes the time to start the whole program at REPL use (load "program.scm") instead of (import (program)) or (require program) so when there is some syntax-transformers do not start your program by (define-library (program) ... or even (module-name program) but simply put the code, and even your program is also considered as a module as any file.scm in Kawa is considered as a module file. but i'm still searching more on this problem.... On Sat, Jun 29, 2024 at 5:32 PM Damien Mattei wrote: > 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=(# 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=#(1 2 1) > z=#(#(0) #(0 0) #(0)) > z̃=#(#(0) #(0 0) #(0)) > define-overload-existing-operator : proc =# > define-overload-existing-operator : orig-proc =# > M=#(matrix@3811464b matrix@5f0a5848) > ᐁ=#(#(0) #(0 0) #(0)) > nbiter=5000 > 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=3.3029259361846465E-5 > > ################## XOR ################## > *init* : nc=#(2 8 1) > z=#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) > z̃=#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) > M=#(matrix@7fb313e3 matrix@771ede0d) > ᐁ=#(#(0 0) #(0 0 0 0 0 0 0 0) #(0)) > nbiter=250000 > 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=3.32027043752617E-4 > > ################## SINE ################## > *init* : nc=#(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 PM 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/ >> >