From: Bat Kwok Kwan (CE)
Subject: visual basic and lisp
Date: 
Message-ID: <78rjnd$mpr$2@www.csis.hku.hk>
I am writing a program that part of it is in lisp and part of it is
in visual basic. Is there any method that can combine lisp and visual
basic? It is said that acl5.0 can compile lisp into DLL. But I just do 
this for interest and so do not have acl. Is there any free compiler
can do similar thing also?
Thanks:
--

From: Guy Footring
Subject: Re: visual basic and lisp
Date: 
Message-ID: <wtiudq5qoc.fsf@thcsv01.trafford.ford.com>
·····@csis.hku.hk (Bat Kwok Kwan (CE)) writes:

> 
> I am writing a program that part of it is in lisp and part of it is
> in visual basic. Is there any method that can combine lisp and visual
> basic? It is said that acl5.0 can compile lisp into DLL. But I just do 
> this for interest and so do not have acl. Is there any free compiler
> can do similar thing also?
> Thanks:
> --

Both Franz' ACL5.0 and Harlequin's LWW4.1 can dump themselves as a DLL,
and whilst both vendors offer free versions I don't know whether the
free versions can also do this.  Check out WWW.Franz.Com and WWW.Harlequin.Com
respectively to find out.

We're currently using the combination of VB and Lisp - VB to do the GUI bit
and Lisp to do the smart stuff.  Whilst this combination certainly wasn't my
preference, the system (though not finished yet) is working fine.  
I was constrained to use VB for the GUI for political reasons rather than
technical reasons - are you sure you really need to use VB or could you go
for a Lisp-only solution?  ACL5.0 in particular has a pretty impressive GUI
builder and set of widgets.

If you do go ahead, here are a couple of things to be aware of:
1) VB uses Unicode BStrings internally but expects the DLL outside world to
   be using ANSI single-byte strings, so it does conversions for you when
   calling into your DLL.  However, if you are using callbacks into VB you'll
   need to handle the conversions for yourself.  Check out the discussion I had
   with Jim Mack in comp.lang.basic.visual.misc on DejaNews for more details.

2) VB requires DLL calls to use STDCALL calling conventions.

3) I had to use the undocumented LWW function FLI:DEFINE-FOREIGN-FUNCALLABLE
   to tie into the VB callbacks.

4) VB boolean values are 0 (false) and -1(true) whereas C true is usually 1
   This can give odd results in VB if you test for [condition = TRUE] rather
   than simply [condition]

I haven't used ACL5.0 seriously yet though my goal is to get the code running 
under both compilers.  I believe that ACL5.0 also gives you the ability to 
write COM interfaces, in which case that may be a better way to go since
the hassles over strings and calling conventions go away.

If you have specific problems I might be able to help further.


Hope this is of some help,

Guy Footring
From: Guy Footring
Subject: Re: visual basic and lisp
Date: 
Message-ID: <wtk8y65rwy.fsf@thcsv01.trafford.ford.com>
·····@csis.hku.hk (Bat Kwok Kwan (CE)) writes:

> 
> I am writing a program that part of it is in lisp and part of it is
> in visual basic. Is there any method that can combine lisp and visual
> basic? It is said that acl5.0 can compile lisp into DLL. But I just do 
> this for interest and so do not have acl. Is there any free compiler
> can do similar thing also?
> Thanks:
> --

Both Franz' ACL5.0 and Harlequin's LWW4.1 can dump themselves as a DLL,
and whilst both vendors offer free versions I don't know whether the
free versions can also do this.  Check out WWW.Franz.Com and WWW.Harlequin.Com
respectively to find out.

We're currently using the combination of VB and Lisp - VB to do the GUI bit
and Lisp to do the smart stuff.  Whilst this combination certainly wasn't my
preference, the system (though not finished yet) is working fine.  
I was constrained to use VB for the GUI for political reasons rather than
technical reasons - are you sure you really need to use VB or could you go
for a Lisp-only solution?  ACL5.0 in particular has a pretty impressive GUI
builder and set of widgets.

If you do go ahead, here are a couple of things to be aware of:
1) VB uses Unicode BStrings internally but expects the DLL outside world to
   be using ANSI single-byte strings, so it does conversions for you when
   calling into your DLL.  However, if you are using callbacks into VB you'll
   need to handle the conversions for yourself.  Check out the discussion I had
   with Jim Mack in comp.lang.basic.visual.misc on DejaNews for more details.

2) VB requires DLL calls to use STDCALL calling conventions.

3) I had to use the undocumented LWW function FLI:DEFINE-FOREIGN-FUNCALLABLE
   to tie into the VB callbacks.

4) VB boolean values are 0 (false) and -1(true) whereas C true is usually 1
   This can give odd results in VB if you test for [condition = TRUE] rather
   than simply [condition]

I haven't used ACL5.0 seriously yet though my goal is to get the code running 
under both compilers.  I believe that ACL5.0 also gives you the ability to 
write COM interfaces, in which case that may be a better way to go since
the hassles over strings and calling conventions go away.

