HDTenEightyP/NetNews huggingface dataset:
From: dag@seldon.control.lth.se (Dag Bruck)
Newsgroups: comp.lang.ada
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Date: 15 Dec 92 13:55:39 GMT
Organization: Department of Automatic Control, Lund, Sweden

In <comp.lang.ada> rlk@VisiCom.COM (Bob Kitzberger) writes:
>Experienced C programmers have rules of thumb that they follow in order
>to help them to avoid language "problems".

I also think we can close this discussion now.

Anyone interested in the problems of C should read the following
excellent book:

	Andrew Koenig: C Traps and Pitfalls, Addison-Wesley.

Dag Bruck
From: erickson@atlas.cs.nps.navy.mil (David Erickson)
Newsgroups: comp.lang.ada
Subject: Turtle graphics package wanted
Date: 17 Dec 92 21:55:58 GMT
Organization: Naval Postgraduate School, Monterey CA

I would like to be able to assign projects to second quarter CS students
that involve limited graphics output capabilities, something on the
level of sprites.  An example assignment would be to animate sort routines
on linked lists, or a simple board game.  Are there any public domain
graphics packages which are compatible with Sparc Verdix Ada or Meridian
Ada?

Thanks for your help.

-Dave Erickson
Naval Postgraduate School
Monterey, CA  93908
erickson@cs.nps.navy.mil
Newsgroups: comp.lang.ada
From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
Subject: Re: Gunslingers
Organization: Texas Instruments Inc
Distribution: world,local
Date: Mon, 14 Dec 1992 17:35:55 GMT

In <1992Dec13.143600.4111@arizona.edu> frank@evax2.engr.arizona.edu (Frank Manning) writes:

>The following is submitted in honor of a certain well-known movie, which is
>being broadcast on TV tonight (13 Dec) in the US:

 [Flame deleted]

All very nice, and it sure makes a convincing case for Ada, wouldn't
you say?  Of course, if you're interested in facts or reason, you'll
have to look elsewhere, but as for Frank Manning, he doesn't need any
of those things.  He has a Mandate.

>-- Frank Manning                                   -- Std disclaimer
>-- College of Engineering and Mines                --
>-- Civil Engineering 100, University of Arizona    --
>-- Tucson, AZ  85721  frank@evax2.engr.arizona.edu --
-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
From: eachus@oddjob.mitre.org (Robert I. Eachus)
Newsgroups: comp.lang.ada
Subject: Re: Language pitfalls (was Re: FORTRAN bug)
Date: 17 Dec 92 01:31:21 GMT
	<1992Dec15.180821.17817@beaver.cs.washington.edu>
	<1992Dec15.203558.18211@inmet.camb.inmet.com>
	<EACHUS.92Dec15202249@oddjob.mitre.org> <256@visicom.com>
Organization: The Mitre Corp., Bedford, MA.


In article <256@visicom.com> rlk@VisiCom.COM (Bob Kitzberger) writes:

   Robert, I can't think of a reason to have a function that does nothing
   but raise an exception... can you provide an example?  (I'm not
   questioning the need for it -- just curious)

   Stubbing is the major reason for doing this, i.e. something not
available in the current version of the software, but the interface is
provided.

   Another case is where a generic requires an operation as a formal
parameter which is meaningless for a particular actual.  There are
cases where providing a function which raises an error is more useful
than rewriting the generic.  For example, assume you have a "standard"
interface to IO devices, for some current_position would return a
value, for other devices the function of the same name would
immediately raise an exception.

   A more subtle use in when you are not sure an obsolete interface
or object can be eliminated.  Putting in a function which prints a
meaningful message then returns is more polite than ripping it out,
and waiting until some user of the package screams.

   One more use I have found was for a private type where user created
objects were verboten.  (Put in a component with such a function as
the default initial value.  User created objects will cause the
function to be evaluated.)

   Lots of uses, but only the difficulties the rule creates in
stubbers is compelling.

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
Newsgroups: comp.lang.ada
From: ae@sei.cmu.edu (Arthur Evans)
Subject: Re: Open Systems closed to Ada?
Cc: mfeldman@seas.gwu.edu
Fcc: +inbox
Organization: Software Engineering Institute
Date: Sun, 13 Dec 1992 15:15:15 EST

mfeldman@seas.gwu.edu (Michael Feldman) says:
>> My experience is that the projects are sufficiently complex that the
>> numbers can be cooked to show savings or lack of savings according to
>> the motive of the writer. Lots of people are trying to show that Ada
>> saves money, and because they want these numbers to come out right,
>> they do. Others want just as desperately to show no savings, and I'm
>> sure the numbers would come out their way too. Maybe I'm too cynical,
>> but I don't put all that much faith in these arguments, one way or
>> the other.

True, of course.  Nonetheless, the paper "Ada Outperforms Assembly: A
Case Study" (citation below) given at TRI-Ada '92 last month is surely
relevant.  I quote the abstract in its entirety:

    With the intent of getting an Ada waiver, a defense contractor wrote
    a portion of its software in Ada to prove that Ada could not produce
    real-time code.  The expectation was that the resultant machine code
    would be too large and too slow to be effective for a communications
    application.  However, the opposite was verified.  With only minor
    source code variations, one version of the compiled Ada code was
    much smaller while executing at the same speed, and a second version
    was approximately the same speed but much faster than the
    corresponding assembly code.

What was interesting here is that they intended to prove Ada inadequate
and ended up proving just the opposite, somewhat to their initial
dismay.  Details are in the paper, which I commend to your attention.

Here are two quotes from the paper, both being paragraphs quoted in
their entirety:

    How can a compiler for a high-order language beat assembly code in
    both size and performance?  It is because of a reasonably high level
    of maturity on the part of compiler development in general and the
    compiler vendor in specific.  When a vendor brings a wealth of
    experience to bear on optimization, it goes beyond the capabilities
    of any one individual, no matter how experienced.

    QRS [the pseudonym for the defense contractor, which is not
    identified] is convinced.  It has now decided to use Ada extensively
    because it believes the use of Ada will provide the company with a
    competitive edge in the market place.

