From: Hema
Subject: Call Lisp Program from vb.net
Date: 
Message-ID: <1146822104.610392.161180@u72g2000cwu.googlegroups.com>
How to call a lisp program from vb.net program

or

how to call a vb.net exe from lisp program

i need ans for either one of this or both. plz do help

thanxs in advance

From: Eli Gottlieb
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <9QI6g.5968$Gg.1524@twister.nyroc.rr.com>
Hema wrote:
> How to call a lisp program from vb.net program
> 
> or
> 
> how to call a vb.net exe from lisp program
> 
> i need ans for either one of this or both. plz do help
> 
> thanxs in advance
> 
If you use the Embeddable Common Lisp System you can compile your Lisp 
program to C, with functions being built roughly like normal C 
functions.  The VB.net program could call those.

-- 
The science of economics is the cleverest proof of free will yet 
constructed.
From: Carl Shapiro
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <ouy7j50gxfy.fsf@panix3.panix.com>
"Hema" <·········@yahoo.com> writes:

> How to call a lisp program from vb.net program

If your Lisp can be compiled to a DLL you can use P/Invoke to call out
to Lisp.  The equivalent Lisp facility, the foreign function
interface, can be used in the other direction to call VB.NET from
Lisp.
From: Hema
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <1146889661.915022.47830@y43g2000cwc.googlegroups.com>
Hai,


thanxs for reply


I want to execute the lisp program from vb.net appln.


i hv an lisp program which reads the autocad drawing and writes the
result in an mdb.


using vb.net program i'll read the data and process it.


and i need to call both these programs from single vb.net appln.


is there an easy way to do this task?
From: Pascal Bourguignon
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <87hd43wxs2.fsf@thalassa.informatimago.com>
"Hema" <·········@yahoo.com> writes:
> Hai,
> thanxs for reply
> I want to execute the lisp program from vb.net appln.
> i hv an lisp program which reads the autocad drawing and writes the
> result in an mdb.
> using vb.net program i'll read the data and process it.
> and i need to call both these programs from single vb.net appln.
> is there an easy way to do this task?

I don't know.  I know about lisp, not about vb...

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"You can tell the Lisp programmers.  They have pockets full of punch
 cards with close parentheses on them." --> http://tinyurl.com/8ubpf
From: David Golden
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <xh17g.8772$j7.304670@news.indigo.ie>
Hema wrote:

> Hai,
> 
> 
> thanxs for reply
> 
> 
> I want to execute the lisp program from vb.net appln.
> 
> 
> i hv an lisp program which reads the autocad drawing and writes the
> result in an mdb.
> 

Hm, Is this an autocad autolisp program as opposed to on written in one
of the more general-purpose lisp dialects like Common Lisp? Common
Lisp, a general purpose standard language, is usually covered on
comp.lang.lisp, though other lisps and lispoids get a look-in
occasionally.

While autolisp is "a lisp", it's a funny vendor-specific variant used as
an application scripting language.  On the plus side, just asking
autodesk about their .NET bindings might work.
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=4879815

There are autocad-specific newsgroups where you might get better
responses if this is AutoLISP rather than Common Lisp related.
From: Chui Tey
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <1146961421.119947.267460@i39g2000cwa.googlegroups.com>
You got to work out how to run the lisp program from the command line

Dim procID As Integer
Dim newProc As Diagnostics.Process
newProc = Diagnostics.Process.Start("CLISP.EXE myscript.lisp")
procID = newProc.Id
newProc.WaitForExit()
Dim procEC As Integer = -1
If newProc.HasExited Then
    procEC = newProc.ExitCode
End If

... continue your processing here.
From: zergling
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <1146973056.934682.285490@y43g2000cwc.googlegroups.com>
> I want to execute the lisp program from vb.net appln.
>
> i hv an lisp program which reads the autocad drawing and writes the
> result in an mdb.
>
> using vb.net program i'll read the data and process it.
>
> and i need to call both these programs from single vb.net appln.
>
> is there an easy way to do this task?

I don't think anyone's mentioned this. Is this sorta what you wanted?
It basically embeds ECL into Visual Basic.
http://www.cs.stevens.edu/~dlong/vbecl/

It sounds like a good bit of effort (especially if you hit any specific
problems), so you might have to think about the time, effort, other
alternatives etc.

Good luck.
From: Pascal Bourguignon
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <87ac9wzgy4.fsf@thalassa.informatimago.com>
"Hema" <·········@yahoo.com> writes:

> How to call a lisp program from vb.net program

You should ask this on comp.lang.vb, I guess...


> how to call a vb.net exe from lisp program

This is implementation dependant.
With clisp, you can do:

(ext:shell "vb.net.exe some argument")

(ext:run-program "vb.net.exe"
                 :arguments (list "some" "argment")
                 ...)


> i need ans for either one of this or both. plz do help

You can also consider communicating between the two programs with some
sort of IPC:  sockets, pipes, shared memory, message queues, etc.  All
this is implementation dependant in Common Lisp.  In clisp, you have a
nice SOCKET package, you could write a server, to which the vb program
could connect and send requests and receive answers.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The rule for today:
Touch my tail, I shred your hand.
New rule tomorrow.
From: Timofei Shatrov
Subject: Re: Call Lisp Program from vb.net
Date: 
Message-ID: <445b6808.35348879@news.readfreenews.net>
On Fri, 05 May 2006 16:25:55 +0200, Pascal Bourguignon
<···@informatimago.com> tried to confuse everyone with this message:

>"Hema" <·········@yahoo.com> writes:
>
>> How to call a lisp program from vb.net program
>
>You should ask this on comp.lang.vb, I guess...
>
>
>> how to call a vb.net exe from lisp program
>
>This is implementation dependant.
>With clisp, you can do:
>
>(ext:shell "vb.net.exe some argument")
>
>(ext:run-program "vb.net.exe"
>                 :arguments (list "some" "argment")
>                 ...)
>

The stumbling point (at least for me) was that there is :wait keyword
parameter, which is very important. By default Lisp program stops
executing until "inferior" program finishes its job. But if you run it
like (ext:run-program "vbnet.exe" :wait nil) the Lisp program would
continue execution, which is often what you want. Also I encountered
some bugs when trying to run-program under SLIME with default :wait t.

>> i need ans for either one of this or both. plz do help
>
>You can also consider communicating between the two programs with some
>sort of IPC:  sockets, pipes, shared memory, message queues, etc.  All
>this is implementation dependant in Common Lisp.  In clisp, you have a
>nice SOCKET package, you could write a server, to which the vb program
>could connect and send requests and receive answers.

CLISP sockets are extremely easy to use. I guess they're not hard in VB
either. In my game "The Rougelike"
(http://common-lisp.net/project/lifp/rouge.htm) I used CLISP as client
to a makeshift server written in C. It's ironic that the C code is ugly
and non-portable, while the similar code in Lisp is nice and portable.

By the way, using Lisp as client is more convinient, because unlike
other languages, you can test the connection with the help of the REPL,
sending various commands to the server interactively. In REPL-less
language such testing becomes somewhat harder.

--
|Don't believe this - you're not worthless              ,gr---------.ru
|It's us against millions and we can't take them all... |  ue     il   |
|But we can take them on!                               |     @ma      |
|                       (A Wilhelm Scream - The Rip)    |______________|