HDTenEightyP/NetNews huggingface dataset:
From: prikala@cs.joensuu.fi ( Pasi Rikala)
Subject: Sun Common Lisp & Foreign functions
Keywords: foreign functions
Organization: University of Joensuu
Date: Thu, 10 Sep 1992 12:26:29 GMT

Hello Lisp-Gurus 

I have this strange problem with Sun Common Lisp when trying to use 
functions originally written with c. 
 
My c-function is like this: 
 
/* mytest.c */ 
int my_sleep() 
{ 
        int i; 
 
        i = sleep(10); 
        perror("After Sleep"); 
        return(i); 
} 
 
I compile it with "cc -c" to "mytest.o"
And on lisp I say: 
(def-foreign-function (my_sleep         (:return-type :signed-32bit) 
                                        (:name "_my_sleep") 
                                        (:language :c))) 
 
(load-foreign-files "mytest.o") 
 
 
When I call it with (my_sleep), it does not sleep 10 seconds as supposed 
but still returns 0: 
> (my_sleep) 
After Sleep: Interrupted system call 
0 
> 
 
Same thing happens every time I call sleep from my functions.

My question is: What am I doing wrong? Why is sleep interrupted? 
How can I tell lisp not to interrupt foreign functions when they 
seem to be sleeping?


Pasi Rikala	(prikala@cs.joensuu.fi)
From: William.Lott@cs.cmu.edu
Newsgroups: comp.lang.lisp
Subject: Re: Function to print in #S format
Date: 9 Sep 92 14:12:26 GMT
	<19920909004003.1.GADBOIS@CLIO.MCC.COM>
Organization: Carnegie Mellon, Pittsburgh, PA

gadbois@mcc.com (David Gadbois) writes:
> Note that CMU CL v15 did not let you use structure types as
> specializers, so this will not work there.  I have not checked v16 yet
> to see if they have fixed it.

I don't remember about 16d, but 16e does support structure
specializers.  But the following should work in either version:

	(c::default-structure-print structure stream depth)

-William Lott
CMU Common Lisp Group
Xref: sparky comp.lang.lisp:2420 comp.lang.scheme:2182 news.answers:2883
From: charest@Aig.Jpl.Nasa.Gov (Len Charest)
Subject: Re: Function to print in #S format
Followup-To: comp.lang.lisp
Reply-To: charest@aig.jpl.nasa.gov
Organization: NASA/Jet Propulsion Laboratory
Date: Wed, 9 Sep 1992 01:10:22 GMT

In article <SJAMESON.92Sep8161926@fergie.dnet.ge.com>, sjameson@fergie.dnet.ge.com (Stephen M Jameson) writes:
|> I would like to have a :PRINT-FUNCTION
|> specified in the DEFSTRUCT which will print in a concise, non-readable format
|> if a certain switch is set, and print in the verbose, readable format 
   [i.e., #S syntax]
|> if the switch is not set. 

The following long-winded reply assumes that you are really trying to
solve the following two problems: switch between concise and verbose
printed representations of structures; and ensure a printed
representation such that "the reader will automatically reconstruct the
structure".

There is no one variable or function built into CL that will provide
this behavior. DEFSTRUCT does not provide a handle on the #S structure
printer that the Lisp implmentation is required to have. The #S printer
returns "whatever object the constructor macro [for the structure]
returns" (CLtL2, p. 537) *not* an object that is EQ to the object being
printed. And the situation is further complicated by the new global
variable *PRINT-READABLY*, which when it's value is TRUE (or maybe
non-NIL) then "printing any object must ... produce a printed
representation that the reader will accept [and] ... on reading the
printed representation, produce an object that is 'similar as a
constant' to the object that was printed." (CLtL2, p 557) The #S
printer and *PRINT-READABLY* would then seem to be at odds with one
another.

Section 25.1.4 explains the notion of 'similar as a constant' and
suggests that MAKE-LOAD-FORM be used for constructing such objects at
*load time*.

Some suggestions:

1. Define your own switch *PRINT-CONCISELY* and make all of your
structure print-functions obey it. Yes, this means you must explicitly
check the switch in your code, but you may exploit
PRINT-UNREADABLE-OBJECT to handle printing when *PRINT-CONCISELY* is
non-NIL (probably the default value). Also, PRINT-UNREADABLE-OBJECT
obeys *PRINT-READABLY* as an added bonus.

2. If you really want structures to print as #S( ... ) when your switch
is NIL (not set) then you have to maintain the names of the slots of
the structure yourself. Yes, it looks like the implementation must
already maintain that info, since #S itself prints the names of the
slots, but no handle on the slot-name info is provided. (You could
write code that had read-time conditionals for specific Lisp
implementations, but in your post you mentioned you were worried about
portability.) As an alternative you could define your own # macro
character that accepted positional arguments for structure slot values
instead of keyword arguments.

3. (mutually exclusive) Use CLOS. Ha Ha only serious.
..................................................
                                  Len Charest, Jr.
                 JPL Artificial Intelligence Group
                          charest@aig.jpl.nasa.gov
Newsgroups: comp.lang.ada
From: goodsenj@ajpo.sei.cmu.edu (John Goodsen)
Subject: Re: Wanted: User Interface tools recommendations
Organization: Ada Joint Program Office
Distribution: usa
Date: Tue, 15 Sep 1992 16:15:37 GMT

>
>I am looking for recommendations on user interface tools especially those with
>Ada interfaces. I have the following suggestions already:
>
>TAE+ : A NASA developed and owned tool.
>SAMMII : A tool developed by SSI in support of the Space Station Program.
>
>Any help would be appreciated.
>

Check out GRAMMI.  Written entirely in Ada for Ada developers.
It has a GUI builder which spits out your Ada specs for you.
Motif 3D look and feel on all of it's widgets, plus widgets
you don't find in other toolkits...

see:       Jennifer Lott
           EVB Software Engineering, Inc.
           1-800-877-1815
           grammi-info@evb.com
           info@evb.com

PS:  To the comp.lang.ada FAQ keeper, are the Ada GUI
     builders and graphics packages in the FAQ?

John Goodsen
goodsenj@ajpo.sei.cmu.edu
From: alex@cs.umd.edu (Alex Blakemore)
Newsgroups: comp.lang.ada
Subject: Re: Detecting EOL with SEQUENTIAL_IO!!!!!!!
Date: 6 Sep 92 03:57:39 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742

In article <1992Sep5.160811.1@vmsclst1.sc.csupomona.edu> mgeorgy@vmsclst1.sc.csupomona.edu writes:
> Hello, I have noticed that the package SEQUNTIAL_IO does not have
> END_OF_LINE(filename) like TEXT_IO.  Is there a way to get around this (ie
> writing my own, or does one already exist???).

Sequential_io manages files that are logically a sequential stream of
objects of type X, where X may be (almost) any single data type of
your choice.

The concept of end_of_line (or even just line) just doesn't make sense
with sequential io.  You can read one object of type X after another.
c'est tout.

Direct_io is similar but provides (surprise) direct access.

Text_io is a very different beast with an idea of a lines of
characters and pages of lines.  Text_io usually writes and reads the
natural text file on the system, which in Unix for example is a stream
of characters some of which may be line feed characters.  In such an
environment, text_io is not very different in practice from
sequential_io instantiated with type character.  I assume this is what
you are doing.  VMS represents text files differently by the way.

The fact that you are viewing your file as lines of text suggests that
you may be using the wrong IO package for your application.  Text_IO
may be more appropriate - in which case end_of_line is provided.  You
can still read the file character by character using get if you
prefer.  It may be easier to port to other systems if you don't embed
the knowledge of how lines are separated in text files inside your
program.

Or perhaps you should use sequential io on your data type and forget
about lines and characters altogether.  This can be very convenient.
But then there is no reason to expect that you can read and write
such files except via your programs.  Don't expect them to make any
sense in a text editor.

If you must do this.  On a Unix system, you can detect a new line in a
text file by comparing the last character read with ascii.lf.
-- 
---------------------------------------------------
Alex Blakemore alex@cs.umd.edu   NeXT mail accepted
From: ae@sei.cmu.edu (Arthur Evans)
Newsgroups: comp.lang.ada
Subject: compilers written in Ada (was: 20K expressions)
Date: 13 Sep 92 19:25:14 GMT
Organization: Software Engineering Institute

In my observation, any product used heavily by the folks who develop it
has a lot of advantages.  One of the biggest is the absence of rough
edges.  All little annoyances in usage come forcibly to the attention
of those best positioned to fix them -- and they do so.

As for compiling the compiler being a good test: No single test is
adequate, and a vendor requires an extensive test suite of programs.
However, to the extent that a compiler stresses corners of the
performance envelope missed by other tests (and I think it does), self
hosting is a useful contribution to quality.

Art Evans
----------------------------------------------
Arthur Evans, Jr, PhD           Ada Consultant
461 Fairview Road
Pittsburgh PA  15238-1933
412-963-0839
ae@sei.cmu.edu
Newsgroups: comp.lang.ada
From: edm@verdix.com (Ed Matthews)
Subject: Re: Ada Development Environments
Organization: Verdix Corp.
Date: Tue, 15 Sep 1992 19:03:36 GMT

