HDTenEightyP/NetNews huggingface dataset:
From: schonber@acf3.NYU.EDU (Ed Schonberg)
Newsgroups: comp.lang.ada
Subject: Re: GNU-NYU Ada project
Date: 23 Nov 92 01:22:00 GMT
Organization: New York University

A few words of explanation about the figures in the GNAT progress
report.

The quoted performance (1,000,000 lines/min on a 16 mhz PC) is correct,
but it is the performance of a syntax checker, not a parser, i.e. the
recognizer does not build a parse tree. Apart from the parsing algorithm
(more of that below) what is critical to this performance is the coding
of the lexical scanner. It seems clear that this performance is not
achievable with a table-driven system.

Robert Dewar wrote the syntax checker precisely to compare the
performance of a top-down parser with  that of an LALR parser (in this
case, a highly optimized system written by Philippe Charles, with table
compression, and very effective error recovery). In addition to the
more than order-of-magnitude performance gain, the top-down parser is
much smaller (i.e. the total code is smaller than the LALR tables),
and its error recovery of comparable quality.

So why do people insist on the superiority of LALR methods? For one,
because tools allow anyone to produce working parsers with relatively
little effort. For another, because the Aho-Ullman text has been touting
the advantages of LALR for a decade, mostly out of fondness for what are
obviously very elegant algorithms. It is also said that error recovery
methods are easier to build into LALR parsers, but this is obviously not
the case: when parsing top-down you have a much better idea of what you
are looking for, and it is easier to resynchronize. Finally, in the case
of a language such as Ada, with a high density of keywords, it is very 
easy to write a top-down parser, and the actions per token are few,
which explains the overall performance. 

Of course, writing a top-down parser by hand still requires reasonable
skill and a close examination of the grammar of the language. but it
nowhere as fraught with peril as the Dragon book makes it sound.

Ed Schonberg
GNAT project
New York University

schonberg@nyu.edu
From: jhobson@SU19F.harris-atd.com (Harv Hobson)
Newsgroups: comp.lang.ada
Subject: Re: Outputting quote marks
Date: 23 Nov 92 13:52:57 GMT
Reply-To: jhobson@SU19F.UUCP (Harv Hobson)
Organization: ASD Software Systems Section, HARRIS Corp. Melbourne, Fl.

In article <By13E7.4q5@plato.ds.boeing.com> rosen@plato.ds.boeing.com (Robert Rosen) writes:
>I need to use Text_IO to output a string consisting of three
>consecutive quote marks (""").  How can I do it?  Trying 
>  Text_IO.Put_Line (""""");
>produces a compilation error.
>
text_io.put_line("""""""");

Harv Hobson
Newsgroups: comp.lang.tcl
From: farrar@adaclabs.com (Stephen Daedalus)
Subject: Re: Wanted: Geometry handlers like TeX Glue...
Organization: The Eye of the Pyramid, Inc.
Date: Wed, 18 Nov 1992 16:30:34 GMT

You could use the placer.  You can "place" a widget inside a "sibling" widget.

frame .frame
pack append . .frame {top expand fill frame center}
button .frame.foo -text "foo"
button .frame.bar -text "bar"
place .frame.foo -in .frame -x 0 -y 0
place .frame.bar -in .frame.foo -relx 3.0 -rely 2.5

The relx and rely options act sort of like glue.  See the man page for
place for more details.
---
Richard Farrar		These views are my own, not my company's or country's.
ADAC Laboratories	"A man without hand is not a man."
farrar@adaclabs.com		- George Costanza, Seinfeld
		Spam is a registered trademark of Hormel
Newsgroups: comp.lang.tcl
From: jkh@esel.lotus.com (Jordan K Hubbard)
Subject: Re: SOURCE - man.tk - gross little hack
Organization: Lotus Ireland
Date: Wed, 18 Nov 92 18:50:31 GMT

Cute presentation format - pity that 'man -D' works on so few
systems (tried it on Solaris 1 & 2, AIX, HPUX, 386BSD, zilch..).
Care to filter the output?

				Jordan
From: shite@sinkhole.unf.edu (Stephen Hite)
Newsgroups: comp.lang.tcl
Subject: Can <Tab> be used to change focus in forms?
Date: 18 Nov 92 04:42:37 GMT
Organization: Univ. of North Florida


Real beginner question (thanks in advance)...

    When creating a dialog using the Tk Toolkit (with wish), is
it easy to get the <Tab> key to act as a focus changer so a user
could easily go from one field to the next without using the
mouse?  That is, I'm looking for the functionality you'd get in a dialog
with Microsoft Windows.  


