Search
Thursday, 12th of September 2019, 2:11:16 UTC
2:57:16
beach
Good morning everyone!
2:58:01
no-defun-allowed
Good morning beach!
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:25:59
beach
Great! I will definitely use it as part of the printer in SICL.
4:26:27
beach
But it won't be right away, because I don't need floats during bootstrapping.
4:26:56
beach
When do you start your new job?
4:27:31
ck_
I won't vanish here completely, but I'll be active much less probably
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:30:11
beach
As far as I can tell, you have contributed quite a lot.
4:31:40
ck_
time will tell if anything is useful
4:32:43
beach
Indeed, but I have no doubts.
4:33:20
ck_
Hey, thanks. A glimmer of optimism :)
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:33:49
ck_
like a christmas present
4:34:23
beach
Yes, I just wanted enough time, but still push myself a bit. And I needed a well defined date.
6:52:36
beach
I am going to be a bit busy with other stuff today. I'll be here sporadically.
8:07:24
heisig
Shinmera: You are a legend!
8:14:09
no-defun-allowed
Morning heisig and Shinmera
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.
9:07:22
beach
But now, it makes the boot procedure fail.
9:07:38
beach
I suspect PARSE-MACRO, and I am going to investigate.
9:07:54
beach
But, like I said, I'll be busy with other stuff today.
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:14:02
beach
Yes, I think you found it.
12:14:17
beach
It was definitely related to LET and LET*.
12:15:35
beach
I have been running around all day, so now I am going to take a break.
12:15:46
beach
I'll try to attack this problem after the break.
12:29:35
scymtym
beach: sure, i thought this was a good opportunity to put the s-expression pattern matcher to work
13:17:24
beach
Oh, is that how you found it? What pattern did you use?
13:21:09
Bike
i should probably change cst to signal an error on declare declare, since it's definitely illegal
13:21:18
Bike
i don't know if sicl uses the same code for proclaim, though
13:21:49
Bike
well that should signal an error, still
13:21:53
beach
It is a simple mistake of piling a DECLARE on top of a DECLARE.
13:22:18
Bike
but not one that gives you a source location?
13:22:39
beach
The same code is both in Cleavir and Cleavir2.
13:22:53
beach
How can Clasp not detect it?
13:24:24
beach
I guess there must be a LET* with declarations.
13:24:37
Bike
Well, what error are you getting? I would expect CST to treat the DECLARE as a type declaration
13:24:42
Bike
and clasp mostly ignores those at the moment
13:25:15
beach
The error I get is in Trucler, so that must be the difference.
13:33:12
beach
It is trying to combine type declarations, one of which (type (declare (ignore)))
13:33:58
beach
So (declare (declare (ignore))) has been transformed into (declare (type (declare (ignore))))
13:34:33
Bike
does it not combine type declarations just by putting AND in front of them?
13:36:44
beach
OK, let me restore the code so that I can give you a better answer...
13:40:27
beach
TRUCLER:ADD-VARIABLE-TYPE is called...
13:40:58
beach
With SYMBOL being (IGNORE), i.e. not a symbol.
13:41:58
beach
So it asks the environment for a description of the "symbol" (IGNORE).
13:42:12
beach
The environment returns NIL as a description.
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:43:07
Bike
Shouldn't (declare (ignore)) be treated as a type, and then there are no variables?
13:43:12
Bike
Maybe I messed up canonicalization
13:44:00
beach
MERGE-TYPE specializes on the description, so the default method is called, which calls error.
13:44:29
beach
Correct, but it is given (declare (declare (ignore)))
13:44:42
beach
Which is a bug in CST-to-AST when it processes LET* it seems.
13:45:01
Bike
so it actually ends up as (type declare (ignore)), i see
13:45:07
beach
So the inner DECLARE is taken to be a type.
13:45:23
Bike
alright, that's all i was concerned about
13:49:47
beach
OK, so we have an ordinary list of CSTs, each one being a CST version of (declare ...).
13:50:09
beach
And we have a RESULT, which is body form.
13:50:58
beach
Er no, RESULT is not a body form. Hold on...
13:51:42
beach
I take that back. :) I think it is.
13:52:57
beach
So if there are no declarations, we build (let <bindings> RESULT).
13:53:40
beach
But if there are declarations, we build (let <bindings> (declare (declare ...) (declare...)) RESULT) instead.
13:54:01
beach
So we are inserting an extra DECLARE.
13:54:30
beach
We should append the declarations and (list RESULT).
13:54:47
beach
But we don't have a CST:APPEND. At least I don't think so.
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)
13:57:09
Bike
i mean with 'declare actually being a cst
13:59:16
beach
I guess (mapcar #'cst:rest declaration-csts)
13:59:53
Bike
right, and the conses are cst:cons
14:00:14
beach
Yeah. I think I can figure it out.
14:01:43
beach
Just wrap declaration-csts, so that they turn into (mapcar #'cst:rest declaration-csts).
14:02:08
beach
Do you want the honor for Cleavir v1 so that you can test it immediately?
14:03:14
Bike
you mean port your fix? sure i can do that
14:03:32
Bike
or me doing it? i'm in the middle of something else actually
14:03:34
beach
Yes, or just modify that line in convert-let*
14:06:41
beach
Done. It shouldn't have any influence on Cleavir, but you might keep an eye open.
Thursday, 12th of September 2019, 14:11:16 UTC