I was just wondered what others, in their experience with lisp, have often wanted from read macros and readtables. Are you satisfied with what one can do with them now in the current standard or do you wish for something more?
Personally, I would like
(1) Readtables per package rather than a global one
(2) Being able to read backward in the reader macro stream for context
Read Macro / Readtable Wish List
Re: Read Macro / Readtable Wish List
There is a project to make managing readtables easier: named-readtables.
Re: Read Macro / Readtable Wish List
Personally, I wish for just one thing: dispatch based on a symbol. E.g., something like #!BAR and #!FOO:BAR will dispatch to read macro attached to FOO:BAR symbol.Suroy wrote:I was just wondered what others, in their experience with lisp, have often wanted from read macros and readtables. Are you satisfied with what one can do with them now in the current standard or do you wish for something more?
Personally, I would like
(1) Readtables per package rather than a global one
(2) Being able to read backward in the reader macro stream for context
Re: Read Macro / Readtable Wish List
Join the line of people who rediscover that syntax. Here's my implementation.dmitry_vk wrote:Personally, I wish for just one thing: dispatch based on a symbol. E.g., something like #!BAR and #!FOO:BAR will dispatch to read macro attached to FOO:BAR symbol.
http://www.cliki.net/read-macros
See also this syntax invented for PLT scheme.
http://barzilay.org/misc/scribble-reader.pdf
http://docs.plt-scheme.org/scribble/
Re: Read Macro / Readtable Wish List
Oh, I have to add to my list
I would like a read-delimited-form which will read everything rather than read-delimited-list which doesn't like cons lists. Thats because I would like to implement a more natural interface to the dot-net framework using RDNZL rather than using brackets. I know, picky, picky
I would like a read-delimited-form which will read everything rather than read-delimited-list which doesn't like cons lists. Thats because I would like to implement a more natural interface to the dot-net framework using RDNZL rather than using brackets. I know, picky, picky
Re: Read Macro / Readtable Wish List
So like yesterday and today I copy and pasted sbcl's reader parsing code getting rid of any sbcl-specific code. Dont know if i broke anything cause i only tested it for the very simplest cases. I do know i commented out the #S reader macro definition. I imagine if someone wanted to, though, a better (?) reader macro system using this code could easily be produced which is , err.. better.
http://github.com/Eyaro/cl-reader
Now i shall go check out scheme
http://github.com/Eyaro/cl-reader
Now i shall go check out scheme