From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id B75A73858298 for ; Fri, 13 Oct 2023 14:27:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B75A73858298 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-ot1-x332.google.com with SMTP id 46e09a7af769-6bd04558784so1430869a34.3 for ; Fri, 13 Oct 2023 07:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697207240; x=1697812040; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=JN5/sX4SL19SfOiiy2BDOzD/3pSwH8n7EEl7yjvDK9A=; b=bf6CAkDv5wCYz2Rsnd7YjFQzsg1clNXQldbPCJ2KvaKrTDFyHb61nFWdLfzZTYg3i6 KCf+iEQxRSIYQsSyqLsKmvvUM/yAJ6eMa2+B8YDwPeIVMBx1EO8yYGFknJDQXb+Ogk+P ktfi2opgxaQbrkC2FJ/lO7oXPlhWBEQm9Rmy61BkjKkchWYyqiuyF37puw7mO6pFfuTd wXIssY9tSiIMZARAGBGQoHC2Mzxf+3zY0aLqjxmdW+aVezgl6RqlYhAwYWlnclHFYZm4 dgiNH+wBGGnzG5Jwp+asj4U7ydobgcd74+PuZxpWY6oGkWFRUC9OJnASWHZhmtb+LJ6Z 97EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697207240; x=1697812040; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JN5/sX4SL19SfOiiy2BDOzD/3pSwH8n7EEl7yjvDK9A=; b=JCbD4o1Dq4ecoXIOPOosMEO/N3ksez8ZD+VxY95ZlCNGIwyC/51idr4QtVDGCiGDUx Xkf6vfXaEFMyetrbzHXTanwZwvqzszceKoU+lYquQACYsMaM1bawhaSEyDwRqWXARy91 PoyvXOB/QFuCYqN4GoRzMFfi1cJOpIzE1enWfwZi0ze+B0s7bUJEIpMfJCl4dN7dHhBV hmmma2+PSFz0BWl+GF7uFcxgektvQPCdhSd9GVAw0uaKHIEnRg6T6va6B5YjdiKhGVVE BLHSYzQenW129SvkLp0bBx25Kvcp8c0cqpz5lhZkfjMYrUb452cr7nTSCks6D/TVxI/I cz9Q== X-Gm-Message-State: AOJu0YyKySRKeFx/zgvcJrH+gSvLXNvrFaXtUSvVatlcpXgGhWUwMtLU ZIQ3fsJq4bMoaADLkkp/P6COtijo5jg= X-Google-Smtp-Source: AGHT+IHFmXBSPe8uclM2vKLbjhB2rW9Uhe9eB1Qo1+mBCny/EnmIyxYkoqhB1zjJwWYIHOhcbTMh9A== X-Received: by 2002:a9d:6194:0:b0:6b5:ee8f:73af with SMTP id g20-20020a9d6194000000b006b5ee8f73afmr31173806otk.5.1697207239897; Fri, 13 Oct 2023 07:27:19 -0700 (PDT) Received: from L440 ([2806:2f0:74a1:f0f5:c12:2e87:e0a4:a474]) by smtp.gmail.com with ESMTPSA id 189-20020a4a09c6000000b0057df0bcab46sm3132959ooa.45.2023.10.13.07.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 07:27:19 -0700 (PDT) Received: by L440 (Postfix, from userid 1000) id 05DE71081F54; Fri, 13 Oct 2023 08:27:18 -0600 (CST) From: Alcides Flores To: Damien Mattei via Kawa Cc: Damien Mattei Subject: Re: include files References: Date: Fri, 13 Oct 2023 08:27:17 -0600 In-Reply-To: (Damien Mattei via Kawa's message of "Fri, 13 Oct 2023 08:50:11 +0200") Message-ID: <87ttqu38e2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-1.2 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: --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain *Hello Damien* In the case you mention. Have you tried using =require= for that? I have always used it successfully in such situations. I.e. importing units/modules in paths relative to the current directory of the module(s). #+begin_src scheme (require "my-scheme-file.scm") (require "some-dir/scheme-file1.scm") (require "another-dir/scheme-file2.scm") #+end_src *Greetings.* --==-=-=-- --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Alcides Flores. El vie, oct 13 2023, Damien Mattei via Kawa escribi=C3=B3: > it is a problem i had long time ago on another kawa project, how can i > include a file relative to the included file, it works for first > included file but if the latter included file include another relative > path file it fails: > > #|kawa:4|# (load > "exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa+.scm") > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:38:10: > cannot open file "./rec.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:39:19: > cannot open file "./def.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:40:19: > cannot open file "./set-values-plus.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:41:19: > cannot open file "./for_next_step.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:42:19: > cannot open file "./declare.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:43:19: > cannot open file "./condx.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:44:19: > cannot open file "./block.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:45:19: > cannot open file "./not-equal.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:46:19: > cannot open file "./exponential.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:47:19: > cannot open file "./while-do-when-unless.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:48:19: > cannot open file "./repeat-until.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:49:19: > cannot open file "./modulo.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:50:19: > cannot open file "./bitwise.scm" > /Users/mattei/Library/CloudStorage/Dropbox/git/AI_Deep_Learning/../Scheme= -PLUS-for-Kawa/Scheme+.scm:53:19: > cannot open file "./slice.scm" > > file Scheme+.scm: > > > ;; (load "Scheme+.scm") > ;; (load "scheme-infix.scm") > ;; (load "assignment.scm") > ;; (load "apply-square-brackets.scm") > ;; (load "array.scm") > > (require 'srfi-1) > (require 'srfi-69) ;; hash table > > ;; try relative , use include-relative-relative if problems > (include "./rec.scm") ; rec does not exist in Kawa (no SRFI 31) > (include-relative "./def.scm") > (include-relative "./set-values-plus.scm") > (include-relative "./for_next_step.scm") > (include-relative "./declare.scm") > (include-relative "./condx.scm") > (include-relative "./block.scm") > (include-relative "./not-equal.scm") > (include-relative "./exponential.scm") > (include-relative "./while-do-when-unless.scm") > (include-relative "./repeat-until.scm") > (include-relative "./modulo.scm") > (include-relative "./bitwise.scm") > > > (include-relative "./slice.scm") > > file: exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kawa+.scm > > ; Deep Learning : back propagation, gradient descent, neural network > with N hidden layers > > ; L'algorithme de r=C3=A9tro-propagation du gradient dans un > ; r=C3=A9seau de neurones avec N couches cach=C3=A9es. > > ; D. Mattei > > > ; use MacVim to show ALL the characters of this file (not Emacs, not Aqua= macs) > ; jeu de couleurs: Torte ou Koehler > > ; use: (load "exo_retropropagationNhidden_layers_matrix_v2_by_vectors4kaw= a+.scm") > > (include-relative "../Scheme-PLUS-for-Kawa/Scheme+.scm") > > (include-relative "../Scheme-PLUS-for-Kawa/scheme-infix.scm") > > (include-relative "../Scheme-PLUS-for-Kawa/assignment.scm") > (include-relative "../Scheme-PLUS-for-Kawa/apply-square-brackets.scm") > > (include-relative "../Scheme-PLUS-for-Kawa/array.scm") > > > i know i can , and used module for Scheme+ but ,for now i prefer > testing with included files and any way scheme-infix assignment > apply-square-brackets required to be included at user or main > definition level as it modify the environment and scheme+ used a > modified reader before that too.... --=-=-=--