freenode/#sicl - IRC Chatlog
Search
4:25:01
ck_
beach: [no action needed on your part] I did most of what we discussed about the floating printer (good thing too, because it revealed a bug in the clhs-conforming code). I didn't touch the variable names, but put in some documentation strings instead. If you ever use it, I'd like to know :)
4:29:13
ck_
beach: so like I told the mcclim people, I'd like to say thanks to you as well. Not everyone is so welcoming.
4:33:46
ck_
You said, if I recall, in #lisp that "by end of year" is the current planning for an executable sicl?
4:34:23
beach
Yes, I just wanted enough time, but still push myself a bit. And I needed a well defined date.
9:06:32
beach
Somewhere, very likely programmatically generated, I have a (DECLARE (DECLARE...)) somewhere.
9:07:13
beach
Before CST was fixed by Bike, it ignored this declaration, because it didn't recognize the type of declaration.
11:31:52
scymtym
this seems suspicious assuming DECLARATION-CSTS actually holds CSTs: https://github.com/robert-strandh/SICL/blob/master/Code/Cleavir2/CST-to-AST/convert-let-and-letstar.lisp#L106
12:29:35
scymtym
beach: sure, i thought this was a good opportunity to put the s-expression pattern matcher to work
13:21:09
Bike
i should probably change cst to signal an error on declare declare, since it's definitely illegal
13:24:37
Bike
Well, what error are you getting? I would expect CST to treat the DECLARE as a type declaration
13:33:58
beach
So (declare (declare (ignore))) has been transformed into (declare (type (declare (ignore))))
13:43:00
beach
Then it calls MERGE-TYPE with the client, with the description (i.e. NIL) and the type (i.e. DECLARE).
13:44:00
beach
MERGE-TYPE specializes on the description, so the default method is called, which calls error.
13:49:47
beach
OK, so we have an ordinary list of CSTs, each one being a CST version of (declare ...).
13:53:40
beach
But if there are declarations, we build (let <bindings> (declare (declare ...) (declare...)) RESULT) instead.
13:56:48
Bike
wouldn't doing (cons (cons 'declare (mapcar #'rest declarations)) result) work too? so (declare x) (declare y) becomes (declare x y)
14:01:43
beach
Just wrap declaration-csts, so that they turn into (mapcar #'cst:rest declaration-csts).
14:14:03
beach
*SIGH* the entire day is almost gone, and I haven't started my "mission", i.e. think about the global environment protocol for use with Trucler and Cleavir.
14:22:16
heisig
beach: If you need someone to discuss the global environment protocol, I'll be around most of the evening.
14:28:21
beach
So the client of CST-to-AST must define methods on those functions, specialized to whatever global environment it gives to CST-to-AST.
14:29:59
beach
And Trucler may well receive a function description describing a generic function, even though Trucler is not really concerned with generic functions.
14:31:25
heisig
As I said before, I'd recommend that the global environment library provides methods such that each global environment can also be used as a Trucler lexical environment.
14:33:10
heisig
Every query function has a fallback method that queries the global environment instead, using the global environment protocol.
14:34:27
beach
Trucler has default methods on those that just adds a lexical environment layer, right?
14:35:43
beach
And, both the client of CST-to-AST and Trucler itself may call a query function, passing a global environment, right?
14:36:13
beach
I mean, that client just calls the query function, at there may not be any lexical environment piled on top.
14:39:32
heisig
I think of it as GLOBAL-ENVIRONMENT inheriting from LEXICAL-ENVIRONMENT. Except both environments are opaque objects and inheritance might not be involved at all.
14:40:51
heisig
The global environment argument might even be ignored for a potential native-global-environment client.
14:43:27
beach
Right, but nothing prevents us from asking the client to supply a dummy object. And I think we should.
14:43:57
beach
Methods specialized to the class of that object would just trampoline to global functions.
14:54:49
beach
I think the way to attack this problem is to ask the question "what does CST-to-ASt ever need to query the environment about", and then we can take the answers and stick them into two categories: 1. purely global and 2. maybe lexical or global.
14:57:36
beach
We know about DESCRIBE-VARIABLE, DESCRIBE-FUNCTION, DESCRIBE-BLOCK, DESCRIBE-TAG, and DESCRIBE-OPTIMIZE.
14:58:25
beach
Trucler currently has DESCRIBE-CLASS, but the association between a class name and a class is always global.
14:59:46
Bike
i don't think there's good reason to exclude the possibility of an implementation that allows information that is standardly only global to be lexical.
15:01:02
beach
OK, fair enough, but that would have to be transparent to these protocols, because we can't possibly think of every such situation.
15:02:45
Bike
yeah basically what i mean is that i think it would be good for the compiler to be able to treat environments uniformly as far as possible.
15:03:05
Bike
CST-to-AST calls global-environment in a couple places but maybe we can eliminate that?
15:03:22
Bike
we can for example distinguish lexical versus global function references by the type of info returned by the query function
15:03:38
Bike
and that's actually what we do, but conver-global-function-reference gets the global environment as an argument
15:04:56
beach
OK, so now be basically have a conflict. According to you, when the compiler needs a list of DECLARATIONS, it should call a Trucler function. But heisig wants to avoid that.