Hi,
On Aug 20, 4:59 pm, Brian Hurt bhur...@gmail.com wrote:
This I like better, and I may take a crack at doing this over the next
weekend. Have some sort of parser object that starts life parsing the same
s-expression syntax as the standard Clojure reader but allows for
extensions. This
On Fri, Aug 14, 2009 at 7:00 PM, Jonathan Smith
jonathansmith...@gmail.comwrote:
It would be nice if someone wrote a separate extension to clojure that
(reads in a text file and) that does tokenization and manipulation of
said tokens (I'm thinking YACC, flex/bison sort of thing).
(Then you
On Aug 14, 2009, at 12:48 AM, Daniel Lyons fus...@storytotell.org
wrote:
On Aug 13, 2009, at 5:30 PM, Bradbev wrote:
More complex reader macros could be (infix x + y + z / 3).
I think you can already do that with regular macros.
I don't think so. Macros are invoked after the read
On Aug 14, 2009, at 2:03 AM, Chouser chou...@gmail.com wrote:
On Aug 14, 2009, at 12:48 AM, Daniel Lyons fus...@storytotell.org
wrote:
On Aug 13, 2009, at 5:30 PM, Bradbev wrote:
More complex reader macros could be (infix x + y + z / 3).
I think you can already do that with
On Aug 14, 2009, at 12:12 AM, Chouser wrote:
That particular example may not have to be a macro at all:
http://paste.lisp.org/display/75230
Wonderful! :)
I think people want reader macros for a couple different reasons.
Sometimes it's just to remove parens from a function or macro call.
Just to add a bit of contradiction to the debate: it is generally told to
people coming to lisp that lisp is all about giving power to users, and
it's up to them to take care of not shooting themselves in the foot.
E.g. that' the general answer when one complains that there's no static
typing with
I suspect that reader macros are necessary to fully realize named-
argument message passing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
One thing that I would like to see implemented seems like a good
candidate for a reader macro...
I find it useful to have a way to comment out an expression by
prefixing it with some symbol.
I.E. if a '/' before an expression is an expression comment, it is
easy to experiment with code:
(foo
On Fri, Aug 14, 2009 at 10:20 AM, Boris Mizhen - 迷阵bo...@boriska.com wrote:
One thing that I would like to see implemented seems like a good
candidate for a reader macro...
I find it useful to have a way to comment out an expression by
prefixing it with some symbol.
I.E. if a '/' before
On Fri, Aug 14, 2009 at 3:28 AM, Daniel Lyonsfus...@storytotell.org wrote:
On Aug 14, 2009, at 12:12 AM, Chouser wrote:
Perhaps these different desires can fulfilled with two different
constructs.
The two being:
1. To remove parens from a function or macro call. You mean e.g. #
and #()?
Similarly # is pretty close to what the re-pattern
function does. One difference is that # compiles the
regex at read time while re-pattern compiles it runtime. If
re-pattern were a macro that difference would essentially
disappear.
In code, yes, it would disappear because you can shift
On Aug 14, 2009, at 10:49 AM, Chouser wrote:
So in general 1 is in my opinion a fairly minor syntax
thing, while 2 could be somewhat alleviated if Clojure had
a string literal format that allowed un-escaped double
quotes and left backslashes unmolested. This would allow
things like (infix
On Thu, Aug 13, 2009 at 4:59 PM, Daniel Lyons fus...@storytotell.orgwrote:
On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
I'm just wondering what people's response would be to allow user-generated
reader macros. I'm not sure, but I think the only change to the clojure
core that would be
On Aug 14, 11:46 am, Brian Hurt bhur...@gmail.com wrote:
On Thu, Aug 13, 2009 at 4:59 PM, Daniel Lyons fus...@storytotell.orgwrote:
On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
I'm just wondering what people's response would be to allow user-generated
reader macros. I'm not sure,
Reading the responses to this thread, and thinking about things,
I've come around to this point of view.
What I wanted was the ability to read Clojure data structures from a
file or from stdin in a way that I could extend- for long, involved
reasons I need to specify byte arrays (as
I'm just wondering what people's response would be to allow user-generated
reader macros. I'm not sure, but I think the only change to the clojure
core that would be necessary in order to do this would be that in
clojure/src/jvm/clojure/lang, LispReader.dispatchMacros would have to be
made
On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
I'm just wondering what people's response would be to allow user-
generated reader macros. I'm not sure, but I think the only change
to the clojure core that would be necessary in order to do this
would be that in
Hi,
Am 13.08.2009 um 22:30 schrieb Brian Hurt:
Now, I can certainly see a lot of potiential downsides to this.
Redefining what #{} or #() means is just the start.
I think, this is the reason Rich is not very positive for that idea:
because nobody came up with a way of defining namespaces
On Aug 13, 2009, at 4:59 PM, Daniel Lyons wrote:
On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
I'm just wondering what people's response would be to allow user-
generated reader macros. I'm not sure, but I think the only change
to the clojure core that would be necessary in order to
On Thu, Aug 13, 2009 at 5:14 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 13.08.2009 um 22:30 schrieb Brian Hurt:
Now, I can certainly see a lot of potiential downsides to this.
Redefining what #{} or #() means is just the start.
I think, this is the reason Rich is not very positive
On Thu, Aug 13, 2009 at 5:23 PM, Aaron Cohenremled...@gmail.com wrote:
On Thu, Aug 13, 2009 at 5:14 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 13.08.2009 um 22:30 schrieb Brian Hurt:
Now, I can certainly see a lot of potiential downsides to this.
Redefining what #{} or #() means is
What is the main point of reader macros? Is it so you can define your
own short-hand syntax, or is it the ability to get more direct access
to the reader?
If it is the first point, then I'd be happy to not have them - to me
shorthand doesn't buy much.
If it is the second point then why not
On Aug 13, 2009, at 3:35 PM, Bradbev wrote:
What is the main point of reader macros? Is it so you can define your
own short-hand syntax, or is it the ability to get more direct access
to the reader?
If it is the first point, then I'd be happy to not have them - to me
shorthand doesn't
On Aug 13, 3:43 pm, Daniel Lyons fus...@storytotell.org wrote:
On Aug 13, 2009, at 3:35 PM, Bradbev wrote:
What is the main point of reader macros? Is it so you can define your
own short-hand syntax, or is it the ability to get more direct access
to the reader?
If it is the first
On Aug 13, 1:30 pm, Brian Hurt bhur...@gmail.com wrote:
I'm just wondering what people's response would be to allow user-generated
reader macros. [...]
I think you could get most of the benefits for DSL's by using regular
strings, except that regular strings have quoting issues:
On Aug 13, 2009, at 8:29 PM, Scott wrote:
A single super quoted string reader would avoid this problem.
Instead of defining a new read syntax like:
#my-syntax(your DSL goes between here and here)
Clojure could provide a general purpose string creating read syntax.
Something like #...
A
On Aug 14, 2:47 am, Chas Emerick cemer...@snowtide.com wrote:
On Aug 13, 2009, at 8:29 PM, Scott wrote:
A single super quoted string reader would avoid this problem.
Instead of defining a new read syntax like:
#my-syntax(your DSL goes between here and here)
Clojure could provide a
So, what are people's thoughts?
Trying to use them in Common Lisp has frustrated the crap out of me.
The only library I know of that promulgates them seriously is CL-SQL
and the gymnastics you have to do to install the reader macros are
frustrating. Another library I tried to use I
On Aug 13, 5:47 pm, Chas Emerick cemer...@snowtide.com wrote:
A good thought, but #foo is reader syntax for defining a regular
expression with the pattern foo. :-/
Sorry about that, I'm not experienced at Clojure, but I should have
been more clear. The first important part isn't which
Hmm, not so sure this is related, but I've often thought it would be
great to have some way of having embedded source of other types as a
special string defined as normal in the clojure source but marked in
such as way that the editor (vim, emacs, etc) could recognise this and
do formatting,
On Aug 13, 2009, at 5:30 PM, Bradbev wrote:
More complex reader macros could be (infix x + y + z / 3).
I think you can already do that with regular macros.
I don't think so. Macros are invoked after the read stage but before
evaluation of arguments. This kind of macro would be invoked
31 matches
Mail list logo