changelog shortlog graph tags branches changeset files revisions annotate raw help

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

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