Lisp HUG Maillist Archive

LispWorks and code compatibility

I'm thinking about becoming more serious with developing Common
Lisp applications using LispWorks but I want to know first how
compatible is code developed using LIspWorks with regards to other
implementions.

I'm using LispWorks on FreeBSD and I want to know how compatible
is the code that I will write across LispWorks versions. Do I need to
modify the code to make it compile on LispWorks for Linux (or
Windows)? Will it work out of the box?

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

On 7/31/08, Rommel Martinez <ebzzry@gmail.com> wrote:
>
> I'm thinking about becoming more serious with developing Common
> Lisp applications using LispWorks but I want to know first how
> compatible is code developed using LIspWorks with regards to other
> implementions.

Depends which features you use: are you using non-standard Common
Lisp? (ie the Windowing API?) Then you're out of luck. However,
standard Common Lisp should work with only minor modifications on
other implementations. Usually this means your algorithms are
portable, but the UI may not.

> I'm using LispWorks on FreeBSD and I want to know how compatible
> is the code that I will write across LispWorks versions. Do I need to
> modify the code to make it compile on LispWorks for Linux (or
> Windows)? Will it work out of the box?

I have no experience there, but I hear it should.

Bye,


Erik.


Re: LispWorks and code compatibility

"Rommel Martinez" <ebzzry@gmail.com> writes:

> I'm thinking about becoming more serious with developing Common
> Lisp applications using LispWorks but I want to know first how
> compatible is code developed using LIspWorks with regards to other
> implementions.

It's generally very compatible. Even GUI code (written with CAPI)
needs very few #+-es to work. I grepped through 37k lines of my GUI
code, and the only thing I found was some fine-tuning of sizes
of fonts and gui elements, and different path name defaults for
different OSes.
-- 
  (espen)


Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 6:14 PM, Erik Huelsmann <ehuels@gmail.com> wrote:
> On 7/31/08, Rommel Martinez <ebzzry@gmail.com> wrote:
>>
>> I'm thinking about becoming more serious with developing Common
>> Lisp applications using LispWorks but I want to know first how
>> compatible is code developed using LIspWorks with regards to other
>> implementions.
>
> Depends which features you use: are you using non-standard Common
> Lisp? (ie the Windowing API?) Then you're out of luck. However,
> standard Common Lisp should work with only minor modifications on
> other implementations. Usually this means your algorithms are
> portable, but the UI may not.

Oops. Sorry. I should have said "LispWorks implementations" instead of
just "implementations".

>> I'm using LispWorks on FreeBSD and I want to know how compatible
>> is the code that I will write across LispWorks versions. Do I need to
>> modify the code to make it compile on LispWorks for Linux (or
>> Windows)? Will it work out of the box?
>
> I have no experience there, but I hear it should.

OK. Good. :-)

> Bye,
>
>
> Erik.
>



-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

Espen Vestre <ev@netfonds.no> writes:

> It's generally very compatible. 

....assuming the question was about using lispworks only, but with
 several OSes. I wasn't sure if you were asking two different
 questions (compatibility within lisp implementations and
 compatibility within different lispworks versiosn) or one question
 (the latter only).
-- 
  (espen)


Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 6:19 PM, Espen Vestre <ev@netfonds.no> wrote:
> "Rommel Martinez" <ebzzry@gmail.com> writes:
>
>> I'm thinking about becoming more serious with developing Common
>> Lisp applications using LispWorks but I want to know first how
>> compatible is code developed using LIspWorks with regards to other
>> implementions.
>
> It's generally very compatible. Even GUI code (written with CAPI)
> needs very few #+-es to work. I grepped through 37k lines of my GUI
> code, and the only thing I found was some fine-tuning of sizes
> of fonts and gui elements, and different path name defaults for
> different OSes.
> --
>  (espen)
>

