Page 1 of 1

Lisp to C converter.

Posted: Sun May 08, 2016 4:21 pm
by eratosthenesia
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.

Re: Lisp to C converter.

Posted: Wed May 11, 2016 4:18 pm
by David Mullen
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.

Re: Lisp to C converter.

Posted: Thu May 12, 2016 5:51 am
by sylwester
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?

Re: Lisp to C converter.

Posted: Tue May 17, 2016 7:56 am
by eratosthenesia
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.

Re: Lisp to C converter.

Posted: Fri May 20, 2016 2:18 pm
by sylwester
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.