public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* difference between REPL and compiled
@ 2023-11-16 14:25 Damien Mattei
  0 siblings, 0 replies; only message in thread
From: Damien Mattei @ 2023-11-16 14:25 UTC (permalink / raw)
  To: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]

when i try to compile this file:
https://github.com/damien-mattei/AI_Deep_Learning/blob/main/exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa%2B.scm

i got warning but not error but i can not find the .class file:
kawa -Dkawa.import.path=".:/Users/mattei/Scheme-PLUS-for-Kawa:./kawa" -C
exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm
(compiling exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm
to exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa)

...


exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:7:36:
duplicate declaration of '*'
exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:5:9: (this
is the previous declaration of '*')
exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:8:36:
duplicate declaration of '+'
exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa.scm:6:9: (this
is the previous declaration of '+')
/Users/mattei/Scheme-PLUS-for-Kawa/for_next_step.scm: note - skipped 0
errors, 14 warnings, 0 notes

the problem seems to be in the first lines of the parsed code:

(require (quote srfi-69))
(require matrix)
(require Scheme+)
(require array)
(import (rename (scheme base) (+ orig+)))
(import (rename (scheme base) (* orig*)))
(define-overload-existing-operator * orig*)
(define-overload-existing-operator + orig+)
(define-overload-procedure random)
(define (random-int n) (integer (* n (random))))
(overload-existing-operator * multiply-matrix-matrix (matrix? matrix?))
(overload-existing-operator * multiply-matrix-vector (matrix? vector?))
(overload-existing-operator + vector-append (vector? vector?))
(overload-procedure random java.lang.Math:random ())

i think it is the import-rename that was causing this sort of problem last
month when i had put it in modules

I suppose that the compiling now put again all the code in a module causing
somewhere the problem again

is there a way to make it compile the way it works in REPL when i load it
by hand like (load "filename.scm") ?

Damien

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-16 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 14:25 difference between REPL and compiled Damien Mattei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).