That's good news to me then. Thanks.

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 6:22 PM, Espen Vestre <ev@netfonds.no> wrote:
> Espen Vestre <ev@netfonds.no> writes:
>
>> It's generally very compatible.
>
> ...assuming the question was about using lispworks only, but with
>  several OSes. I wasn't sure if you were asking two different
>  questions (compatibility within lisp implementations and
>  compatibility within different lispworks versiosn) or one question
>  (the latter only).
> --
>  (espen)
>

Yes. The compatibility question is confined to LispWorks with other
OSes.

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

Unable to parse email body. Email id is 8448

Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 7:41 PM,  <davef@lispworks.com> wrote:
>
>  > I'm thinking about becoming more serious with developing Common
>  > Lisp applications using LispWorks but I want to know first how
>  > compatible is code developed using LIspWorks with regards to other
>  > implementions.
>  >
>  > I'm using LispWorks on FreeBSD and I want to know how compatible
>  > is the code that I will write across LispWorks versions. Do I need to
>  > modify the code to make it compile on LispWorks for Linux (or
>  > Windows)? Will it work out of the box?
>
> Common Lisp code is compatible across LispWorks implementations. We
> aim to make extensions compatible as far as possible, and document any
> discrepancies.
>
> Almost all code that works in LispWorks for FreeBSD will work in
> LispWorks for Linux. One area of discrepancies is code that uses third
> party libraries which may or be not be present on the other OS.
>
> Most code that works in LispWorks for FreeBSD will also work in
> LispWorks for Windows. The areas with discrepancies include the system
> interfaces (SYS:CALL-SYSTEM, SYS:OPEN-PIPE, etc) and foreign functions
> (pay attention to the calling convention).
>
> You are in a good position with the GUI in LispWorks because CAPI code
> is highly portable between its three supported GUI libraries, though
> of course there are always a few features that a particular platform
> cannot support. We aim to document such discrepancies. (If you find a
> discrepancy that is not documented, please report that directly to
> lisp-support@lispworks.com as a bug.)
>
> The LispWorks IDE is written with CAPI and illustrates much of what
> can be done portably.
>
> --
> Dave Fox
> LispWorks Ltd
> http://www.lispworks.com/
>

That's good to know. Are these "discrepancies" documented
somewhere?

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

Unable to parse email body. Email id is 8450

Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 7:54 PM,  <davef@lispworks.com> wrote:
>
>  [...]
>  > > You are in a good position with the GUI in LispWorks because CAPI code
>  > > is highly portable between its three supported GUI libraries, though
>  > > of course there are always a few features that a particular platform
>  > > cannot support. We aim to document such discrepancies. (If you find a
>  > > discrepancy that is not documented, please report that directly to
>  > > lisp-support@lispworks.com as a bug.)
>  > >
>  > > The LispWorks IDE is written with CAPI and illustrates much of what
>  > > can be done portably.
>  > >
>  > > --
>  > > Dave Fox
>  > > LispWorks Ltd
>  > > http://www.lispworks.com/
>  > >
>  >
>  > That's good to know. Are these "discrepancies" documented
>  > somewhere?
>
> Yes, in the documentation for each feature. For example, if you
> specify a disabled image for a CAPI:BUTTON this image won't be used on
> Windows, and that's mentioned on the page manual page for CAPI:BUTTON
>
>  http://www.lispworks.com/documentation/lw51/CAPRM/html/capiref-17.htm
>
>
> --
> Dave Fox
> LispWorks Ltd
> http://www.lispworks.com/
>

OK, but is there a central set of documents that describes which parts of the
LispWorks systems have these differences across implementations, something
that lists all these discrepancies so that I'll know in advance what
to watch out
for and for me to be more aware?

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