If you have specific problems I might be able to help further.


Hope this is of some help,

Guy Footring
From: Bat Kwok Kwan (CE)
Subject: Re: visual basic and lisp
Date: 
Message-ID: <78smjm$73s$1@www.csis.hku.hk>
Guy Footring (········@thcsv01.trafford.ford.com) wrote:
: ·····@csis.hku.hk (Bat Kwok Kwan (CE)) writes:

: > 
: > I am writing a program that part of it is in lisp and part of it is
: > in visual basic. Is there any method that can combine lisp and visual
: > basic? It is said that acl5.0 can compile lisp into DLL. But I just do 
: > this for interest and so do not have acl. Is there any free compiler
: > can do similar thing also?
: > Thanks:
: > --

: Both Franz' ACL5.0 and Harlequin's LWW4.1 can dump themselves as a DLL,
: and whilst both vendors offer free versions I don't know whether the
: free versions can also do this.  Check out WWW.Franz.Com and WWW.Harlequin.Com
: respectively to find out.

I have tried acl 5.0 trial version. But it lacks a compiler and can not
save image. It seems the personal version of LWW4.1 also imposed
similar restriction.
Do you know any other method  ?
Thanks.

: We're currently using the combination of VB and Lisp - VB to do the GUI bit
: and Lisp to do the smart stuff.  Whilst this combination certainly wasn't my
: preference, the system (though not finished yet) is working fine.  
: I was constrained to use VB for the GUI for political reasons rather than
: technical reasons - are you sure you really need to use VB or could you go
: for a Lisp-only solution?  ACL5.0 in particular has a pretty impressive GUI
: builder and set of widgets.

: If you do go ahead, here are a couple of things to be aware of:
: 1) VB uses Unicode BStrings internally but expects the DLL outside world to
:    be using ANSI single-byte strings, so it does conversions for you when
:    calling into your DLL.  However, if you are using callbacks into VB you'll
:    need to handle the conversions for yourself.  Check out the discussion I had
:    with Jim Mack in comp.lang.basic.visual.misc on DejaNews for more details.

: 2) VB requires DLL calls to use STDCALL calling conventions.

: 3) I had to use the undocumented LWW function FLI:DEFINE-FOREIGN-FUNCALLABLE
:    to tie into the VB callbacks.

: 4) VB boolean values are 0 (false) and -1(true) whereas C true is usually 1
:    This can give odd results in VB if you test for [condition = TRUE] rather
:    than simply [condition]

: I haven't used ACL5.0 seriously yet though my goal is to get the code running 
: under both compilers.  I believe that ACL5.0 also gives you the ability to 
: write COM interfaces, in which case that may be a better way to go since
: the hassles over strings and calling conventions go away.

: If you have specific problems I might be able to help further.


: Hope this is of some help,

Yes, it is helpful. Thanks.

:: Guy Footring

--
From: Guy Footring
Subject: Re: visual basic and lisp
Date: 
Message-ID: <wtg18q5tds.fsf@thcsv01.trafford.ford.com>
·····@csis.hku.hk (Bat Kwok Kwan (CE)) writes:

> 
> Guy Footring (········@thcsv01.trafford.ford.com) wrote:
> : ·····@csis.hku.hk (Bat Kwok Kwan (CE)) writes:
> 
> : > 
> : > I am writing a program that part of it is in lisp and part of it is
> : > in visual basic. Is there any method that can combine lisp and visual
> : > basic? It is said that acl5.0 can compile lisp into DLL. But I just do 
> : > this for interest and so do not have acl. Is there any free compiler
> : > can do similar thing also?
> : > Thanks:
> : > --
> 
> : Both Franz' ACL5.0 and Harlequin's LWW4.1 can dump themselves as a DLL,
> : and whilst both vendors offer free versions I don't know whether the
> : free versions can also do this.  Check out WWW.Franz.Com and WWW.Harlequin.Com
> : respectively to find out.
> 
> I have tried acl 5.0 trial version. But it lacks a compiler and can not
> save image. It seems the personal version of LWW4.1 also imposed
> similar restriction.
> Do you know any other method  ?
> Thanks.
> 

Perhaps CormanLisp would work.  It claims to be able to run as an in-process
COM component which I believe should work straightforwardly with VB.  I've
never tried CormanLisp, but you can get check it out and download it from
WWW.Corman.Net/CormanLisp.html

[extra stuff deleted]

Regards
Guy.
From: Will Fitzgerald
Subject: Re: visual basic and lisp
Date: 
Message-ID: <78sc45$p6i@news.net-link.net>
we have successfully written programs that communicate between VB and Lisp
using TCP/IP.

I don't know if there is a free Lisp compiler for the Windows environment
that can do TCP/IP communications.

>I am writing a program that part of it is in lisp and part of it is
>in visual basic. Is there any method that can combine lisp and visual
>basic? It is said that acl5.0 can compile lisp into DLL. But I just do
>this for interest and so do not have acl. Is there any free compiler
>can do similar thing also?
>Thanks:
>--