This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (optima:match message-type ((guard x (eql x (getf msg-type :subscribed))) (format t "do something?"))) | |
| Non-linear pattern: (STRUCTURE CL-WAMP::GUARD | |
| (CL-WAMP::X CL-WAMP::X) | |
| (EQL (AND | |
| CL-WAMP::X | |
| (STRUCTURE | |
| GETF | |
| (CL-WAMP::MSG-TYPE | |
| CL-WAMP::MSG-TYPE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defvar msg-type '(:hello 1 | |
| :welcome 2 | |
| :abort 3 | |
| :challenge 4 | |
| :authenticate 5 | |
| :goodbye 6 | |
| :error 8 | |
| :publish 16 | |
| :published 17 | |
| :subscribe 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun write-raw-bytes (bytes) | |
| (with-open-file (s "temp-bytes" | |
| :direction :output | |
| :if-exists :append | |
| :element-type '(unsigned-byte 8)) | |
| (loop for byte in bytes do (write-byte byte s)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Name service error in "getaddrinfo": -2 (Name or service not known) | |
| [Condition of type SB-BSD-SOCKETS:HOST-NOT-FOUND-ERROR] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| There is no applicable method for the generic function: | |
| #<STANDARD-GENERIC-FUNCTION CCL::SOCKADDR #x30200040291F> | |
| when called with arguments: | |
| (NIL) | |
| [Condition of type NO-APPLICABLE-METHOD-EXISTS] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/k/quicklisp/dists/quicklisp/software/alexandria-20170227-git/sequences.lisp"/4 UTF-8) #x302001E7D9DD>, near position 8041 : | |
| Bad file descriptor during read | |
| [Condition of type CCL::SIMPLE-STREAM-ERROR] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| There is no applicable method for the generic function: | |
| #<STANDARD-GENERIC-FUNCTION CCL::SOCKADDR #x30200044D97F> | |
| when called with arguments: | |
| (NIL) | |
| [Condition of type NO-APPLICABLE-METHOD-EXISTS] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun check-int32 (x) | |
| (<= (* -1 #x80000000) x -1)) | |
| (defgeneric pack (v) | |
| (:method ((o (eql t))) (write-raw-byte #xc2)) | |
| (:method ((o null)) (write-raw-byte #xc3)) | |
| (:method ((o #'check-int32)) (write-raw-bytes #xd2))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defmethod pack (((<= (-1 * #x80000000) n -1))) | |
| (list | |
| #xd2 | |
| (ldb (byte 8 24) n) | |
| (ldb (byte 8 16) n) | |
| (ldb (byte 8 8) n) | |
| (ldb (byte 8 0) n))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (in-package #:cl-msgpack) | |
| (defun test-read () | |
| (with-open-file (s "temp-bytes" :element-type '(signed-byte 8)) | |
| (format t "stream:~S ~S~%" (read-byte s) (read-byte s nil 'eof)))) | |
| (defun write-raw (byte) | |
| (with-open-file (s "temp-bytes" | |
| :direction :output | |
| :element-type '(signed-byte 8)) |
NewerOlder