Re: Undocumented reader macros?

2016-02-10 Thread James Elliott
Understood! I am certainly not diving in to submit pull requests to add features. On Wednesday, February 10, 2016 at 10:43:25 AM UTC-6, Andy Fingerhut wrote: > > It may be as finished as it will ever be. > > Andy > > On Wed, Feb 10, 2016 at 8:35 AM, James Elliott > wrote: > >> Ah, I see that par

Re: Undocumented reader macros?

2016-02-10 Thread Andy Fingerhut
It may be as finished as it will ever be. Andy On Wed, Feb 10, 2016 at 8:35 AM, James Elliott wrote: > Ah, I see that part of the reason it’s not yet documented is that it’s not > really finished; you can’t, for example, use a keyword as a function with > it. Trying to use #=(:tap-tempo control

Re: Undocumented reader macros?

2016-02-10 Thread James Elliott
Ah, I see that part of the reason it’s not yet documented is that it’s not really finished; you can’t, for example, use a keyword as a function with it. Trying to use #=(:tap-tempo control-buttons) as a case target fails with clojure.lang.Keyword cannot be cast to clojure.lang.Symbol. I guess I

Re: Undocumented reader macros?

2016-02-08 Thread James Elliott
Quite dissonant, I mean, derp. On Monday, February 8, 2016 at 9:49:28 PM UTC-6, James Elliott wrote: > > Oh, I see… interesting. What would it take to achieve commitment? :) I > humbly submit that it feels qiote dissonant to stumble across something > like this in a language that is attaining su

Re: Undocumented reader macros?

2016-02-08 Thread James Elliott
Oh, I see… interesting. What would it take to achieve commitment? :) I humbly submit that it feels qiote dissonant to stumble across something like this in a language that is attaining such wide adoption as Clojure is now. On Monday, February 8, 2016 at 8:53:45 PM UTC-6, Alex Miller wrote: > >

Re: Undocumented reader macros?

2016-02-08 Thread Alex Miller
Rich has never committed to officially making this part of Clojure so it has been left as an undocumented feature. On Monday, February 8, 2016 at 12:33:44 PM UTC-6, James Elliott wrote: > > I learned recently that you > can tell the reader to evaluate

Undocumented reader macros?

2016-02-08 Thread James Elliott
I learned recently that you can tell the reader to evaluate a function at read time, if you want some potentially costly operation that you know will result in a constant value to be done just once, rather than every time the surrounding form is eval

Re: Sharable custom reader macros in Clojurescript?

2014-12-03 Thread Gary Verhaegen
let the application decide. On Wednesday, 3 December 2014, Hoang Minh Thang wrote: > Hi all, how do I add custom reader macros in Clojurescript (like > data_readers.clj in Clojure)? I want to deliver them in libraries. > > -- > You received this message because you are subscribe

Sharable custom reader macros in Clojurescript?

2014-12-03 Thread Hoang Minh Thang
Hi all, how do I add custom reader macros in Clojurescript (like data_readers.clj in Clojure)? I want to deliver them in libraries. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: [ANN] reader-macros

2011-12-21 Thread Peter Danenberg
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath: > Oh excuse me, I was misreading what is going on here with the > lambda. I thought it was a reader macro, but you're just pulling > that alias in from some dependency. Exactly: `λ' and `defλ' are just vanilla macros that shadow `fn'

Re: [ANN] reader-macros

2011-12-21 Thread Peter Danenberg
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath: > One thing I'd really want before I even considered using this would > be some way of restricting the scope of a reader macro to the > current file. As is, they just have way too much room to interfere > with your whole world. I'm not

Re: [ANN] reader-macros

2011-12-21 Thread Aaron Cohen
2011/12/21 Aaron Cohen : > 2011/12/21 Peter Danenberg : >> Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath: >>> Ha, I just looked at the source, it's really weird to see λ in >>> "clojure" code. >> >> That's a little idiosyncrasy of mine: I've been chastised for it in >> the past; ma

Re: [ANN] reader-macros

2011-12-21 Thread Aaron Cohen
2011/12/21 Peter Danenberg : > Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath: >> Ha, I just looked at the source, it's really weird to see λ in >> "clojure" code. > > That's a little idiosyncrasy of mine: I've been chastised for it in > the past; maybe `lambda' would be more readab

Re: [ANN] reader-macros

2011-12-21 Thread Peter Danenberg
Quoth Aaron Cohen on Setting Orange, the 63rd of The Aftermath: > Ha, I just looked at the source, it's really weird to see λ in > "clojure" code. That's a little idiosyncrasy of mine: I've been chastised for it in the past; maybe `lambda' would be more readable? -- You received this message bec