In article <16863969A.M19481@mwvm.mitre.org> M19481@mwvm.mitre.org writes:
>I am trying to find information about Ada Development Environments.  If you
>know of any other than Rational (which I am already investigating), I would
>appreciate a lead.  Thanks...
> 
>David Hite - dhite@mitre.org

You might enquire about VADSpro from Verdix. VADSpro is software engineering
environment that is available on a number of popular UNIX workstations.
Contact one of the following or your local Verdix sales rep:

Tim Ruhe
Director of Marketing
(703) 318-5800

Lynn Campbell
CASE Marketing
(703) 318-5800
-- 

Ed Matthews                                                edm@verdix.com
Verdix Corporation Headquarters                            (703) 318-5800
Herndon, Virginia
Newsgroups: comp.lang.ada
From: eachus@Dr_No.mitre.org (Robert I. Eachus)
Subject: Re: pragma INLINE
Organization: The Mitre Corp., Bedford, MA.
Date: Mon, 14 Sep 1992 20:55:08 GMT

In article <1992Sep10.154342.6109@relay.nswc.navy.mil> bwallet@apssgi.nswc.navy.mil (Brad Wallet) asks:

 > Can pragma INLINE be used with a function created by pragma INTERFACE to
 > C code?

    It's legal, but I can't imagine that any compiler would do the
inlining. (Pragma INLINE is a classic pragma in that it includes
advice to the compiler--please put this in line.  Pragma INTERFACE on
the other hand probably should have been a representation
specification.  A compiler must obey it or reject the program.)



--

					Robert I. Eachus

with STANDARD_DISCLAIMER;
use  STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
Newsgroups: comp.lang.ada
From: breland@mcc.com (Mark Breland)
Subject: Ada Object Oriented development tools???
Summary: Looking for object oriented in all the wrong places...
Keywords: OO, object oriented, development, tools
Organization: MCC, Austin, TX
Date: Mon, 14 Sep 1992 23:06:54 GMT

Looking for information from knowledgeable Ada developers concerning Ada object
oriented development tools.  We are launching an Ada development effort that
requires the usage of such tools, and are thus extremely receptive to any
anecdotal contributions, suggestions, or recommendations.  Direct e-mail
to breland@mcc.com is preferred; however, posted replies are welcome as well.

Thanks!