Steve Hite
shite@sinkhole.unf.edu
Newsgroups: comp.lang.tcl
From: davis@cs.cornell.edu (Jim Davis)
Subject: Does wish-mode.el exist?
Summary: would like an Emacs mode for sending commands to Tk applications.
Keywords: Emacs, wish
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Distribution: usa
Date: Wed, 18 Nov 1992 21:05:51 GMT


I know there are several versions of tcl-mode for Emacs.  Is there
something which allows one to run a wish shell as an inferior process,
sending command lines to it?  I know there are equivalent things for
Lisp, for instance.

Perhaps even more desirable would be the ability to use the Tk send
facility, so one could send commands to any running Tk program.  I
recall reading about a program to allow non-Tk programs to send to Tk,
but can't recall if it was an announcement of working code or a merely
the desire for it, as this is.
From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
Newsgroups: comp.lang.tcl
Subject: variable visibility problem
Date: 17 Nov 92 18:07:00 GMT
Organization: U. of Maryland/NIST

Hello!

I am somehow new to Tcl, so I apologize if the answer to my question
is obvious. It also may well be that there are better ways of
accomplishing what I want, in a way that makes my question
irrelevant---I ask for both answers and meta-answers.

I have the following problem in my Tcl/Tk script. I have a button that
opens up a canvas with a drawing. I want to be able to select a
magnification of this drawing, so next to this button I keep a slider;
I would select the zoom factor and then press the button that 
opens  the canvas window. A first attempt at this code was:
 
	pack append $w.plot \
          [scale $w.plot.zoom -label Zoom: -from 1 -to 10 -orient horiz \
	                       -command "set zoomfac"] {right} \
	  [button $w.plot.Qp -text "E-Q-space plot" -relief raised \
                        -command "MyPlot $num $w $zoomfac"] {right}

The scale widget sets the zoomfac local variable, and the button calls
my canvas painting procedure MyPlot with three arguments, the last of
which is the zoom factor.  Since the scale -command is executed both
when the widget is initialized and when the slider is moved, variable
zoomfac is always initialized.

Of course the code above does not work, because $zoomfac is evaluated
once at the creation of button, and the MyPlot command is called with
a constant argument. My second try was

	  [button $w.plot.Qp -text "E-Q-space plot" -relief raised \
                        -command {MyPlot $num $w $zoomfac}] {right}

but this in turn fails, because $num is not a valid variable in the
routine from which MyPlot is called.

I ended up setting a global variable SomeVar, set by 
 
 scale ...  -command "set SomeVar"

and read by MyPlot; but there oughta be a better way.

Thanks for your help
			przemek
--
			przemek klosowski (przemek@rrdstrad.nist.gov)
			Reactor Division (bldg. 235), E111
			National Institute of Standards and Technology
			Gaithersburg, MD 20899,      USA

			(301) 975 6249
Newsgroups: comp.lang.tcl
From: chetal@is.morgan.com (Pradeep Chetal)
Subject: Toplevel widget remains after destroy until I move cursor out of it!
Organization: Information Services, Morgan Stanley, NYC
Date: Wed, 18 Nov 1992 02:26:02 GMT


I have an application which pops up a toplevel widget.
When I quit the toplevel widget, the windows inside
the toplevel seem to unpack BUT the whitened widget remains until I move the
cursor outside the window in which case it disappears. BUT It remains there
until I move the cursor out of the window.

All I am using is 
	destroy TOP_LEVEL_WIDGET

Help will be mucho appreciated. I just started using Tcl/Tk and love it!

/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: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Upcoming Tcl/Tk events
Date: 23 Nov 92 16:43:46 GMT
Organization: U.C. Berkeley Sprite Project
NNTP-Posting-Host: tyranny.berkeley.edu


Here are a few upcoming events related to Tcl and Tk:

MIT X Conference, Jan. 18-20, 1993, Boston MA:
    - On Monday, Jan. 18, I'll be giving an all-day tutorial on Tcl and Tk.
    - On Tuesday, Jan. 19, I'll be giving a talk in the conference, on
      canvas and text widgets.
    - On Tuesday, Jan. 19, there will be a birds-of-a-feather session
      on Tcl and Tk.

USENIX Winter Conference, Jan. 26-29, 1993, San Diego, CA:
    - On Tuesday, Jan. 26, I'll be giving an all-day tutorial on Tcl and Tk.
    - There will probably be a Tcl/Tk birds-of-a-feather session also,
      but I haven't scheduled it yet.

