freenode/#lisp - IRC Chatlog
Search
17:51:39
minion
Josh_2: direct your attention towards copying: http://www.nhplace.com/kent/PS/EQUAL.html
17:57:10
Bike
i wonder if there would be some value in exposing the copying that change-class is defined to use, though.
17:58:41
Bike
implementations might have something faster under the hood, like copying a storage vector
20:44:36
no-defun-allowed
Only if you expect the user to a package like that quite frequently. The only system I've made that does is lisp-strikes-twice.
20:45:34
no-defun-allowed
And that is an exploitation framework like metasploit or whatever skiddies use these days, but in Lisp and using the full power of the user's Lisp's REPL.
20:47:08
no-defun-allowed
So I would expect a user to want a -user package for that, because most of the functions they use are in that system.
20:55:42
copec
I was under the impression that most clos implementations are storing each slot grouped together referenced by clos object instance, unlike a vector or like a c struct
20:56:55
Shinmera
making the actual storage for standard-instance-access a vector is sensible with that in mind.
20:57:33
Shinmera
this is for standard-classes. Others may have entirely different storage and access methods of course.
21:01:54
copec
I read the art of the mop some time ago, but iirc the example implementation used a hashtable for each slot definition
21:24:39
Bike
by "each slot grouped together referenced by clos object instance" you mean like, each slot name would have a hash table where the keys are instances and the values are the slot values? i think there might have been an implementation of "virtual slots" in there doing that
21:25:55
copec
I probably saw something at some point, or conflated the storage of slot (meta) properties with the storage of actual slot data
21:35:01
bbsl
hi! I am trying to do part one of a8c but I am getting stuck on the last bit which is using my (hacky) function (eval-all). Anyone care to have a look and tell me what I am doing wrong?: https://rextester.com/live/UJVC52026 (this is my 2nd day of lisp so)
21:41:43
dlowe
but the program doesn't stop when it reaches the end - it stops when it encounters opcode 99
21:42:43
bbsl
hmmm I guess let me try to remove that part, I thought I was checking for the inverse I guess that (a < b)
21:44:46
bbsl
I guess I do not understand return values very well (or at all) in cl. "setf" will morph the input given in the context of the funtion or? I just want to return a new list with the new values
21:46:00
Bike
that's fine. it's not how i'd write it but there's nothing wrong with doing it that way, it's just maybe inefficient
21:46:53
Bike
plus that way you don't have to understand setf yet, because I don't think you do based on that description
21:47:57
LdBeth
bbsl: But I don’t see your code do anything “halt” the program when the op is 99, so I guess that’s the problem
21:49:07
Bike
i'm pretty sure the initial problem is that with the offsetn = 0 thing, eval-current isn't called at all.
21:51:11
Bike
with this structure, to handle 99 correctly i suppose you could have eval-current return some kind of special object (e.g. nil) to indicate that there is nothing left to do, and then eval-all has to check that
21:51:25
bbsl
LdBeth: how should I go about making it halt then I guess I can check if last-return from eval-current == this-return or I can return nil when I get 99 and always keep last-return so I can return that when I get nil
22:10:47
bbsl
While we are at it does anyone know of a link to a decent cl dev-env setup for emacs? I am using slime currently but that is about it. Would be nice if it was possible to get flychecking and company mode working ie.
22:13:18
bbsl
I was using spacemacs but they borked scala support with the whole metals/ensime thing so I stopped using it :o. ty for the link will check it out.