Re: comment macro not ignoring contents

2009-07-17 Thread philip.hazel...@gmail.com
On Jul 17, 1:52 pm, Rich Hickey wrote: > #_ does what you want: > > user=> (list 1 2 #_42 3) > (1 2 3) Thanks for pointing that out. I notice this is actually on the reader page - apologies for not looking properly. --~--~-~--~~~---~--~~ You received this message

Re: comment macro not ignoring contents

2009-07-17 Thread Richard Newman
> (I once tried to write a reader macro for CL which would do this, but > the best I got was one which would read two forms and ignore the > first.) The usual technique in Common Lisp is cl-user(1): (list 1 2 #+(or) 3 4) (1 2 4) You can improve readability by using #+:never or somesuch, but tha

Re: comment macro not ignoring contents

2009-07-17 Thread Rich Hickey
On Fri, Jul 17, 2009 at 8:13 AM, philip.hazel...@gmail.com wrote: > > On Jul 17, 4:56 am, Richard Newman wrote: >> If you want unsyntactic input in your file, comment it out with >> semicolons. >> >> Adding true block comments -- #| |# -- is on the to-do list. > While we're on the subject, are th

Re: comment macro not ignoring contents

2009-07-17 Thread philip.hazel...@gmail.com
On Jul 17, 4:56 am, Richard Newman wrote: > If you want unsyntactic input in your file, comment it out with   > semicolons. > > Adding true block comments -- #| |# -- is on the to-do list. While we're on the subject, are there any plans for a sexp-comment? Essentially I'm looking for reader synta

Re: comment macro not ignoring contents

2009-07-16 Thread kkw
That makes really good sense. Thanks for the clear explanation! Kev On Jul 17, 1:56 pm, Richard Newman wrote: > > 1:24 com.kkw.ss=> (comment 1s) > > java.lang.NumberFormatException: Invalid number: 1s > > java.lang.Exception: Unmatched delimiter: ) > > 1:25 com.kkw.ss=> > > >    Kindly let me k

Re: comment macro not ignoring contents

2009-07-16 Thread Richard Newman
> 1:24 com.kkw.ss=> (comment 1s) > java.lang.NumberFormatException: Invalid number: 1s > java.lang.Exception: Unmatched delimiter: ) > 1:25 com.kkw.ss=> > >Kindly let me know if I've done something abnormal. comment is a macro, not a syntactic element. A macro is evaluated after read time (

comment macro not ignoring contents

2009-07-16 Thread kkw
Hi folks, Anyone get the following interesting messages? 1:19 com.kkw.ss=> (comment 1) nil 1:20 com.kkw.ss=> (comment s1) nil 1:21 com.kkw.ss=> (comment 1) nil 1:22 com.kkw.ss=> (comment s) nil 1:23 com.kkw.ss=> (comment s1) nil 1:24 com.kkw.ss=> (comment 1s) java.lang.NumberFormatException: