From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rohan Drape Newsgroups: gmane.lisp.guile.user Subject: r6rs and posix sockets Date: Sat, 23 Jan 2021 12:00:54 +1100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30059"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jan 23 02:59:28 2021 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 1l38D2-0007hv-1D for guile-user@m.gmane-mx.org; Sat, 23 Jan 2021 02:59:28 +0100 Original-Received: from localhost ([::1]:43418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l38D0-0005be-U6 for guile-user@m.gmane-mx.org; Fri, 22 Jan 2021 20:59:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l37Id-0006x0-A0 for guile-user@gnu.org; Fri, 22 Jan 2021 20:01:11 -0500 Original-Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]:37952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l37IZ-0002V1-Ky for guile-user@gnu.org; Fri, 22 Jan 2021 20:01:11 -0500 Original-Received: by mail-vk1-xa33.google.com with SMTP id f3so1799413vkf.5 for ; Fri, 22 Jan 2021 17:01:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Lx/EB7Gp0fOlN6UK4f/yerWncJ+RdQwnLAerwYblD4I=; b=Ijw7/87p5xD9S9AuKRKrAvhX/Zvy99GrpmvYLh7WxGf+BIcPTWpfVi/TiuT1lh24Lf yBwI6YbplzbpPdd2N6g6Q2SVmTLMiSKcDQ7nlSYUknY/a15C3O3YayW1iMlByBfkcgXg 3M6o1v97fEI8uDEeoivQ2wL9yChVYsZcQBRXNDpvEaBrfM0oJKHE078H4oDqMcIo7E80 Na2L4IC64Uwcv6zD1IMXE3RlXKArSZWpu9wkyekdh7lb2IVJowWLkCwXttsG3nmcFbUi EKI/cTEQT3GHMaW0s1jsCsnlQjOkxitvgPQn5StYvFWJdu3BxyhPDWCtFzz2gMQY5ufU 7N7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Lx/EB7Gp0fOlN6UK4f/yerWncJ+RdQwnLAerwYblD4I=; b=nnLR0gxPmCf7CAV9OsneaYiXf+K/RHYnqyrThqZ0PVMLkzCP1GDRVEJFJU9juJQDxY nK88MkDcw+fIPl+KkbvmArysam5Yt1hmdrDnzEoh9bAD7jNH9p7xn5A0V2d+GMovD85q nQfipAYMJCx4EGhhbVVG0eGwnW5vJtL8q0j4ugm29BNq0Yt9cfcc/VfxA09wCI4NNlpw WTPDewCHQfp952c/0fm42RX04X2AAMYL+3ICSpDP0VnIC0Ps1JGCptuk1zKGgAHWG0kX /JTHJYaxxJnJ0wOZMPoTbXbjlZ/zeLOIOSBTwV8HVVNuYC17/8Y2ZZlxeeZliCMeF1XH 7Lcw== X-Gm-Message-State: AOAM532i0Zsbkq1d6zt+EV6eGbc0UhUSMz9ltyQuIZjVIe1eqZJEP6J6 3DOUjB9iZG6bcr89EJ2jPZGtBgIGgzqkw9Di4XNaHkuMxNQ= X-Google-Smtp-Source: ABdhPJwFix48qyG05rtKYLGd0T4cD93OubJN9lD3lztux5tvmWCfCV8p+F8dAQ4fhyZCtjxOx3RUKaUGDaJr3lG1Oh4= X-Received: by 2002:a1f:4901:: with SMTP id w1mr2856675vka.17.1611363664773; Fri, 22 Jan 2021 17:01:04 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::a33; envelope-from=rohan.drape@gmail.com; helo=mail-vk1-xa33.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 22 Jan 2021 20:59:11 -0500 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:17184 Archived-At: hello list a very simple question i hope how do we access the guile posix/sockets functions from within an r6rs library? in ikarus there is (import (ikarus)), is it something similar? i see they are automatically present in the interpreter best, rohan $ guile --r6rs GNU Guile 3.0.4 [...] scheme@(guile-user)> socket $1 = # scheme@(guile-user)> $ cat test.scm #!r6rs (library (test) (export udp-open) (import (rnrs)) (define udp-open (lambda (h p) (let ((s (socket PF_INET SOCK_DGRAM 0))) (connect s AF_INET (inet-pton AF_INET h) p) (list s h p))))) $ guile --r6rs GNU Guile 3.0.4 [...] scheme@(guile-user)> (import (test)) ;;; compiling /home/rohan/opt/lib/r6rs/test.scm ;;; test.scm:9:0: warning: possibly unbound variable `socket' ;;; test.scm:9:0: warning: possibly unbound variable `PF_INET' ;;; test.scm:9:0: warning: possibly unbound variable `SOCK_DGRAM' [...]