Hello all,
sorry for the OT, I tried to send similar questions to various e-mails but no response till now.
I am new in Common Lisp. But I have wide experinece with AutoLisp (Lisp for autoCAD) and C/C++ programming. I develop a specialised program for our company and I gladly involve Common Lisp programming language into source files for that program.
My intention is the way like php-code is used in html or TCL is used in similar situations. E.g. to define CL function "echo" which would pass its result (= text to be dispalayed) to the main program "reader", e.i. if I use (echo "aaa") in the source file, then string "aaa" will be passed to the main program.
I am a WinXp user. I use MS Visual Studio .Net (2002) and VS 2005 EE for C/C++ developement.
I would have two basic questions for this moment:
- What are conditions under which I would be able to use Common Lisp source or a .dll of CL interpreter? E.g. web page with licence agreement.
- Where and how to get C/C++ sources of CL interpreter?
Thank you in advance.
LuP
OT: CL use and sources
Re: OT: CL use and sources
If you want to embed Common Lisp into a C/C++ program, you could take a look at ECL, which is LGPL.
Re: OT: CL use and sources
... Thank you for the response.
LuP
LuP
-
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
- Contact:
Re: OT: CL use and sources
Not all "interpreters" are written in C/C++. And we don't usually say "interpreters" because most implementations (maybe all of them?) compiles the code, sometimes to C code, sometimes to bytecode, or even directly to assembly.
If you want to see the C / C++ source code of an implementation, you'll want to take a look at ECL or Clisp (google and you'll find them). Clisp should be more implemented in C because it compiles code to bytecode. OTOH, half of ECL is written in lisp itself, only a minimal core is implemented in C.
The only implementation that has a .dll interpreter is ECL. All the others are programs.
But you don't need either if you want to be able to use C or C++ code (libraries). You can create an interface to a C library using CFFI; the program swig might help you to create the interface, but you need to learn how to use CFFI first.
By the way, if you want to learn CL, take a look at http://www.gigamonkeys.com/book.
If you want to see the C / C++ source code of an implementation, you'll want to take a look at ECL or Clisp (google and you'll find them). Clisp should be more implemented in C because it compiles code to bytecode. OTOH, half of ECL is written in lisp itself, only a minimal core is implemented in C.
The only implementation that has a .dll interpreter is ECL. All the others are programs.
But you don't need either if you want to be able to use C or C++ code (libraries). You can create an interface to a C library using CFFI; the program swig might help you to create the interface, but you need to learn how to use CFFI first.
By the way, if you want to learn CL, take a look at http://www.gigamonkeys.com/book.