From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Cowan Newsgroups: gmane.lisp.guile.user Subject: Re: library vs define-module issue Date: Sat, 1 Aug 2020 09:40:12 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13565"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guile User To: Zelphir Kaltstahl Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Aug 01 15:40:40 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 1k1rkb-0003Mj-W9 for guile-user@m.gmane-mx.org; Sat, 01 Aug 2020 15:40:37 +0200 Original-Received: from localhost ([::1]:60252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1rka-0006bX-Qu for guile-user@m.gmane-mx.org; Sat, 01 Aug 2020 09:40:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1rkR-0006bQ-9R for guile-user@gnu.org; Sat, 01 Aug 2020 09:40:27 -0400 Original-Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:38118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1rkO-00071f-U4 for guile-user@gnu.org; Sat, 01 Aug 2020 09:40:27 -0400 Original-Received: by mail-qt1-x830.google.com with SMTP id e5so11084880qth.5 for ; Sat, 01 Aug 2020 06:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NPRAiFJHNgY1IpSOJka++hbfKvT42HmuXnxkw7s9+GA=; b=pKV+/zdOMlsy03pmM2CD7jYO0TtB1PlnLjAJD3vgbb7YJepQ7+vlTQCFcimAvUyqNU r5RXI5iZaczjdywauCfpP0yXQcEJigLMbSBM8J6VUENpjWV1ocMvZPp4iYmJ85ImEnYa 9WCVGZatSufkaACWy1zHucLayp0nokTXiMoc0jSw85CYC6nQgV82Z0QYEJZSrvtrDV9i vR3iu4lanFWNdonI7GYlpPrkCBgiIrf+tgv+tX8Z/m5X/5BsIBSZlbRofu4yYWGeq7hp PtYhER49O4ef6DLj1IeYTW9m3AKDPDcH3wW++vpJQlq+x8hWZm2Tj2VhVQLHuDWF20Go YKnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NPRAiFJHNgY1IpSOJka++hbfKvT42HmuXnxkw7s9+GA=; b=tL+v5dwyecSkwCH+T8/DdaFhbyc/pvONviHkwwjwRrKs44b2+MVEVX6MYWqRIMjWoo l8tZFAq93Q9bN0g3wZkvKKnAzLq9e4MsfFh+XbAS+N11fze8u5jHNMyr0kxZVSBzzu7V TvsmP+kf30y9UKUiuaZzXeP/YHBokpNFMTs43pQgj8eZvG1MMYnyotBrZgrF7QCfTRUp TgC18bLxSwY8M+JrIiMH9i3pXEO/YdRHJsaC1Lwpdi8CO0fs3bPUyYQBbGcyvZWdtmDj woYnismhZoABi1v/rkeZGnKlA16xCuqG10ih6T48G9clNCWexF2dNtAx5x/Btw5Mswsu 1aBg== X-Gm-Message-State: AOAM532j5fFyKjETtNJnacAIew/vnlmTOncnm3qgEnLKGDgNj4hLEnTe OlM3iStSAVPNAu6KXsvl/yjTzy4xRvu6Hkuyjed0Cg== X-Google-Smtp-Source: ABdhPJxzLLJP59xxbY9RIYQyx/6duO30FhbA6ClXxRpaZVwyk75mH/F+mroUJN6XGfYTdfZ0yNA7TnDwU/bembs7GE8= X-Received: by 2002:ac8:2957:: with SMTP id z23mr3283544qtz.186.1596289223069; Sat, 01 Aug 2020 06:40:23 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=cowan@ccil.org; helo=mail-qt1-x830.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: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:16763 Archived-At: On Sat, Aug 1, 2020 at 8:02 AM Zelphir Kaltstahl wrote: > ;;; geometry.scm:25:0: warning: possibly unbound variable `define' > ;;; geometry.scm:26:2: warning: possibly unbound variable `lambda*' > > What am I doing wrong? Why is everything unbound, even core forms like > define or cond? Perhaps I need to import some base thing when using > (library =E2=80=A6)? > Exactly. You have to import (rnrs base) or else (guile), because the global environment is empty at the start of an R[67]RS library definition. This is deliberate so that you can choose an entirely different base library if you wish. Similarly, Chicken provides both (scheme base) and (chicken base), and Chibi provides both (scheme base) and (chibi), although (chibi) is smaller than (scheme base) rather than larger, in keeping with Chibi's goals. As a matter of style, I recommend importing the standard base library and then bringing in anything Guile-specific with (import (only (guile) ...)). This advice also applies to Chibi, but not so much to Chicken unless you are specifically using the R7RS mode. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org Is not a patron, my Lord [Chesterfield], one who looks with unconcern on a man struggling for life in the water, and when he has reached ground encumbers him with help? --Samuel Johnson