[armedbear-devel] [Patch]: Which allows drakma to run.
Drakma uses its own type OCTET as element-type for streams it's defined as (deftype octet () '(unsigned-byte 8)) But read-byte and friends don't recognize type because it's not expanded before-hand. So, what I did is to apply EXPAND-DEFTYPE beforehand. Perhaps UPGRADED-ELEMENT-TYPE would've been better, or something entirely different in an another place or more places. But it allows me to use drakma successfully. So, one can do (push :drakma-no-ssl *features*) ;; I can't load CFFI needed for cl+ssl (asdf:load-system :drakma) (drakma:http-request "http://bing.com") => fancy results On another note, I couldn't get usocket to work on Debian until I discovered that I need to either do echo 0 > /proc/sys/net/ipv6/bindv6only or launch java with -Djava.net.preferIPv4Stack=true Otherwise usocket returns a very cryptic error SOCKET-TYPE-NOT-SUPPORTED-ERROR which is in reality "java.net.SocketException: Network is unreachable". -- With best regards, Stas.
Hi Stas, Thanks for the patch. I think your solution is best, because I'd expect people to expect STREAM-ELEMENT-TYPE to return what they set it to. Committed as r14070. Bye, Erik. On Sun, Aug 5, 2012 at 10:44 AM, Stas Boukarev <stassats@gmail.com> wrote:
Drakma uses its own type OCTET as element-type for streams it's defined as (deftype octet () '(unsigned-byte 8))
But read-byte and friends don't recognize type because it's not expanded before-hand. So, what I did is to apply EXPAND-DEFTYPE beforehand. Perhaps UPGRADED-ELEMENT-TYPE would've been better, or something entirely different in an another place or more places. But it allows me to use drakma successfully.
So, one can do (push :drakma-no-ssl *features*) ;; I can't load CFFI needed for cl+ssl
(asdf:load-system :drakma)
(drakma:http-request "http://bing.com") => fancy results
On another note, I couldn't get usocket to work on Debian until I discovered that I need to either do echo 0 > /proc/sys/net/ipv6/bindv6only or launch java with -Djava.net.preferIPv4Stack=true
Otherwise usocket returns a very cryptic error SOCKET-TYPE-NOT-SUPPORTED-ERROR which is in reality "java.net.SocketException: Network is unreachable".
-- With best regards, Stas.
_______________________________________________ armedbear-devel mailing list armedbear-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
Erik Huelsmann <ehuels@gmail.com> writes:
Hi Stas,
Thanks for the patch. I think your solution is best, because I'd expect people to expect STREAM-ELEMENT-TYPE to return what they set it to.
Committed as r14070. Another option would be to have an additional slot for the stream class which would hold the result of type expansion, potentially expanding it every time can slow things down, but I haven't actually benchmarked it.
-- With best regards, Stas.
participants (2)
-
Erik Huelsmann
-
Stas Boukarev