artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: http-request in a controller- is it possible?


From: Mortimer Cladwell
Subject: Re: http-request in a controller- is it possible?
Date: Sat, 12 Dec 2020 05:52:48 -0500

Hi Nala,
I get the same results - a string - for both 3.0.4 and 2.2.7 for a non-local URL.

My computer is Debian10/Guile-3.0.4.  Below I test 3.0.4 at the terminal and 2.2.7 in a Guix protected environment.
When using Artanis I work with branch fix/ssql-guile3. Tests below do not involve Artanis.
Thanks
Mortimer

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 = #<input-output: file 7f09b60b0e00>
scheme@(guile-user)> (open-socket-for-uri "http://localhost:3000/123")
$2 = #<input-output: socket 14>
scheme@(guile-user)>

Guile-2.2.7 using Guix:

Manifest:(specifications->manifest
'("guile@2.2.7" "gnutls" "coreutils" "gawk" "sed" "findutils" "glibc" "grep" ))

mbc@HP8300:~/temp/guilesocket$ guix environment --pure  --manifest=manifest.scm
mbc@HP8300:~/temp/guilesocket$ guile
GNU Guile 2.2.7
Copyright (C) 1995-2019 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")
;;; WARNING: loading compiled file /home/mbc/.guix-profile/lib/guile/3.0/site-ccache/gnutls.go failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode kind
$1 = #<input-output: file 7fa115eeb150>
scheme@(guile-user)> (open-socket-for-uri "http://localhost:3000/123")
$2 = #<input-output: socket 16>

Supposedly the warning is harmless? https://issues.guix.gnu.org/issue/39301
Harmless when using 2.2 code with 3.0 but I am unsure of the reverse.

On Fri, Dec 11, 2020 at 11:22 PM Nala Ginrut <mulei@gnu.org> wrote:

Hi Mortimer!

Mortimer Cladwell writes:

> (open-socket-for-uri "https://blockchain.info/q/24hrprice") ==>
> #<input-output: string 7ff564d887e0>  (a string)

This is very strange, it should be #<input-output: socket xx>
xx is an integer.
I tried it on my machine, it's Guile-2.2.7, and it's correct.



--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

reply via email to

[Prev in Thread] Current Thread [Next in Thread]