freenode/#lisp - IRC Chatlog
Search
13:55:14
beach
Is this going to be another standard that we do not have the manpower to keep up with?
13:59:15
jackdaniel
if it is well organized then it is a fine protocol for pairing CL with any IDE implementing it (the protocol)
14:23:48
beach
Someone needs to check whether it can handle everything that SLIME needs, like presentations, inspector, backtraces, etc.
14:24:20
beach
And I still worry that it will evolve and that we won't have the resources to keep up.
14:26:34
beach
I didn't look myself. It makes me tired just to think about tracking another standard.
15:49:27
drmeister
It irks me that LOOP doesn't have a for-multiple-values (a b c) = (a-multiple-value-call ...) clause
15:50:44
pjb
Yes, asterisks are only a convention. But you should stick to it to avoid hours of debugging.
15:51:46
pjb
There's define-symbol-macro allowing you to define a global lexical binding. You can use it to define a macro to define global lexical variables. There are such macros in librairies, under various names such as defglobal, deflex, etc.
15:53:05
drmeister
Re: language server protocol - does anyone know who cxxxr is? https://github.com/cxxxr/cl-lsp
15:53:35
pjb
It's usually a function that takes usually a list of a and d and apply car or cdr accordingly.
16:01:28
drmeister
pjb: Understood - thank you. I just emailed the developer and posted an issue about it. Let's see what happens.
16:12:26
makomo
is this because the checking is done only for the signature of the generic function?
16:18:10
beach
There is a phrase somewhere that methods with &key arguments are called with an implicit :ALLOW-OTHER-KEYS T. Let me see whether I can find it.
16:22:31
makomo
this? "The checking of the validity of keyword names is done in the generic function, not in each method. A method is invoked as if the keyword argument pair whose name is :allow-other-keys and whose value is true were supplied, though no such argument pair will be passed."
16:22:38
specbot
Congruent Lambda-lists for all Methods of a Generic Function: http://www.lispworks.com/reference/HyperSpec/Body/07_fd.htm
16:24:16
makomo
beach: regarding the CLOS book by Sonya Keene, i find the examples ok, even though they use non-standard functionality.
16:25:22
makomo
figured i should read through it quickly just to catch any details before going on with AMOP :-)
16:29:38
skidd0
So I have a lisp file in a multi file package. In this file, I have a (defvar *tasks* '()) special variable that I want to have access to. When I (use-package my-package), the special var *tasts* is unbound
16:32:31
skidd0
oh right, because the name (symbol) gets evaluated to those functions or class objects
16:33:06
skidd0
exporting isn't exporting the class itself, just the symbol that points to the compiled class?
16:35:55
beach
It inspects the class metaobject to see how to create the instance and how to initialize it.
16:37:05
skidd0
and that metaobject holds all the things i defined in my code, how to initialize, what member variables are, etc
16:37:08
beach
MAKE-INSTANCE looks at the class metaobject of which it is about to create an instance in order to determine how big a chunk of memory to allocate and how to fill it in.
16:38:39
beach
skidd0: I think this question is fine. If your questions become too basic, someone might point to too the noobs channel.
16:41:36
beach
And it is not quite right to say that the symbol gets evaluated to a class, because something like (eval 'person) does not return the class metaobject even if you have (defclass person ...).
16:47:58
makomo
beach: for when you're around again: regarding the keyword issue, the reason why i didn't think that that second sentence applies to that situation is because it's listen for the case when "If the generic function lambda list mentions &key ..."
16:49:18
makomo
so is that really the sentence which describes this observed behavior (the fact that method keyword arguments aren't checked)?
17:05:39
asarch
In this issue of the BYTE magazine, they said there was an issue dedicated to Lisp. Do you know where could I find it? https://archive.org/details/byte-magazine-1981-08
17:08:39
pjb
minion: memo for makomo: notice that defgeneric &rest with defmethod &key doesn't respect the Lyskoff substittution principle. Avoid it!
18:23:23
makomo
pjb: i assume you meant the Liskov substitution principle? i've never seen that spelling. anyway, how is that related to LSP?
18:23:23
minion
makomo, memo from pjb: notice that defgeneric &rest with defmethod &key doesn't respect the Lyskoff substittution principle. Avoid it!
18:27:08
makomo
pjb: hm i think i see what you mean but in this case it doesn't have to do with types, which is the original setting for LSP, right? the problem is that the methods don't align with the interface specified by the generic function
18:27:26
makomo
i.e. S doesn't act like a T, even though it's a particular implementation of T. S being the method, T being the generic function.
18:29:25
makomo
i.e. if the method then specifies &key in its lambda list and you pass an unspecified keyword argument, why isn't that an error?
18:29:32
specbot
Congruent Lambda-lists for all Methods of a Generic Function: http://www.lispworks.com/reference/HyperSpec/Body/07_fd.htm
18:29:45
makomo
the last sentence of case 4 talks about it, but wouldn't that apply only when case 4 is in effect?
18:30:40
makomo
in this case the generic function doesn't specify &key anywhere, so :allow-other-keys shouldn't be implicitly true
19:06:15
pjb
makomo: it is related to the type of the &rest arguments. &key imposes that the &rest argument have an even length, and that each even-nubered element be a symbol.
19:23:42
ealfonso
anyone familiar with hunchentoot know how to redirect an http request to https on the same port when using ssl-acceptor?
19:38:08
makomo
pjb: mhm, i see. but do you know why no warning is issued for invalid keyword arguments then?
19:39:38
pjb
In anycase, giving a meaningfull warning would require global analysis, after all the defgeneric and defmethod forms for this method have been compiled.
19:52:16
makomo
pjb: by warning i meant error. for example, passing unspecified keyword arguments to a normal function is an error
19:54:11
aeth
You can actually afaik get some degree of global analysis in SBCL with (setf sb-ext:*derive-function-types* t)
19:54:31
aeth
It's behind a flag and defaulted to NIL because (1) it violates parts of the ANSI standard and (2) it will break the interactive flow of CL
19:55:02
aeth
It assumes function types will never change. I'm not sure if it also applies to generic functions.
20:02:59
aeth
I think you could have a conforming implementation with global analysis always on if you're willing to have the extra bookkeeping overhead of tracking when things are redefined and knowing what else to redefine in that case. That would also improve the experience with macros and inline functions.
21:54:46
cgay_
Go has that but I have to say I haven't seen it used much. I think in a local scope it's not that useful, though it provides a little more indication of intention.
21:56:12
Ukari
i wanna use lexical defconstant or a lexical let which can't assign twice, because it might make code more clear when a variable couldn't be changed
22:01:02
pfdietz
(let-const ((x e)) . body) ==> (let ((#:G0001 e)) (symbol-macrolet ((x (identity #:G0001))) . body))
22:02:30
cgay_
bike-shedding: would be nice to be able to indicate const-ness for a particular variable in a LET, rather than introducing a new level of indentation.
23:23:36
pillton
You could also use the position return value of read-from-string and its start argument.