freenode/#sicl - IRC Chatlog
Search
13:22:29
Bike
got parse-macro working nicer now. handles destructuring key and optional. treats declarations on &whole and &enviroment variables correctly. warns if &whole variables are unused
13:22:54
Bike
it would be nice if the erorr messages for bad arguments were improved too, but i'm not sure how to do that right off
13:24:50
Bike
right now if a macro gets too few arguments it just signals a simple error saying "too few arguments"
13:28:17
Bike
ohh, i missed a discussion about frequencies in the generic function dispatch... i was actually wondering about that before. it might be good. (though right now i imagine it's irrelevant compared to everything else that's slow)
13:28:58
Bike
as i mentioned before, i think, compiling a switch optimally is kind of a universe of problems in itself
13:29:29
Bike
If an SBCL macro doesn't get the right number of arguments, the error shows the list of arguments and the lambda list, but only for the relevant lambda list
13:29:46
Bike
E.g. if you have ((x)) and pass (4), you'll get an error about the lambda list (x), not ((x))
13:30:41
Bike
i don't think CST should have its own condition classes for this. Or I could define a generic function that produces an error form, and clients could specialize it
13:40:19
Bike
ah, there are already classes, for use with cst:db... still, should be customizable for parse-macro
14:57:06
beach
Do they still change the GC? Or is this an old problem that has never been corrected?
15:04:28
Bike
ok, got it doing a dumb "too many arguments" error now. printing the lambda list in the error may be trickier because it's already parsed at this point
15:05:56
Bike
having the parsed lambda list object carry around a reference to the original CST would be okay, right?
16:02:26
Bike
if i just leave ltieral CSTs in the result of parse-macro, it will cause problems for anybody that uses parse-macro for defmacro, since there's no make-load-form
16:02:55
Bike
even if the source info is stored separately, it'll have to have a make-load-form itself, and that's entirely client dependent
16:32:26
Bike
hm... the lambda list objects are actually constructed in the depths of the parser, so it's not obvious to me how to attach their originals
16:36:27
beach
I would need to spend some off-line thinking to understand the problem that SICL might have.
16:40:00
Bike
well, basically a defmacro form would expand into something that has a literal CST in it. So there has to be a make-load-form for it or you can't compile-file any macros, w hich is obviously not tenable.
16:45:33
scymtym
beach: in SBCL, the runtime, the memory allocation parts of the compiler and the gc implementation change rather frequently. i would say those areas are dougk's main focus
17:06:51
Bike
the CST tests don't cover parse-macro, or lambda list parsing at all... i wonder how that could be done...
17:08:28
Bike
what i've been doing informally in the repl is eval-ing the result of parse macro and calling the result with simple arguments, and that works well enough... just need some handlers is all
17:08:44
Bike
but i've also been checking that the implementation doesn't signal warnings about unused variables or anything, and that's harder
17:10:16
Bike
yeah, i mean, depending on how an implementation's EVAL works maybe nothing actually gets signaled
19:04:44
scymtym
Bike: maybe by being a member of the s-expressionist organization. otherwise not any more than you are, that is i contributed a few changes. that said, i seem to be able to merge pull requests if that helps