Re: [ANN] reader-macros

2011-12-21 Thread Aaron Cohen
On Wed, Dec 21, 2011 at 12:27 PM, Peter Danenberg wrote: > Despite Brian Carpenter's warning about torches and pitchforks [1], > I've decided to release a reader-macros package; may Zeus forgive me > for opening this pithos: > >  https://github.com/klutometis/reader-ma

Re: [ANN] reader-macros

2011-12-21 Thread Peter Danenberg
Whoops: that's Brian Carper, not Carpenter. Quoth Peter Danenberg on Setting Orange, the 63rd of The Aftermath: > Despite Brian Carpenter's warning about torches and pitchforks [1], > I've decided to release a reader-macros package; may Zeus forgive me > for opening t

[ANN] reader-macros

2011-12-21 Thread Peter Danenberg
Despite Brian Carpenter's warning about torches and pitchforks [1], I've decided to release a reader-macros package; may Zeus forgive me for opening this pithos: https://github.com/klutometis/reader-macros Here's a trivial example where we implement a reverse-string

Re: Are reader macros and "regular" macros handled differently by the compiler?

2011-12-01 Thread Mark Rathwell
Reader macros are expanded by the reader, "regular" macros are expanded by the compiler. The reader is what translates the text strings that you have typed into Clojure data structures, the compiler translates those data structures into executable code. Clojure does not allow you

Are reader macros and "regular" macros handled differently by the compiler?

2011-12-01 Thread Julien Chastang
Are reader macros and "regular" macros handled differently by the compiler? If possible, please give some contrasting details about what the compiler is doing in each case. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Request for Discussion: user created reader macros

2009-08-20 Thread Brian Hurt
On Fri, Aug 14, 2009 at 7:00 PM, Jonathan Smith wrote: > > 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 could substitute in c

Re: Request for Discussion: user created reader macros

