On Monday, July 29, 2024 at 06:35:45 AM EDT, Attila Lendvai attila@lendvai.name wrote:
it's not environmental differences, but a peculiarity of slime's implementation. one of them calls SWANK:INTERACTIVE-EVAL on the CL side, and the other calls SWANK:PPRINT-EVAL.
the latter configures the printer differently (i.e. enables *PRINT-CIRCLE*). but notice that the two outputs are the same semantically. one of them just also annotates the cons cell identities.
in short: it's a peculiarity of the current slime implementation, but i wouldn't call it a bug.
OK. I see that the result is (semantically) the same.
The following at the REPL causes `slime-eval-last-expression' to return the same value as `slime-pprint-eval-last-expression':
CL-USER> *print-circle* NIL CL-USER> (setf *print-circle* t) T CL-USER> (loop :for n :in '(a b c) :collect `(,n (gensym))) ((A . #1=((GENSYM))) (B . #1#) (C . #1#))
The documentation for both `slime-eval-last-expression' and `slime-pprint-eval-last-expression' does not mention this difference in either docstrings, and neither function is documented in the Slime (info) manual (although their key bindings are).
It would be helpful for users to have it documented that the pprint function (indirectly) changes the value of *PRINT-CIRCLE* and that, therefore, the user should expect the pretty-print printed representation to differ sometimes from the standard evaluation.
Thank you for your response and clarification about what is going on in this Slime behavior.
--