Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.lisp > #16515
| From | "Pascal J. Bourguignon" <pjb@informatimago.com> |
|---|---|
| Newsgroups | comp.lang.lisp |
| Subject | Re: Any Clojure users here? |
| Date | 2011-01-29 15:53 +0100 |
| Organization | Informatimago |
| Message-ID | <87pqrfkbga.fsf@kuiper.lan.informatimago.com> (permalink) |
| References | <0cf0b960-68f4-4659-90b1-0bbd17660f89@glegroupsg2000goo.googlegroups.com> <4d468896-360a-4d56-8700-d30d94e62b12@s3g2000vbf.googlegroups.com> <877hdolm92.fsf@kuiper.lan.informatimago.com> <81af4098-97b2-4f27-8922-b2b0c6acafd3@l22g2000pre.googlegroups.com> |
Bill <schottstaedt@gmail.com> writes:
> On Jan 28, 2:03 pm, "Pascal J. Bourguignon" <p...@informatimago.com>
> wrote:
>> And happily, it would occur to no lisp programmer to use vectors eg. in
>> a macro such as:
>>
>> (let. #((v 1)
>> (u 2))
>> (+ v u))
>
> This is great -- it turned up a bug in my little scheme interpreter.
> Do you have any more snippets that a lisp-programmer-since-1976 would
> never think of?
If you go to the extreme, replace all list by a structure denoting the
instruction.
(defstruct if test then else)
(defstruct defun name args body)
(defstruct let bindings body)
(defstruct call function arguments)
...
and use the reader for literal structures:
#S(defun :name 'fact :args #(x)
:body #S(if :test #S(call :function '< :arguments #(x 1))
:then 1
:else #S(call :function '* :arguments #(x #S(call :function 'fact
:arguments #(#S(call :function '-
:arguments #(x 1))))))))
This is a sexp. This is homoiconic. This has all the syntax you want.
There's no list in obvious sight (we could substitute the reader macro
for #\' to produce #(quote x) instead of (quote x)). Everybody's happy.
Well but for the macro writers who now need to know in advance the
structures, or we need to add introspection on them, and why not
meta-information explaining which slot is to be evaluated, which won't,
which contain new variable names, etc. Now you can over-engineer all
you want.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
Back to comp.lang.lisp | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Any Clojure users here? "joswig@lisp.de" <joswig@lisp.de> - 2011-01-28 14:07 -0800
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-01-31 19:18 +0000
Re: Any Clojure users here? Tim Bradshaw <tfb@tfeb.org> - 2011-02-10 10:01 +0000
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-02-10 10:02 +0000
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-02-10 05:37 +0000
Re: Any Clojure users here? Marco Antoniotti <marcoxa@gmail.com> - 2011-01-30 02:15 -0800
Re: Any Clojure users here? Alessio Stalla <alessiostalla@gmail.com> - 2011-02-01 15:29 -0800
Re: Any Clojure users here? Alessio Stalla <alessiostalla@gmail.com> - 2011-01-30 13:17 -0800
Re: Any Clojure users here? Tim X <timx@nospam.dev.null> - 2011-02-01 18:07 +1100
Re: Any Clojure users here? Pascal Costanza <pc@p-cos.net> - 2011-01-30 23:17 +0100
Re: Any Clojure users here? Alessio Stalla <alessiostalla@gmail.com> - 2011-01-31 11:22 -0800
Re: Any Clojure users here? Alessio Stalla <alessiostalla@gmail.com> - 2011-01-31 14:42 -0800
Re: Any Clojure users here? TheFlyingDutchman <zzbbaadd@aol.com> - 2011-01-31 15:55 -0800
Re: Any Clojure users here? Tim X <timx@nospam.dev.null> - 2011-02-01 08:24 +1100
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-01-31 19:47 +0000
Re: Any Clojure users here? Rainer Joswig <joswig@lisp.de> - 2011-01-31 22:18 +0100
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-02-10 05:36 +0000
Re: Any Clojure users here? "joswig@lisp.de" <joswig@lisp.de> - 2011-01-31 15:06 -0800
Re: Any Clojure users here? Tim Bradshaw <tfb@tfeb.org> - 2011-01-31 22:56 +0000
Re: Any Clojure users here? Rainer Joswig <joswig@lisp.de> - 2011-01-31 21:06 +0100
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-01-31 20:47 +0000
Re: Any Clojure users here? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2011-01-28 23:03 +0100
Re: Any Clojure users here? "Pascal J. Bourguignon" <pjb@informatimago.com> - 2011-01-29 15:53 +0100
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-01-30 01:55 +0000
Re: Any Clojure users here? Pascal Costanza <pc@p-cos.net> - 2011-01-30 10:42 +0100
Re: Any Clojure users here? "MarkHaniford@gmail.com" <markhaniford@gmail.com> - 2011-01-29 17:32 -0800
Re: Any Clojure users here? Marco Antoniotti <marcoxa@gmail.com> - 2011-01-29 09:44 -0800
Re: Any Clojure users here? Tim X <timx@nospam.dev.null> - 2011-01-30 10:24 +1100
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-02-10 04:59 +0000
Re: Any Clojure users here? Antony <remove+spam_lisp.linux@gmail.com> - 2011-02-01 06:08 -0800
Re: Any Clojure users here? Pascal Costanza <pc@p-cos.net> - 2011-01-30 23:16 +0100
Re: Any Clojure users here? Pascal Costanza <pc@p-cos.net> - 2011-01-29 01:28 +0100
Re: Any Clojure users here? "joswig@lisp.de" <joswig@lisp.de> - 2011-01-28 14:56 -0800
Re: Any Clojure users here? Bill <schottstaedt@gmail.com> - 2011-01-29 06:23 -0800
Re: Any Clojure users here? Deeyana <d.awlberg@hotmail.invalid> - 2011-01-28 23:24 +0000
csiph-web