2009-08-20 Thread Meikel Brandmeyer
Hi, On Aug 20, 4:59 pm, Brian Hurt 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 would sidestep

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Richard Newman
if you wrote your own. Furthermore, extending the built-in reader means that your work can be reused — your tests can use the same syntax, your code can, other people can use your library to express byte arrays. I'd use it for sure. [[ Sidenote: A big motivation for reader macr

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Jonathan Smith
On Aug 14, 11:46 am, Brian Hurt wrote: > On Thu, 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 > > r

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Brian Hurt
On Thu, 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

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Chas Emerick
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 (in

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Richard Newman
eft backslashes unmolested. This would allow > things like (infix #'''5*2'''). Again, not pretty but > perhaps better than nothing. That's probably convenient, but note that this supports your own regex- like mini-language (;)) but requires the same conto

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Chouser
The reader gets upset about that. 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 #''

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Boris Mizhen - 迷阵
> Clojure spells this #_ instead of / and it is indeed > implemented as a (builtin) reader macro. Nice, thanks! :) > > --Chouser > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Chouser
On Fri, Aug 14, 2009 at 10:20 AM, Boris Mizhen - 迷阵 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 an expressi

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Boris Mizhen - 迷阵
at 9:27 AM, Mark Addleman wrote: > > 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&qu

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Mark Addleman
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

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Laurent PETIT
e's no static typing with compiler checks, macros; ... Why make an exception for reader macros, then ? :-) Is there a limit to the power users can have in their hands, finally ? ?? :-) :-) :-) More seriously, I don't have enough reader macro background, but I feel they may be as macros v

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Daniel Lyons
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

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chouser
On Aug 14, 2009, at 2:03 AM, Chouser wrote: > > > On Aug 14, 2009, at 12:48 AM, Daniel Lyons > wrote: > >> >> >> On Aug 13, 2009, at 5:30 PM, Bradbev wrote: >> >>>>> More complex "reader" macros could be (infix x + y + z / 3

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chouser
On Aug 14, 2009, at 12:48 AM, Daniel Lyons 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. >&g

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Daniel Lyons
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 > evalu

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Adrian Cuthbertson
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, s

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Scott
On Aug 13, 5:47 pm, Chas Emerick 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 character trigge

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Richard Newman
>> 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.

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Michele Simionato
On Aug 14, 2:47 am, Chas Emerick 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 general pu

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chas Emerick
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

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Scott
On Aug 13, 1:30 pm, Brian Hurt 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: (my-

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Bradbev
On Aug 13, 3:43 pm, Daniel Lyons 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

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Daniel Lyons
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

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Bradbev
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 th

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Aaron Cohen
ining 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" for reader macros, so >> that they don't interfere with each other. >>

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Aaron Cohen
Rich is not very positive for that idea: because > nobody came up with a way of defining "namespaces" for reader macros, so > that they don't interfere with each other. > >> But it'd make it a lot easier to do things with DSLs. > > I'm happy with mac

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chas Emerick
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

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Meikel Brandmeyer
"namespaces" for reader macros, so that they don't interfere with each other. But it'd make it a lot easier to do things with DSLs. I'm happy with macros for DSLs. Actually the macros just quasiquote their arguments and pass them on to actual functions. So, what are peop

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Daniel Lyons
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

Request for Discussion: user created reader macros

2009-08-13 Thread Brian Hurt
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

Re: reader macros

2009-01-23 Thread Paul Barry
Mark, Yes, I think so. My understanding of a reader marco is a character or set of characters that is a shortcut for some other special form/macro that you could use if the reader macro didn't exist. By that definition, I think [...] and {...} are also reader macros. I think \ just part o

Re: reader macros

2009-01-23 Thread Matt Revelle
On Jan 23, 2009, at 4:18 PM, Mark Volkmann wrote: > > On Fri, Jan 23, 2009 at 3:00 PM, Chouser wrote: >> >> On Fri, Jan 23, 2009 at 2:17 PM, Mark Volkmann >> wrote: >>> >>> Are all of these considered "reader macros"? >> [snip] >

Re: reader macros

2009-01-23 Thread Mark Volkmann
On Fri, Jan 23, 2009 at 3:00 PM, Chouser wrote: > > On Fri, Jan 23, 2009 at 2:17 PM, Mark Volkmann > wrote: >> >> Are all of these considered "reader macros"? > [snip] >> Is it correct that these are not considered "reader macros"? > >

Re: reader macros

2009-01-23 Thread Chouser
On Fri, Jan 23, 2009 at 2:17 PM, Mark Volkmann wrote: > > Are all of these considered "reader macros"? [snip] > Is it correct that these are not considered "reader macros"? I don't see any distinction made in the code: http://code.google.com/p/clojure/source

reader macros

2009-01-23 Thread Mark Volkmann
Are all of these considered "reader macros"? ; (comment) @ (deref) ^ (get metadata) #^ (add metadata) ' (quote) #"..." (regex) ` (syntax quote) ~ (unquote) ~@ (unquote splicing) #' (var quote) #{...} (set) #(...) (anonymous function) Is it correct that these are

Suggestion for new reader macros

2009-01-01 Thread Mibu
What do you think about adding these new reader macros: !form => (complement form) #!(...) => (fn [args] (complement (...))) Two problems I see with these macros are the hassle to the reader with names that include '!' (e.g. set!, swap!), and the possible confusion of meaning wi

Re: reader macros Perl-like

2008-11-28 Thread Rich Hickey
ly consider some > readability issues before making the 1.0 release. I'd hate for people > to reject Clojure based on some of the syntax looking as difficult to > read as Perl code. I'm mainly referring to reader macros. > > I feel that some reader macros are easily justi

reader macros Perl-like

2008-11-28 Thread Mark Volkmann
ct Clojure based on some of the syntax looking as difficult to read as Perl code. I'm mainly referring to reader macros. I feel that some reader macros are easily justified based on the frequency of their use. For example, anonymous functions with #(...) instead of (fn ...). Others are much

Re: reader macros

2008-11-16 Thread Jeff Rose
Rich Hickey wrote: > I've added #! as a to-end-of-line comment, like ; [EMAIL PROTECTED]:~/projects/languages/clojure$ cat foo #!/usr/bin/env clj (println "Hello World!") [EMAIL PROTECTED]:~/projects/languages/clojure$ chmod u+x foo [EMAIL PROTECTED]:~/projects/languages/clojure$ ./foo Hello Wor

Re: reader macros

2008-11-16 Thread Stephen C. Gilardi
On Nov 16, 2008, at 8:55 AM, Rich Hickey wrote: > I've added #! as a to-end-of-line comment, like ; Very cool, thanks! Now, with Clojure compiled into its jar and the associated faster launching, it's reasonable to think of using Clojure for more tasks that might otherwise be done with bash

A clojure executable (was: Re: reader macros)

2008-11-16 Thread Dudley Flanders
On Nov 16, 2008, at 7:45 AM, Mark Volkmann wrote: > > On Sun, Nov 16, 2008 at 6:59 AM, Jeff Rose <[EMAIL PROTECTED]> wrote: >> >> For that matter, a standard clj script >> or executable should probably be a part of the package too. > > A big +1! Everybody shouldn't have to write this script the

Re: reader macros

2008-11-16 Thread Rich Hickey
ead table is getting modified, I > vote for Ruby like string evaluation too :-) > > Cheers, > Jeff > > Stephen Gilardi wrote: > > Clojure does not currently allow programs to define new reader macros. That > > is unlikely to change. > > > There are more detai

Re: reader macros

2008-11-16 Thread Mark Volkmann
On Sun, Nov 16, 2008 at 6:59 AM, Jeff Rose <[EMAIL PROTECTED]> wrote: > > For that matter, a standard clj script > or executable should probably be a part of the package too. A big +1! Everybody shouldn't have to write this script themselves or copy it from the Wiki. It could require that certai

Re: reader macros

2008-11-16 Thread Jeff Rose
able should probably be a part of the package too. How about it? For the children. Oh, and if the read table is getting modified, I vote for Ruby like string evaluation too :-) Cheers, Jeff Stephen Gilardi wrote: > Clojure does not currently allow programs to define new reader macr

Re: reader macros

2008-11-16 Thread Meikel Brandmeyer
Hi, Am 16.11.2008 um 04:37 schrieb James Reeves: As far as I'm aware, Clojure doesn't support user reader macros. There's a section in clojure.org/lisps that mentions that the read table is not available to user programs. Yes. Rich doesn't want to include user defined

Re: reader macros

2008-11-15 Thread Stephen Gilardi
Clojure does not currently allow programs to define new reader macros. That is unlikely to change. There are more details here: http://groups.google.com/group/clojure/search?group=clojure&q=reader+macro&qt_g=Search+this+group There is a clever technique described on the wiki tha

Re: reader macros

2008-11-15 Thread Adam Jones
On Nov 15, 4:52 pm, Jeff Rose <[EMAIL PROTECTED]> wrote: > Hi, I'm finding comments talking about reader macros, but nothing about > defining them.  Does anyone know of an example for adding new read > macros?  I'd like to define a #! macro that passes over the rest of

Re: reader macros

2008-11-15 Thread James Reeves
On Nov 16, 12:52 am, Jeff Rose <[EMAIL PROTECTED]> wrote: > Hi, I'm finding comments talking about reader macros, but nothing about > defining them.  Does anyone know of an example for adding new read > macros?  I'd like to define a #! macro that passes over the rest of

reader macros

2008-11-15 Thread Jeff Rose
Hi, I'm finding comments talking about reader macros, but nothing about defining them. Does anyone know of an example for adding new read macros? I'd like to define a #! macro that passes over the rest of the line so we can use clojure scripts just as easily as a ruby script woul

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-29 Thread Tom Hickey
On Oct 29, 10:10 am, Chouser <[EMAIL PROTECTED]> wrote: > Is there something wrong with JSON I'm not seeing? Not at all. I use JSON myself and am totally fine with keeping it that way. I just thought the idea of reading Clojure data on the JS side was interesting/fun. --~--~-~--~~---

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-29 Thread Chouser
On Wed, Oct 29, 2008 at 9:53 AM, Tom Hickey <[EMAIL PROTECTED]> wrote: > > Chouser, does ClojureScript not have something like this in order to > do read? It doesn't. ClojureScript currently uses the standard Clojure reader and parts of the compiler. This means, for example, that you can't have

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-29 Thread Tom Hickey
On Oct 22, 9:41 am, Randall R Schulz <[EMAIL PROTECTED]> wrote: > On Wednesday 22 October 2008 06:27, .Bill Smith wrote: > > > Would you have S-expressions going from the server back to the client > > as well? > > If that client is a Web browser, then presumably it would require an > S-Expression

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-24 Thread Brett Morgan
On Fri, Oct 24, 2008 at 5:16 PM, Adam Jones <[EMAIL PROTECTED]> wrote: > > > > On Oct 22, 6:17 am, Chouser <[EMAIL PROTECTED]> wrote: > > On Wed, Oct 22, 2008 at 4:30 AM, Brett Morgan <[EMAIL PROTECTED]> > wrote: > > > > > I understand the lisp way is to use the reader plus macros to interpret > t

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-23 Thread Adam Jones
On Oct 22, 6:17 am, Chouser <[EMAIL PROTECTED]> wrote: > On Wed, Oct 22, 2008 at 4:30 AM, Brett Morgan <[EMAIL PROTECTED]> wrote: > > > I understand the lisp way is to use the reader plus macros to interpret the > > incoming data stream. This is hella cool in that it seriously cuts down on > > t

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
I was heading in the direction of generating javascript on the server for page generation, so it makes some sense to keep using that technique for communication as well. In this model the webclient is trusting the javascript the server is generating, so I have to be diligent in my code generation n

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Chouser
On Wed, Oct 22, 2008 at 9:41 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > On Wednesday 22 October 2008 06:27, .Bill Smith wrote: >> Would you have S-expressions going from the server back to the client >> as well? > > If that client is a Web browser, then presumably it would require an > S-

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Randall R Schulz
On Wednesday 22 October 2008 06:27, .Bill Smith wrote: > Would you have S-expressions going from the server back to the client > as well? If that client is a Web browser, then presumably it would require an S-Expression reader written in JavaScript to decode them. That would be a nice thing to

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread .Bill Smith
Would you have S-expressions going from the server back to the client as well? Bill --~--~-~--~~~---~--~~ 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 To u

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Rich Hickey
On Wed, Oct 22, 2008 at 6:55 AM, Brett Morgan <[EMAIL PROTECTED]> wrote: > > > On Wed, Oct 22, 2008 at 9:54 PM, Parth Malwankar <[EMAIL PROTECTED]> > wrote: >> >> >> >> On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: >> > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote:

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Chouser
On Wed, Oct 22, 2008 at 4:30 AM, Brett Morgan <[EMAIL PROTECTED]> wrote: > > I understand the lisp way is to use the reader plus macros to interpret the > incoming data stream. This is hella cool in that it seriously cuts down on > the amount of development work I have to do. The reader is already

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
On Wed, Oct 22, 2008 at 9:54 PM, Parth Malwankar <[EMAIL PROTECTED]>wrote: > > > > On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: > > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote: > > > > - Recently the #= reader macro was added. This makes the reader > > do the e

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Parth Malwankar
On Oct 22, 3:42 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: > On Oct 22, 1:30 pm, "Brett Morgan" <[EMAIL PROTECTED]> wrote: > > - Recently the #= reader macro was added. This makes the reader >   do the evaluation before using the value. You may want to >   disable this. E.g. > >   user=> #=(

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Parth Malwankar
to build the tree walker? And have them applied to a stm core? > Very lightweight in comparison to what I'd do traditionally. Very cool. > > My concern is, what are the security considerations of this architectural > choice? Do I have to worry about people submitting malformed s expression

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
dy done, > and > > using macros to build the tree walker? And have them applied to a stm > core? > > Very lightweight in comparison to what I'd do traditionally. Very cool. > > > > My concern is, what are the security considerations of this architectural > &g

Re: Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Christian Vest Hansen
rity considerations of this architectural > choice? Do I have to worry about people submitting malformed s expressions? > Submitting s expressions that contain data that expands out reader macros? > Do I have to watch for any particular bad code practices in constructing the

Reader + Macros on untrusted S Expressions: Security considerations?

2008-10-22 Thread Brett Morgan
what are the security considerations of this architectural choice? Do I have to worry about people submitting malformed s expressions? Submitting s expressions that contain data that expands out reader macros? Do I have to watch for any particular bad code practices in constructing the macros? How do I g

Re: Bug in r1057? Var reader macros in syntax quotes

2008-10-10 Thread Rich Hickey
On Oct 10, 12:34 pm, Perry <[EMAIL PROTECTED]> wrote: > Not sure exactly how this is related, but r1058 still gives me the > following error that popped up after r1057. Compojure defines this > macro: > > (defmacro redef > "Redefine an existing value, keeping the metadata intact." > [name va

Re: Bug in r1057? Var reader macros in syntax quotes

2008-10-10 Thread Perry
Not sure exactly how this is related, but r1058 still gives me the following error that popped up after r1057. Compojure defines this macro: (defmacro redef "Redefine an existing value, keeping the metadata intact." [name value] `(let [m# (meta #'~name) v# (def ~name ~value)]

Re: Bug in r1057? Var reader macros in syntax quotes

2008-10-10 Thread Rich Hickey
On Oct 10, 6:03 am, Achim Passen <[EMAIL PROTECTED]> wrote: > Hi! > > There seems to be a problem with the new LispReader$VarReader: > > ; r1057 > user=> `#'clojure/doc > java.lang.UnsupportedOperationException: Vars are not values > (NO_SOURCE_FILE:0) > > ; r1056 > user=> `#'clojure/doc > (var

Bug in r1057? Var reader macros in syntax quotes

2008-10-10 Thread Achim Passen
Hi! There seems to be a problem with the new LispReader$VarReader: ; r1057 user=> `#'clojure/doc java.lang.UnsupportedOperationException: Vars are not values (NO_SOURCE_FILE:0) ; r1056 user=> `#'clojure/doc (var clojure/doc) This only happens for bound Vars, which are no longer wrapped when re