From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: mbcladwell@stihie.net Newsgroups: gmane.lisp.guile.user Subject: Re: open-socket-for-uri returns string, but integer is needed Date: Sat, 30 Jan 2021 09:23:00 -0600 Message-ID: <20210130092300.Horde.SbZuJPXArIaP1-IqlxpsQAz@www.stihie.net> References: <20210130073542.Horde.fnEmi9P7VryWvgZpnJCOvPv@www.stihie.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6974"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Horde Application Framework 5 Cc: guile-user To: Aleix Conchillo =?utf-8?b?RmxhcXXDqQ==?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jan 30 16:23:49 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 1l5s6H-0001ia-9s for guile-user@m.gmane-mx.org; Sat, 30 Jan 2021 16:23:49 +0100 Original-Received: from localhost ([::1]:49630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5s6G-0004N9-5D for guile-user@m.gmane-mx.org; Sat, 30 Jan 2021 10:23:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5s5b-0004Mp-Dt for guile-user@gnu.org; Sat, 30 Jan 2021 10:23:07 -0500 Original-Received: from gateway20.websitewelcome.com ([192.185.64.36]:11750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5s5Z-0001an-Bw for guile-user@gnu.org; Sat, 30 Jan 2021 10:23:07 -0500 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway20.websitewelcome.com (Postfix) with ESMTP id B2994400D25F2 for ; Sat, 30 Jan 2021 09:16:07 -0600 (CST) Original-Received: from gator3135.hostgator.com ([50.87.144.171]) by cmsmtp with SMTP id 5s5WlWUy3iQiZ5s5WlzdcG; Sat, 30 Jan 2021 09:23:03 -0600 X-Authority-Reason: nr=8 Original-Received: from gator3135.hostgator.com ([50.87.144.171]:41336) by gator3135.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1l5s5V-003hq0-7d; Sat, 30 Jan 2021 09:23:01 -0600 Original-Received: from [100.0.196.207] ([100.0.196.207]) by www.stihie.net (Horde Framework) with HTTPS; Sat, 30 Jan 2021 09:23:00 -0600 In-Reply-To: Content-Disposition: inline X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3135.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stihie.net X-BWhitelist: no X-Source-IP: 50.87.144.171 X-Source-L: Yes X-Exim-ID: 1l5s5V-003hq0-7d X-Source-Sender: gator3135.hostgator.com [50.87.144.171]:41336 X-Source-Auth: mbcladwell@stihie.net X-Email-Count: 1 X-Source-Cap: cGxhcGFuO3BsYXBhbjtnYXRvcjMxMzUuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: yes Received-SPF: pass client-ip=192.185.64.36; envelope-from=mbcladwell@stihie.net; helo=gateway20.websitewelcome.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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:17204 Archived-At: Yes it is installed. mbc@HP8300:~$ dpkg -s guile-gnutls Package: guile-gnutls Status: install ok installed How do I test that it is properly configured? For example I can: scheme@(guile-user)> (cdar (json-string->scm (utf8->string (receive (response-status response-body) (http-request "https://api.blockchain.com/v3/exchange/tickers/LTC-USD") response-body)))) $1 = 134.3 Thanks Mortimer Quoting Aleix Conchillo FlaquƩ : > Hi, > > This is just a guess but do you have GnuTLS Guile bindings installed? You > are using https on the first one. > > In Debian I believe it's guile-gnutls. > > Best, > > Aleix > > > On Sat, Jan 30, 2021, 5:38 AM wrote: > >> >> Hi, >> On Debian 10, Guile 3.0.4 I need to create a socket: >> >> mbc@HP8300:~$ guile >> GNU Guile 3.0.4 >> Copyright (C) 1995-2020 Free Software Foundation, Inc. >> Enter `,help' for help. >> scheme@(guile-user)> (use-modules (web client)) >> scheme@(guile-user)> (open-socket-for-uri >> "https://blockchain.info/q/24hrprice") >> $1 = # >> scheme@(guile-user)> (open-socket-for-uri "http://localhost:3000/123") >> $2 = # >> scheme@(guile-user)> >> >> A local http looks good - returns an integer socket. >> A remote https uri returns file 7f09b60b0e00 which is rejected by >> downstream functions requiring a port/integer e.g. (http-get .... >> #:port ) >> >> I get the same results on Guile 2.2.7 in a Guix protected environment. >> What am I doing wrong - how do I get an integer returned? >> Thanks >> Mortimer >> >> >>