Unable to parse email body. Email id is 8453

Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 8:04 PM,  <davef@lispworks.com> wrote:
>
>  > >  [...]
>  > >  > > You are in a good position with the GUI in LispWorks because CAPI code
>  > >  > > is highly portable between its three supported GUI libraries, though
>  > >  > > of course there are always a few features that a particular platform
>  > >  > > cannot support. We aim to document such discrepancies. (If you find a
>  > >  > > discrepancy that is not documented, please report that directly to
>  > >  > > lisp-support@lispworks.com as a bug.)
>  > >  > >
>  > >  > > The LispWorks IDE is written with CAPI and illustrates much of what
>  > >  > > can be done portably.
>  > >  > >
>  > >  > > --
>  > >  > > Dave Fox
>  > >  > > LispWorks Ltd
>  > >  > > http://www.lispworks.com/
>  > >  > >
>  > >  >
>  > >  > That's good to know. Are these "discrepancies" documented
>  > >  > somewhere?
>  > >
>  > > Yes, in the documentation for each feature. For example, if you
>  > > specify a disabled image for a CAPI:BUTTON this image won't be used on
>  > > Windows, and that's mentioned on the page manual page for CAPI:BUTTON
>  > >
>  > >  http://www.lispworks.com/documentation/lw51/CAPRM/html/capiref-17.htm
>  > >
>  > >
>  > > --
>  > > Dave Fox
>  > > LispWorks Ltd
>  > > http://www.lispworks.com/
>  > >
>  >
>  > OK, but is there a central set of documents that describes which parts of the
>  > LispWorks systems have these differences across implementations, something
>  > that lists all these discrepancies so that I'll know in advance what
>  > to watch out
>  > for and for me to be more aware?
>
> No.
>
> --
> Dave Fox
> LispWorks Ltd
> http://www.lispworks.com/
>

Hmm. But we could make one, right?


-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

On 31 Jul 2008, at 11:01, Rommel Martinez wrote:
>
>
> I'm using LispWorks on FreeBSD and I want to know how compatible
> is the code that I will write across LispWorks versions. Do I need to
> modify the code to make it compile on LispWorks for Linux (or
> Windows)? Will it work out of the box?


Some time ago (LW 4.2 era) I wrote a fairly substantial application  
(ended up I think between 20 & 30 kloc) which needed to run on Linux.   
I didn't have a Linux machine for the first month or so, so wrote it  
on LWW.  When I did finally get access to a Linux machine, I checked  
out the code, compiled and ran it.  There were no code changes needed.

The application itself did not have a GUI, but there were GUI tools  
around it (things to look a data structures &c), which also worked out  
of the box.


Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 8:33 PM, Tim Bradshaw <tfb@cley.com> wrote:
> On 31 Jul 2008, at 11:01, Rommel Martinez wrote:
>>
>>
>> I'm using LispWorks on FreeBSD and I want to know how compatible
>> is the code that I will write across LispWorks versions. Do I need to
>> modify the code to make it compile on LispWorks for Linux (or
>> Windows)? Will it work out of the box?
>
>
> Some time ago (LW 4.2 era) I wrote a fairly substantial application (ended
> up I think between 20 & 30 kloc) which needed to run on Linux.  I didn't
> have a Linux machine for the first month or so, so wrote it on LWW.  When I
> did finally get access to a Linux machine, I checked out the code, compiled
> and ran it.  There were no code changes needed.
>
> The application itself did not have a GUI, but there were GUI tools around
> it (things to look a data structures &c), which also worked out of the box.
>

Great! :-)

-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

