freenode/#lisp - IRC Chatlog
Search
5:19:43
asarch
If I have ":accessor get_x", how could I access to it from: (defparameter *p1* (make-instance 'point :x 1 :y 2 :z 3))?
5:22:19
loke
(let ((a (make-instance 'foo))) #|set the value|# (setf (foo/x a) 'new-value) #|print the value|# (print (foo/x a)))
5:27:31
asarch
This girl was my inspiration to learn Lisp. Now she is sick: https://www.youtube.com/watch?v=gS1DbvHHVH0
5:46:02
asarch
If I have (defgeneric draw (point) ...) and then (defmethod draw (p1 point) ...) and (defmethod draw (p2 point) ...), how can I specify which one (p1 or p2) version of draw I want to use?
5:47:24
jackdaniel
if you want two distinct point classes which are drawn differently, you need to create them and specialize on them
5:48:03
jackdaniel
(defclass p1 (point) (…)) (defclass p2 (point) (…)) (defmethod draw ((p p1)) …) (defmethod draw ((p p2)) …)
6:02:07
asarch
I guess that, by default, all projects stored there now are property of Microsoft :-(
6:02:09
jackdaniel
I'm certain many people heard about that, but it seems a bit offtopic, hence it belongs to #lispcafe
6:08:39
jackdaniel
one way to do that is: (find-class 'foo), PPM on it in slime, select inspect, go to "SLOTS" slot of the class and inspect individual slot
6:09:50
jackdaniel
I'm sure my question got missed in a wall of text – did you read the page in the spec about "documentation" function?
6:10:38
didi
How do I copy the intelligent way structures are printed, using my own :print-object? i.e. I want to open a line whenever I print to a too high column.
6:14:05
asarch
No, I didn't. I just was wondering the Lisp way to access the documentation for the "point.x" slot
6:16:21
jackdaniel
why didn't you? this is a way you look up things by yourself (without depending on others)
6:17:26
jackdaniel
as a bonus point trying to look things up first saves you from creating (hopefully misleading) impression, that you value your time more than person's who you ask for help
6:17:29
asarch
I thought there was another easy way other than: https://stackoverflow.com/questions/21367083/how-do-i-access-the-documentation-string-of-a-slot-of-a-defclass-in-common-lisp
6:20:07
jackdaniel
sure. if you look for something, it is a good idea to type function name in l1sp.org and see what comes up
7:53:56
loke
otwieracz: I never used TLS termination in Hunchentoot. I put a haproxy in front of hunchentoot and do the TLS termination there.
8:02:39
otwieracz
Yes, I'd rather do that but due to backward compatibility I need to do this in Lisp here…
8:07:58
loke
xificurC: cl-gss isn't in the list either, but if you want to integrate with Kerberos, that's the one to use.
8:09:29
xificurC
those are all nice and true comments that don't change the truth - it's not on the list of recommended libraries :( Who's choosing these recommended libraries?
8:41:39
xificurC
some have said here that codewalking is not a good idea (IIUC it's implementation dependent?). However searching for this term doesn't give too many results for me. In Let Over Lambda there was a section called "code-walking with macrolet". Is this just his idea or is macrolet what is referred to as codewalking? Would that mean using macrolet is di
8:45:19
jdz
xificurC: I could recommend reading http://christophe.rhodes.io/notes/blog/posts/2014/naive_vs_proper_code-walking/
9:03:55
jackdaniel
with code-walking you need a full knowledge about special operators used in the source code
9:04:09
jackdaniel
CL defines twenty-something special operators and implementations add some on top of that
9:05:21
jackdaniel
so it is not trivial in a sense, that you need to handle around 30 special cases and you are never sure, if there isn't some operator you are not aware of
9:05:46
jackdaniel
Michael Raskin had a lightning talk about portable code walking during ELS two years ago
9:07:08
xificurC
it's just that the readme didn't explain or link to the issue it is solving. And the alternatives are saying "removes macrolet" which I don't know how to explain
9:20:05
xificurC
shka: I'm never sure if I can trust that book. Just last time I asked on it and was told it defined macros that have issues with code-walking
9:22:05
xificurC
the part about why it is difficult to codewalk I understood, however I don't understand what does "macroexpand-dammit (only macroexpansion, removes macrolet)" mean in agnostic-lizard's README
9:44:44
xificurC
but to summarize what I hope to have learned from this - macrolet is fine when wanting to expand something in the function-call position (sorry for the improper term, not sure what the correct term is). If one wants to do transformations that require searching for anything else naive code walking techniques will fail in bizarre ways
9:45:40
shka
then you surely noticed how it explicitly states that writing code walkers is challenging
9:48:49
xificurC
shka: yes I noticed. What I might have not explained explicitly is that I don't know how much can I trust a person that says to understand the complexity of the issue and then goes on creating macros that by one's own definition will fail to take that complexity in mind
9:50:51
xificurC
e.g. while I like defmacro!'s g! and o! symbols I don't want to take that shortcut if I'll end up debugging some broken expansion for hours before understanding it's not my bug but the macro's
13:51:30
xificurC
beach: are you an author/maintainer of some CLs? I saw you mention sicl and cleavir?
13:52:12
minion
xificurC: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
13:52:17
minion
xificurC: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
13:54:17
beach
No, no other Common Lisp implementation. However, I was one of the creators of McCLIM, now maintained by jackdaniel.