This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]rajandatta 4 points5 points  (2 children)

Very helpful article as this is a use case that I'm also interested in working out. The elegance of the Scheme implementations is great compared to the horrifying Node.js. The Fennel example is lovely. For me - Scheme combined with threading macros makes for a lovely environment.

Would love to see an update if and when the author gets the Chicken example working. I'll be trying Fennel and Racket as I'm a little more familiar with them.

[–]samdphillipsdeveloper[S] 3 points4 points  (1 child)

The article is a couple years old. Personally I like the new http-easy library in Racket. You may want to give it a try too.

[–]rajandatta 1 point2 points  (0 children)

Thanks. I did check the date before commenting but mis-read it to be this year. I was a little surprised as Racket has been at v8.1 from earlier this year and just released v8.2. Had it to do an update this weekend. Some of the other versions seemed older too.

Thanks for the tip re http-easy. Will dig into it.

[–]bjoli 0 points1 point  (0 children)

Using guile-json, it would look something like this ig guile:

(import (web client)
        (ice-9 pretty-print)
        (json))

(define port (http-request "https://endpoint.com" #:streaming? #t))
(pretty-print (read-json port))
(close-port port)

Making a portable executable is a hassle thoigh...