From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Vladimir Zhbanov Newsgroups: gmane.lisp.guile.user Subject: Re: Using guile-scmutils with REPL and compilation Date: Sat, 20 Jun 2020 10:33:34 +0300 Message-ID: <20200620073334.GA1894@newvzh.lokolhoz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.10.1 (2018-07-13) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jun 20 09:34:24 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmY19-000GFe-E8 for guile-user@m.gmane-mx.org; Sat, 20 Jun 2020 09:34:23 +0200 Original-Received: from localhost ([::1]:38064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmY17-0007LY-Te for guile-user@m.gmane-mx.org; Sat, 20 Jun 2020 03:34:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmY0y-0007LE-50 for guile-user@gnu.org; Sat, 20 Jun 2020 03:34:12 -0400 Original-Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:36813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmY0w-00084y-DE for guile-user@gnu.org; Sat, 20 Jun 2020 03:34:11 -0400 Original-Received: by mail-lj1-x242.google.com with SMTP id i3so13985836ljg.3 for ; Sat, 20 Jun 2020 00:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ueY8UwPiz+tPrXQqDfjWJ4qZr7HsG1OKjFnFktAGpS0=; b=E9uOm0JloaLM430Ax8i92xD+X6xEQiszaeNBTFDlymATp1+WpA/K18KqqMMh8XBWMg U9fPlDWVWZmhbkl2GTE1RFSpnKm0UrFtEqtjtv54Viqac/6eLz3ldi6ihf1B+bZGzeP0 iIQXcoNXzmPybfNvBE9/uEvI+Kkvgl815/9zI57HJRao7YEgB1jACNVqvkr1Cyr2fcVD c1L1kSf39yUA4+Evw5cbhYoZPrpND1pdkv+aDbs5Ak3NtewsKbth9OiT949ysX7VqrRs 6gniuZKKYw10S642mGpctVjcPn224nJHae1LQoGDMH+bcAtY+/Fqcy9AFezbIe3kYnF/ cD2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ueY8UwPiz+tPrXQqDfjWJ4qZr7HsG1OKjFnFktAGpS0=; b=ovWvoLI1Lrj1n0bv/SXaogEtk2J7N7AAfcmbHMeIQLDOvEHJsNzC1WL46N/QicNmZq vYsHhhwIjYiL3hlTZWoYaws3fLWbmeWZcfMancUz7EJ11P2Cs+AoYOgyvCrplUPXoGdG hHmMSxPUDIokQuErBsu5/PN28SXI59xkRyQf7rhOr3jRt7EL9Lct6yS1Gj8WrGHAoQ5p yX+k+2OLprC2TVuwXK1cFH6QNA0cHrh3dLAAozBqe+dM5kTvzIZzzP1mebhKC4nMGM1t 9brcMS3XttW7O3U5r7ZjjvCez3fJjnJMy7szV5wZ6tBCX8nNWAiWjzCS9vnYiInXTRbc ftuw== X-Gm-Message-State: AOAM532EBP4ASMX8YwnM5f/8AcyIDdfM6nn+5pzPv7pzWYgCPE7xcw+P BEnYsax6J5ZSWTyPlHjGaMoMMITl X-Google-Smtp-Source: ABdhPJwiOmbmSeE0qmSUIOReWltLqvi4rYqXET9stMbXCnFpmAKO4QZvoVLQJ/Dp3jw96tzoWaUKMA== X-Received: by 2002:a2e:8198:: with SMTP id e24mr3495589ljg.183.1592638447126; Sat, 20 Jun 2020 00:34:07 -0700 (PDT) Original-Received: from newvzh.lokolhoz ([95.179.127.231]) by smtp.gmail.com with ESMTPSA id n23sm1903560lfq.76.2020.06.20.00.34.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jun 2020 00:34:06 -0700 (PDT) Original-Received: from vovka by newvzh.lokolhoz with local (Exim 4.92) (envelope-from ) id 1jmY0W-0005FM-Pn for guile-user@gnu.org; Sat, 20 Jun 2020 10:33:44 +0300 Mail-Followup-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::242; envelope-from=vzhbanov@gmail.com; helo=mail-lj1-x242.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16595 Archived-At: Hi Slava, On Sat, Jun 20, 2020 at 02:43:00AM +0300, Viacheslav Dushin wrote: ... > Second one: > There is also a problem with code compilation: > > (load (%search-load-path "guile-scmutils/src/load.scm")) > (set-current-module generic-environment) > > (define ((Gamma w) t) > (up t (w t) ((D w) t))) > > works fine in the REPL, but fails to compile (guile code.scm) with the > following error: > > ;;; note: source file > /usr/local/Cellar/guile/2.2.7_2/share/guile/2.2/ice-9/boot-9.scm > ;;; newer than compiled > /usr/local/Cellar/guile/2.2.7_2/lib/guile/2.2/ccache/ice-9/boot-9.go > ;;; note: source file > /Users/slava/Documents/work/func-diff-geometry/prologue/code.scm > ;;; newer than compiled > /Users/slava/.cache/guile/ccache/2.2-LE-8-3.A/Users/slava/Documents/work/func-diff-geometry/prologue/code.scm.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /Users/slava/Documents/work/func-diff-geometry/prologue/code.scm > ;;; WARNING: compilation of > /Users/slava/Documents/work/func-diff-geometry/prologue/code.scm > failed: > ;;; Syntax error: > ;;; /Users/slava/Documents/work/func-diff-geometry/prologue/code.scm:4:0: > source expression failed to match any pattern in form (define ((Gamma > w) t) (up t (w t) ((D w) t))) > Backtrace: > 6 (primitive-load "/Users/slava/Documents/work/func-diff-…") > 5 (_ # # #) > 4 (_ # # #) > 3 (_ # # #) > In ice-9/eval.scm: > 245:16 2 (_ #(#(# #f # …))) > In unknown file: > 1 (string-prefix? "/" #f # # # …) > 0 (_ # # #) > > ERROR: In procedure string-prefix?: Wrong type argument in position 2 > (expecting string): #f Try (load #f) and you'll get the same error. `load' requires string as an argument. AFAICS in the Guile reference manual, probably the function is supposed to work in REPL only (while it works without it). If `%search-load-path' is not able to find the file you want to load, it returns #f. You can check your `%load-path' if the directory with that file is listed in that variable. If not, use `add-to-load-path "the-dir-your-file-resides-in"' to make it work, or use the absolute path of the file. HTH -- Vladimir (λ)επτόν EDA — https://github.com/lepton-eda