changelog shortlog graph tags branches changeset files revisions annotate raw help

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

changeset 234: d7aa08025537
parent: 282991a71fe5
child: a3b65a8138ac
author: Richard Westhaver <ellis@rwest.io>
date: Wed, 20 Mar 2024 22:51:48 -0400
permissions: -rw-r--r--
description: cry, obj/meta, ffi/magick
1 (defpackage :obj/meta
2  (:nicknames :meta)
3  (:use :cl :std)
4  (:export
5  :class-equalp
6  :*standard-metaobjects*))
7 
8 (defpackage :obj/list
9  (:nicknames :list)
10  (:use :cl :std)
11  (:export :clist))
12 
13 (defpackage :obj/hash
14  (:nicknames :hash)
15  (:use :cl :std)
16  (:export
17  :*global-hasher*
18  :+global-hash+
19  :djb
20  :hash-object
21  :hash-object-address
22  :dumb-string-hash
23  ;; castable
24  :castable
25  :make-castable
26  :castable-p
27  :rehash
28  :castable-size
29  :castable-count
30  :castable-test
31  :castable-hasher
32  :getchash
33  :remchash
34  :try-remchash
35  :put-if-absent
36  :put-if-equal
37  :put-if-present
38  :clrchash
39  :mapchash))
40 
41 (defpackage :obj/id
42  (:nicknames :id)
43  (:use :cl :std :obj/hash)
44  (:export
45  :id :reset-id :update-id :make-id
46  :id-factory))
47 
48 (defpackage :obj/equiv
49  (:use :cl :std)
50  (:export :equiv :eqv :nequiv :neqv :equivalence))
51 
52 (defpackage :obj/uri
53  (:nicknames :uri)
54  (:use :cl :std :obj/id))
55 
56 (defpackage :obj/url
57  (:nicknames :url)
58  (:use :cl :std :obj/uri))
59 
60 (defpackage :obj/seq
61  (:nicknames :seq)
62  (:use :cl :std)
63  (:export :iterator :ring))
64 
65 (defpackage :obj/tree
66  (:nicknames :tree)
67  (:use :cl :std :obj/id :obj/seq)
68  (:export :keytype :node :tree-node :binary-node :unary-node :ternary-node :avl-node
69  :make-tree-node :make-binary-node :make-unary-node :make-ternary-node :make-avl-node))
70 
71 (defpackage :obj/graph
72  (:nicknames :graph)
73  (:use :cl :std :obj/id :obj/seq)
74  (:export
75  :vertex :edge :graph
76  :weighted-edge :directed-edge :undirected-edge))
77 
78 (defpackage :obj/color
79  (:nicknames :color)
80  (:use :cl :std)
81  (:export
82  #:rgb #:rgb-red #:rgb-green #:rgb-blue #:gray #:&rgb
83  #:hsv #:hsv-hue #:hsv-saturation #:hsv-value #:&hsv
84  #:rgb-to-hsv #:hsv-to-rgb #:hex-to-rgb #:as-hsv #:as-rgb
85  #:rgb-combination #:hsv-combination
86  #:parse-hex-rgb #:print-hex-rgb
87  :color-palette :parse-and-write-color-definitions))
88 
89 (defpackage :obj/time
90  (:nicknames :time)
91  (:use :cl :std)
92  (:export
93  :timestamp
94  :date
95  :time-of-day
96  :make-timestamp
97  :clone-timestamp
98  :day-of
99  :sec-of
100  :nsec-of
101  :timestamp<
102  :timestamp<=
103  :timestamp>
104  :timestamp>=
105  :timestamp=
106  :timestamp/=
107  :timestamp-maximum
108  :timestamp-minimum
109  :adjust-timestamp
110  :adjust-timestamp!
111  :timestamp-whole-year-difference
112  :days-in-month
113  :timestamp-
114  :timestamp+
115  :timestamp-difference
116  :timestamp-minimize-part
117  :timestamp-maximize-part
118  :with-decoded-timestamp
119  :decode-timestamp
120  :timestamp-century
121  :timestamp-day
122  :timestamp-day-of-week
123  :timestamp-decade
124  :timestamp-hour
125  :timestamp-microsecond
126  :timestamp-millennium
127  :timestamp-millisecond
128  :timestamp-minute
129  :timestamp-month
130  :timestamp-second
131  :timestamp-week
132  :timestamp-year
133  :parse-timestring
134  :invalid-timestring
135  :format-timestring
136  :format-rfc1123-timestring
137  :to-rfc1123-timestring
138  :format-rfc3339-timestring
139  :to-rfc3339-timestring
140  :encode-timestamp
141  :parse-rfc3339-timestring
142  :universal-to-timestamp
143  :timestamp-to-universal
144  :unix-to-timestamp
145  :timestamp-to-unix
146  :timestamp-subtimezone
147  :define-timezone
148  :*default-timezone*
149  :*clock*
150  :leap-second-adjusted
151  :clock-now
152  :clock-today
153  :find-timezone-by-location-name
154  :timezones-matching-subzone
155  :all-timezones-matching-subzone
156  :reread-timezone-repository
157  :now
158  :today
159  :format-date-simple
160  :enable-read-macros
161  :+utc-zone+
162  :+gmt-zone+
163  :+month-names+
164  :+short-month-names+
165  :+day-names+
166  :+short-day-names+
167  :+seconds-per-day+
168  :+seconds-per-hour+
169  :+seconds-per-minute+
170  :+minutes-per-day+
171  :+minutes-per-hour+
172  :+hours-per-day+
173  :+days-per-week+
174  :+months-per-year+
175  :+iso-8601-format+
176  :+iso-8601-date-format+
177  :+iso-8601-time-format+
178  :+rfc3339-format+
179  :+rfc3339-format/date-only+
180  :+asctime-format+
181  :+rfc-1123-format+
182  :+iso-week-date-format+
183  :astronomical-julian-date
184  :modified-julian-date
185  :astronomical-modified-julian-date
186  :zone-name
187  :encode-universal-time-with-tz
188  :decode-universal-time-with-tz))
189 
190 (defpackage :obj/music
191  (:nicknames :music)
192  (:use :cl :std)
193  (:export
194  :*bpm* :*key-signature* :*time-signature*
195  :*chord-table* :*key-table* :*tone-table*))
196 
197 (defpackage :obj/tbl
198  (:nicknames :tbl)
199  (:use :cl :std)
200  (:import-from :uiop :split-string)
201  (:export
202  :table
203  :row
204  :make-table
205  :make-row
206  :add-to-table
207  :add-to-row
208  :get-row
209  :get-row-column
210  :set-row-column
211  :num-rows
212  :num-cols
213  :num-col
214  :rectangular-table-p
215  :sequence->row
216  :row-sequence->table
217  :with-rows
218  :select
219  :distinct
220  :top
221  :order-by
222  :where
223  :where-filter
224  :where-or
225  :where-and
226  :table-from-csv
227  :table-from-tvs))
228 
229 (defpackage :obj/temperature
230  (:nicknames :temperature)
231  (:use :cl :std)
232  (:export :fahrenheit :celsius :kelvin :rankine))
233 
234 (defpackage :obj/direction
235  (:nicknames :direction)
236  (:use :cl :std)
237  (:export :up :down :left
238  :right :east :west :north
239  :north-east :north-west :south-east :south-west
240  :direction :angle))
241 
242 (defpackage :obj/shape
243  (:nicknames :shape)
244  (:use :cl :std)
245  (:export :circle :square :cube :sphere :triangle :pyramid))
246 
247 (defpackage :obj/cfg
248  (:nicknames :cfg)
249  (:use :cl :std)
250  (:export :cfg :make-cfg :find-cfg :cfg-find :cfg-get))
251 
252 (defpackage :obj/db
253  (:nicknames :db)
254  (:use :cl :std :id :seq :sb-mop :sb-pcl)
255  (:export
256  :xdb
257  :collection
258  :collection-aware
259  :map-docs
260  :duplicate-doc-p
261  :find-duplicate-doc
262  :store-doc
263  :serialize-doc
264  :serialize-docs
265  :load-from-file
266  :get-collection
267  :add-collection
268  :snapshot
269  :load-db
270  :get-docs
271  :get-doc
272  :get-val
273  :set-val
274  :sum
275  :max-val
276  :document
277  :doc-type
278  :key
279  :find-doc
280  :find-docs
281  :sort-collection
282  :docs
283  :*fsync-data*
284  :storable-class
285  :dbs
286  :get-db
287  :add-db
288  :make-db
289  :close-db
290  :destroy-db
291  :connect-db
292  :query-db
293  :db-get
294  :close-db
295  :database
296  :enable-sequences
297  :next-sequence
298  :sort-docs))
299 
300 (uiop:define-package :obj
301  (:use-reexport :list :hash :color
302  :seq :tree :graph :tbl
303  :id :db :time :uri :url :cfg
304  :music :temperature :direction :shape))