Plaster
New
List
Login
common-lisp
default
anonymous
2022.01.15 04:56:41
(defmacro with-hash-keys (keys hash &body body) "Creates a let binding for each of the keys listed in KEYS in HASH using gethash." (alexandria:once-only (hash) `(let ,(mapcar (lambda (key) `(,key (gethash ,(string key) ,hash))) keys) (locally ,@body)))) (defun rooms-in-a-space (connection room-id) (let* ((response (spaces-hierarchy connection room-id)) (rooms (gethash "rooms" response))) (mapcar (lambda (room) (with-hash-keys (|room_id| |name| |room_type|) room (list :name |name| :id |room_id| :room-type |room_type|))) rooms))) The variable LUNAMECH-MATRIX-API/V2::|name| is unbound. [Condition of type UNBOUND-VARIABLE] Restarts: 0: [CONTINUE] Retry using LUNAMECH-MATRIX-API/V2::|name|. 1: [USE-VALUE] Use specified value. 2: [STORE-VALUE] Set specified value and use it. 3: [RETRY] Retry SLY mREPL evaluation request. 4: [*ABORT] Return to SLY's top level. 5: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {10060C7443}>) Backtrace: 0: (ROOMS-IN-A-SPACE #<CONNECTION ..) 1: ((:METHOD INITIATE-ROOMS (LUNA COMMUNITY)) #<MOONBOT ..) [fast-method] 2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (INITIATE-ROOMS *LUNA* (FIRST (COMMUNITIES *LUNA*))) #<NULL-LEXENV>) 3: (EVAL (INITIATE-ROOMS *LUNA* (FIRST (COMMUNITIES *LUNA*)))) 4: ((LAMBDA NIL :IN SLYNK-MREPL::MREPL-EVAL-1)) --more--
Raw
Annotate
Repaste
Edit