freenode/#sicl - IRC Chatlog
Search
9:43:24
heisig
jackdaniel: I am in a video conference right now. But that shouldn't take too long - maybe 10 more minutes.
9:43:30
jackdaniel
I have a bug for you! ,) in sealable-metaobjects library, in file code/specializer-prototype.lisp you do something like (register-class-prototype (make-array yadayada :element-type element-type)), where register-class-prototype does pushnew with a test #'equalp. you trigger undefined behavior there
9:43:58
jackdaniel
namely when you make-array you do not supply initial-element nor initial-contents, but you access elements (test equalp)
9:44:24
jackdaniel
for specialized arrays it may trigger i.e a floating point exception for trash bit patterns
9:44:46
jackdaniel
(because the implementation is not obliged to initialize the array if neither argument is specified)
10:01:23
jackdaniel
I'd love for ecl to be more performant, but that's not it (however if someone makes a pull request I'll review it and possibly merge) -- the issue came during testing ecl before the release
10:02:14
jackdaniel
cl-test-grid takes all quicklisp libraries and tries to load them and when fesible call their test suite
10:02:42
heisig
Ah, OK. The good news is that sealable metaobjects and fast generic functions are not very invasive. So you may not even need to merge anything.
10:03:05
heisig
But I'd need some mechanism like SBCL's deftransform to obtain the type information at the call site.
10:05:03
jackdaniel
no, they've diverged too much, but I'm sure I'll exploit beach's, bike's and drmeister's kind hearts and ask them when in doubt :)
10:54:56
heisig
beach: One of my anonymous referees complained that the abstract of my paper was not very good. Would you mind reviewing my new abstract?
10:55:10
heisig
The (hopefully final) version of my paper is here: https://heisig.xyz/sealable-metaobjects.pdf
10:55:59
heisig
The new version of the paper also contains my benchmark results for fast generic functions. Those could be interesting for people in this channel, too.
11:10:36
splittist
heisig: I'm not beach, but my completely ignorant suggestion would be: Lose the first para. Start with the first two sentences of the second para. Then use the first part of the first sentence of the third para (up to "... next method."). Then the last sentence of the second para.
11:21:44
heisig
I will still wait for beach's remarks before I make yet another version of the paper.
11:49:40
beach
heisig: Yes, I think all the required information is present now, with or without the remarks by splittist. One remarks though, I would say "competitive WITH" or "comparable TO", but not "competitive TO". Maybe splittist has an option on that one though.
12:01:14
scymtym
Shinmera: if i remember correctly, cl-test-grid requires some sort of adapter for each project for which tests should be executed
12:02:24
Shinmera
Ah. That makes sense, since asdf:test-system does not allow returning any form of useful value to indicate pass/fail, let alone more intricate stuff.
13:04:43
beach
Currently, my implementation of generic dispatch has a few problems. First, it does not handle eql-specializers. Second, it always uses the stamp of the object.
13:04:53
beach
In other words, I haven't yet implemented what Bike suggested in the past (and what Clasp no doubt is doing), namely test for classes defined by tag bits first. The best order for such tests will depend on what subset of classes of such objects is present in the call history, so that's an interesting problem in itself, but that is not why I am bringing it up.
13:05:09
beach
I am bringing it up because the current boot procedure works because I call a host function STAMP which is quite flexible, and that is why I can mix functions of different purity in the same environment. The day I improve my implementation of generic dispatch, the current boot strategy won't work.
13:05:24
beach
So I am thinking of ways to fix that. It would clearly be desirable not to have two versions of the implementation of generic dispatch. Here is my idea...
13:05:33
beach
I use the existing instruction FIXNUMP-INSTRUCTION, CONSP-INSTRUCTION, CHARACTERP-INSTRUCTION, and I guess a few new ones for testing for SINGLE-FLOAT which is an immediate in SICL, and for testing for STANDARD-OBJECT. And I use the NOOK-READ instruction to get to the stamp of a standard object.
13:05:40
beach
Now, during bootstrapping, all instances of SICL built-in classes are represented by host objects, like FIXNUM, CONS, CHARACTER, but some instances of SICL standard objects are also represented by host objects, in particular symbols.
13:05:42
beach
So the idea would be to have the HIR interpreter interpret the NOOK-READ-INSTRUCTION with a constant input of 0 to mean STAMP-OF, but it would also handle those special objects like symbols.
13:06:29
beach
Then, I can remove the definition of STAMP from the boot procedure, but I can still mix functions of different purity under certain circumstances.
13:26:49
beach
So when COMPUTE-APPLICABLE-METHODS-USING-CLASSES returns a second value of false, we may or may not be allowed to avoid a call to COMPUTE-APPLICABLE-METHODS. I forget the conclusion of previous discussions, but for STANDARD-GENERIC-FUNCTION we ought to be able to avoid such a call since conforming applications can't add methods to determine whether COMPUTE-APPLICABLE-METHODS was called or not.
13:29:48
beach
But in the general case, it seems that, when the binary search that the discriminating function implements fails, one possibility is that it is because we were not allowed to cache the result of COMPUTE-APPLICABLE-METHODS-USING-CLASSES, so we must call COMPUTE-APPLICABLE-METHODS.
13:37:05
Bike
on clasp we cache things with eql specializers sometimes, but only with standard-generic-function.
13:37:32
Bike
hypothetically we could export some kind of caching API so programmers with custom generic function classes could have caching beyond the c-a-m-u-c case as well
13:38:53
heisig
There was a paper by Rhodes on how such an API could look like: https://research.gold.ac.uk/9924/
13:41:20
beach
Oh, OK, I'll look into that. Thanks. But I am not going to implement it yet. Keep it simple in the first version is the motto.
13:42:01
Bike
just the normal c-a-m-u-c to c-a-m should work fine... handling eql specializers is nice, especially since cleavir uses them all over, but it's hardly a requirement
13:44:41
Bike
the first example here is a code walker, which is exactly what cst-to-ast is doing with the specialization-only head symbols... nice
14:09:59
heisig
beach: Nook is the new name for racks, right? I tried to look it up in the SICL specification, but there was no explanation yet.