Lisp to C converter.

Whatever is on your mind, whether Lisp related or not.
Post Reply
eratosthenesia
Posts: 2
Joined: Sun May 08, 2016 4:18 pm

Lisp to C converter.

Post by eratosthenesia » Sun May 08, 2016 4:21 pm

Hey everyone. I'm new to this forum, and I promise I'm not just plugging my new thing (which I am, but not just that -- I want to be part of this forum). It's a LISP/c to C converter that I wrote that works fully on CLISP and maybe somewhat on other versions of lisp. LISP/c is a language I wrote that's basically C stripped down to the bare bones with LISP-style macros. I find it fun and easy to use. The link to the project is here: github.com/eratosthenesia/lispc and I'd appreciate it if a few of you took a look. Thank you, and I look forward to using this forum quite a lot.

David Mullen
Posts: 78
Joined: Mon Dec 01, 2014 12:29 pm
Contact:

Re: Lisp to C converter.

Post by David Mullen » Wed May 11, 2016 4:18 pm

Wow, this is already looking fairly complete. It's easy to see this being an alternative to straight C/C++ for complicated simulation work. Embedded systems, too, since with modifications it could even compile to a specialized dialect like nesC, which I recall being kind of tedious to write, for some reason. I'm not a C++ maven, so I just glanced over those examples, and they do look nicely concise. What stuck out to me was the "Beyond Templates" section where the C code has "typedef cell cell;" which should be "typedef struct cell cell;" if I remember the pattern correctly.

sylwester
Posts: 133
Joined: Mon Jul 11, 2011 2:53 pm

Re: Lisp to C converter.

Post by sylwester » Thu May 12, 2016 5:51 am

Since you are using the extension .cl on your examples is the language a superset of CL or is the power of CL only used in it's implementation?
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p

eratosthenesia
Posts: 2
Joined: Sun May 08, 2016 4:18 pm

Re: Lisp to C converter.

Post by eratosthenesia » Tue May 17, 2016 7:56 am

Mostly in the implementation. I just use the extension "cl" as shorthand for "lisp/c". I might change that in the future. Thank you for your input.

sylwester
Posts: 133
Joined: Mon Jul 11, 2011 2:53 pm

Re: Lisp to C converter.

Post by sylwester » Fri May 20, 2016 2:18 pm

eratosthenesia wrote:Mostly in the implementation. I just use the extension "cl" as shorthand for "lisp/c". I might change that in the future. Thank you for your input.
Wouldn't it be more logical to use .lc then if it was shorthand for LispC? .cl is a common extension for common lisp files.
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p

Post Reply