-- 

 /\/\((  /\/\((  /\/\((  /\/\((  /\/\((  /\/\((  /\/\((  /\/\((  /\/\((  /\/\((
 /\/\((  Mark A. Breland         /\/\((  Microelectronics and Computer   /\/\((
 /\/\((  Project Leader - AFT    /\/\((    Technology Corporation        /\/\((
From: eachus@Dr_No.mitre.org (Robert I. Eachus)
Subject: Re: Variant Record Defaults
Organization: The Mitre Corp., Bedford, MA.
Date: Tue, 8 Sep 1992 16:43:40 GMT


In article <1992Sep2.223807.9217@netfs.dnd.ca> BERRYMAN@orca.drep.dnd.ca (DON BERRYMAN) writes:

   Please concider the following code fragment:

	package dstring is
	    type text (maxlen: positive := 64) is private;
             ...
        end dstring;

	procedure useit is
	   type buffer is record
		data: dstring.text;
	   end record;
	   aaa: buffer;
	   bbb: dstring.text;
	begin
	   null;
	end useit;
        ...

   I'm sure the reason is given in an obscure section of the LRM...

   No, it's an implementation issue.  (Hint: What is the maximum size
of an object of type buffer...)  Most compilers today can deal with
huge varying size obects which depend on a discriminant of the type,
but not which depend on buried discriminants.  In any case the
solution is simple.  Choose a "reasonable" maximum size for the
discriminant and declare a subtype with that limit:

        subtype my_positive is range 1..40000;

	type text (maxlen: my_positive := 64) is private;

    If you really need huge strings, you're going to have to use
explict pointers and manage the memory yourself.

--

					Robert I. Eachus

with STANDARD_DISCLAIMER;
use  STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
Newsgroups: comp.lang.ada
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Case errors
Organization: George Washington University
Date: Sat, 5 Sep 1992 15:54:34 GMT

In article <tp923021.715674752@ash> tp923021@ash.canberra.edu.au (Ben Elliston) writes:

[stuff deleted]
>
>"Incomplete case in middle of range"
>
>The portion of code generating this error is:

It's not clear what Symbol's type is. If it is Character, then you need 
a WHEN OTHERS choice to absorb uninteresting values of Symbol. An Ada
CASE statement requires all values of the selector variable to be covered
by choices.
>
>CASE Symbol IS
>  WHEN "(" | "[" | "{" => Push(Symbol,S);  -- Push the symbol onto stack
>  WHEN ")" | "]" | "}" => 
Also, you have a syntax error here: the double quotes (string quotes)
must be single quotes (character quotes).

>    IF Empty(S) THEN -- The stack is empty?
>      Valid := False;
>    ELSIF Match(Top(S),Symbol) THEN  -- The closing symbol matches
>                                     -- the opening symbol on the stack
>      Pop(S);
>    ELSE
>      Valid := False;
>    END IF;
>  Text_IO.Get(Item => Symbol);
>END CASE;
>
Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman
co-chair, SIGAda Education Committee

Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)

"Americans wants the fruits of patience -- and they want them now."
------------------------------------------------------------------------
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.lang.ada
Subject: Re: AI and Ada (Was: Multiple Inheritance -- the last post?)
Date: 9 Sep 92 06:23:22 GMT
Organization: Comp Sci, RMIT, Melbourne, Australia

In article <1992Sep8.195650.5728@sei.cmu.edu>, jldh@sei.cmu.edu (Jorge Luis Diaz-Herrera) writes:
> Briefly, Ada83 satisfies most "special" AI programming requirements,

I like Ada, but _this_ I have trouble with.

> although a complete solution to the problems is still lacking, Ada9X promises
> to be an excellent software engineering (concurrent) language strongly
> supporting many typical AI programming paradigms (such as, functional
> programming, logic programming, frames, and, of course, "programs as data",
> not to mention object-oriented technology).

I have read several of the Ada9X documents, and really appreciate all the
work that has gone into it.  There's some wonderful stuff coming.  Now, I
haven't read _all_ the Ada9X documents (I don't think the department has
enough paper), so I missed the bit where they were going to add support
for logic programming.  It really does come as a surprise that Ada9X will
"STRONGLY SUPPORT" logic programming.  I would definitely like to hear more
about this, and I'm sure many other comp.lang.ada readers would too.

> p.s.: by the way, studies have shown that Ada is several times more efficient
> than traditional interpreted AI languages (just in case you are worried about
> efficiency considerations).

This is a very curious and rather irrelevant assurance.  The AI languages
_I_ use have compilers.  Reasonably good ones.  How does Ada-for-AI compare
against traditional (dynamically) *compiled* AI languages?  (Take as
reference points SICStus Prolog generating native code, MIT Scheme generating
native code, and CMU Common Lisp.  While you're at it, you might try SML/NJ.)

-- 
You can lie with statistics ... but not to a statistician.
Newsgroups: comp.lang.ada
From: anderson@dseg.ti.com (John Anderson)
Subject: Verdix vs Telesoft on Sun
Organization: TI-DSEG Spring Creek
Reply-To: anderson@dseg.ti.com
Date: Fri, 11 Sep 1992 22:19:20 GMT

I am interested in hearing from anyone who has any knowledge of how the Verdix and 
Telesoft self targeted Sun Sparc based compilers compare in terms of code size 
efficiency.

If anyone has this information or similar information for another target, please
let me know.

Thanks

John Anderson
From: un040337@wvnvms.wvnet.edu
Newsgroups: comp.lang.ada
Subject: Info anout JANUS ADA compiler ??
Date: 13 Sep 92 04:34:59 GMT
Organization: West Virginia Network for Educational Telecomputing


Hi everybody out there,
I am thinking about getting an ADA compiler for my PC (486).
The add I am looking at offers Janus/Ada x86 compiler for $99.
Does anybody know anything about this compiler ?
I link to do graphics and somtimes BIOS stuff, is that possible
with this compiler?
I would also welcome suggestions about other ada compilers.

			Thanks for your time
			Andy UN040337@wvnvms.wvnet.edu
Newsgroups: comp.lang.ada
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Info anout JANUS ADA compiler ??
Organization: George Washington University
Date: Mon, 14 Sep 1992 04:09:33 GMT

In article <1992Sep12.234255.3607@wvnvms.wvnet.edu> un040337@wvnvms.wvnet.edu writes:
>
>Hi everybody out there,
>I am thinking about getting an ADA compiler for my PC (486).
>The add I am looking at offers Janus/Ada x86 compiler for $99.
>Does anybody know anything about this compiler ?
>I link to do graphics and somtimes BIOS stuff, is that possible
>with this compiler?
>I would also welcome suggestions about other ada compilers.

For the money, you are better off with Meridian. If you are a student, you
can pay $99. for a nice package including integrated editor (less polished
than Borland but in the same genre), compiler, linker, debugger, and
libraries including some graphics, math, DOS interface, etc.

Call 800-221-2522; ask for LInda Souza. They take VISA.

I have no connection with Meridian; I just like their software and their
student-friendly attitude.

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman
co-chair, SIGAda Education Committee

Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)

"Americans wants the fruits of patience -- and they want them now."
------------------------------------------------------------------------
Newsgroups: comp.lang.ada
From: dudek@acsu.buffalo.edu (David T. Dudek)
Newsgroups: comp.lang.ada
Subject: FTP site for ADA compiler for IBM-PC?
Date: 14 Sep 92 15:54:10 GMT
Organization: UB

I'm a CS student learning ADA, and I would like to 'play around' with it on
my 286XT-clone at home.  Does anyone have any info about a shareware or
public domain compiler that I can obtain?  One similar to the VERDIX
version would be very helpful.


-- 
--David Thomas Dudek  aka: the "DUDE"  |  "The opinions expressed are those of
  University at Buffalo                |   my alter id, and do not reflect     
  V098PWXS@UBVMS.CC.BUFFALO.EDU        |   gamma rays in any way, shape or 
  dudek@acsu.buffalo.edu               |   form."
Newsgroups: comp.lang.ada
Subject: Detecting EOL with SEQUENTIAL_IO!!!!!!!
From: mgeorgy@vmsclst1.sc.csupomona.edu
Date: 5 Sep 92 16:08:11 PDT
Organization: Computer Science Computational Systems
Nntp-Posting-User: cvajz000

Hello, I have noticed that the package SEQUNTIAL_IO does not have
END_OF_LINE(filename) like TEXT_IO.  Is there a way to get around this (ie
writing my own, or does one already exist???).

Thanx,
Matt Georgy
California State Polytechnic State University, Pomona  -- Computer Science
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+When It Absolutely, Positively, Has To Be Taken Out Overnight!!!+
+                                                                +
+                                           -- Team Stealth      +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
From: crispen@iceman.boeing.com (crispen)
Newsgroups: comp.lang.ada
Subject: Re: Play 20K expressions again, Sam
Date: 4 Sep 92 13:35:02 GMT
Organization: The Internet

emery@mitre-bedford.arpa  (David Emery) sez:

>I've run into the "damn Verdix bug" limit on number of branches in a
>case statement a couple of times.

Oh, please don't get me started on their case statements!  Have you
seen the code they generate?  Compare and branch, compare and branch...
Hasn't anyone there heard of a jump table?  The foregoing is about
their 5.4.1 compiler (I think) which is on VADSWorks 1.2(?) (VxWorks
4.0.2-based).  Haven't looked at the newer versions yet, so if they've
fixed it, IT'S ABOUT TIME!!!

Bob Crispen
Pretty near ready to post the multiple inheritance summary.
crispen@foxy.boeing.com
Newsgroups: comp.lang.ada
From: cobarruvias@asd2.jsc.nasa.gov
Subject: Wanted: User Interface tools recommendations
Organization: NASA/JSC
Distribution: usa
Date: Tue, 15 Sep 1992 14:31:22 GMT

I am looking for recommendations on user interface tools especially those with
Ada interfaces. I have the following suggestions already:

TAE+ : A NASA developed and owned tool.
SAMMII : A tool developed by SSI in support of the Space Station Program.

Any help would be appreciated.

*****************************************************************
John R. Cobarruvias, Texas A&M Class of '78, 
NASA Johnson Space Center Houston Tx.
(713)483-9357

"And to think..................I hesitated" (Hellraiser II)
*****************************************************************

Newsgroups: comp.lang.ada
From: braun@EUROPA.ENG.GTEFSD.COM (Chris Braun  x4475)
Newsgroups: comp.lang.ada
Subject: proving program correctness
Date: 8 Sep 92 15:15:19 GMT
Organization: The Internet

Not precisely an Ada question, but one I expect some of you can help with:

I'm looking for a VERY introductory book (or perhaps paper) on the subject of
proving program correctness -- on techniques for constructing provably 
correct programs and for verifying their correctness.  A student in an 
evening course I teach has gotten very interested in this subject and would
like to pursue some independent study in the area.  He's just starting in a
CS masters program but has a background in operations research -- not much
traditional CS so far.

Any help would be appreciated.

Chris Braun
braun@europa.eng.gtefsd.com
Newsgroups: comp.lang.ada