[slime-devel] broken clojure REPL
Tobias C. Rittweiler
tcr at freebits.de
Sat Jan 9 16:21:21 UTC 2010
"Steven E. Harris" <seh at panix.com> writes:
> "Tobias C. Rittweiler" <tcr at freebits.de> writes:
>> The point is that you're not trying to use a Lisp reader to read what
>> looks very much like Lisp forms, but you're trying to use the Clojure
>> reader. And the Clojure reader is very restrictive in what it accepts
>> as symbols.
> Well, I wrote "Lisp" as opposed to "Common Lisp" to generalize the
> complaint. One can imagine SLIME having originated for some Lisp that
> allowed symbols like ":::foo", which the Common Lisp reader would not
> read without complaint. Are we not biased in this debate due to SLIME
> having been made for Common Lisp?
> > The easiest compromise is to change %CURSOR-MARKER% to +CURSOR-MARKER+
> > which, if I read the documentation right, the Clojure reader will
> > accept.
> It would not accept the "swank::" prefix, due to the double colon, but
> the plus is accepted where the percent sign is not.
I think I was told that the issue of two colons is not insurmountable.
> > Doing so, is sweeping a problem under the carpet.
> Yes, I agree, insofar as either protocol participant is using a parser
> (be it the Common Lisp, Clojure, or ELisp reader) that isn't just
> reading a string.
> However, to recommend that the protocol participants implement a parser
> from scratch to read these Lisp forms seems unreasonable too; after all,
> the protocol looks to have been designed for writing and reading Lisp
> forms directly. It can't just be an accident that there are paired
> parentheses and keyword-style tags.
I have not made such a recommendation in my previous mail.
> > I still think that it is Clojure that should "change". It should
> > provide a way to READ in a form with minimal processing -- something
> > that CL's reader, for instance, does not really allow to unfortunate
> > consequences.
> That would be convenient, but also isn't fair, in light of my suggestion
> above about a symbol like ":::foo". I don't have an example of a symbol
> that Clojure can read and CL can't, but if the situation were reversed
> and Swank had been implemented first in Clojure, would you advocate that
> CL should be changed to play along?
CL should have been made to provide such a minimal reading mode, too.
Clojure, unlike ANSI CL, has the chance to make it happen.
Please try to make it happen.
More information about the slime-devel