[Openmcl-devel] ccl manual (was Re: trace on recursive functions)

Ron Garret ron at flownet.com
Mon Dec 14 18:48:06 UTC 2009


On Dec 14, 2009, at 10:31 AM, Brian Mastenbrook wrote:

> On 12/14/2009 12:06 PM, Ron Garret wrote:
>> 
>> On Dec 14, 2009, at 9:13 AM, Brian Mastenbrook wrote:
>> 
>>> On 12/13/2009 7:33 PM, Ron Garret wrote:
>>>> 
>>>> On Dec 13, 2009, at 12:30 PM, Brian Mastenbrook wrote:
>>>> 
>>>>> I personally find editing text in S-Expressions to be incredibly
>>>>> cumbersome. Quite a lot of my code is mixed XML/S-Expressions done with
>>>>> a reader macro that allows me to write things like (<a href="test">
>>>>> "Text!"), and while this works for layout in web applications I'd go mad
>>>>> trying to read things like "This is a bit of text that has \"quotes\"
>>>>> and \"\\"\" (backslashes) in it".
>>>> 
>>>> Then I have good news for you too.  There is another cool new technology called Unicode, which gives you access to additional characters beyond those in the traditional ASCII repertoire.  In particular, Unicode gives you access to a number of different styles of balanced quotation marks.  Balanced quotation marks can be nested, and also allow one level of traditional unbalanced quotes to be contained, all without any escape characters.  e.g.
>>>> 
>>>> «Balanced quotes can be «nested» and can contain "unbalanced quotation marks" without any escape characters.»
>>> 
>>> Clearly for a documentation-oriented wiki, there will be a need to use the standard quotation marks that Common Lisp uses. Your funny Unicode quotations are just constituent characters to the default reader.
>> 
>> Guess what!  More good news!  (One of these days you are going to notice a pattern developing here.)  You can actually *change* the Lisp reader!  Yourself! Easily!
> 
> Yes, and if you change it enough you'll basically wind up with a reader that's customized to writing documentation. Which is exactly what the @-reader in PLT's Scribble is, which is why I pointed it out.
> 
> The point is that you've now gone from very simple sexps to a custom syntax that also happens to require me to change system settings in order to be able to edit it efficiently (since I assume the custom quotes will be used for all text in this documentation format; you can't very well document how to use CL strings using a non-standard reader).
> 
> You would do well to assume that I'm not an ignoramus. I am well versed in this wonderful Unicode and Common Lisp stuff. I am pointing out these problems because your solutions are just as complicated as the solution of using a format where text is unquoted and meta-information is escaped, with the added bonus of not shifting the burden of figuring out how to insert quotes onto the user and their level of familiarity with how to edit plists or whatever's required to make this convenient on other platforms.


No, my solution is not "just as complicated."  My solution has one very small startup cost which then pays dividends over a very long period of time.  Furthermore, my solution would serve as a showcase for what makes Lisp different and unique.  And finally, we're talking about writing documentation here.  If we can't document the process of editing keybindings well enough to serve the target audience we're talking about here then we may as well just pack our bags and go home.

If we're not going to take advantage of Lisp's unique features to solve our own problems how are we ever going to convince anyone else that Lisp can solve their problems?  What are we even doing here?

rg




More information about the Openmcl-devel mailing list