changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/obj/pkg.lisp

changeset 679: 12287fab15d0
parent: 97dd03beda03
author: Richard Westhaver <ellis@rwest.io>
date: Thu, 26 Sep 2024 21:16:45 -0400
permissions: -rw-r--r--
description: rocksdb load opts and env updates
1 ;;; obj/pkg.lisp --- Object System
2 
3 ;;
4 
5 ;;; Code:
6 (defpackage :obj/meta
7  (:nicknames :meta)
8  (:use :cl :std)
9  (:export
10  :class-equalp
11  :*standard-metaobjects*))
12 
13 (defpackage :obj/list
14  (:nicknames :list)
15  (:use :cl :std)
16  (:import-from :sb-lockless
17  :make-ordered-list :lfl-insert
18  :lfl-delete :lfl-find
19  :lfl-insert*/t :lfl-delete*/t :lfl-find*/t
20  :do-lockfree-list :lfl-keys :make-marked-ref)
21  (:export :clist))
22 
23 (defpackage :obj/hash
24  (:nicknames :hash)
25  (:use :cl :std)
26  (:shadowing-import-from :sb-lockless :endp)
27  (:import-from :sb-lockless
28  :make-so-map/fixnum :+hash-nbits+
29  :node-hash :%node-next
30  :unbound-marker-p
31  :get-next :node-hash
32  :so-head :so-bins
33  :so-key :so-data
34  :so-count :so-key-node-p
35  :so-insert :so-delete
36  :so-find :so-find/string
37  :so-maplist :make-so-map/string
38  :make-so-set/string :make-so-set/fixnum :make-so-map/addr :make-marked-ref
39  :make-so-set/addr)
40  (:export
41  :*global-hasher*
42  :*global-hash*
43  :djb
44  :hash-object
45  :hash-object-address
46  :dumb-string-hash
47  ;; castable
48  :castable
49  :make-castable
50  :castable-p
51  :rehash
52  :castable-size
53  :castable-count
54  :castable-test
55  :castable-hasher
56  :getchash
57  :remchash
58  :try-remchash
59  :put-if-absent
60  :put-if-equal
61  :put-if-present
62  :clrchash
63  :mapchash))
64 
65 (defpackage :obj/id
66  (:nicknames :id)
67  (:use :cl :std :obj/hash)
68  (:export
69  :id :reset-id :update-id :make-id
70  :id-factory))
71 
72 (defpackage :obj/equiv
73  (:use :cl :std)
74  (:export :equiv :eqv :nequiv :neqv :equivalence))
75 
76 (defpackage :obj/uri
77  (:nicknames :uri)
78  (:use :cl :std)
79  (:export
80  :uri ; class
81  :uri-p
82  :iri ; subclass of uri
83  :iri-p
84  :copy-uri
85 
86  :uri-parse-error
87  :uri-parse-error-string
88 
89  :uri-scheme
90  :uri-userinfo
91  :uri-port
92  :uri-path
93  :uri-query
94  :uri-fragment
95  :uri-ipv6
96  :uri-zone-id
97  :uri-plist
98  :uri-authority ; pseudo-slot accessor
99  :uri-host
100  :urn ; class
101  :urn-nid
102  :urn-nss
103  :urn-q-component ; RFC 8141
104  :urn-f-component ; RFC 8141
105  :urn-r-component ; RFC 8141
106  :*strict-parse*
107  :parse-uri
108  :merge-uris
109  :enough-uri
110  :uri-parsed-path
111  :render-uri
112  :string-to-uri
113  :uri-to-string
114  :string-to-iri
115  :iri-to-string
116  :parse-uri-string-rfc3986
117  :parse-iri-string-rfc3987
118  :make-uri-space ; interning...
119  :uri-space
120  :uri=
121  :intern-uri
122  :unintern-uri
123  :do-all-uris
124  :uri-to-pathname
125  :pathname-to-uri
126  ;; domains
127  :parse-domain
128  :ipv4-addr-p
129  :ipv6-addr-p
130  :ip-addr-p
131  :ip-addr=
132  :uri-tld
133  :uri-domain))
134 
135 (pkg:defpkg :obj/url
136  (:nicknames :url)
137  (:use :cl :std :obj/uri)
138  (:shadowing-import-from :quri :url-encode :url-decode :url-encode-params :url-decode-params)
139  (:export :url-encode :url-decode :url-encode-params :url-decode-params))
140 
141 (defpackage :obj/seq
142  (:nicknames :seq)
143  (:use :cl :std)
144  (:export :iterator :ring))
145 
146 (defpackage :obj/tree
147  (:nicknames :tree)
148  (:use :cl :std :obj/id :obj/seq)
149  (:export :keytype :tree-node :binary-node :unary-node :ternary-node :avl-node
150  :make-node :make-binary-node :make-unary-node :make-ternary-node :make-avl-node))
151 
152 (defpackage :obj/graph
153  (:nicknames :graph)
154  (:use :cl :std :obj/id :obj/seq)
155  (:export
156  :vertex :edge :graph :make-edge :make-graph
157  :nodes :edges :add-node :add-edge
158  :weighted-edge :directed-edge :undirected-edge :directed-graph
159  :edge-value :edge-weight :node-edges))
160 
161 (defpackage :obj/color
162  (:nicknames :color)
163  (:use :cl :std)
164  (:export
165  #:rgb #:rgb-red #:rgb-green #:rgb-blue #:gray #:&rgb
166  #:hsv #:hsv-hue #:hsv-saturation #:hsv-value #:&hsv
167  #:rgb-to-hsv #:hsv-to-rgb #:hex-to-rgb #:as-hsv #:as-rgb
168  #:rgb-combination #:hsv-combination
169  #:parse-hex-rgb #:print-hex-rgb
170  :color-palette :parse-and-write-color-definitions
171  :*x11-colors* :*x11-color-palette* :*default-color-palette* :color-palette
172  #:make-color-palette
173  #:color-palette-p
174  #:copy-color-palette
175  #:color-palette-table))
176 
177 (defpackage :obj/time
178  (:nicknames :time)
179  (:use :cl :std)
180  (:export
181  :iso-time
182  :rfc-1123-date
183  :timestamp
184  :date
185  :time-of-day
186  :make-timestamp
187  :clone-timestamp
188  :day-of
189  :sec-of
190  :nsec-of
191  :timestamp<
192  :timestamp<=
193  :timestamp>
194  :timestamp>=
195  :timestamp=
196  :timestamp/=
197  :timestamp-maximum
198  :timestamp-minimum
199  :adjust-timestamp
200  :adjust-timestamp!
201  :timestamp-whole-year-difference
202  :days-in-month
203  :timestamp-
204  :timestamp+
205  :timestamp-difference
206  :timestamp-minimize-part
207  :timestamp-maximize-part
208  :with-decoded-timestamp
209  :decode-timestamp
210  :timestamp-century
211  :timestamp-day
212  :timestamp-day-of-week
213  :timestamp-decade
214  :timestamp-hour
215  :timestamp-microsecond
216  :timestamp-millennium
217  :timestamp-millisecond
218  :timestamp-minute
219  :timestamp-month
220  :timestamp-second
221  :timestamp-week
222  :timestamp-year
223  :parse-timestring
224  :invalid-timestring
225  :format-timestring
226  :format-rfc1123-timestring
227  :to-rfc1123-timestring
228  :format-rfc3339-timestring
229  :to-rfc3339-timestring
230  :encode-timestamp
231  :parse-rfc3339-timestring
232  :universal-to-timestamp
233  :timestamp-to-universal
234  :unix-to-timestamp
235  :timestamp-to-unix
236  :timestamp-subtimezone
237  :define-timezone
238  :*default-timezone*
239  :*clock*
240  :leap-second-adjusted
241  :clock-now
242  :clock-today
243  :find-timezone-by-location-name
244  :timezones-matching-subzone
245  :all-timezones-matching-subzone
246  :reread-timezone-repository
247  :now
248  :today
249  :format-date-simple
250  :enable-read-macros
251  :+utc-zone+
252  :+gmt-zone+
253  :+month-names+
254  :+short-month-names+
255  :+day-names+
256  :+short-day-names+
257  :+seconds-per-day+
258  :+seconds-per-hour+
259  :+seconds-per-minute+
260  :+minutes-per-day+
261  :+minutes-per-hour+
262  :+hours-per-day+
263  :+days-per-week+
264  :+months-per-year+
265  :+iso-8601-format+
266  :+iso-8601-date-format+
267  :+iso-8601-time-format+
268  :+rfc3339-format+
269  :+rfc3339-format/date-only+
270  :+asctime-format+
271  :+rfc-1123-format+
272  :+iso-week-date-format+
273  :astronomical-julian-date
274  :modified-julian-date
275  :astronomical-modified-julian-date
276  :zone-name
277  :encode-universal-time-with-tz
278  :decode-universal-time-with-tz))
279 
280 (defpackage :obj/uuid
281  (:nicknames :uuid)
282  (:use :cl :std :obj/id :obj/time)
283  (:export
284  :uuid :*ticks-per-count* :format-as-urn :make-null-uuid
285  :make-uuid-from-string :make-v1-uuid :make-v3-uuid :make-v4-uuid
286  :make-v5-uuid :uuid= :+namespace-dns+ :+namespace-oid+ :+namespace-x500+
287  :uuid-to-octet-vector :octet-vector-to-uuid))
288 
289 (defpackage :obj/music
290  (:nicknames :music)
291  (:use :cl :std)
292  (:export
293  :*bpm* :*key-signature* :*time-signature*
294  :*chord-table* :*key-table* :*tone-table*))
295 
296 (defpackage :obj/temperature
297  (:nicknames :temperature)
298  (:use :cl :std)
299  (:export :fahrenheit :celsius :kelvin :rankine))
300 
301 (defpackage :obj/direction
302  (:nicknames :direction)
303  (:use :cl :std)
304  (:export :up :down :left
305  :right :east :west :north
306  :north-east :north-west :south-east :south-west
307  :direction :angle))
308 
309 (defpackage :obj/shape
310  (:nicknames :shape)
311  (:use :cl :std)
312  (:export :circle :square :cube :sphere :triangle :pyramid))
313 
314 (defpackage :obj/cfg
315  (:nicknames :cfg)
316  (:use :cl :std)
317  (:export :cfg :make-cfg :find-cfg
318  :cfg-find :cfg-get :defcfg
319  :load-cfg))
320 
321 (defpackage :obj/db
322  (:nicknames :db)
323  (:use :cl :std :id :seq :sb-mop :sb-pcl)
324  (:export
325  :get-val
326  :set-val
327  :dbs
328  :get-db
329  :add-db
330  :make-db
331  :close-db
332  :destroy-db
333  :connect-db
334  :query-db
335  :db-get
336  :db
337  :database
338  :db-closed-p
339  :db-open-p))
340 
341 (defpackage :obj/query
342  (:nicknames :query)
343  (:use :cl :std)
344  (:export :query
345  :data-source
346  :query-expression
347  :logical-expression
348  :column-expression
349  :literal-expression
350  :field
351  :fields
352  :row-count
353  :column-count
354  :record-batch
355  :schema
356  :derive-schema
357  :load-schema
358  :make-schema
359  :make-query
360  :field-vector
361  :*literal-value-types*
362  :literal-value-type
363  :literal-value-vector
364  :projection
365  :selection
366  :aggregate
367  :data-frame
368  :execution-context
369  :physical-expression
370  :physical-plan
371  :scan-exec
372  :scan-data
373  :execute-query
374  :aggregate-function
375  :aggregate-function-designator
376  :aggregate-expression
377  :binary-expression
378  :unary-expression
379  :alias-expression
380  :query-optimizer
381  :make-physical-plan
382  :make-physical-expression
383  :query-planner
384  :hash-aggregate-exec
385  :filter
386  :selection-exec
387  :projection-exec
388  :execute
389  :max-physical-expression
390  :aggregate-physical-expression
391  :accumulated
392  :accumulate
393  :accumulator
394  :math-physical-expression
395  :equiv-physical-expression
396  :binary-physical-expression
397  :literal-physical-expression
398  :column-physical-expression
399  :evaluate
400  :schema-metadata
401  :make-record-batch
402  :record-batch-p
403  :copy-record-batch
404  :record-batch-schema
405  :record-batch-fields
406  :make-field
407  :field-p
408  :copy-field
409  :field-name
410  :field-type
411  :column-size
412  :column-value
413  :column-type
414  :column-vector
415  :column-data
416  :math-expression
417  :add-expression
418  :sub-expression
419  :mult-expression
420  :div-expression
421  :mod-expression
422  :and-expression
423  :or-expression
424  :lteq-expression
425  :gteq-expression
426  :lt-expression
427  :gt-expression
428  :neq-expression
429  :eq-expression
430  :lhs
431  :rhs
432  :logical-plan
433  :aggregate-expression-p
434  :df-col
435  :df-project
436  :df-filter
437  :df-aggregate
438  :df-select
439  :df-fields
440  :df-data
441  :limit
442  :make-df
443  :binary-expression-name
444  :binary-expression-op
445  :sum-expression
446  :min-expression
447  :max-expression
448  :avg-expression
449  :count-expression
450  :to-field
451  :column-name
452  :cast-expression
453  :df-plan
454  :df-exec
455  :execute*
456  :register-file
457  :register-data-source
458  :register-df
459  :file-data-path
460  :file-data-source
461  :optimize-query
462  :projection-pushdown-optimizer
463  :extract-columns*
464  :extract-columns
465  :query-vop
466  :expr
467  :load-field))
468 
469 (defpackage :obj/secret
470  (:nicknames :secret)
471  (:use :cl :std)
472  (:export :secret-object :reveal-object :conceal-object
473  :ensure-revealed :ensure-concealed))
474 
475 (defpackage :obj/build
476  (:use :cl :std)
477  (:export :build :build-from))
478 
479 (uiop:define-package :obj
480  (:use-reexport :list :hash :color
481  :seq :tree :graph :id
482  :db :time :uri :url
483  :cfg :music :temperature :direction
484  :shape :secret :query))