[armedbear-devel] [Patch]: Which allows drakma to run.

Stas Boukarev stassats at gmail.com
Sun Aug 5 08:44:11 UTC 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: element-type.diff
Type: text/x-diff
Size: 2121 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20120805/ef55f4ae/attachment.diff>
-------------- next part --------------

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.


More information about the armedbear-devel mailing list