Fog Creek Software
Discussion Board




DLLs in LISP ????

Does anyone here know how to convert lisp programs in to DLLs ???

Mohammad Atif
Thursday, April 08, 2004

Rewrite them in C++ :-)

More seriously, it most likely depends on which Lisp implementation you're using. I believe that most/all Windows Lisp implementations support COM, so you could probably easily set up the Lisp program as a COM server, and connect to it from another application.

What are you trying to accomplish?

-Mark

Mark Bessey
Thursday, April 08, 2004

I have written an AI program in LISP ( its much quicker to write it in LISP then in any other language i know of ) , and i want to use that program in a GUI developed in say C# or VB.NET ....

Mohammad Atif
Thursday, April 08, 2004

Could you use a .Net implementation of Lisp?  Then, it should be as simple as having one assembly for your Lisp code, which you then integrate into your VB.Net or C# project.  (No COM necessary.)  Here's one:

http://dotlisp.sourceforge.net/dotlisp.htm

(I have no idea about whether it's stable, usable, etc.)

Robert Jacobson
Thursday, April 08, 2004

Allegro?

http://www.franz.com/

Andrew Burton
Thursday, April 08, 2004

www.cormanlisp.com is an Common Lisp native-code compiler for Win32 that can generate stand-alone executables and DLLs.  (IIRC the Lisp core is itself a COM server).  It has rich features for interfacing to C/C++ code.

The compiler is free unless you wish to redistribute your applications, in which case a full license is only $250 (no royaltied.  (Franz Allegro Common Lisp is very expensive in comparison.)

The IDE is free for 30 days, and then must be licensed (in with the $250 above).  However, you can use the compiler without the IDE.  Others have managed to use Emacs as an IDE for the compiler - Google should find instructions.

Hope this helps,

Chris

Chris Newcombe
Thursday, April 08, 2004

Thank you all for your replies , but the problem is that I am a student and I cant afford to spend $250 on my semester project , does any one of you know of a free utility to do this conversion

Mohammad Atif
Friday, April 09, 2004

Depends on the meaning of free (libre or gratis), and on whether or not the whole project is free (libre sense). E.g., if the GPL is acceptable, you can embed CLISP in your application and make into into a DLL with little (?) work. CormanLisp seems to offer what you want too.


[ http://www.lisp.org/table/systems.htm ] may be helpful.

Also, if Scheme is still an option, you'll have considerably more 'free' choice.

Ori Berger
Friday, April 09, 2004

Write a network interface to your Lisp code using a simple text-based protocol. Then, write a GUI that speaks this protocol. Assuming that you won't want to make very many round-trips per unit time, and you won't be moving huge amounts of data between the two programs, then this could be a neat solution. It even lets you run the back end on one computer and the GUI on another -- wherever they might be. If you send the protocol over HTTP, then you'd likely skip past firewalls OK.

Given that you have a user generating the events (button pushes etc.), then they won't be very frequent (compared to computer speeds). You may be needing to send lots of data each time -- so this may be a sticking point (could you do local caching or exploit data redundancy?).

You'd need to think about how you'd weed out rogue data (i.e. data is code etc.). You might also want to think about whether authentication is an issue.

For a small class project, you could probably just do the interesting bits and leave out the security.

C Rose
Friday, April 09, 2004

http://franz.com/downloads/#acl

Allegro is free as long as your project it as well.

Andrew Burton
Friday, April 09, 2004

Problem solved :)

Corman did the trick for me , other then the occasional message box everythings working just fine .

Thank you all for your help

Mohammad Atif
Saturday, April 10, 2004

*  Recent Topics

*  Fog Creek Home