The paper is by Patricia K Lawlis and Terance W Elem and appears on
pages 334-337 of the Conference Proceedings.  I suspect that you can get
a reprint from Tartan, which is rather proud of the fact that their
compiler was used.

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: larry@peak.nmsu.edu (Evil Engineer doin' it the Cowboy Way)
Subject: Ada recommendations?
Organization: New Mexico State University, MetaPhysical Science Laboratory
Distribution: comp.lang.ada
Date: Mon, 14 Dec 1992 23:41:28 GMT

Hello all.

I've been lurking now for some time, and now I find myself needing to find
a workable multitasking environment for DOS 5.0/Windows 3.1. Although I'm
a hardware design engineer, I do most of my own software to test hardware
in Stony Brook Modula-2 and bits of Assembler. I've found this a superior
and workable replacement for C, which I *used* to think was the language I
needed for this kind of work.

I've had an introductory class in Ada, and used an early version of the
Meridian compiler for awhile. I liked a lot about the language, plus I have
been impressed with a very successful use of Ada for all flight and GSE
software for high altitude, long duration (up to 30 days) balloon flight
and GSE software, developed with Alsys Ada.

Anyway, I'd be very interested in hearing your recommendations and
comments.

Thank you in advance.

L.
"Yeh, Buddy..            | larry@psl.nmsu.edu (Larry Cunningham)|  _~~_
 I've got your COMPUTER! | % Physical Science Laboratory        | (O)(-)
 Right HERE!!"           | New Mexico State University          |  /..\ 
 (computer THIS!)        | Las Cruces, New Mexico, USA 88003    |   <> 
--------------------------------------------------------------------------
Disclaimer: Opinions expressed here are CORRECT, mine, and not PSLs or NMSUs..
Tularosa: tullies, roses, lava, white sands, and home of THEM! (atomic ants).
From: alex@cs.umd.edu (Alex Blakemore)
Newsgroups: comp.lang.ada
Subject: Re: IBM & Air Traffic Control
Keywords: Big Screwup
Date: 12 Dec 92 20:01:08 GMT
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742

In article <1992Dec12.002523.27592@beaver.cs.washington.edu> pattis@cs.washington.edu (Richard Pattis) writes:
> Anyone know more about the project. I thought the air traffic control stuff was
> being done "mostly" in Ada; if not, anyone know what language was used. Even
> better, anyone know what is "really" behind the delay.

Everyone I've ever talked to about that project was horrified - sure its being
done in Ada, but on IBM hardware with IBM management and IBM engineering.
In the early days, I was told their coding standards even forbade private types,
talk about the last thing you want to do on a large complex system.
It sounds like this was a disaster before they ever got to code.
Though you're right it doesnt help Ada.  (What do you think Ted?) (just kidding)

Plan on taking the train for a few years after they introduce this thing.

-- 
---------------------------------------------------
Alex Blakemore alex@cs.umd.edu   NeXT mail accepted
From: jordan@IMSI.COM (Jordan Hayes)
Newsgroups: comp.lang.tcl
Subject: Re: Destroying interpreters
Date: 15 Dec 92 21:20:04 GMT
Organization: Investment Management Services Inc., NYC

Gerald W. Lester <gwlester@cpu.com> writes:

	The problem comes in that since Tcl_eval is in the middle of
	processing a procedure it then tries to access the interpreter
	data structure for the next line of code to execute and dies!

We experience a similar problem with a function that gets called by
Tcl_Eval() wants to send more code to the interpreter ... things get
stepped on (but Purify doesn't complain! -- weird ...).  I've taken to
setting a zero-length timeout to let the callback unwind and let the
main loop process some more events, but there's a window of
vulnerability that looks ugly ...

/jordan
Newsgroups: comp.lang.tcl
From: chetal@is.morgan.com (Pradeep Chetal)
Subject: How can I reduce the size of '.' window in the running application?
Organization: Information Services, Morgan Stanley, NYC
Date: Fri, 18 Dec 1992 08:01:40 GMT


I create a frame '.frame1' which takes a lot of space & 
	pack append . .frame1 {}
causes the application window to increase in size.

As a result of a button press, I would like to replace .frame1 BY .frame2 
which is MUCH smaller in size. When I do a
	destroy .frame1
	pack append . .frame2 {}
I want the application window to shrink to .frame2 size.

How can I do this? 

In addition, how do X resources added via 'option' mix with .Xdefaults added
via xrdb?

Thanks,

/Pradeep
--
----------------------------------------------------------------------------
Pradeep Chetal		UUCP:	...!uunet!is.morgan.com!chetal
Morgan Stanley		Internet: 	chetal@is.morgan.com
1633 Broadway,		Phone:		(212) 703-2220 (O)
NY, NY 10019				(212) 703-2371 (FAX)
            _______________    __o
        _________________     -\<,
                        ......O/ O
From: joel@saffron.CS.Berkeley.EDU (Joel A. Fine)
Newsgroups: comp.lang.tcl
Subject: Re: Commercial applications in Tcl?
Date: 12 Dec 1992 00:03:44 GMT
Organization: University of California, Berkeley
Distribution: world
NNTP-Posting-Host: saffron.cs.berkeley.edu

In article <1992Dec11.224741.23471@wuecl.wustl.edu>, omar@wucs1.wustl.edu (Omar El-Ghazzawy) writes:
|> If you plan on writing the entire application in Tcl then I believe you have
|> a bit of a problem.  However, if you create a few objects in C and register
|> them as Tcl commands your problem may be solved.

Yes, that's the conclusion I came to. I'd be interested in a solution that doesn't
require C code, if anyone has thought of one.

- Joel

Newsgroups: comp.lang.tcl
From: jrohr@rasc.com (Jay J. Rohr)
Subject: Expect problems on ISC 3.0.1
Organization: Rohr Applied SYstems Corp., Sterling VA
Date: Sun, 13 Dec 1992 03:50:40 GMT

I'm trying to get expect 3.24.1 to run on ISC 3.0.1. Everything compiles fine
but when I try to run any command I get the error.

	invalid spawn_id (*)
    where n is some number

If I run the spawn command from the expect prompt, it executes without error.
( A ps shows the spawn(ed) process running ). But any command that tries to
use the connection - expect, generates the error.

Any ideas ??  Thanks

jrohr@rasc.com                  +---+    ^    +----  +----
Jay J. Rohr                     |   |   / \   |      |
Rohr Applied Systems Corp.      |---+  /---\  +---+  |
Sterling, Va.                   |  \   |   |      |  |
                                |   \  |   |  ----+  +----
-- 
jrohr@rasc.com                  +---+    ^    +----  +----
Jay J. Rohr                     |   |   / \   |      |
Rohr Applied Systems Corp.      |---+  /---\  +---+  |
Sterling, Va.                   |  \   |   |      |  |
From: sls@aero.org (Sam Shen)
Newsgroups: comp.lang.tcl
Subject: Tk3.0 bug?
Date: 18 Dec 92 16:36:17
Organization: The Aerospace Corporation
Distribution: comp
NNTP-Posting-Host: batcomputer.aero.org

This short script puts up a button and another toplevel window .hello.
The button alternately does a wm withraw .hello/wm deiconify .hello.
This works fine with tk2.3, but under tk3.0 the .hello window never
shows up.  I'm running on a sparc 2/SunOS 4.1.1/MIT X11R5.

	-Sam

toplevel .hello
pack append .hello \
    [label .hello.l -text "Hello, world!"] ""
wm withdraw .hello

pack append . \
    [button .b] "fill expand"

proc Show {} {
    wm deiconify .hello
    .b config -text "Hide" -command Hide
}

proc Hide {} {
    wm withdraw .hello
    .b config -text "Show" -command Show
}

Show

Newsgroups: comp.lang.tcl
From: tdoan@bnr.ca (Tuan Doan)
Subject: Help on reading shell variable/environment
Keywords: TCL/TK,variable,environment,shell
Organization: Bell-Northern Research, Richardson, Tx.
Date: Tue, 15 Dec 1992 20:49:40 GMT

Hello,

   Does anyone know of a way to read shell variable or environment variable
inside TCL/TK?  I need to access the TERM variable so that to prevent my
TCL/TK program from being run when the user is not in an X window environment.

Also, is there an easy way to implement set operations in TCL/TK?  For example,

   set lista [list a b c]
   set listb [list b c d]
   set listc [and lista listb]        -> listc={b,c}
   set listd [or lista listb]         -> listd={a,b,c,d}

One of the nifty functionality that TCL/TK provides is list.  Unfortunately,
no logic's operators on it.

Regards,

 __  __/  /   /   __  /    |   /    Tuan T. Doan
    /    /   /   /   /   / |  /     Advance Signalling Design
   /    /   /   __  /   /  | /      2201 Lakeside Blvd.  P.O. Box 833871
__/  ______/ __/ __/ __/  __/       Richardson, TX 75083-3871
                                    Phone: 6-444-4575/214-684-4575
Internet:  tdoan@bnr.ca             Fax:   6-444-3716/214-684-3716
      or   tdoan@x400gate.bnr.ca    
Newsgroups: comp.lang.tcl
From: trones@dxcern.cern.ch (Jostein Lodve Trones)
Subject: Changing a menuitem while selected
Reply-To: trones@dxcern.cern.ch (Jostein Lodve Trones)
Organization: CERN, European Laboratory for Particle Physics, Geneva
Date: Fri, 18 Dec 1992 09:19:59 GMT



I have this program where I invoke different procedures by selecting from
a menu. But sometimes I get an error, and it does not seem to be deterministic,
ie I am not able to reproduce the error, but it happens every now and then.

The error is
invalid command name : "83" <-- This is sometimes different, for instance
                                "ms" or other times a whole word taken from
                                one of my comment lines in the program...
  while executing
"error "invalid command name: \"$cmdName\""
     (procedure "unknown" line 32)
      invoked from within
"83"
       invoked from within
"$menu invoke $i"
       ("then" clause line 4)
       invoked from within
"if {$i != "none"} {
             tk_mbUnpost
             update idletasks
             $menu invoke $i
    }"
       (procedure "tk_invokeMenu" line 3)
	invoked from within
"tk_invokeMenu .TAPE_SERVERS.menu:c"    <---- This is just the name of the menu
        (command bound to event)

I am aware that the error may be difficult to find without having the source
code, (and that is quite long) so I will just ask two questions:

(1) The menu is named in the format .$window_name.menu:$menu_button_name
    Can a ':' in the name cause any problems?

(2) When a selection is made, let's say we select menuitem no 2, the invoked
    procedure will change the command bound to this menuitem, using
    ".$window_name.menu:$menu_button_name entryconfigure 2 -command ....."
    So I am actually changing the command bound to the event while I am
    executing the command that was earlier bound to the event.
    Can this cause the problem?

Thank's for any and all replies.

Cheers,
	Jostein
From: trier@slc6.ins.cwru.edu (Stephen C. Trier)
Newsgroups: comp.lang.tcl
Subject: Re: Destroying interpreters
Date: 16 Dec 1992 16:51:04 GMT
Organization: Case Western Reserve University, Cleveland OH (USA)
NNTP-Posting-Host: slc6.ins.cwru.edu

I solved this problem (on MS-DOS) with an ugly hack: The interpreter
that wants to die sets a flag (in C) that says "terminate this interpreter".
The main program loop (in C) periodically checks these flags and kills
any interpreters that need to terminate.

I ended up using this flag as a chance to kill the window associated with
the interpreter, too.  I could have used an interpreter-destruction callback,
but it seemed pointless when I couldn't destroy the interpreter from within
itself.

-- 
Stephen Trier                      "We want to offer you a price that you
Network software type               just can't afford to take advantage of."
Case Western Reserve University         - Sales blurb from HSC Software
trier@ins.cwru.edu
Newsgroups: comp.lang.tcl
From: root@choreo.ca (Superuser)
Subject: novice tk questions
Organization: Choreo Systems, Ottawa Canada
Date: Thu, 17 Dec 1992 16:05:40 GMT

Plaease forgive me for these questions.  I'm still rather new to this X
stuff, and I appreciate your indulgence.

I am re-writing an existing Perl application in tcl and tk, not because it
doesn't work in Perl, but because someone wants an X-version.

1.  I have a scrolled list setup, and I want to be able to determine the item
which was selected in the list.  How so I do this?  

2.  I would like to prevent the user from being able to select more than
one item in the list.

3.  I have a button binding set up as

	bind . <Double-Button-1> { DoSearch }

	but it doesn't call the subroutine.  No errors are displayed on stdout.

4.  There is an entry widget setup to collect some info from the user,
where does this info get stuffed, and how do I look at it?

5.  I noticed from an earlier posting that someone wanted a read-only entry
widget.  I will also be doing this as there are some dyanmic fields which
will be shown in the one of the windows.  How do I stuff the value into the
entry widget?

Thanks for the feedback!

Chris


-- 
????                --- It Always works for me! ---                           
Chris Hare, UNIX Scientist                  Preferred : chare@unilabs.org
Just a mild-mannered consultant by day ....
From: joel@saffron.CS.Berkeley.EDU (Joel A. Fine)
Newsgroups: comp.lang.tcl
Subject: Recursion in tcl?
Date: 15 Dec 1992 19:15:09 GMT
Organization: University of California, Berkeley
Distribution: world
NNTP-Posting-Host: saffron.cs.berkeley.edu

Hi,

Suppose I were crazy enough to write a recursive procedure in tcl. It's
pretty easy to blow past the hard-coded limit of 100 nested calls in that
case. Is there any way to dynamically increase that limit? Should there
be, in some future release of tcl?

- Joel Fine
joel@cs.berkeley.edu

P.S. Here's how to test that limit:

proc nest {i} {
  echo $i
  incr i
  nest $i
}

nest 1
Newsgroups: comp.lang.tcl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: Re: Recursion in tcl?
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Fri, 18 Dec 1992 18:35:55 GMT

I agree.  The recursion limit should be settable.
-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"In a minute, I'll burp up your droid."
Newsgroups: comp.lang.tcl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: minor tk3.0 problem: "make install" doesn't install prolog.ps
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Sat, 19 Dec 1992 05:15:25 GMT

A minor note:  "make install" in tcl6.5/tk3.0 doesn't install prolog.ps
into the lib directory, typically /usr/local/lib/tk.

The makefile needs an extra line to copy it over, or you can just 
cp tcl6.5/tk3.0/library/prolog.ps /usr/local/lib/tk

-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"In a minute, I'll burp up your droid."
Newsgroups: comp.lang.tcl,bnr.lang.tcl
From: norm@bnr.ca (Norm MacNeil)
Subject: Compiling tk2.3 on SUN Sparc
Reply-To: norm@bnr.ca
Organization: Bell-Northern Research Ltd.
Date: Fri, 18 Dec 1992 19:35:38 GMT

Well, the docs say it should compile Ok on the SUN Sparc; however, on the
Sparc 2 w/ SUNOS4.1.1 I get the following:

ld: Undefined symbol:
      _strtoul
      _strerror

Well, of course, man shows that "strtoul" & "strtoerror" do not exist.  So for
those out there who have already compiled it on a SUN Sparc, how did you get
around this?  Just wondering before I start delving into the code.

Thanks much,

  Norm.

+-----------------------------------------------------------------------+
 Norm MacNeil                     Phone: (613) 763-3372
 Data Systems                     Fax:   (613) 765-2854
 Bell-Northern Research Ltd.      EMail: norm@bnr.ca (INTERNET)
 #include <disclaimer.std>       "Roller bladers do it in-line!"
Newsgroups: comp.lang.tcl
From: karl@NeoSoft.com (Karl Lehenbauer)
Subject: Re: Tcl Lint?
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Sat, 19 Dec 1992 18:23:10 GMT
Keywords: lint

In article <1992Dec18.191930.12950@bnr.ca> nicholsg@bnr.ca (Geoff Nichols) writes:
>Are there any Tcl programs out there which can check a Tcl procedure for
>potential run-time errors which result in something like "can't read "x":
>no such variable"? Sorta like a Tcl lint program.

I haven't heard of one.

Things like "eval" makes the task problematic -- you could never be sure if
what a program gens up and passes to eval is correct.

However, it would still be desirable to have one that could do as much as
was reasonable such as no such variable and proc and command calls with the
wrong number of arguments.  The latter would catch the most common coding
error, I think.

The thing that keeps me from trying to knock something simple out in Tcl
is the relative difficulty of parsing Tcl procs from a Tcl proc -- square-
brackets aren't compatible with Tcl's list operators for walking through a 
proc as a list, for example.

-- 
-- Email info@NeoSoft.com for info on getting interactive Internet access.
"In a minute, I'll burp up your droid."
Newsgroups: comp.lang.tcl