If you know of anyone who's considered using Tcl and Tk but has been put
off by the lack of good introductory documentation, you might recommend
the tutorials to them.  Each of the tutorials will go over Tcl and Tk from
top to bottom, including both writing Tcl scripts and interfacing to the
libraries in C.  I hope that by the end of the day all of the attendees
will know enough to use both Tcl and Tk effectively.

If you're already familiar with writing Tcl and Tk scripts but would like
to learn about the C interfaces, then you might consider attending the
afternoon part of the tutorial (the morning portion gives an overview
and describes how to write Tcl/Tk scripts, and the afternoon discusses
the C interfaces).
From: capo@cs.utexas.edu (Charles Read)
Newsgroups: comp.lang.tcl
Subject: pathname of toplevel window in Tk
Date: 16 Nov 1992 19:14:12 -0600
Organization: CS Dept, University of Texas at Austin
NNTP-Posting-Host: im4u.cs.utexas.edu
Keywords: toplevel pathname Tk

version of Tk:  2.3

Is it possible to obtain the pathname
of a toplevel window whose menu (or one
of whose children's menus) has most
recently been activated?

The man page for canvas maintains a "current" 
variable that describes what Item in a canvas
presently lies under the mouse-cursor. This
suggests that somewhere in Tk the current 
toplevel window is known. But is the pathname
of this window accessible from the command-line
interface?

-c
From: ouster@sprite.Berkeley.EDU (John Ousterhout)
Newsgroups: comp.lang.tcl
Subject: Re: Multiple text-lines in buttons
Date: 20 Nov 1992 16:47:23 GMT
Organization: U.C. Berkeley Sprite Project
Distribution: world
NNTP-Posting-Host: tyranny.berkeley.edu

In article <1992Nov20.094418.5838@dxcern.cern.ch>, trones@dxcern.cern.ch (Jostein Lodve Trones) writes:
|> 
|> Is it possible to have two or more lines of text in a button?
|> 
|> I tried with a -text option like: -text "This is line 1 \n and this line 2"
|> but I still got them on the same line.
|> 
|> Thank's!
|> 
|> Cheers, 
|> 	Jostein

Right now this isn't possible.  You'd have to use a message widget
instead, but of course it doesn't have all the other properties of
buttons (you can define them yourself with bindings, though).
Newsgroups: comp.lang.tcl
From: pat@wrs.com (Patrick Boylan)
Subject: Any port to Mips Magnum yet?
Keywords: Mips
Reply-To: pat@wrs.com
Organization: Wind River Systems
Date: Fri, 20 Nov 1992 00:35:12 GMT

Has anyone ported Tcl to the Mips Magnum yet?
Thanks in advance.

- Patrick

-- 
 Patrick Boylan, Consulting Engineer, FAE Asia/Pacific
 Wind River Systems
 1010 Atlantic Ave. Alameda, CA  94501
 email: pat@wrs.com   tel: (510)748-4100   fax: (510)814-2010
Newsgroups: comp.lang.tcl
From: mh@awds.imsd.contel.com (Mike Hoegeman)
Subject: arTCLs and Re: what is "map" in a wish script?
Organization: GTE Weather Systems Group. Westlake VIllage CA.
Date: Wed, 18 Nov 1992 06:17:26 GMT

In article <mathew.722058866@henry> mathew@elroy.Jpl.Nasa.Gov (Mathew Yeates) writes:
>I want to try my hand at writing a Wish application. I am studying
>the arTCL's program to get a feel for things but I've got a problem.
>In the main routine is the line
>map .
>This bombs and I can find no reference to "map" in the manpages although
>it is mentioned once as a keyword under MapWindow.

The 'map' call was an undocumented command in older wishes. you can just take
the map call out. I think the latest version of arTCLs does not have the map
call in it. It was kind of a stupid thing to have in anyways. 
(Check the tcl archive for the latest version of arTCLs.)

BTW, Take some of the code in arTCLs  with a grain of salt. arTCLS was
written as a result of a bet with a colleague of mine that i could
write a newsreader entirely as a wish script in a couple of days.

I won by the way. :->
-- 
------------------------------------------------------------------------------
Mike Hoegeman               email: mh@wx.gtegsc.com  tel: (818)706-4145
GTE Weather Systems Group   31717 La Tienda Dr, Westlake Village CA. 91359
Newsgroups: comp.lang.tcl
From: scoob@bnr.ca (Christian Marcotte)
Subject: couldn't allocate a color for "#ffe4c4"
Organization: Bell-Northern Research, Ontario, Canada
Date: Thu, 19 Nov 1992 02:58:58 GMT



So this is my first Tk application.
Tk is the best thing since chocolate but I still have this little problem
when running my tk application on my color machine when I already a very
colorful background...

   couldn't allocate a color for "#ffe4c4"

Any ideas on how I could avoid that?

Thanks.

-- scoob


-- 
---------------------------------------------------------------------------
Christian Marcotte                Bell-Northern Research
scoob@bnr.ca                      3500 Carling Ave
Telephone: (613) 763-2782         Nepean, Ont., Canada K1Y 4H7
Newsgroups: comp.lang.tcl
From: dtailor@crc.ac.uk (Dilip Tailor x3296)
Subject: Information on Tcl/Tk frontend for Sybase??? 
Reply-To: dtailor@crc.ac.uk (Dilip Tailor x3296)
Organization: MRC Human Genome Mapping Project Resource Centre, Harrow, UK
Date: Thu, 19 Nov 1992 14:52:06 GMT


Hello World,

Sometime ago there was some info' on a Tcl/Tk frontend for Sybase.
Can someone please forward me some details.

Many Thanks,
Dilip Tailor
Xref: sparky comp.lang.tcl:1904 comp.lang.perl:7071 comp.lang.scheme:2618
From: beard@toadflax.cs.ucdavis.edu (Patrick C. Beard)
Newsgroups: comp.lang.tcl,comp.lang.perl,comp.lang.scheme
Subject: Re: Closures, Object-Oriented Equivalence, New version of Perl and TCL
Date: 15 Nov 92 21:46:42 GMT
Followup-To: comp.lang.tcl
Organization: Department of Computer Science, University of California, Davis

After thinking about the differences between objects and closures a little
while, I agree that closures and objects can represent more or less the
same concepts. Objects can be said to be closures plus syntactic sugar.

In my opinion, objects are closures with multiple entry points. In
message passing object models for scheme, the fundamental problem to
solve is how to look up a method by name. My current technique is to
create nested "methods" or allow closures to be added to the object
after the fact, and store these in association list inside the object.
Then I convert a symbol to a closure to call using "assq" to look it
up. Other methods I've seen amount to using a case statement, which seems
rather difficult to maintain, in my opinion, and makes it impossible to
add methods at runtime.

In C++, the compiler generates closures with multiple entry points.
Essentially an object is an environment that is shared by a group of
functions, very much like the way nested closures in Scheme share the
same environment.  Unfortunately, the language doesn't support an
automatic way to look up these nested closures by name and make them
available to the world outside the object. Also, in Scheme, a
"method/closure" that I've added to an object DOESN'T have access to
the object's environment (can't access its local state).

