This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
lispnews
14460 lines (11314 loc) · 505 KB
/
lispnews
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From jkf Tue Apr 13 00:12:22 1982
To: /na/doe/jkf/lispnews
Subject: new features
Status: RO
In response to requests from franz users, these enhancements have been
made:
In Lisp 38.07, if the lisp variable 'displace-macros' is set to non-nil,
then when a macro expansion is done by the evaluator, the resulting
expansion replaces the original call. This means that macro expansion
is only done once.
In Liszt 8.03, the 'function' function is open coded. If you have
(function (lambda ....))
in your code then the lambda expression is compiled as a separate function
and the result of the function call is a 'bcd' object which points
to that compiled lambda.
From jkf Sun Apr 18 13:16:46 1982
To: local-lisp
Subject: opus 38.09
Status: RO
The new features of this version are:
If the load function ends up fasl'ing in a file, then load will
do what is necessary to insure that the new functions are linked in
correctly. Previously, if you turned on the transfer tables with
(sstatus translink on) or (sstatus translink t) and then fasl'ed in
functions which already existed, the old versions of the functions
would still be used, unless you did (sstatus translink on) yourself.
Now this is done automatically.
tyi now accepts a second argument which is the object to return
upon eof. -1 is the default.
(pp-form 'g_obj ['p_port]) should be used instead of $prpr
for pretty printing a form.
The storage allocator and collector has been modified to add
two new data types: vector and vector immediate. They are not in
their final form so I suggest that you not try to use them.
However, be on the lookout for garbage collection bugs.
From jkf Wed Apr 21 07:45:54 1982
To: local-lisp
Subject: liszt 8.04
Status: RO
the new features of liszt 8.04 are:
1) init files:
Before liszt begins compiling, it looks for an init file to load in.
It first searches in the current directory, and then it searches
your home directory (getenv 'HOME).
It looks for file names:
.lisztrc.o .lisztrc.l lisztrc.o lisztrc.l
It loads only the first one it finds.
2) interrupt handling
If you interrupt liszt (with ^C typically), it will remove its
temporary file and exit.
3) preallocation of space
It preallocates space in order to reduce the number of gc's done
during compiling.
From jkf Wed Apr 21 13:47:50 1982
To: local-lisp
Subject: lisp opus 38.10
Status: RO
lisp will now look for a lisprc in a way similar to liszt.
It will first search in . and then in $HOME
It will look for the file .lisprc or lisprc ending with .o, .l and then
just .lisprc or lisprc.
Shortly, it will only look for files ending in .l and .o since we don't
want to encourage files with non-standard filename extensions.
From jkf Wed Apr 21 23:40:59 1982
To: local-lisp
Subject: lisp opus 38.11
Status: RO
I finally got sick of showstack and baktrace and rewrote them in lisp,
rincorporating some of the features people have been requesting.
Showstack now works as follows:
(showstack) : show all interesting forms. Forms resulting from
the trace package are not printed as well as
extraneous calls to eval. In the form printed,
the special form <**> means 'the previous expression
printed'. prinlevel and prinlength are set to
reasonable values to prevent the expression from
getting too large
(showstack t) : same as above but print all expressions.
(showstack 5) : print only the first 5 expressions. of course, 5
is not the only possible numeric argument.
(showstack lev 3) : set prinlevel to 3 before printing
(showstack len 4) : set prinlength to 4 before printing
the above arguments can be used in combination.
The default value of prinlevel is showstack-prinlevel, that of prinlength
is showstack-prinlength. the default showstack printer is the
value of showstack-printer (default is 'print').
baktrace accepts the same arguments as showstack, but it ignores the
prinlevel and prinlength arguments.
From jkf Sat Apr 24 08:55:18 1982
To: local-lisp
Subject: lisp opus 38.12, liszt 8.05
Status: RO
these changes and enhancements were made:
1) the function 'function' in the interpreter acts just like 'quote'
In the compiler, 'function' will act like 'quote' unless the
argument is a lambda expression, in which case liszt will replace
the lambda expression with a unique symbol. That unique symbol's
function cell will contain a compiled version of the lambda
expression. These changes will make Franz compatible with Maclisp
type lisps, as far as the treatment of 'function'
2) Mechanisms were added to permit user written C or Fortran code to call
lisp code. Everything isn't quite ready yet.
3) Signal was fixed so that if you ask for a signal to be ignored, the
operating system will be notified. The correct way to fork a lisp
is now:
(cond ((fork) (signal 2 (prog1 (signal 2) (wait)))))
4) You can select the default function trace uses to print the arguments and
results. Just lambda bind trace-printer to the name of the function
you want it to use. The standard trace-printer sets prinlevel and
prinlength to the values of trace-prinlevel and trace-prinlength before
printing. By default, trace-prinlevel is 4, and trace-prinlength is 5
From jkf Sun Apr 25 23:46:16 1982
To: local-lisp
Subject: lisp opus 38.13
Status: RO
Functions 1+ and 1- are now part of the interpreter, rather than
being made equivalent to add1 and sub1.
From jkf Wed Apr 28 09:52:43 1982
To: local-lisp
Subject: Opus 38.14
Status: RO
Has these new features:
1) the message [load filename] will appear before load
reads in a lisp source file. This can be disabled by
setting $ldprint to nil.
2) a function 'truename' as been added. It takes a port
and returns the name of the file associated with that port.
It returns a string if there is a file associated with
the port, otherwise it returns nil.
From jkf Wed Apr 28 10:36:34 1982
To: local-lisp
Subject: more on opus 38.14
Status: RO
$ldprint is lambda bound to nil during the loading of the lisprc file.
From jkf Wed May 5 08:30:00 1982
To: local-lisp
Subject: opus 38.15
Status: RO
a minor modification: 'makhunk' is now more efficient.
From jkf Wed May 5 20:56:40 1982
To: local-lisp
Subject: Opus 38.16
Status: RO
A new function was added:
(hunk-to-list 'h_hunk)
returns the elements of h_hunk as a list.
Also, the error message printed when an oversized print name is encountered
has been improved.
From jkf Fri May 7 20:03:40 1982
To: local-lisp
Subject: Liszt version 8.06
Status: RO
Local declarations are now supported. You can say:
(defun foo (a b)
(declare (special a))
... body ...)
and the special declaration for 'a' will affect the body of function
foo only. The 'a' which is an argument to foo will also be special
in this case. Declarations may be
1) at the top level, not within a function body.
2) at the beginning of a 'lambda' body.
3) at the beginning of a 'prog' body
4) at the beginning of a 'do' body.
'the beginning' means either the first, second or third form in the body.
When the compiler is searching for declarations, it will not macroexpand.
Fixnum declarations now have meaning. If you do
(declare (fixnum i j))
then
(greaterp i j) will be converted to (>& i j)
The declare function is now defined in the compiler. Previously,
the only way to declare something was for the compiler to 'compile'
the declaration form. Now, if you load or fasl in a file with
a declare statement in it, the declare statement will have the
proper effect in the compiler.
(function (lambda () ...)), (function (nlambda () ...)) and
(function (lexpr () ...)) are all supported.
From jkf Wed May 12 08:15:37 1982
To: local-lisp
Subject: Lisp Opus 38.17
Status: RO
... has a minor bug fix: The port returned by 'fileopen' will now print
correctly.
From jkf Tue May 25 06:18:04 1982
Date: 25-May-82 06:17:51-PDT (Tue)
From: jkf
Subject: opus 38.18
Via: ucbkim.EtherNet (V3.100 [3/27/82]); 25-May-82 06:18:04-PDT (Tue)
To: local-lisp
Status: RO
The msg macro will now evaluate all atom arguments except the ones
for carriage control (N B). Thus if you used (msg foo) you should
now use (msg "foo").
From jkf Thu May 27 08:29:29 1982
To: local-lisp
Subject: liszt 8.08
Status: RO
Fixes a bug in the code which converts generic arithmetic to fixnum only
arithmetic. Liszt was converting from generic to fixnum operators based on
the first argument only due to a typo in the code.
From jkf Wed Jun 9 07:25:19 1982
To: local-lisp
Subject: lisp Opus 38.20
Status: RO
There is now a character macro for reading hexadecimal.
#x1f = #X1f = #X1F = 31
#x-1f = -31
From jkf Thu Jun 17 15:42:54 1982
To: local-lisp
Subject: Lisp Opus 38.21
Status: RO
Has two routines for interfacing with termcap. These routines were
written by morris djavaher and are meant to be called by lisp programs
which have yet to be installed.
From jkf Tue Jun 22 09:09:25 1982
Date: 22-Jun-82 09:09:13-PDT (Tue)
From: jkf
Subject: opus 38.22
Via: ucbkim.EtherNet (V3.120 [6/17/82]); 22-Jun-82 09:09:25-PDT (Tue)
To: local-lisp
Status: RO
setq with no arguments will now return nil.
From jkf Wed Jun 30 19:05:54 1982
Date: 30-Jun-82 19:05:32-PDT (Wed)
From: jkf (John Foderaro)
Subject: liszt 8.09
Via: ucbkim.EtherNet (V3.130 [6/26/82]); 30-Jun-82 19:05:54-PDT (Wed)
To: local-lisp
Status: RO
liszt will now look in 12 places for an init file when it starts up.
It will load in the first one it comes to only.
The files it looks for are:
{ ./ , $HOME } { .lisztrc , lisztrc } { .o , .l , }
From jkf Tue Sep 14 08:53:03 1982
Date: 14-Sep-82 08:52:44-PDT (Tue)
From: jkf (John Foderaro)
Subject: lisp opus 38.26
Message-Id: <8208141553.9999@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.193 [9/6/82]) id a09999;
14-Sep-82 08:53:03-PDT (Tue)
To: local-lisp
Status: RO
Franz used to read the symbols 4dxx 4Dxx and 4Exx as 4exx. Now it reads
them (and other similar symbols) correctly.
From jkf Sat Oct 2 15:15:48 1982
Date: 2-Oct-82 15:15:32-PDT (Sat)
From: jkf (John Foderaro)
Subject: lisp opus 38.27
Message-Id: <8209022215.10796@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.193 [9/6/82]) id a10796;
2-Oct-82 15:15:48-PDT (Sat)
To: local-lisp
Status: RO
If you set the variable top-level-print to a non nil value, then that
value will be used by the top-level to print out the result of the
evaluation. This has effect in break loops too.
For example, if you want the pretty printer to print out the top level
values, type (setq top-level-print 'pp-form).
From jkf Sun Oct 3 19:28:45 1982
Date: 3-Oct-82 19:28:29-PDT (Sun)
From: jkf (John Foderaro)
Subject: lisp opus 38.28
Message-Id: <8209040228.9829@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.193 [9/6/82]) id a09829;
3-Oct-82 19:28:45-PDT (Sun)
To: local-lisp
Status: RO
A modification has been made to the load function.
Normally if you type (load 'x), the load function will first try to fasl
the file x.o and failing that it will try to load x.l
If you (setq load-most-recent t), and if x.l and x.o both exist, then
load will fasl or load the most recently modified file.
The load-most-recent flag only has an effect if you type the filename
without a trailing .l or .o.
From jkf Tue Oct 5 21:01:55 1982
Date: 5-Oct-82 21:01:33-PDT (Tue)
From: jkf (John Foderaro)
Subject: liszt 8.12, lisp 38.29
Message-Id: <8209060401.6358@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.193 [9/6/82]) id a06358;
5-Oct-82 21:01:55-PDT (Tue)
To: local-lisp
Status: RO
Liszt will now check that you are passing the correct number of arguments
to functions. As a result, some files which have compiled without
complaint in the past may compile now with warnings or errors. In this
note, I'll explain what the compiler knows, what it looks for in your
program, and how you can help the compiler understand your program.
For each function, liszt either knows nothing about the the number of
arguments to a function, or it knows the minimum number of arguments, or the
maximum number of arguments, or both the minimum and maximum number of
arguments. This information comes about in one of three ways:
1) it is known when liszt starts (by virtue of a value stored under the
fcn-info indicator on a function's property list)
2) it is declared by the user, either via (declare (*arginfo ...))
or (declare (*args ...)) [see below]
3) it is determined when a (lambda) function is compiled.
When a lambda is compiled, the compiler can easily figure out the
minimum and maximum number of arguments.
When an nlambda or lexpr function is compiled, the compiler doesn't
make a guess as to how many arguments are expected. The user should
use the (declare (*args ...)) form to tell the compiler how many
arguments are expected.
For lexpr's generated via 'defun' using &optional and &rest keywords,
the correct declaration is generated automatically.
Once liszt determines the number of arguments to a function, it uses that
information to check that the function is called with the correct number of
arguments. It does not check calls to the function that occured before it
determined the correct number of arguments. [This backward checking will
be added sometime in the future.]
If liszt finds that a function is called with the wrong number of
arguments, it prints an informative message. That message is a error if the
function being called is one which is open coded by the compiler. The
message is a warning otherwise. The reason for the distinction is that
you are free to redefine functions not open coded by the compiler. If the
number of arguments is not correct, it may just be that the compiler's
database and your code are refering to two different functions.
If you redefine system functions, you should use the
(declare (*arginfo ...)) form to let the compiler know about the number
of arguments expected by your version of the functions.
You can declare the number of arguments to functions using this form
(declare (*arginfo (fcnname1 min1 max1) (fcnname2 min2 max2) ...))
where each min or max is either a fixnum or nil (meaning "I don't know")
for example, here are some `correct' declarations:
(declare (*arginfo (read 0 2) (cons 2 2) (boole 3 nil) (append nil nil)))
explanation:
(read 0 2) means that the function read expects between 0 and 2
arguments (inclusive).
(cons 2 2) means that cons expects 2 arguments.
(boole 3 nil) means that boole expects at least 3 arguments.
(append nil nil) means that append expects any number of arguments,
this is equivalent to (append 0 nil).
The *arginfo declaration is usually made at the top level of a file.
To declare the argument characteristics of the current function being
compiled use the '*args' declaration. It looks somewhat like the
*arginfo declaration.
It is best explained with examples
(def read
(lexpr (n)
(declare (*args 0 2))
... code for read
))
(def process
(nlambda (x)
(declare (*args 1 3))
... code for process
))
Note: the *args declaration is not needed for lambda's.
If you get an error or warning which you believe is incorrect, it is
probably due to an incorrect database entry. Please let me know and I will
fix it immediately. I expect that there will be quite a few of these
errors because much of the database was built by hand.
From jkf Fri Oct 8 12:55:45 1982
Date: 8-Oct-82 12:55:31-PDT (Fri)
From: jkf (John Foderaro)
Subject: lisp 38.30, liszt 8.13
Message-Id: <8209081955.4140@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.193 [9/6/82]) id a04140;
8-Oct-82 12:55:45-PDT (Fri)
To: local-lisp
Status: RO
There are now three new functions for dealing with processes:
*process
*process-send
*process-receive
These functions are designed to replace the 'process' function, which, due
to its nlambda'ness, was difficult to use. All of the above functions
are lambda's or lexpr's.
See chapter 6 of the manual (its on-line) for the details of these
functions. This is a quick summary:
(*process-send 'st_command)
tells the shell to run the command st_command concurrently, and returns
a write-only port. Characters written to this port will appear at
the standard input of st_command.
example:
(setq p (*process-send "mail jkf"))
(print 'HiThere p)
(close p)
(*process-receive 'st_command)
tells the shell to run st_command concurrently, and returns a
read-only port. Characters written to the standard output by
st_command will be available by reading from the given port.
Characters written on the standard error by st_command will
appear on lisp's the standard error (the terminal most likely).
example:
; to see if foo is logged in:
(setq p (*process-receive "u"))
(do ((user (read p '**eof**) (read p '**eof**)))
((eq '**eof** user) (print 'Not-Logged-In))
(cond ((eq 'foo user) (print 'Is-Logged-In))))
(close p)
(*process 'st_command ['g_readp ['g_writep]])
this is the general function which process, *process-send and
*process-receive call. If called with one argument it
starts the new process and waits for it to end, e.g:
(*process (concat "vi " filename))
In this case *process return the exit code of the process.
The g_readp and g_writep arguments, if given, tell *process to
run the process concurrently. If g_read is non nil then
*process will return a port just like *process-receive.
If g_writep is non-nil, then *process will set up a pipe like
*process-send.
*process will return a list of the form
(readport writeport process-id)
where readport and writeport will only be a port if g_readp
or g_writep are non nil.
A little know fact about processes is that a process, once started,
cannot die and disappear until its parent asks about its status.
Take the mail example given above:
(setq p (*process-send "mail jkf"))
(print 'HiThere p)
(close p)
after the mail process finishes it work, it will attempt to die, returning
an integer called the 'exit status'. However until the lisp program
asks about its status the mail process will remain in existence
in a Zombie state, somewhere between life and death. ps will show this:
PID TT STAT TIME COMMAND
3876 p0 Z 0:01 <exiting>
A user is only allowed a small number of processes, so if you continue
to generate processes and leave them around as Zombies, you will eventually
run out of processes. The way to let the Zombie die is to call
the wait function, e.g.
-> (wait)
(3876 . 0)
->
this says that process 3876 died with exit status 0.
Also, when you exit lisp the shell will clean up the Zombies.
If you start a process with (*process "vi foo") then lisp will wait
for it to complete before continuing, so you don't have to worry about
Zombies. You only have to worry if you run a process concurrently,
such as when you use *process-send or *process-receive.
From jkf Tue Oct 12 10:44:22 1982
Date: 12-Oct-82 10:43:52-PDT (Tue)
From: jkf (John Foderaro)
Subject: lisp opus 38.31
Message-Id: <8209121744.29800@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.220 [10/11/82])
id A29800; 12-Oct-82 10:44:22-PDT (Tue)
To: local-lisp
Status: RO
new function: (time-string ['x_time])
if given no arguments, it returns the current time as a string.
if given an argument, x_time, then it converts that argument to
a time string and returns that string.
The argument should represent the number of seconds since
Jan 1, 1970 (GMT).
note that this makes (status ctime) obsolete.
From jkf Tue Oct 12 14:35:26 1982
Date: 12-Oct-82 14:34:10-PDT (Tue)
From: jkf (John Foderaro)
Subject: also in opus 38.31
Message-Id: <8209122135.5086@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.220 [10/11/82])
id A05086; 12-Oct-82 14:35:26-PDT (Tue)
To: local-lisp
Status: RO
If top-level-read is set to a non nil value, then the lisp
top level will funcall it to read a form for evaluation.
It will be funcalled with two arguments, a port and an eof marker.
top-level-read will be used in break levels too.
Be very careful when setting top-level-read because if you set it
to an illegal value, there is no way to correct it.
From jkf Tue Oct 19 18:54:18 1982
Date: 19-Oct-82 18:54:02-PDT (Tue)
From: jkf (John Foderaro)
Subject: lisp tags
Message-Id: <8209200154.195@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.222 [10/13/82])
id A00195; 19-Oct-82 18:54:18-PDT (Tue)
To: franz-friends
Status: RO
We also use vi style tags so emacs users and vi users can share the same
tags file. Rather than modify ctags, we use this shell script:
#!/bin/csh
# make a tags file for lisp source files.
# use:
# lisptags foo.l bar.l baz.l ... bof.l
# generate the file 'tags'
#
awk -f /usr/local/lib/ltags $* | sort > tags
where the file /usr/local/lib/ltags is
/^\(DEF/ { print $2 " " FILENAME " ?^" $0 "$?" }
/^\(def/ { print $2 " " FILENAME " ?^" $0 "$?" }
From jkf Tue Oct 19 22:50:40 1982
Date: 19-Oct-82 22:50:29-PDT (Tue)
From: jkf (John Foderaro)
Subject: Lisp Opus 38.32, Liszt 8.14
Message-Id: <8209200550.3968@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.222 [10/13/82])
id A03968; 19-Oct-82 22:50:40-PDT (Tue)
To: local-lisp
Status: RO
Topic 1:
liszt can now autoload macros. If liszt encounters a symbol without
a function definition but with a macro-autoload indicator on the
property list, then the value of the indicator is a file to load which
should define the macro.
The interpreter's undefined function handler will also look for
macro-autoload properties, thus you needn't give a symbol both an
autoload and a macro-autoload property.
The default lisp contains macro-autoload properties for the macros
defstruct, loop and defflavor.
Topic 2:
It is now possible to define 'compiler only macros' or cmacros.
A cmacro acts like a normal macro, but will only be used by the
compiler. A cmacro is stored on the property list of a
symbol under the indicator 'cmacro'. Thus a function can
have a normal definition and a cmacro definition.
The macro 'defcmacro' has a syntax identical to 'defmacro' and
creates cmacros instead of macros.
For an example of the use of cmacros, see the definitions
of nthcdr and nth in /usr/lib/lisp/common2.l
Topic 3:
If the form (foo ...) is macro expanded and the result also begins
with the symbol foo, then liszt will stop macro expanding (previously
it got into an infinite loop).
Topic 4:
The function nth has been added to Franz.
(nth 'x_index 'l_list)
returns the nth element of l_list, where the car of the list
is accessed with (nth 0 'l_list)
The macros (push 'g_value 'g_stack), and
(pop 'g_stack ['g_into])
have been added to franz.
typical uses
(setq foo nil)
(push 'xxx foo)
(push 123 foo)
now foo = (123 xxx)
(pop foo) returns 123
now foo = (xxx)
(pop foo yyy) returns xxx and sets yyy to xxx
Topic 5:
The version of Flavors written at Mit for Franz have been transported
here. Flavors is a system for doing object oriented programming in
lisp. The documentation for flavors in the Lisp Machine manual
from Mit. Since Lisp Machine manuals are rather scarce around here,
perhaps we can find someone to make copies of the flavor chapter for
those interested in it. There is a description of the unique
features of the Franz Flavors in /usr/lib/lisp/flavors.usage.
As mentioned above, the flavors code will be autoloaded
when you call 'defflavor' for the first time.
Our local flavors expert is Eric Cooper (r.ecc).
From jkf Fri Oct 22 15:46:51 1982
Date: 22-Oct-82 15:46:32-PDT (Fri)
From: jkf (John Foderaro)
Subject: lisp opus 38.34
Message-Id: <8209222246.5610@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.222 [10/13/82])
id A05610; 22-Oct-82 15:46:51-PDT (Fri)
To: local-lisp
Status: RO
Franz lisp now has a form of closure called an fclosure. A fclosure is a
compromise between a funarg and the type of functional object that we
currently have in Franz. In this short note, I'll explain through examples
what fclosures are and where you might use them, and finally describe the new
functions. The fclosure system was designed to be compatible with the Lisp
Machine closures, so you may want to look at a Lisp Machine manual for more
information. fclosure are related to closures in this way:
(fclosure '(a b) 'foo) <==> (let ((a a) (b b)) (closure '(a b) 'foo))
A example of the use of fclosures:
->(setq counter 0)
0
->(setq x (fclosure '(counter) '(lambda (val) (setq counter (+ val counter)))))
fclosure[1]
The function 'fclosure' creates a new type of object called a fclosure.
A fclosure object contains a functional object, and a set of symbols and
values for the symbols. In the above example, the fclosure functional
object is (lambda (val) (setq counter (+ val counter)))
and the set of symbols and values just contains the symbol 'counter' and
zero, the value of counter when the fclosure was created.
When a fclosure is funcall'ed:
1) the lisp system lambda binds the symbols in the fclosure to their
values in the fclosure.
2) it continues the funcall on the functional object of the fclosure
3) finally it un-lambda binds the symbols in the fclosure and at the
same time stores the current values of the symbols in the fclosure.
To see what that means, let us continue the example:
-> (funcall x 32)
32
-> (funcall x 21)
53
Notice that the fclosure is saving the value of the symbol 'counter'.
Each time a fclosure is created, new space is allocated for saving
the values of the symbols.
If we executed the same fclosure function:
->(setq y (fclosure '(counter) '(lambda (val) (setq counter (+ val counter)))))
fclosure[1]
We now have two independent counters:
-> (funcall y 2)
2
-> (funcall y 12)
14
-> (funcall x 3)
56
To summarize:
(fclosure 'l_vars 'g_funcobj)
l_vars is a list of symbols (not containing nil)
g_funcobj is lambda expression or a symbol or another fclosure
examples: (fclosure '(foo bar baz) 'plus)
(fclosure '(a b) #'(lambda (x) (plus x a))) notice the #'
which will make the compiler compile the
lambda expression.
There are time when you want to share variables between fclosures.
This can be done if the fclosures are created at the time times using
fclosure-list:
(fclosure-list 'l_vars1 'g_funcobj1 ['l_vars2 'g_funcobj2 ... ...])
This creates a list of closures such that if a symbol appears in
l_varsN and l_varsM then its value will be shared between the
closures associated with g_funcobjN and g_funcobjM.
example: -> (setq x (fclosure-list '(a) '(lambda (y) (setq a y))
'(c a) '(lambda () (setq c a))))
(fclosure[4] fclosure[7])
-> (funcall (car x) 123) ; set the value of a in the 1st fclosure
123
-> (funcall (cadr x)) ; read the same value in the 2nd fclosure
123
Other fclosure functions:
(fclosure-alist 'c_fclosure)
returns an assoc list giving the symbols and values in the fclosure
(fclosurep 'g_obj)
returns t iff g_obj is a fclosure
(fclosure-function 'c_fclosure)
returns the functional object of the fclosure
Note: If a throw (or error) occurs during the evaluation of a fclosure,
which passes control out of the fclosure, then current values of the
symbols will not be stored. This may be a bug. We could set up
an unwind-protect, but it would then take longer to funcall
a fclosure. If you think an unwind protect is important, let me know.
Note 2: you can also 'apply' a fclosure.
From jkf Sat Oct 23 08:58:07 1982
Date: 23-Oct-82 08:57:53-PDT (Sat)
From: jkf (John Foderaro)
Subject: more on closures
Message-Id: <8209231558.21572@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.222 [10/13/82])
id A21572; 23-Oct-82 08:58:07-PDT (Sat)
To: local-lisp
Status: RO
I sent the maryland people the flavors.usage file from mit so that they
could compare their implementation with mit's. What follows is their
analysis. Some of the differences between the two versions is due to
different schemes for getting around the fact that franz didn't have a form
of closure. RZ has indicated that now that franz has fclosures, it may be
possible to use more of the 'official' lisp machine flavor code. fclosures
will probably affect the maryland implementation too:
Date: 22 Oct 82 15:39:18 EDT (Fri)
From: Liz Allen <liz.umcp-cs@UDel-Relay>
Subject: flavors
To: jkf at Ucb-C70
Via: UMCP-CS; 23 Oct 82 9:09-EDT
Wow, implementing closure in one day is amazing. We had thought
about writing some kind of closure... We've been discussing how
having closures would affect our code. It might make it easier to
read and modify, but it might be less efficient. Can you tell us
how your implementation works and what it looks like to a user?
About the MIT implementation. Ours is probably better in a couple
of respects but probably loses a couple of places, too. Pros:
1. With ours, there is no need to discard instances when
redefining a flavor. The only time this would be necessary
is if the instance variables change which rarely happens
since methods change much more often than the instance
variables. Without a structure editor, you tend to reload the
file containing flavors in order to change a method.
2. We can compile files with flavors (he didn't say if you
can compile MIT's Franz flavors) and when they are compiled
they run *fast*. Most of the overhead occurs at combine
time and compiled flavors shouldn't have to be recombined.
3. We use hunks to store instance variables (actually, an
instance is a hunk whose cxr 0 is the name of the flavor and
whose cxr n (> 0) are the values of instance variables). We
pay a price at combine time since instance variable references
in method code are replaced with cxr and rplacx calls (but MIT
pays the same price in putting hash calls in the methods), but
we win over MIT since the cxr calls are much faster than the
hash table calls. We do have to have "ghost" methods which
are copies of methods containing different cxr calls when the
referenced variables of a method don't align in flavors
which inherit the method. This, however, happens only
rarely.
4. We handle getting and setting instance variables better
than the MIT implementation -- we don't need to send a message
and the syntax is much better. We recently added the
functions << and >> which get and set instance variables, eg:
(<< foo 'instance-var)
and
(>> foo 'instance-var 'value)
where foo is a flavor instance.
5. Our describe function has a hook which (if the variable
*debugging-flavors* is set to non-nil) allows the user to
follow pointers to any instances referenced in the describe.
This is done by assigning to a variable (made from its unique
id) the value of the instance.
Cons:
1. They implement more things from Lisp Machine flavors
(like wrappers/whoppers, init-keywords), but we really haven't
found the need for them. We implement less closely to LM
flavors, but in a way that's better suited to Franz Lisp.
2. We didn't implement the method table as a hash table, but
there's no reason why we couldn't.
3. Things we don't have, but could easily implement include:
describe-method, defun-method/declare-flavor-instance-variables,
and storing flavor information in hunks instead of on the
property lists.
4. We don't handle method types like :and and :or. We just
have primary/untyped methods and :before and :after daemons.
We have people reading our documentation. After we get some feedback
from them, we'll send the tape and docs to you. That should be early
next week.
-Liz Allen and Randy Trigg
From jkf Mon Oct 25 12:56:59 1982
Date: 25-Oct-82 12:55:44-PDT (Mon)
From: jkf (John Foderaro)
Subject: lisp Opus 38.35, liszt 8.15
Message-Id: <8209251956.17542@UCBKIM.BERKELEY.ARPA>
Received: by UCBKIM.BERKELEY.ARPA (3.222 [10/13/82])
id A17542; 25-Oct-82 12:56:59-PDT (Mon)
To: local-lisp
Status: RO
New features:
1) tilde-expansion: franz will now expand filenames which begin with ~
just like csh does. It will only do the expansion if
the symbol tilde-expansion has a non-nil value. The default
value for tilde-expansion is t.
These functions do tilde expansion: If I've left any out, let
me know:
load, fasl, infile, outfile, fileopen, probef, cfasl, ffasl, chdir
sys:access, sys:unlink [these are new functions, see below]
2) liszt will remove its temporary file if given a SIGTERM signal
(SIGTERM is sent by default when you give the kill command from the shell)
3) load will now print a helpful message if an read error occurs when it