freenode/#clasp - IRC Chatlog
Search
18:41:40
Bike
primitive typeq works and is slightly faster than predicates (when applicable). however any advantage with typep is negated by the fact my expansion involves a LET to avoid multiple evaluation, which bclasp has as an allocation i guess. oh well
19:20:07
Bike
one little sticking point with changing cleavir type inference is that i can't determine the type of constants
19:20:40
Bike
and not avoiding checks because you have a literal instead of a variable with a declared type would be pretty silly
19:31:57
Bike
well. if i have (typep x 'list) that turns into (or (if (typeq x cons) t nil) (eq x nil)). type inference and constant propagation are pretty much the same thing.
19:57:51
Bike
i guess i can just try it with only types first, but i don't think constants can really be ignored
3:15:00
Bike
i'm pretty much done with it, iw as just looking at how generic functions are implemented
3:22:52
drmeister
You use 'validatorfs' - is that a typo? Or did I screw up a search and replace? What does 'validatorfs' mean?
5:18:09
beach
The CST library is turning into a full replacement for the Cleavir code utilities, which is a good thing.
5:19:43
beach
Yeah. Some processing, like canonicalizing LET and LET* bindings used to be part of generate-ast, but it is definitely better to have it in the CST library.
5:21:02
drmeister
::notify Bike I fixed the validator thing. But say there is a validator that limits the range of values of a slot between 0 and 10. If I (setf (slot object) 15), the value is set to 10 but 15 is returned. I expected 10. The CLHS says of setf: "results---the multiple values[2] returned by the storing form for the last place, or nil if there are no pairs."
5:21:26
beach
Each time some code is transformed, it is important to preserve source location as must as is reasonable, so such transformations are naturally in the CST library.
5:28:49
drmeister
What source gets tracked when a macro is expanded? I've always been puzzled by what should best happen with source tracking when a macro is expanded.
5:31:00
beach
If some symbol appears several times in the expansion, it could have come from the original form, or it could have been introduced by the macro expander.
5:32:18
beach
We could do better if we had a way to track source code of the macro expander itself, but that's currently not done.
5:33:54
beach
For what it's worth, in SICL, I intend to load the entire contents of the file being compiled as a string into the image, and have source locations refer to that string.
5:34:25
beach
... as opposed to hoping that the file is still around, has the same, and has not been modified.
5:35:58
drmeister
I like to load whole files and work with them in memory - but I wouldn't think to keep them around.
5:36:59
beach
Source code will likely be paged out, so it's not necessarily RAM. People tend to ignore the existence of virtual memory.
5:39:35
beach
The entire source code of SICL is 6.4MB, which is ridiculously little in terms of RAM size today.
5:40:17
beach
But I am getting used to people no longer being able to do back-of-envelope calculations.