From: Tin Gherdanarra
Subject: How can I find out on which operating system I'm running?
Date: 
Message-ID: <55e680F24nsdtU1@mid.individual.net>
There is MACHINE-TYPE and SOFTWARE-TYPE, but no
OPERATING-SYSTEM-TYPE. I can't believe that this is
not standardized in Common Lisp. groups.google.com
did not yield anything to answer the question. To
be more specific, how can I find out on which operating
system I'm running in Clisp? Thanks
-- 
Lisp kann nicht kratzen, denn Lisp ist fluessig

From: Edi Weitz
Subject: Re: How can I find out on which operating system I'm running?
Date: 
Message-ID: <uabymvx50.fsf@agharta.de>
On Fri, 09 Mar 2007 23:43:12 +0100, Tin Gherdanarra <···········@gmail.com> wrote:

> There is MACHINE-TYPE and SOFTWARE-TYPE, but no
> OPERATING-SYSTEM-TYPE. I can't believe that this is not standardized
> in Common Lisp. groups.google.com did not yield anything to answer
> the question. To be more specific, how can I find out on which
> operating system I'm running in Clisp?

Most implementations provide a more or less useful answer if you use
SOFTWARE-TYPE, only on CLISP the function's return value looks a bit,
er, strange.  But don't hold it against them.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Vassil Nikolov
Subject: Re: How can I find out on which operating system I'm running?
Date: 
Message-ID: <yy8vird97h14.fsf@eskimo.com>
On Sat, 10 Mar 2007 00:02:19 +0100, Edi Weitz <········@agharta.de> said:

| On Fri, 09 Mar 2007 23:43:12 +0100, Tin Gherdanarra <···········@gmail.com> wrote:
|| There is MACHINE-TYPE and SOFTWARE-TYPE, but no
|| OPERATING-SYSTEM-TYPE. I can't believe that this is not standardized
|| in Common Lisp. groups.google.com did not yield anything to answer
|| the question. To be more specific, how can I find out on which
|| operating system I'm running in Clisp?

| Most implementations provide a more or less useful answer if you use
| SOFTWARE-TYPE, only on CLISP the function's return value looks a bit,
| er, strange.  But don't hold it against them.

    #+unix :unix #+windows :windows #-(or unix windows) :unspecific

  is a partial answer.

  ---Vassil.


-- 
Is your code free of side defects?
From: Pascal Bourguignon
Subject: Re: How can I find out on which operating system I'm running?
Date: 
Message-ID: <87d53f6jh7.fsf@voyager.informatimago.com>
Vassil Nikolov <···············@pobox.com> writes:

> On Sat, 10 Mar 2007 00:02:19 +0100, Edi Weitz <········@agharta.de> said:
>
> | On Fri, 09 Mar 2007 23:43:12 +0100, Tin Gherdanarra <···········@gmail.com> wrote:
> || There is MACHINE-TYPE and SOFTWARE-TYPE, but no
> || OPERATING-SYSTEM-TYPE. I can't believe that this is not standardized
> || in Common Lisp. groups.google.com did not yield anything to answer
> || the question. To be more specific, how can I find out on which
> || operating system I'm running in Clisp?
>
> | Most implementations provide a more or less useful answer if you use
> | SOFTWARE-TYPE, only on CLISP the function's return value looks a bit,
> | er, strange.  But don't hold it against them.
>
>     #+unix :unix #+windows :windows #-(or unix windows) :unspecific
>
>   is a partial answer.
>
>   ---Vassil.

But the real answer is that you shouldn't write OS specific code ;-)
Keep it standard and portable!

> Is your code free of side defects?


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
        Un chat errant
se soulage
        dans le jardin d'hiver
                                        Shiki
From: Rainer Joswig
Subject: Re: How can I find out on which operating system I'm running?
Date: 
Message-ID: <joswig-F9A7A6.10414212032007@news-europe.giganews.com>
In article <··············@voyager.informatimago.com>,
 Pascal Bourguignon <···@informatimago.com> wrote:

