Re: ANN: A simple scheme interpreter in clojure

2011-01-27 Thread Andrzej
On Tue, Jan 25, 2011 at 12:52 AM, Andrzej ndrwr...@googlemail.com wrote:
 On Mon, Jan 24, 2011 at 5:50 PM, dennis killme2...@gmail.com wrote:
 Hi,
 Yes,i have seen the rscheme.

 cscheme is just an exercise,it is not practical at all.

 So was rscheme. :-) In many respects your implementation is more
 complete than mine.

Pushed it to github:
https://github.com/andrzej-r/rscheme

Andrzej

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-24 Thread dennis
Thanks,it is an issue.

On Jan 24, 1:09 pm, David dsieg...@yahoo.com wrote:
 Line 86 of core.clj is:

         (list 'cadr caddr)

 and should be:

         (list 'caddr caddr)

 On Jan 23, 9:45 pm, dennis killme2...@gmail.com wrote:

  I have implemented a simple interpreter in clojure,it is just
  transformed from the interpreter in SICP.Maybe someone interested in
  it.

  I have pushed it on github athttps://github.com/killme2008/cscheme
  ,you can clone and run it by yourself.



-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-24 Thread dennis
Hi,
Yes,i have seen the rscheme.

cscheme is just an exercise,it is not practical at all.

On Jan 24, 1:44 pm, Andrzej ndrwr...@googlemail.com wrote:
 Hi,

 You may want to see if there is anything of interest for you 
 there:http://clojure.wikidot.com/scheme-interpreter-in-clojure

 It has its own reader that attempts to be more compatible with Scheme
 than the reader used in Clojure. It constructs a fairly elaborate
 syntactic tree (perhaps it would be better to abstract its nodes a bit
 - currently it's somewhat convoluted) and preserves a lot of
 information about the source code in metadata.

 OTOH, the evaluator is AFAIR fairly buggy and incomplete.

 The whole thing is unmaintained now so feel free to scavenge any parts
 of it, if you like.

 Cheers,

 Andrzej

 On Mon, Jan 24, 2011 at 11:45 AM, dennis killme2...@gmail.com wrote:
  I have implemented a simple interpreter in clojure,it is just
  transformed from the interpreter in SICP.Maybe someone interested in
  it.

  I have pushed it on github at
 https://github.com/killme2008/cscheme
  ,you can clone and run it by yourself.



-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-24 Thread Andrzej
On Mon, Jan 24, 2011 at 5:50 PM, dennis killme2...@gmail.com wrote:
 Hi,
 Yes,i have seen the rscheme.

 cscheme is just an exercise,it is not practical at all.

So was rscheme. :-) In many respects your implementation is more
complete than mine.

Cheers,

Andrzej

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-24 Thread Alan
Arguably it should be neither of these, but instead a macro of some
kind. The solution that would make it impossible to get this wrong
would be something like:

(defmacro primitives [ specs]
  `(list
~@(for [s specs]
   (if (coll? s)
 `(list '~(first s) ~(second s))
 `(list '~s ~s)

user= (primitives + - (disp print))
((+ #core$_PLUS_ clojure.core$_PLUS_@145ad3d) (- #core$_
clojure.core$_@517bc3) (disp #core$print clojure.core
$print@166de66))


On Jan 23, 9:09 pm, David dsieg...@yahoo.com wrote:
 Line 86 of core.clj is:

         (list 'cadr caddr)

 and should be:

         (list 'caddr caddr)

 On Jan 23, 9:45 pm, dennis killme2...@gmail.com wrote:

  I have implemented a simple interpreter in clojure,it is just
  transformed from the interpreter in SICP.Maybe someone interested in
  it.

  I have pushed it on github athttps://github.com/killme2008/cscheme
  ,you can clone and run it by yourself.



-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-23 Thread David
Line 86 of core.clj is:

(list 'cadr caddr)

and should be:

(list 'caddr caddr)

On Jan 23, 9:45 pm, dennis killme2...@gmail.com wrote:
 I have implemented a simple interpreter in clojure,it is just
 transformed from the interpreter in SICP.Maybe someone interested in
 it.

 I have pushed it on github athttps://github.com/killme2008/cscheme
 ,you can clone and run it by yourself.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ANN: A simple scheme interpreter in clojure

2011-01-23 Thread Andrzej
Hi,

You may want to see if there is anything of interest for you there:
http://clojure.wikidot.com/scheme-interpreter-in-clojure

It has its own reader that attempts to be more compatible with Scheme
than the reader used in Clojure. It constructs a fairly elaborate
syntactic tree (perhaps it would be better to abstract its nodes a bit
- currently it's somewhat convoluted) and preserves a lot of
information about the source code in metadata.

OTOH, the evaluator is AFAIR fairly buggy and incomplete.

The whole thing is unmaintained now so feel free to scavenge any parts
of it, if you like.

Cheers,

Andrzej

On Mon, Jan 24, 2011 at 11:45 AM, dennis killme2...@gmail.com wrote:
 I have implemented a simple interpreter in clojure,it is just
 transformed from the interpreter in SICP.Maybe someone interested in
 it.

 I have pushed it on github at
 https://github.com/killme2008/cscheme
 ,you can clone and run it by yourself.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en