libera/#sicl - IRC Chatlog
Search
3:54:24
beach
The main issue I fixed was that the APPEND clause should not copy last list that is appended.
3:54:30
beach
It was interesting because the main difficulty was figuring out the trick to the solution, which was keeping the tail pointer pointing not to the last CONS cell in the accumulated list, but to the last CONS cell that should not be copied in case more cells get attached.
3:54:35
beach
When more cells get attached as a result of another APPEND, an NCONC, or a COLLECT, the tail pointer is moved and CONS cells are copied on the way.
3:54:37
beach
The other interesting part was that there was no problem whatsoever figuring out how to modify the code accordingly. The fix involved adding more code to macro expanders, so some abstractions had to be created. But otherwise, the organization of the LOOP code seemed sane.
3:59:13
moon-child
something I noticed while looking at that code is that lists that were APPENDed were traversed twice: once when initially copied, and once again when moving to the end. I would guess this change in approach also fixed that
7:26:25
moon-child
random thought: it would be nice a printer could produce forms like (#1=#:foo #1#)