freenode/#lisp - IRC Chatlog
Search
21:14:50
aeth
A slight clarification: I'm not actually sure if deprecation means removal in macOS 10.15. It just means that it *could be* removed in macOS 10.15.
21:16:44
aeth
Bike: Well, you'd have to approach it the same way if you want to ensure continued macOS support.
21:18:10
rpg
ACTION remembers "The only thing worse than being talked about is *not* being talked about..."
21:19:12
aeth
rpg: I guess on the plus side, people will finally start abandoning OpenGL 3.3 or OpenGL 4.1 in favor of either Vulkan or newer versions of OpenGL. The macOS excuse will no longer exist and the older drivers/hardware for the other OSes are fading.
21:20:01
rpg
aeth: Seems weird, but I'm kind of a 2D guy, anyway! ;-) Have you checked in with #lispgames?
21:25:26
Bike
you can iterate over hash tables with a variety of mechanisms, such as maphash; the rest shouldn't be too hard depending on your desired semantics
21:26:29
dxtr
Question #2: Are hash tables passed as copies? What I'm basically wondering is that if I modify a hash table within a function will that affect the caller too?
21:27:37
dxtr
Oh, so if I modify *anything* within a function that affects the caller too? This is an area I haven't really thought about
21:28:03
dxtr
I always try to make everything immutable but this time I'm considering if non-mutability is simply easier
21:28:41
rpg
dxtr: most things *are* immutable, but there are things like list structures (if you use nconc or the like), arrays (if you modify their contents), etc.
21:29:37
rpg
e.g. if you change a variable from one string to another, it doesn't harm the original string. It's only if you modify the string's contents.
21:32:42
aeth
What's the best way to ensure sb-ext:*derive-function-types* when building an executable with SBCL but not during development?
21:36:18
aeth
sb-ext:*derive-function-types* is normally NIL, and should normally be NIL, but when compiling an executable for SBCL for applications using my framework, it should be T. It makes SBCL assume that functions won't be redefined to change the function types, which gives more power to the compiler. i.e. Optimizations, compile-time warnings/errors, etc.
21:37:24
rpg
aeth: One way to do it would be to bind that variable around the build process for the executable. You could do that relatively easily, I think, if you were using Fare's ASDF "bundle" stuff.
21:37:55
rpg
That said, I've never used that stuff myself, except to run tests, so I'm not at all familiar with its ins and outs.
21:39:16
aeth
Oh, there is a slight complication in that what I'm doing is an engine/framework thing, so the ultimate executable will be for a system other than the systems that I am writing.
23:54:39
Xach
the quicklisp build server has a failed hard drive. i'll get a new one in the next few days and hope to be back annoying people with build failures by the weekend.
0:21:55
akkad
ACTION hunts fruitlessly for the slime var to limit output in the repl from crippling emacs
1:11:42
DataLinkDroid
The Ada Number Words library has been moved to Bitbucket: https://bitbucket.org/EclecticSoftwareEngineer/ada-number-words.git
2:54:43
mfiano
If I make a custom "continue" restart, is there a way to register that with SLIME as the default for when 'c' is pressed?
4:43:22
asarch
I do: (defclass point () (....)) and then (defgeneric draw (point) ...) and later (defmethod draw ((point p1)) (...)) but I get "There is no class named COMMON-LISP-USER::P1".
4:45:06
asarch
As far I understand, defgeneric functions are like "templates" which I can "define" with defmethod
4:45:27
asarch
(From this: http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html)
4:50:54
jackdaniel
usually error messages are quite informative, in this case it told you, that there is no class "p1" – skimming where did you put this symbol would indicate the problem
4:51:56
asarch
How would you do (from C++): class point {int x, y, z; ... }; class rect {point p1, p2; ...}; (the "point p1, p2;" part)?
4:56:03
jackdaniel
if you talk about having class instances as members of another class, you have it without any declarations
4:56:22
jackdaniel
you may add :type initarg to slot definition, but there is no guarantee it will be enforced
4:56:56
minion
asarch: please look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
4:57:48
jackdaniel
loke: it certainly did not on 1.4.1 version, because I needed defclass* for that (to increase the safety level locally)
4:58:42
jackdaniel
asarch: slot (like variable names) doesn't have a type, it just stores a reference to the variable (which is typed)
4:59:30
jackdaniel
so (defclass rect () ((p1 :initform (make-point 0 0)) (p2 :initform (make-point 1 1)))) is a class having by default two points
4:59:51
loke
asarch: As for your question, you'd create a rect class like so: (defclass rect () ((p1 ...) (p2 ...))
4:59:55
jackdaniel
but you can do (setf (slot-value rect 'p1) 'boom) and you won't have a point in one of the slots
5:00:31
jackdaniel
ACTION leaves asarch in more konwledgeble hands, needs to take a shower (just finished morning excercie)
5:07:05
loke
(defclass rect () ((p1 :initform (make-instance 'point)) (p2 :initform (make-instance 'point))))
5:07:36
loke
then you can add :READER arguments to each point, meaning that you can expose the reader function, but no accessor/writer.
5:13:02
asarch
If you can supply the reader and the accessor, what is the point of the defmethod functions?
5:13:49
loke
asarch: readers and accessors are just a quick way to generate the appropriate methods/gneric functions for you
5:15:00
loke
(defclass foo () ((x))) (defgeneric foo/x (obj)) (defmethod foo/x ((obj foo)) (slot-value obj 'x))
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