2
submitted 1 year ago* (last edited 1 year ago) by DasterlyB to c/lisp@lemmy.ml

Newer sbcl common lisp user, on windows 10 using portacle.

I quickloaded drakma and have tried to download several urls, they all give me "Socket error in "connect": EINTR (A non-blocking socket operation could not be completed immediately.)"

Example ( not sure why the asterisks don't show up in Lemmy?):

(ql:quickload :drakma)

(setf drakma:header-stream standard-output)

(drakma:http-request "http://lisp.org/")

directly from the drakma website gives me this output:

Socket error in "connect": EINTR (A non-blocking socket operation could not be completed immediately.) [Condition of type SB-BSD-SOCKETS:INTERRUPTED-ERROR]

Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1004E68473}>)

Backtrace: 0: (USOCKET:SOCKET-CONNECT "lisp.org" 80 :PROTOCOL :STREAM :ELEMENT-TYPE FLEXI-STREAMS:OCTET :TIMEOUT 20 :DEADLINE NIL :NODELAY :IF-SUPPORTED :LOCAL-HOST NIL :LOCAL-PORT NIL) 1: (DRAKMA:HTTP-REQUEST #<PURI:URI http://lisp.org/>) 2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DRAKMA:HTTP-REQUEST "http://lisp.org/") #) 3: (EVAL (DRAKMA:HTTP-REQUEST "http://lisp.org/")) 4: (SWANK::EVAL-REGION "(drakma:http-request "http://lisp.org/") ..) 5: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL)) 6: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {10035042FB}>) 7: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100350429B}>) 8: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100350427B}>) 9: (SWANK-REPL::REPL-EVAL "(drakma:http-request "http://lisp.org/") ..) 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "(drakma:http-request "http://lisp.org/") ..) 11: (EVAL (SWANK-REPL:LISTENER-EVAL "(drakma:http-request "http://lisp.org/") ..) 12: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(drakma:http-request "http://lisp.org/") ..) 13: (SWANK::PROCESS-REQUESTS NIL) 14: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 15: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 16: (SWANK/SBCL::CALL-WITH-BREAK-HOOK # #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {1004E700FB}>) 17: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "c:/Users/denni/portacle/all/emacsd/elpa/slime-20191224.2328/swank/sbcl.lisp") # #<CLOSURE (LAMBDA NIL :IN SWANK::H.. 18: (SWANK::CALL-WITH-BINDINGS ((STANDARD-INPUT . #1=#<SWANK/GRAY::SLIME-INPUT-STREAM {1004D414A3}>) (STANDARD-OUTPUT . #2=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {1004E39643}>) (TRACE-OUTPUT . #2#) (*ERR.. 19: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {10034591C3}> NIL) 20: ((FLET SB-UNIX::BODY :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE)) 21: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE)) 22: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE)) 23: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX)) 24: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE) {5C9FBEB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "repl-thr.. 25: (SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {1004E68473}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::SPAWN-REPL-THREAD) {1004E683FB}> NIL)

you are viewing a single comment's thread
view the rest of the comments
[-] Daz@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

Not a great answer but I suspect this is Windows being crap. Lisp and windows have never been that great of an experience. Drakma works fine on my Fedora box.

Also, wrap your code in tick marks:
`(setf drakma:*header-stream* *standard-output*)`

(setf drakma:*header-stream* *standard-output*)

[-] DasterlyB 1 points 1 year ago

I tried.the same thing in CCL on Windows and it works fine, so I wonder if there is a bug somewhere in Windows version of SBCL.

this post was submitted on 17 Jun 2023
2 points (100.0% liked)

Lisp Community

684 readers
1 users here now

A community for the Lisp family of programming languages.

Lisp (historically LISP) is a family of programming languages with a long history and a distinctive, fully parenthesized prefix notation. Originally specified in 1958, Lisp is the second-oldest high-level programming language. Only Fortran is older, by one year.

History

Associations and meetings

Resources - TODO

Related communities (dialects) - TODO

founded 5 years ago
MODERATORS