This bit of work, plus inheritance, and other "bookkeeping" chores
performed by an object-oriented language are what raises object
oriented programming up to a new level of "convenience" above Scheme,
if not necessarily a new level of "abstraction".

My other complaint about Scheme is that I am always paranoid about
redefining some critical bit of built-in functionality. If I want to
create a new number type, say an "interval" data type, and I want to
be able to use + to add them, I have to redefine the global "+", being
careful to safe its definition away inside my new definition of "+". I
prefer C++'s way of "qualifying" names. The only names I really ever
have to add to the global namespace in C++ are new class names.

Scheme should have multiple "top-level" environments. One that
contains the built-in standard scheme bindings, that can't be changed,
one for "extensions" provided by the local implementation, and one for
the programmer to play in. It should be possible to "forget" bindings
as well, and go back to a clean slate. Forth provides this ability.

Just a few ramblings from a former software engineer.

// Patrick C. Beard
// Department of Computer Science, U. C. Davis
// pcbeard@ucdavis.edu
Newsgroups: comp.lang.tcl
From: bytor@grumpy.bellcore.com (Ross Huitt)
Subject: 'send' to tk from non-tk/non-tcl apps
Organization: Bellcore
Date: Mon, 16 Nov 92 17:45:43 GMT

Is there code around somewhere that will let me do the following?

1) Add a Tk compatible 'send' (and receive) facility to non-Tk
   based Tcl interpretors.

2) Add a Tk compatible 'send' facility to non-Tcl applications.

These facilities would be a _big_ plus for mixed systems.

Ross Huitt
bytor@ctt.bellcore.com
Newsgroups: comp.lang.tcl
From: Duane Murphy <damurphy@wc.novell.com>
Subject: Aborting command interpreting
X-Xxdate: Thu, 19 Nov 92 17:40:34 GMT
Organization: Novell, Inc.
X-Useragent: Nuntius v1.1.1d12
Date: Thu, 19 Nov 1992 17:36:18 GMT

