-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
322 lines (296 loc) · 6.15 KB
/
README.txt
File metadata and controls
322 lines (296 loc) · 6.15 KB
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
SmackLisp Version 0.01
SmackLisp is a toy lisp-2 interpreter. Currently Smacklisp is small subset of Common Lisp. That is smacklisp code should run in any common lisp implementation but not vice versa. Smacklisp is designed basically to be a scripting language to be used client-side on a web-site.
Long-term plans include a compiler and maybe a scheme interpreter.
Smacklisp also plans to be configurable, that is certain parts can be disabled (example: configure without looping macros to force use of recursion).
Code/ideas stolen from Norvig, PAIP and Queinnec, Lisp in Small Pieces
Currently Implemented:
Evaluation and Compilation
-- constantp
-- lambda
-- quote
Control and data flow
-- and
-- apply
-- block/return/return-from (not 100% compatible with CL)
-- case
-- complement
-- cond
-- constantly
-- defconstant
-- defparameter
-- defun (no &aux, no setf, declares)
-- defvar
-- eq, eql, equal, equalp
-- every
-- fboundp
-- fdefinition (no setf)
-- flet
-- fmakunbound
-- funcall
-- function (no setf)
-- functionp
-- identity
-- if
-- labels
-- let, let*
-- multiple-value-bind
-- multiple-value-call
-- multiple-value-list
-- not
-- notany
-- notevery
-- or
-- prog prog* (no declares)
-- prog1
-- prog2
-- progn
-- psetf
-- psetq
-- setf (limited setf-able functions)
-- setq
-- some
-- tagbody/go
-- unless
-- when
Structures
-- copy-structure
-- defstruct (no options)
Iteration
-- do
-- do*
-- dolist
-- dotimes
Symbols:
-- boundp
Numbers
-- + - * / = < > <= >= /=
-- decf
-- incf
-- abs acos acosh ash asin asinh atan atanh
-- boole byte
-- ceiling cis complex complexp conjugate cos cosh
-- decode-float denominator
-- evenp exp expt
-- fceiling ffloor float floatp float-sign floor fround ftruncate
-- gcd
-- imagpart integerp isqrt
-- lcm log
-- max min minusp mod
-- numberp numerator
-- oddp
-- parse-integer phase plusp
-- rational rationalize rationalp realp realpart rem round
-- signum sin sinh sqrt
-- tan tanh truncate
-- zerop
-- 1+ 1-
Conses
-- adjoin
-- append
-- atom
-- butlast, nbutlast
-- car (setf)
-- cdr (setf)
-- cxxr (setf)
-- cons
-- consp
-- copy-list
-- first, second, ... tenth (setf)
-- last
-- ldiff
-- list
-- list*
-- list-length
-- listp
-- make-list
-- mapc mapcan mapcar mapcon mapl maplist
-- member
-- member-if
-- nconc
-- nreconc
-- nth (setf)
-- nthcdr
-- null
-- pop
-- push
-- pushnew
-- rest (setf)
-- revappend
-- rplaca
-- rplacd
Conses - Associated Lists
-- acons
-- assoc
-- assoc-if
-- copy-alist
-- pairlis
-- rassoc
-- rassoc-if
Conses - Sets
-- subsetp
-- intersection
-- nintersection
-- set-difference
-- nset-difference
-- set-exclusive-or
-- nset-exclusive-or
-- union
-- nunion
Conses - Trees
-- copy-tree
-- tree-equal
-- subst
-- nsubst
-- subst
-- nsubst
-- tree
-- sublis
-- nsublis
Arrays
-- adjustable-array-p
-- adjust-array
-- aref
-- array-dimension
-- array-dimensions
-- array-displacement
-- array-element-type
-- array-has-fill-pointer-p
-- array-in-bounds-p
-- arrayp
-- array-rank
-- array-row-major-index
-- array-total-size
-- make-array
-- row-major-aref
-- simple-vector-p
-- svref
-- vector
-- vectorp
-- vector-pop
-- vector-push
-- vector-push-extend
Strings
-- char
-- make-string
-- schar
-- simple-string-p
-- string
-- string-capitalize
-- nstring-capitalize
-- string-downcase
-- nstring-downcase
-- string-upcase
-- nstring-upcase
-- string-equal
-- string-greaterp
-- string-left-trim
-- string-lessp
-- string-not-equal
-- string-not-greaterp
-- string-not-lessp
-- stringp
-- string-right-trim
-- string-trim
-- string=
-- string/=
-- string<
-- string>
-- string<=
-- string>=
Sequences
-- concatenate
-- copy-seq
-- count
-- count-if
-- elt
-- fill
-- find
-- find-if
-- length
-- make-sequence
-- map
-- map-into
-- merge
-- mismatch
-- position
-- position-if
-- reduce
-- remove
-- delete
-- remove-duplicates
-- delete-duplicates
-- remove-if
-- delete-if
-- replace
-- reverse
-- nreverse
-- search
-- sort
-- stable-sort
-- subseq
-- substitute
-- nsubstitute
-- substitute-if
-- nsubstitute-if
Hash Tables
-- clrhash
-- gethash
-- hash-table-count
-- hash-table-p
-- hash-table-rehash-size
-- hash-table-rehash-threshold
-- hash-table-size
-- hash-table-test
-- make-hash-table
-- maphash
-- remhash
-- sxhash
Printer
-- prin1
-- princ
-- print
-- terpri
Reader
-- read (but not remotely)
System Construction
-- load
Constants and Variables
-- nil
-- pi
-- t
-- * ** ***
-- + ++ +++
-- / // ///
-- -
-- all the constants in SBCL package common-lisp
(let ((l nil))
(do-all-symbols (x)
(when (and (constantp x)
(eq (find-package 'common-lisp)
(symbol-package x)))
(push x l)))
(sort (remove-duplicates l) 'string<))
Non Common Lisp Function
-- quit (exit repl loop)
Currently Lacks:
Plan to implement:
Types
Tail-recursion
Macros (Internal exists, user not yet)
Unit tests
configurable
Hope to implement
Documentation strings
declarations (at least allow)
CLOS
Streams
Maybe
LOOP
Eval
Debugging
lambda list: &aux &allow-other-keys
No plans to Implement
Condition handling
Packages
Deprecated functions
Read Macros