freenode/#sicl - IRC Chatlog
Search
2:54:58
beach
"It is named a shell because it is the outermost layer around the operating system kernel."
9:04:07
beach
frodef: Multics did not use the idea that every user has a virtual computer, at least not in the sense of a linear address space starting at 0. Multics used "segments" that were fixed-size arrays and that were pages. A Multics virtual address was a pair [segment-number,offset]. Unix, on the other hand did use that idea. Probably because they had to. The first computers it ran on, did not have a memory management unit.
9:06:47
beach
frodef: But, yeah, Multics used processes to separate users from one another. Virtual addresses were 18+18 bits, so there were not enough addresses for everyone to share the same address space. Therefore, virtual addresses were not valid across process boundaries, just like with Unix.
13:35:57
beach
Do you know whether SBCL optimizes TYPEP with a constant atomic type specifier according to the idea that Bike had this morning (UTC+2)?
13:37:20
beach
Basically do the same thing as with SLOT-VALUE, i.e. turn (TYPEP ... 'TYPE) into a (TYPE ...) where TYPE is a generic function.
13:38:32
beach
In SICL, it would be more like turning it into (funcall (car (load-time-value (find-typep-function 'type))) ...).
13:38:39
scymtym
i don't think SBCL ever does that. i had that idea as well when i tested the fast-gf-like thing for SBCL
13:39:24
scymtym
since the benefits over independent TYPEPs would be even more substantial (i would expect)
13:40:53
scymtym
but i may have assumed more general decision trees for that case, now that that i think about it
13:42:01
beach
As I pointed out, the TYPEP thing is often done manually: (defgeneric foop (x) (:method (x) nil) (:method ((x foo)) t))
13:43:42
beach
Well, I think Bike should try this out in some implementation, write down the result in the form of a paper, and submit it to ELS.
13:44:41
scymtym
the commonality being the need to more or less inline a funcallable instance at a call site
13:45:57
Bike
well what i was thinking was just the sicl version. if you're okay with leaning on semantic restrictions you can just inline the predicate, and usually the predicate is small so it should be fine.
13:48:52
beach
That would be the essence of the paper. How to get that machinery to work, even though the definition of the type changes.
13:49:33
Bike
hm, maybe i'm confused. for typep with a constant class a generic function makes some sense and clasp already does that for defstruct.
13:50:05
Bike
for general types i don't know. things like integer ranges wouldn't improve. maybe something like (or (array some-type) (array some-other-type)) would.
13:50:32
Bike
well yes, but the atomic type specifiers are often names for non atomic type specifiers.
13:51:53
beach
The point here is that with the fast generic-function machinery, we get a lot of flexibility.
13:53:44
scymtym
integer range dispatch can be used for tags, stamps and actual integer (at least fixnum) values
13:54:44
beach
Again, I think the machinery for making this stuff work in the presence of DEFTYPE and DEFCLASS after compilation of the TYPEP form would be the essence of the paper.
13:55:12
beach
Optimizations could be speculated about as possible, but not necessarily before the paper submission.
13:56:48
Bike
So i mean the idea is you have (typep x 'foo) expand into (funcall (car (load-time-value (find-typep-cell 'foo))) x), right? then if foo is an integer range you can just have the function be a non-generic.
13:59:27
beach
The interesting part, to me, is what happens if you have (typep x 'foo), and a class named foo. At compile time, you have a class BAR that is a subclass of FOO, so TRUE is returned for BAR.
14:00:32
beach
Yes, but you have to describe what happens when this new DEFCLASS is executed. That is non-trivial.