Search
Sunday, 16th of February 2020, 13:09:01 UTC
13:20:32
jonatack
Sunday thought: I don't get to use Lisp for my work ATM but this is still my favorite non-work IRC channel... thank you, people. Back to lurking.
15:54:23
Lord_of_Life_
** NICK Lord_of_Life
16:21:39
momozor
do you guys know how to enable cors with clack?
16:23:13
jackdaniel
momozor: you need to customize headers
16:23:40
jackdaniel
i.e (200 (:content-type "text/plain" :access-control-allow-origin nil) whatever)
16:24:52
momozor
jackdaniel: thank you so much!
21:33:25
akhetopnu
hello. has anyone here tried to use websocket-driver and send messages to clients from a different thread? It doesn't seem to work. I'm not sure if I'm going crazy or if I'm doing something wrong...
0:17:08
vms14
I cannot declare a variable once I've loaded cl-ncurses
0:17:16
vms14
it says I'm declaring an alien one
0:17:32
vms14
how I'm supposed to switch to "normal" declaration or whatever?
0:17:41
vms14
Cannot proclaim a ALIEN variable SPECIAL: *COLORS*
0:18:09
vms14
(defparameter *colors* '((red 1) (blue 2) (green 3)))
0:18:29
vms14
the only thing I'm doing is to load cl-ncurses, then create a package and :use ncurses with commonlisp
0:18:42
vms14
and try to create that variable
0:19:16
_death
instead of :use, only import the symbols you care about with :import-from
0:20:26
vms14
_death: there isn't another way?
0:22:03
_death
vms14: what happens is that cl-ncurses exports cl-ncurses:*colors* and you attempt to redefine it
0:22:49
_death
vms14: luckily, you get an error instead of silently redefining it, so you can either not import it, or choose a different symbol
0:23:29
_death
or you can shadow it.. but it's best to just not import symbols you don't care about
0:24:58
vms14
I thought I was on some weird state or alike
0:25:06
vms14
I'll just use another name, thanks _death
0:40:52
vms14
(let ((i 0)) (mapcar (lambda (color) (init-pair (incf i) color COLOR_BLACK)) (list COLOR_RED COLOR_BLUE COLOR_GREEN)))
0:41:00
vms14
there's a better way to do that?
0:41:08
vms14
I don't like that let
0:42:10
no-defun-allowed
(loop for color in (list +color-red +color-green+ +color-blue+) for i from 0 do (init-pair color i +color-black+))
0:44:40
vms14
ty no-defun-allowed, much better
Monday, 17th of February 2020, 1:09:01 UTC