changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/std/pkg.lisp

changeset 369: de40bd522c84
parent: 0e00dec3de03
child: d1d64b856fae
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 26 May 2024 15:39:55 -0400
permissions: -rw-r--r--
description: png fixes
1 (pushnew :std *features*)
2 (pushnew "STD" *modules* :test 'equal)
3 
4 (defpackage :std-user
5  (:use :cl :std/named-readtables :std/defpkg)
6  (:shadowing-import-from :std/defpkg :defpkg)
7  (:export :defpkg :in-readtable))
8 
9 (in-package :std-user)
10 
11 (defpkg :std/err
12  (:use :cl)
13  (:export ;; err
14  :std-error :std-error-message
15  :define-error-reporter
16  :deferror
17  :nyi!
18  :required-argument
19  :ignore-some-conditions
20  :simple-style-warning
21  :simple-reader-error
22  :simple-parse-error
23  :simple-program-error
24  :circular-dependency
25  :circular-dependency-items
26  :unknown-argument
27  :unknown-argument-name
28  :unknown-argument-kind
29  :unknown-argument-p
30  :missing-argument
31  :missing-argument-command
32  :missing-argument-p
33  :invalid-argument
34  :invalid-argument-item
35  :invalid-argument-reason
36  :invalid-argument-p
37  :unwind-protect-case))
38 
39 (defpkg :std/sym
40  (:use :cl)
41  (:shadowing-import-from :sb-int
42  :with-unique-names :symbolicate :package-symbolicate :keywordicate :gensymify*
43  :gensymify)
44  (:export
45  :ensure-symbol
46  :format-symbol
47  :make-keyword
48  :make-slot-name
49  :make-gensym
50  :make-gensym-list
51  :with-gensyms
52  :with-unique-names
53  :symbolicate
54  :keywordicate
55  :gensymify
56  :gensymify*))
57 
58 (defpkg :std/list
59  (:use :cl)
60  (:shadowing-import-from :sb-int
61  :ensure-list :recons :memq :assq
62  :ensure-list :proper-list-of-length-p :proper-list-p :singleton-p)
63  (:import-from :std/sym :symb)
64  (:import-from :std/named-readtables :parse-body)
65  (:export
66  :ensure-car
67  :ensure-cons
68  :appendf
69  :nconcf
70  :unionf
71  :nunionf
72  :reversef
73  :nreversef
74  :deletef
75  :flatten
76  :group
77  :let-binding-transform
78  :ensure-list :recons :memq :assq
79  :circular-list :circular-list-p :circular-tree-p :merge!
80  :sort!))
81 
82 (defpkg :std/type
83  (:use :cl)
84  (:import-from :std/sym :format-symbol :with-gensyms)
85  (:import-from :std/list :ensure-car)
86  (:export :+default-element-type+
87  :array-index :array-length
88  :negative-integer :non-negative-integer
89  :positive-integer :octet
90  :octet-vector))
91 
92 (defpkg :std/num
93  (:use :cl)
94  (:export
95  ;; num/parse
96  :parse-number
97  :parse-real-number
98  :parse-positive-real-number
99  :invalid-number
100  :invalid-number-value
101  :invalid-number-reason
102  ;; num/float
103  :make-float-converters
104  :encode-float32
105  :decode-float32
106  :encode-float64
107  :decode-float64))
108 
109 (defpkg :std/stream
110  (:use :cl)
111  (:import-from :std/type :non-negative-integer :positive-integer)
112  (:export
113  ;; stream
114  :copy-stream
115  :wrapped-stream
116  :wrapped-character-input-stream
117  :wrapped-character-output-stream
118  :counting-character-input-stream
119  :prefixed-character-output-stream
120  :stream-of :char-count-of :line-count-of :col-count-of
121  :prev-col-count-of :col-index-of :write-prefix
122  :prefix-of))
123 
124 (defpkg :std/array
125  (:use :cl)
126  (:export :copy-array :signed-array-length))
127 
128 (defpkg :std/hash-table
129  (:use :cl)
130  (:nicknames :std/ht)
131  (:export :hash-table-alist
132  :maphash-keys :hash-table-keys
133  :maphash-values :hash-table-values))
134 
135 (defpkg :std/alien
136  (:use :cl :sb-alien)
137  (:import-from :std/sym :symbolicate :with-gensyms)
138  (:export
139  :setfa
140  :copy-c-string
141  :clone-strings
142  :clone-octets-to-alien
143  :clone-octets-from-alien
144  :foreign-int-to-integer
145  :foreign-int-to-bool
146  :bool-to-foreign-int
147  :define-opaque
148  :shared-object-name
149  :define-alien-loader
150  :c-string-to-string-list
151  :list-all-shared-objects
152  :num-cpus
153  :*cpus*
154  :loff-t
155  :memset))
156 
157 (defpkg :std/mop
158  (:use :cl :sb-mop :sb-pcl)
159  (:import-from :std/sym :symb :make-keyword)
160  (:export :list-slot-values-using-class
161  :list-class-methods :list-class-slots :list-indirect-slot-methods))
162 
163 (defpkg :std/thread
164  (:use :cl :sb-thread :sb-concurrency)
165  (:import-from :std/list :flatten)
166  (:export
167  :print-thread-message-top-level :thread-support-p
168  :find-thread-by-id :thread-id-list
169  :make-threads :with-threads :finish-threads
170  :timed-join-thread :kill-thread :hang
171  :thread-count :dump-thread
172  :make-oracle :make-supervisor :oracle :run-task
173  :oracle-id
174  :push-job :push-task :push-worker :push-result
175  :run-job :run-stage
176  :pop-job :pop-task :pop-worker :pop-result
177  :make-task-pool
178  :start-task-pool :pause-task-pool :shutdown-task-pool
179  :push-stage :designate-oracle :make-task-pool
180  :task :job :task-pool :stage :task-pool-p
181  :job-tasks :make-job :job-p :task-object
182  :make-task :task-p :task :wait-for-threads
183  :task-pool-oracle :task-pool-jobs :task-pool-stages
184  :task-pool-workers :task-pool-results))
185 
186 (defpkg :std/fu
187  (:use :cl)
188  (:import-from :std/sym :make-gensym-list)
189  (:export
190  :ensure-function
191  :ensure-functionf
192  :disjoin
193  :conjoin
194  :compose
195  :multiple-value-compose
196  :curry
197  :rcurry))
198 
199 (defpkg :std/macs
200  (:use :cl)
201  (:import-from :std/sym :symb :mkstr :make-gensym-list :once-only :with-gensyms)
202  (:import-from :std/fu :compose)
203  (:import-from :std/named-readtables :in-readtable :parse-body)
204  (:import-from :std/list :flatten :defmacro!)
205  (:export
206  :named-lambda
207  :g!-symbol-p
208  :defmacro/g!
209  :o!-symbol-p
210  :o!-symbol-to-g!-symbol
211  :defmacro!
212  :defun!
213  :dlambda
214  :until
215  :fact
216  :choose
217  :make-tlist
218  :tlist-left
219  :tlist-right
220  :tlist-empty-p
221  :tlist-add-left
222  :tlist-add-right
223  :tlist-rem-left
224  :tlist-update
225  :build-batcher-sn
226  :sortf
227  :dollar-symbol-p
228  :if-match
229  :when-match
230  :once-only
231  :destructuring-case
232  :destructuring-ccase
233  :destructuring-ecase
234  :when-let
235  :when-let*
236  :if-let
237  :if-let*
238  :if*
239  :define-constant
240  :defvar-unbound
241  :def!
242  :eval-always
243  ;; ana
244  :awhen
245  :acond
246  :alambda
247  :nlet-tail
248  :alet%
249  :alet
250  :acond2
251  :it
252  :aif
253  :this
254  :self
255  ;; pan
256  :pandoriclet
257  :pandoriclet-get
258  :pandoriclet-set
259  :get-pandoric
260  :with-pandoric
261  :pandoric-hotpatch
262  :pandoric-recode
263  :plambda
264  :pandoric-eval
265  :with-collectors
266  :collecting
267  :xor))
268 
269 (defpkg :std/readtable
270  (:use :cl)
271  (:import-from :std/named-readtables :defreadtable)
272  (:import-from :std/fu :curry :rcurry :compose)
273  (:import-from :std/sym :symb)
274  (:import-from :std/list :defmacro!) ;; kludge
275  (:export
276  ;; readtable
277  :|#"-reader|
278  :|#`-reader|
279  :|#f-reader|
280  :|#$-reader|
281  :segment-reader
282  :match-mode-ppcre-lambda-form
283  :subst-mode-ppcre-lambda-form
284  :|#~-reader|
285  :_))
286 
287 (defpkg :std/bit
288  (:use :cl)
289  (:import-from :std/type :octet :octet-vector)
290  (:export
291  :make-bits
292  :sign-bit
293  :different-signs-p
294  :mortify-bits
295  :int-list-bits
296  :aref-bit
297  :make-bit-vector
298  :logbit
299  :bitfield
300  :bitfield-slot-name
301  :bitfield-slot-start
302  :bitfield-slot-end
303  :bitfield-slot-size
304  :bitfield-slot-reader
305  :bitfield-slot-initform
306  :bitfield-slot-pack
307  :bitfield-slot-unpack
308  :parse-atomic-bitfield-slot-specifier
309  :parse-compound-bitfield-slot-specifier
310  :bitfield-slot
311  :bitfield-boolean-slot
312  :bitfield-integer-slot
313  :bitfield-member-slot
314  :define-bitfield
315  :hex-string-to-octet-vector
316  :octet-vector-to-hex-string
317  :octets-to-integer
318  :integer-to-octets
319  :hexchar-to-int))
320 
321 (defpkg :std/fmt
322  (:use :cl)
323  (:import-from :std/list :group :ensure-cons)
324  (:shadowing-import-from :uiop :println)
325  (:export :printer-status :fmt-row :format-sxhash :iprintln :fmt-tree :println))
326 
327 (defpkg :std/path
328  (:use :cl)
329  (:export
330  :wild-pathname
331  :non-wild-pathname
332  :absolute-pathname
333  :relative-pathname
334  :directory-pathname
335  :absolute-directory-pathname))
336 
337 (defpkg :std/os
338  (:use :cl)
339  (:export
340  :list-all-users
341  :list-all-groups))
342 
343 (defpkg :std/file
344  (:use :cl)
345  (:import-from :std/macs :define-constant :once-only :eval-always)
346  (:import-from :std/stream :copy-stream)
347  (:import-from :std/type :octet :octet-vector :array-index :array-length :+default-element-type+)
348  (:export
349  :tmpfile
350  :file-pathname
351  :with-open-files
352  :write-stream-into-file
353  :write-file-into-stream
354  :file=
355  :file-size
356  :file-size-in-octets
357  :+pathsep+
358  :octet-vector=
359  :file-date
360  :file-timestamp
361  :directory-path-p
362  :*hidden-paths*
363  :hidden-path-p
364  :directory-path
365  :find-files
366  :count-file-lines))
367 
368 (defpkg :std/string
369  (:use :cl)
370  (:export
371  :*omit-nulls*
372  :*whitespaces*
373  :string-designator
374  :ssplit
375  :trim
376  :collapse-whitespaces
377  :make-template-parser
378  :string-case))
379 
380 (defpkg :std/seq
381  (:use :cl)
382  (:import-from :sb-int :collect)
383  (:import-from :std/array :signed-array-length)
384  (:export :take :starts-with-subseq :ends-with-subseq
385  :split-sequence :split-sequence-if :split-sequence-if-not))
386 
387 (defpkg :std/sys
388  (:use :cl)
389  (:shadowing-import-from :sb-kernel :get-lisp-obj-address :with-pinned-objects :unbound-marker-p :generation-of)
390  (:shadowing-import-from :sb-vm :list-allocated-objects)
391  (:export
392  :current-lisp-implementation
393  :save-lisp-tree-shake-and-die
394  :save-lisp-and-live))
395 
396 (defpkg :std
397  (:use :cl :sb-unicode :cl-ppcre :sb-mop :sb-c :sb-thread :sb-alien :sb-gray :sb-concurrency)
398  (:use-reexport :std/named-readtables :std/defpkg :std/err :std/sym :std/list :std/type :std/num
399  :std/stream :std/fu :std/array :std/hash-table :std/alien :std/mop :std/thread
400  :std/macs :std/bit :std/fmt :std/path :std/os :std/file :std/string :std/seq :std/sys :std/readtable))