From: Vladimir V. Zolotych
Subject: DEFSYSTEM
Date: 
Message-ID: <3AC0D1D8.763BC021@eurocom.od.ua>
	Hello

-  Where can I found description on usage of DEFSYSTEM ? E.g.  that
   found in sourceforge.net (part of CLOCC). I've encountered phrase
   "...setup defsystem and have a central repository for system
   definitions" several times but still don't know how to do that.

-  ILISP settings question.  When I change REPL prompt to
   CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
   ability of displaying hints about function's args. Commands C-z a,
   C-z d after that works in strange manner.  Can I fix that ?  ILISP
   V5.10.1 Emacs 20.4.2

-  How can I free child resources (created via UNIX:UNIX-FORK) or wait
   its termination in CMUCL 18c ? I've found UNIX-FORK in UNIX
   package. The three symbols with word WAIT in them all internal in
   package. Some symbols that might be related to waiting also exist
   in EXTENSIONS package, but they're also internal.
   CMUCL 18c & Slackware 7.0

-  For

   (make-array 5 :element-type 'single-float)

   type of elements for created array display as SINGLE-FLOAT. The same
   for type BIT.

   For

   (make-array 5 :elements 'info)

   where INFO was created with DEFSTRUCT I see element type as T. Why ?

-  Would you mind say few words about saving/restoring core image ?
   I've see strange behavior. I run Lisp, define number of functions,
   variables, do other things then (ext:save-lisp "core") (CMUCL 18c).
   After that I run lisp with

   lisp -core core

   And try do things that work before saving core. Now I get error

   Error in function UNIX::SIGSEGV-HANDLER:  
     Segmentation Violation at #x402A9D60.

   This I got when run the function that succeeded before I save core.

   Probably I doing something wrong ?

	Thanks in advance.

   
-- 
Vladimir Zolotych                         ······@eurocom.od.ua

From: Nathan Froyd
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <slrn9c1mke.r1m.froydnj@froyd3.laptop.rose-hulman.edu>
In article <·················@eurocom.od.ua>, Vladimir V. Zolotych wrote:
>-  Where can I found description on usage of DEFSYSTEM ? E.g.  that

Read the source code.  I was too lazy to actually "set up the central
repository", so I went with the default, "src:systems".

The original documentation for DEFSYSTEM can be found at the CMU
repository, filename mkantdoc.tgz or some such.

>-  ILISP settings question.  When I change REPL prompt to
>   CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
>   ability of displaying hints about function's args. Commands C-z a,
>   C-z d after that works in strange manner.  Can I fix that ?  ILISP

Probably.  You may need to tell ILISP about your new prompt.

>-  How can I free child resources (created via UNIX:UNIX-FORK) or wait
>   its termination in CMUCL 18c ? I've found UNIX-FORK in UNIX

You may need to use the internal symbols.  This is not necessarily a bad
thing.

>-  For
>
>   (make-array 5 :element-type 'single-float)
>
>   type of elements for created array display as SINGLE-FLOAT. The same
>   for type BIT.
>
>   For
>
>   (make-array 5 :elements 'info)
>
>   where INFO was created with DEFSTRUCT I see element type as T. Why ?

I get an error on your code; "Unknown keyword: :ELEMENTS".
-- 
</nathan>  ·······@rose-hulman.edu  |  http://www.rose-hulman.edu/~froydnj/

Yes, God had a deadline.  So He wrote it all in Lisp.
From: Hannu Koivisto
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <87u24fq67k.fsf@lynx.ionific.com>
"Vladimir V. Zolotych" <······@eurocom.od.ua> writes:

| -  Where can I found description on usage of DEFSYSTEM ? E.g.  that

There is Mark Kantrowitz's document in the CMU AI repository
alongside the mk-defsystem itself.  You could check it out even if
you use the mk-defsystem from CLOCC.  It doesn't cover everything
even the mk-defsystem from the CMU AI repository can do (actually,
I don't think there are much new features in the CLOCC version, but
there might be some minor things), so you'll probably end up
studying system definitions written by other people and/or reading
the defsystem source code (at least its initial comments) if you
need to do anything hairy.

|    "...setup defsystem and have a central repository for system
|    definitions" several times but still don't know how to do that.

The first step, and for now the only one, in setting up the
defsystem is easy: just compile and load that single Lisp file you
downloaded.  You might also want to make your CMUCL initialization
file to load it for you every time CMUCL is started.

I personally dislike the idea of a central repository for system
definitions.  In any case, first try to write just a single system
definition for some project and then ponder on how to organize
them.

| -  ILISP settings question.  When I change REPL prompt to
|    CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
|    ability of displaying hints about function's args. Commands C-z a,
|    C-z d after that works in strange manner.  Can I fix that ?  ILISP
|    V5.10.1 Emacs 20.4.2

"Strange manner" doesn't say anything useful to me.  Exactly how
did you change the prompt?  Did you do anything else?  Anyways, I
suggest you upgrade to the latest CVS version, it has *lots* of
fixes regarding function argument display and related things.  Even
it is "CVS version", it is, IMO, very stable (at least it should be
better than v5.10.1) and could/would probably be released as the
next ILISP release if only ILISP developers had time to do it.

| -  How can I free child resources (created via UNIX:UNIX-FORK) or wait
|    its termination in CMUCL 18c ? I've found UNIX-FORK in UNIX

Is there a reason why you cannot use EXT:RUN-PROCESS?  See the
section "Running Programs from Lisp" in the User's Manual.

| -  For
| 
|    (make-array 5 :element-type 'single-float)
| 
|    type of elements for created array display as SINGLE-FLOAT. The same
|    for type BIT.
| 
|    For
| 
|    (make-array 5 :elements 'info)
| 
|    where INFO was created with DEFSTRUCT I see element type as T. Why ?

From the documentation of MAKE-ARRAY in CLHS:

"element-type indicates the type of the elements intended to be
stored in the new-array. The new-array can actually store any
objects of the type which results from upgrading element-type; see
Section 15.1.2.1 (Array Upgrading)."

I think you should check out that section 15.1.2.1.

| -  Would you mind say few words about saving/restoring core image ?
|    I've see strange behavior. I run Lisp, define number of functions,
|    variables, do other things then (ext:save-lisp "core") (CMUCL 18c).
...
|    This I got when run the function that succeeded before I save core.
|
|    Probably I doing something wrong ?

Impossible to say as you don't tell us what kind of function it is
that you try to run.

-- 
Hannu
From: Raymond Toy
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <4n4rwe6cq4.fsf@rtp.ericsson.se>
>>>>> "Hannu" == Hannu Koivisto <·····@iki.fi> writes:

    Hannu> "Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
    Hannu> | -  ILISP settings question.  When I change REPL prompt to
    Hannu> |    CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
    Hannu> |    ability of displaying hints about function's args. Commands C-z a,
    Hannu> |    C-z d after that works in strange manner.  Can I fix that ?  ILISP
    Hannu> |    V5.10.1 Emacs 20.4.2

    Hannu> "Strange manner" doesn't say anything useful to me.  Exactly how
    Hannu> did you change the prompt?  Did you do anything else?  Anyways, I
    Hannu> suggest you upgrade to the latest CVS version, it has *lots* of
    Hannu> fixes regarding function argument display and related things.  Even
    Hannu> it is "CVS version", it is, IMO, very stable (at least it should be
    Hannu> better than v5.10.1) and could/would probably be released as the
    Hannu> next ILISP release if only ILISP developers had time to do it.

I've had this happen.  I forget the exact symptoms, but if you change
the prompt, you have to tell ilisp about it.  You need to change
comint-prmpt-regexp to be some regexp that will match all possible
prompts that cmucl can produce.

I use

(setq comint-prompt-regexp
  "^\\([0-9]+\\]+\\|\\*\\|\\(<[A-Za-z-]+>\\)\\) ")

I think this supports 3 possible prompts that CMUCL produces:

1.  Digits followed by at least one ]. (The debugger prompt.):
        \\([0-9]+\\]+
2.  The default prompt "*"
        \\*
3.  My personal prompt of the package name surrounded by "<" and ">":
        \\(<[A-Za-z-]+>\\)

For your prompts, this might work for you:

        \\([A-Za-z-]+>\\)

Ray
From: Marco Antoniotti
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <y6c4rwd3kmf.fsf@octagon.mrl.nyu.edu>
Hannu Koivisto <·····@iki.fi> writes:

> "Vladimir V. Zolotych" <······@eurocom.od.ua> writes:
> 
> | -  Where can I found description on usage of DEFSYSTEM ? E.g.  that
> 
> There is Mark Kantrowitz's document in the CMU AI repository
> alongside the mk-defsystem itself.  You could check it out even if
> you use the mk-defsystem from CLOCC.  It doesn't cover everything
> even the mk-defsystem from the CMU AI repository can do (actually,
> I don't think there are much new features in the CLOCC version, but
> there might be some minor things), so you'll probably end up
> studying system definitions written by other people and/or reading
> the defsystem source code (at least its initial comments) if you
> need to do anything hairy.

This is correct.  The document is not in the CLOCC because, being a
CMU TR it's copyright status is not clear.

> |    "...setup defsystem and have a central repository for system
> |    definitions" several times but still don't know how to do that.
> 
> The first step, and for now the only one, in setting up the
> defsystem is easy: just compile and load that single Lisp file you
> downloaded.  You might also want to make your CMUCL initialization
> file to load it for you every time CMUCL is started.
> 
> I personally dislike the idea of a central repository for system
> definitions.  In any case, first try to write just a single system
> definition for some project and then ponder on how to organize
> them.

I agree with this.  Alas the centralized repository is there for
people who like it.  You may want to check the CL-CONFIGURATION
package in the CLOCC which intends to give you all (well, most of) the
flexibility you want in a portable manner.

> | -  ILISP settings question.  When I change REPL prompt to
> |    CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
> |    ability of displaying hints about function's args. Commands C-z a,
> |    C-z d after that works in strange manner.  Can I fix that ?  ILISP
> |    V5.10.1 Emacs 20.4.2
> 
> "Strange manner" doesn't say anything useful to me.  Exactly how
> did you change the prompt?  Did you do anything else?  Anyways, I
> suggest you upgrade to the latest CVS version, it has *lots* of
> fixes regarding function argument display and related things.  Even
> it is "CVS version", it is, IMO, very stable (at least it should be
> better than v5.10.1) and could/would probably be released as the
> next ILISP release if only ILISP developers had time to do it.

This is also correct.  As per the prompt under ILISP/CMUCL there was
some thread on the ILISP mailing list a very long time ago.  The
problem with CMUCL is that the prompt can be actually changed in a
very arbitrary way.  (If memory does not fail me, you can make the
prompt a function which produce a string).  Under these circumstances
trying to come up with a sensible default for the regexp that
recognized the prompt is hopeless.  Hence ILISP/CMUCL only recognizes
the standard '*' and the 'N]+' ones.

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group	tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA			http://bioinformatics.cat.nyu.edu
From: Paolo Amoroso
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <rTTCOkjkvapLnREQ1IjLhZaw3t=3@4ax.com>
On 27 Mar 2001 23:58:55 +0300, Hannu Koivisto <·····@iki.fi> wrote:

> did you change the prompt?  Did you do anything else?  Anyways, I
> suggest you upgrade to the latest CVS version, it has *lots* of

Daily snapshots of the ILISP CVS tree are available at:

  http://cvs.sourceforge.net/cvstarballs/ilisp-cvsroot.tar.gz


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: Vladimir V. Zolotych
Subject: Re: DEFSYSTEM
Date: 
Message-ID: <3AC33FC2.25D83642@eurocom.od.ua>
        Thanks to all for help.

Especially to Paul Foley, his detailed explanation helps
me much. All the following isn't mine at all. I just learned
and applied what I were told.

Just a short summary (for those who're learning Lisp like me).

> -  Where can I found description on usage of DEFSYSTEM ? 

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/mkantdoc.tgz

> -  ILISP settings question.  When I change REPL prompt to
>    CURRENT-PACKAGE-NAME> e.g. USER> the ILISP (or Emacs ?) looses its
>    ability of displaying hints about function's args. Commands C-z a,
>    C-z d after that works in strange manner.  Can I fix that ?  ILISP
>    V5.10.1 Emacs 20.4.2

(add-hook 'cmulisp-hook
          (lambda ()
            (setq comint-prompt-regexp
                  "^\\(\\[[0-9]+\\] [^> \n]*:[0-9]*>\\|[^> \n]*>\\) ")))

> -  How can I free child resources (created via UNIX:UNIX-FORK) or wait
>    its termination in CMUCL 18c ? 

(alien:def-alien-routine "wait" c-call:int
  (status c-call:int :out))

> -  Would you mind say few words about saving/restoring core image ?
>    I've see strange behavior. I run Lisp, define number of functions,
>    variables, do other things then (ext:save-lisp "core") (CMUCL 18c).
>    After that I run lisp with
>
>    lisp -core core
>
>    And try do things that work before saving core. Now I get error>

>    Error in function UNIX::SIGSEGV-HANDLER:  
>     Segmentation Violation at #x402A9D60.

The reason was. I've loaded some .so functions before
saving core. After loading core with

lisp -core my-core

These functions should be reloaded again. I didn't do that. 
So the error above.

The following technique fix the problem.

(ext:save-lisp "my-core" :init-function #'%top-level)

Where

(defun %top-level ()
  :: Loading .so files and other initializations.
  (catch 'cl::%end-of-the-world
    (cl::%top-level)))

-- 
Vladimir Zolotych                         ······@eurocom.od.ua