Search
Monday, 10th of December 2018, 3:32:55 UTC
3:44:20
beach
Good morning everyone!
8:02:54
no-defun-allowed
morning splittist
8:41:23
bendersteed
good morning european friend!
8:41:50
beach
But why exclude the others?
8:43:08
bendersteed
no exclusions, good morning to everyone
8:43:19
bendersteed
I was just happy to share a morning
8:43:28
no-defun-allowed
morning bendersteed
8:46:46
beach
bendersteed: What brings you to #lisp today?
8:48:24
bendersteed
beach: i'm a noob in common lisp, and solve the advent of code in it so i lurk if i have to ask anything
8:49:06
bendersteed
but practical common lisp and hyperspec seem to have me mostly coveres
8:49:39
beach
bendersteed: For truly elementary questions, there is also #clschool.
9:35:15
quasi`
back here after a decade (or seems like it) ... :-/
9:35:39
beach
You? Welcome back then.
9:36:15
quasi`
haha. thanks. always the lurker anyway.
11:36:54
flip214
for hunchentoot's EASY-SSL-ACCEPTOR, can I get the CN from a client certificate? Or any other data from x509?
13:13:09
rnmhdn
any thoughts for a 1:30 h interesting talk related to functional programming?
13:18:10
neirac
how do debug this? https://pastebin.com/RtfnxAmM it only works if I use let* at the second let s-expr
13:19:45
schweers
neirac: you could add a (break) expression to enter the debugger. But I don’t see any reason why the inner LET should be a LET* instead.
13:20:23
shka__
you can trace lquery functions i think
13:20:32
shka__
IIRC those are functions
13:22:37
schweers
Your indentation is ... confusing.
13:23:34
schweers
Does Common Lisp specify in which order the expressions of a let clause are evaluated?
13:24:14
schweers
I just checked, it does.
13:25:16
neirac
schweers my common lisp book just says let* evaluates each expression sequentially not as let. schweers is there any formatter for common lisp, I'm just using emacs
13:25:43
schweers
Just mark the whole thing and press TAB. It should be enough
13:25:56
schweers
But I haven’t used an emacs I didn’t configure myself in ages.
13:27:28
neirac
schweers oh, ok it seems paste bin scramble identation a little
13:28:15
beach
(setq-default indent-tabs-mode nil) in your .emacs
13:28:36
ogamita
Programmers who use Spaces are paid higher than programmers who use tabs!
13:29:12
ogamita
https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/
13:29:49
beach
neirac: Also, never put whitespace after an opening parenthesis.
13:31:12
xificurC
use tabs *and* spaces, to confuse even more people :) https://www.emacswiki.org/emacs/SmartTabs
13:38:00
neirac
ogamita and beach thanks :)
13:38:09
neirac
xificurC thanks for the link
13:38:30
beach
neirac: It ought to work with LET.
13:38:56
xificurC
neirac: don't take that seriously, stick to spaces
13:49:31
neirac
slime is just stuck evaluating, slime-interrupt does not work. it should work with let/let* . it seems is a network issue
14:32:55
neirac
I'm trying to use mapcar on vectors but it requires a list. I thought mapcar used any sequence.
14:33:13
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_mapc_.htm
14:33:24
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_map.htm
14:45:13
White__Flame
neirac: btw, as per its name, mapcar uses car which is a list operation, not a vector operation
14:49:35
_death
neirac: LET evaluates the init forms from left to right, like LET*.. only the binding is parallel
14:54:03
neirac
beach thanks!, I'm trying this but fails. (map #'(lambda (x y) (cons x y )) names prices) ; names and prices are vectors
14:56:03
White__Flame
MAP takes an extra 1st parameter, which is the result type
14:56:35
White__Flame
so (map 'list ...) or (map 'vector ..) or whatever
14:57:19
White__Flame
you can have parameterized/specialized types in there, too
14:58:11
neirac
White_Flame oh, I'm so sorry now it's working. I'll recheck my lisp book again I'm too rusty
15:10:26
ogamita
beach: loop cannot be used on sequences. Only either on list or on vectors. loop for in vs. loop for across
15:12:55
White__Flame
in practice, what other subclasses of SEQUENCE are there?
15:13:24
ogamita
No standard; In SBCL you can define your own.
15:14:18
White__Flame
things like MAP say they'll error out if the result type is not a list or vector subtype
15:14:23
ogamita
You can do: (defgeneric iterator (seq) (:method ((seq list)) (lambda () (when seq (values (pop seq) t)))) (:method ((seq vector)) (let ((i -1)) (lambda () (when (< (incf i) (length seq)) (values (aref seq i) t)))))) (loop :with it := (iterator seq) :for (val gotit) := (multiple-value-list (funcall it)) :while gotit :do (process val))
15:15:22
White__Flame
** NICK White_Flame
15:15:22
ogamita
White__Flame: Good point! However, I guess language extensions will allow it, despite the covariant/contravariant problem.
15:16:01
ogamita
but (map type (lambda (val) (process val)) seq) is just simplier, no need to reinvent the wheel.
Monday, 10th of December 2018, 15:32:55 UTC