freenode/#lisp - IRC Chatlog
Search
23:45:01
asarch
2) How could you specify which 'get-sugar' (either from 'chocolate' or from 'cafe') you want in 'serving-drink'?
23:45:44
asarch
From the question #1 I get: 3: (ERROR "Illegal function call in method body:~% ~S" ((FORMAT T "The level of sugar is: ~d~%" (GET-SUGAR CUP))))
23:46:38
on_ion
although i would say, the slot 'sugar' would be part of something that the chocolate and the cafe would share
23:47:11
Bike
you have serving-drink with a defgeneric with one parameters, and then the method has two parameters.
23:49:38
Bike
which, per precedence rules, would be the one for CHOCOLATE since it's the leftmost superclass
23:50:16
Bike
you should just specify the sugar slot in a parent class, and then specify initforms in the lower class if you'd like
23:54:26
asarch
In my example, because of the class precedence list 'serving-drink' uses 'sugar' from 'chocolate'
23:55:10
Bike
As I said, you probably don't want to do that. You can't have two distinct slots with the same name in the same object.
23:58:07
Bike
As I said, if you must you can think of everything about classes as being what C++ terms "virtual".
23:59:09
specbot
Inheritance of Slots and Slot Options: http://www.lispworks.com/reference/HyperSpec/Body/07_ec.htm
23:59:51
asarch
So, if I do: (defparameter *my-cup* (make-instance 'dinner)) and then (serving-drink *my-cup*), 'sugar' from 'cafe' doesn't exist, right?
0:00:35
Bike
The defclass merges the slot definition information from the 'cafe' and 'chocolate' classes.
0:01:54
asarch
In (defclass dinner (chocolate cafe) ()), I thought the 'sugar' slot was from the last element from the class precedence list
0:03:16
Bike
The two slot definitions only differ in their initform and docstring. According to the page I just linked, dinner's slot will have these from the most specific superclass, i.e. CHOCOLATE.
0:07:51
Bike
you might even be able to arrange a metaclass where child classes just get the unaltered class from their supers
0:08:10
Bike
and then you access them with some special slot-value where you include a class designator in addition to the slot name
0:13:17
asarch
Reading about CLOS and all related stuff, I found the CLOS version of Racket is Swindle
0:14:59
msmith
hi all, can someone remind me of the command that would allow me to destructure a list and use it as parameters in a function?
0:17:49
asarch
So far I found three "glitches" in Lisp: 1) You can't read the value of "ARGS" in a binary file (for passing values) 2) There is no standard way to access to the value of :documentation from defclass 3) And this :-P
0:21:45
asarch
Well, you write an small application in Lisp to start a web server and then you need to specify the port number manually: my-lisp-server --port 8080
0:23:12
Bike
it's nothing i do very often, but there are some libraries, like http://quickdocs.org/command-line-arguments/
0:29:45
White_Flame
of course, each implementation also exposes a simple list of strings representing C's argv
3:28:47
drmeister
Is there some special return value that the handler returns to indicate that it does or doesn't handle the condition?
4:21:49
specbot
Condition System Concepts: http://www.lispworks.com/reference/HyperSpec/Body/09_a.htm
4:48:45
beach
MichaelRaskin: I think you are right. I need more than one `next' PC value when there is a branch in the code. But I can do that. I just have the table contain either a singleton address or a list of addresses.
7:27:23
aeth
The default type one? It definitely isn't a must-have, but it does prevent increased verbosity when refactoring from certain patterns of DEFUN with DECLARE.
7:49:40
pillton
aeth: Yes. The syntax is quite surprising though (I couldn't think of a better word).
8:17:25
aeth
My exact way to do it is probably not the best way to do it, but my API isn't final so I went with it for now.
8:23:13
aeth
The way it would show up when working with sequences would probably be something like: (define-foo map-two-into! ((destination some-seq) (function function) (seq-1 some-seq) (seq-2 some-seq)) (map-into destination function seq-1 seq-2)) Except, of course, it would be doing something more specific that just happens to match that basic pattern.
8:58:22
beach
I factored the descriptions of the three tables providing support for the debugger STEP-* commands: http://metamodular.com/code-object.pdf
9:43:09
beach
I also updated this document: http://metamodular.com/clordane.pdf (section 1.2.8 on page 4) to reflect the different kinds of possible STEP commands. I added a description of how Clordane accomplishes stepping.
11:04:43
Colleen
attila_lendvai: drmeister said at 2018.05.18 14:56:12: Do you recall how to shut down messages from waf? Specifically when it links or aggregates all of the scraped files? The lines are really long and they cause emacs to pause for many seconds when you try to skip over them.