freenode/#lisp - IRC Chatlog
Search
19:16:31
phoe
I have two trees of CLOS instances that form a cyclic graph. How can I compare them for equality? For slot values that are not standard instances, I'd like to use EQUAL; for slot values that are standard instances, I want to recurse while marking the instances I have already visited to avoid loops.
19:16:53
phoe
These instances are of different types; I also want to ensure that the respective instances are of the same type.
19:18:16
pjb
If you have associations that have a multiplicity more than 1, then there could be an abiguity, and you might need backtracking.
19:18:58
pjb
Otherwise, you will need a walk of the two graphs. You can keep the nodes that are already walked in a hash-table.
19:20:11
phoe
All instances have some sort of ID however, so I can sort them by that ID in each list and then assume that the order is the same.
19:20:48
phoe
Or, whenever I traverse one graph, I get the ID of the current instance, find the matching instance in the other graph, and use that instance for comparing the slot values.
19:20:51
pjb
Then you will have to backtrack. If you have a->nb and A->nB and a=A, then you will have to try n*(n-1) b=B.
19:21:27
phoe
Will I have to, if they are ordered? I can treat these collections as ordered, meaning that 1st element of one collection must be equal to 1st element of the other collection.
19:22:24
pjb
phoe: well, that depends if the two graph share the same nodes, or only nodes that are equal?
19:23:17
pjb
Ok. Then yes, you can have a subalgorithm to match the list of nodes in the same association.
19:24:55
pjb
There were a couple of math libraries developed in Japan. Perhaps they had something about graph, I'm not sure.
20:01:25
Xach
Josh_2: (asdf:load-asd "/path/to/file") I think. Although I note that I just tried that on a bogus pathname and it returned something, so I don't know what to expect any more.
20:31:32
pjb
phoe: actually if you have a graph that knows its list of nodes, we don't need to walk the graph, just process the list of nodes (and we have to). On the other hand, if the graph is connected, and we only have one "root" node, then we need to walk it.
21:39:18
fiddlerwoaroof
You should be able to do something like (let ((buf (make-string 10))) (read-sequence buf socket-stream) buf)
22:43:59
pillton
schweers: (loop for var = (allocate-lots-of-resources) do ...) is enough to trigger problems if you rely on finalizers.
0:28:18
fiddlerwoaroof
Speaking of which, nyef used to be really active here and in #sbcl, but I haven't seen them around in a year or so
1:06:10
Josh_2
am I missing something here because unwind-protect isn't shutting the socket when test crashes Q_Q https://plaster.tymoon.eu/view/1109#1109
1:11:49
Bike
i mean, you say test "crashes", but that means it signals an error and the debugger comes up, right?
1:22:47
dlowe
You need to set the SO_REUSEADDR socket option if you want to reuse it right afterward.
1:24:26
dlowe
The documentation says that it makes TCP less reliable, but in practice I've never had trouble with it
1:26:54
fiddlerwoaroof
Hmm, one thing you have to be a bit careful about is the stream keeping things open
1:27:46
fiddlerwoaroof
I don't know if this is relevant here, but I've had issues with drakma where I eventually run out of fds when I do (drakma:http-request "///" :want-stream t) because, unless I close the stream, the socket never gets released.
1:39:26
fiddlerwoaroof
I have a suspicion that additional unwind-protects won't make a difference, unless there's an error in establish-tcp-connection
2:56:16
r13l
is it correct that there’s no way to kill processes started by uiop:run-program (e.g. if one receives a SIGTERM oneself)? maybe i should try to add support for uiop:launch-program to inferior-shell …
6:55:35
beach
Not bad, thanks. My favorite coauthor is coming over for lunch, and then we will work on our ELS paper submissions for this year.
7:00:38
madrik
I've got to the point where I can ask my system which client IP made how many connections; what domains has a given IP visited frequently; etc.
7:01:26
beach
We think this one is pretty much ready to go: http://metamodular.com/bootstrapping.pdf
7:05:19
madrik
In abstract, wasn't this one of the motivations in the birth of SBCL -- that its ancestor, CMUCL, had a rather involved bootstrapping procedure to build it?
7:09:37
beach
We are taking it one step further by bootstrapping CLOS first, rather than last, as is common with implementations that were started before CLOS was part of the standard.