> Vassil Nikolov <···············@pobox.com> writes:
> 
> > On Sat, 10 Mar 2007 00:02:19 +0100, Edi Weitz <········@agharta.de> said:
> >
> > | On Fri, 09 Mar 2007 23:43:12 +0100, Tin Gherdanarra <···········@gmail.com> wrote:
> > || There is MACHINE-TYPE and SOFTWARE-TYPE, but no
> > || OPERATING-SYSTEM-TYPE. I can't believe that this is not standardized
> > || in Common Lisp. groups.google.com did not yield anything to answer
> > || the question. To be more specific, how can I find out on which
> > || operating system I'm running in Clisp?
> >
> > | Most implementations provide a more or less useful answer if you use
> > | SOFTWARE-TYPE, only on CLISP the function's return value looks a bit,
> > | er, strange.  But don't hold it against them.
> >
> >     #+unix :unix #+windows :windows #-(or unix windows) :unspecific
> >
> >   is a partial answer.
> >
> >   ---Vassil.
> 
> But the real answer is that you shouldn't write OS specific code ;-)
> Keep it standard and portable!

I think your remark is silly and useless, since Common Lisp does not
specify (useful) interfaces to Operating System level services like
printing, graphics, process handling, file systems, shells, audio,
video, 3d graphics, networking, internationalization,
cryptographics, fonts, ... - nor should it do.

I would not find it unusual that Lisp programs will want
to use a subset of those and even run on multiple platforms.
Much of that is widely different on popular platforms (Linux,
MAc, Windows).

More useful would be the advice to write/use a portability layer
where possible and provide a clean Lisp interface. In this
portability layer the developer then would use the various
ways to identify the OS, Lisp platform, machine hardware
and write specific code. Outside that portability layer
there should be no #+lispm #-Unix #-Win32 switches.


> 
> > Is your code free of side defects?

-- 
http://lispm.dyndns.org
From: Pascal Bourguignon
Subject: Re: How can I find out on which operating system I'm running?
Date: 
Message-ID: <87k5xl60u5.fsf@voyager.informatimago.com>
Rainer Joswig <······@lisp.de> writes:

> In article <··············@voyager.informatimago.com>,
>  Pascal Bourguignon <···@informatimago.com> wrote:
>
>> Vassil Nikolov <···············@pobox.com> writes:
>> 
>> > On Sat, 10 Mar 2007 00:02:19 +0100, Edi Weitz <········@agharta.de> said:
>> >
>> > | On Fri, 09 Mar 2007 23:43:12 +0100, Tin Gherdanarra <···········@gmail.com> wrote:
>> > || There is MACHINE-TYPE and SOFTWARE-TYPE, but no
>> > || OPERATING-SYSTEM-TYPE. I can't believe that this is not standardized
>> > || in Common Lisp. groups.google.com did not yield anything to answer
>> > || the question. To be more specific, how can I find out on which
>> > || operating system I'm running in Clisp?
>> >
>> > | Most implementations provide a more or less useful answer if you use
>> > | SOFTWARE-TYPE, only on CLISP the function's return value looks a bit,
>> > | er, strange.  But don't hold it against them.
>> >
>> >     #+unix :unix #+windows :windows #-(or unix windows) :unspecific
>> >
>> >   is a partial answer.
>> >
>> >   ---Vassil.
>> 
>> But the real answer is that you shouldn't write OS specific code ;-)
>> Keep it standard and portable!
>
> I think your remark is silly and useless, since Common Lisp does not
> specify (useful) interfaces to Operating System level services like
> printing, graphics, process handling, file systems, shells, audio,
> video, 3d graphics, networking, internationalization,
> cryptographics, fonts, ... - nor should it do.
>
> I would not find it unusual that Lisp programs will want
> to use a subset of those and even run on multiple platforms.
> Much of that is widely different on popular platforms (Linux,
> MAc, Windows).
>
> More useful would be the advice to write/use a portability layer
> where possible and provide a clean Lisp interface. In this
> portability layer the developer then would use the various
> ways to identify the OS, Lisp platform, machine hardware
> and write specific code. Outside that portability layer
> there should be no #+lispm #-Unix #-Win32 switches.

That was what I had in mind, that last paragraph.  Thanks.

-- 
__Pascal Bourguignon__
http://www.informatimago.com
http://pjb.ogamita.org