On Thu, Jul 31, 2008 at 8:08 PM, Rommel Martinez <ebzzry@gmail.com> wrote:
> On Thu, Jul 31, 2008 at 8:04 PM,  <davef@lispworks.com> wrote:
>>
>>  > >  [...]
>>  > >  > > You are in a good position with the GUI in LispWorks because CAPI code
>>  > >  > > is highly portable between its three supported GUI libraries, though
>>  > >  > > of course there are always a few features that a particular platform
>>  > >  > > cannot support. We aim to document such discrepancies. (If you find a
>>  > >  > > discrepancy that is not documented, please report that directly to
>>  > >  > > lisp-support@lispworks.com as a bug.)
>>  > >  > >
>>  > >  > > The LispWorks IDE is written with CAPI and illustrates much of what
>>  > >  > > can be done portably.
>>  > >  > >
>>  > >  > > --
>>  > >  > > Dave Fox
>>  > >  > > LispWorks Ltd
>>  > >  > > http://www.lispworks.com/
>>  > >  > >
>>  > >  >
>>  > >  > That's good to know. Are these "discrepancies" documented
>>  > >  > somewhere?
>>  > >
>>  > > Yes, in the documentation for each feature. For example, if you
>>  > > specify a disabled image for a CAPI:BUTTON this image won't be used on
>>  > > Windows, and that's mentioned on the page manual page for CAPI:BUTTON
>>  > >
>>  > >  http://www.lispworks.com/documentation/lw51/CAPRM/html/capiref-17.htm
>>  > >
>>  > >
>>  > > --
>>  > > Dave Fox
>>  > > LispWorks Ltd
>>  > > http://www.lispworks.com/
>>  > >
>>  >
>>  > OK, but is there a central set of documents that describes which parts of the
>>  > LispWorks systems have these differences across implementations, something
>>  > that lists all these discrepancies so that I'll know in advance what
>>  > to watch out
>>  > for and for me to be more aware?
>>
>> No.
>>
>> --
>> Dave Fox
>> LispWorks Ltd
>> http://www.lispworks.com/
>>
>
> Hmm. But we could make one, right?

I mean ideally.

>
> --
> Rommel M. Martinez <ebzzry@gmail.com>
>



-- 
Rommel M. Martinez <ebzzry@gmail.com>


Re: LispWorks and code compatibility

On Thu, 31 Jul 2008 12:19:24 +0200, Espen Vestre <ev@netfonds.no> wrote:

> It's generally very compatible. Even GUI code (written with CAPI)
> needs very few #+-es to work. I grepped through 37k lines of my GUI
> code, and the only thing I found was some fine-tuning of sizes of
> fonts and gui elements, and different path name defaults for
> different OSes.

I can confirm that.  As long as you don't use OS-specific things like,
say, MDI interfaces on Windows, the only area where you /could/ run
into compatibility problems with GUI apps is the relation between
threads and GUI elements (specifically editor panes) on OS X vs. other
platforms.  If you're aware of this and code "defensively", so to say,
you should be fine.


Re: LispWorks and code compatibility

Edi Weitz <edi@agharta.de> writes:

> I can confirm that.  As long as you don't use OS-specific things like,
> say, MDI interfaces on Windows, the only area where you /could/ run
> into compatibility problems with GUI apps is the relation between
> threads and GUI elements (specifically editor panes) on OS X vs. other
> platforms.  If you're aware of this and code "defensively", so to say,
> you should be fine.

Very good point, Edi. Shame on me for forgetting to mention that.
The limitation on OS X is that all GUI operations run in a single thread,
which means that "execute-with-interface" will not run in a different
thread if it's called from one interface with a different interface
as a parameter.

To the LispWorks guys: Any plans on changing that in a future release?
It has given me a few headaches every now and then.
-- 
  (espen)


Re: LispWorks and code compatibility

On Aug 1, 2008, at 1:11 PM, John DeSoi wrote:

> I use other Mac development tools that have great debuggers -- you  
> can trace through any code including user interface code. So it is  
> possible somehow.
>
> For me this is the biggest limitation of LispWorks on the Mac. I  
> constantly want to set a breakpoint in an interface callback to step  
> through the code. Currently, there no way to do this with LispWorks  
> Mac.

To be more precise than Chun Tuan was, it is possible to run GUI  
elements in separate threads (I do so in Clozure CL for example).  
However, the AppKit itself is not thread safe so any call in any  
thread that causes a GUI element to be modified (i.e., redrawn) needs  
to happen on the main thread. The AppKit provides  
performSelector:onMainThread:withObject:waitUntilDone: (and others)  
for this purpose.

So yes, you can have GUI code on more than one thread, but then you  
have to be careful to always call visible GUI element modifications on  
the main thread. For example, you can allocate and initialize GUI  
elements on a separate thread, but when you show them, you must do it  
on the main thread.


regards,

Ralph






Raffael Cavallaro, Ph.D.
raffaelcavallaro@mac.com


Updated at: 2020-12-10 08:42 UTC