vseloved / cl-redis

Redis client for Common Lisp
Other
188 stars 38 forks source link

Error: #\- is not of type INTEGER. #15

Closed tuscland closed 10 years ago

tuscland commented 10 years ago

When using CL-REDIS with LispWorks 6.1.1:

CL-USER 116 > (redis:connect :host "random-host" :port 1234
#<REDIS:REDIS-CONNECTION 4020000B6B>

CL-USER 117 > (red:ping)

Error: #\- is not of type INTEGER.
  1 (abort) Return to level 0.
  2 Return to top loop level 0.

In REDIS::OPEN-CONNECTION, I left the :element-type 'flex:octet argument commented, which seems to fix the problem. I don't know if that is the correct fix and if it doesn't break anything on other platforms.

vseloved commented 10 years ago

You need to supply IP address to connect. Like #(127 0 0 1). Or, alternatively, (usocket::get-host-by-name "random-host").

I agree, that it's convenient to automatically resolve hosts on connect, although it's a hidden inefficiency. Feel free to submit a pull request...

tuscland commented 10 years ago

No, problem is how the stream is configured. The :element-type parameter does not do good to LispWorks.

vseloved commented 10 years ago

Oh, I see, sorry haven't read to the end. :(

It's strange that :element-type doesn't work on LispWorks (because I see similar code in hunchentoot). To be fair, I've never supported it, because its a hassle to get a proper distribution. If it works without element-type you can add a #-lispworks :element-type #-lispworks 'flex:octet there. Once again, feel free to submit a pull request.

tuscland commented 10 years ago

Thanks, see https://github.com/vseloved/cl-redis/pull/16