I am looking for a clean way of being able to abort the Tcl interpreter 
while it is interpreting a script.  I have looked at CreateTrace, but 
there does not seem to be a way of telling the interpreter to stop 
interpreting.  I have been able to do this by hacking Tcl_Eval, but I 
would like a clean way of doing this.  

I have thought of some cheating ways that involve using the internal 
structure of the interpreter and not the publish public structure.

The idea is to have a clean way of aborting exceptionally long scripts or 
(heaven forbid) a script that has an (non-recursive) endless loop. The 
idea would be to force the execution of a particular command to return an 
error.  This (usually) causes the script to stop.

Any ideas, comments, suggestions?

...Duane
Newsgroups: comp.lang.tcl
From: davis@cs.cornell.edu (Jim Davis)
Subject: selection get fails if non-Tk window owns selection
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Distribution: usa
Date: Wed, 18 Nov 1992 21:21:12 GMT


I have tk 2.3 running under X11r4.  selection get seems to be failing,
although it sometimes works.  It often works if the selection is owned
by a Tk window, but fails (most of the time) otherwise.  On the other
hand, the mxedit program seems to be able to get selections with
no problem.

What should I be checking to track down this problem?


Newsgroups: comp.lang.tcl
From: payne@crl.dec.com (Andrew Payne)
Subject: Patches for setting library paths from environment variables
Keywords: tk, tcl, patch, environment, library
Organization: DEC Cambridge Research Lab
Date: Wed, 18 Nov 1992 01:04:56 GMT

From the Tk ToDo file:

102. Allow $tk_library to be set from an environment variable.

This has probably been done, but here it is anyway.  The environment 
variables TCL_LIBRARY and TK_LIBRARY set the library directories for 
Tcl and Tk.

*** tkWindow.c  Tue Nov 17 16:28:03 1992
--- tkWindow.c~ Tue Nov 17 16:41:56 1992
***************
*** 613,623 ****
       * Set variables for the intepreter.
       */

!     if(getenv("TK_LIBRARY"))
!         Tcl_SetVar(interp, "tk_library", getenv("TK_LIBRARY"), TCL_GLOBAL_ONLY);
!     else
!         Tcl_SetVar(interp, "tk_library", TK_LIBRARY, TCL_GLOBAL_ONLY);
!
      Tcl_SetVar(interp, "tk_version", TK_VERSION, TCL_GLOBAL_ONLY);
      Tcl_SetVar(interp, "tkVersion", TK_VERSION, TCL_GLOBAL_ONLY);

--- 613,619 ----
       * Set variables for the intepreter.
       */

!     Tcl_SetVar(interp, "tk_library", TK_LIBRARY, TCL_GLOBAL_ONLY);
      Tcl_SetVar(interp, "tk_version", TK_VERSION, TCL_GLOBAL_ONLY);
      Tcl_SetVar(interp, "tkVersion", TK_VERSION, TCL_GLOBAL_ONLY);


*** tcl/tclCmdIL.c  Tue Nov 17 19:46:40 1992
--- tcl/tclCmdIL.c~ Tue Nov 17 19:42:44 1992
***************
*** 430,446 ****
                    " library\"", (char *) NULL);
            return TCL_ERROR;
        }
-       interp->result = getenv("TCL_LIBRARY");
  #ifdef TCL_LIBRARY
!       if (interp->result == NULL)
!               interp->result = TCL_LIBRARY;
  #else
!       if (interp->result == NULL) {
!               interp->result = "there is no Tcl library at this installation";
!               return TCL_ERROR;
!       }
  #endif
-       return TCL_OK;
      } else if ((c == 'l') && (strncmp(argv[1], "locals", length) == 0)
            && (length >= 2)) {
        char *name;
--- 430,442 ----
                    " library\"", (char *) NULL);
            return TCL_ERROR;
        }
  #ifdef TCL_LIBRARY
!       interp->result = TCL_LIBRARY;
!       return TCL_OK;
  #else
!       interp->result = "there is no Tcl library at this installation";
!       return TCL_ERROR;
  #endif
      } else if ((c == 'l') && (strncmp(argv[1], "locals", length) == 0)
            && (length >= 2)) {
        char *name;



-- 
--
Andrew C. Payne
DEC Cambridge Research Lab
Newsgroups: comp.lang.tcl