changelog shortlog graph tags branches changeset files file revisions raw help

Mercurial > core / annotate lisp/lib/cli/tests.lisp

changeset 282: da580c7fe954
parent: 282991a71fe5
child: c4682fedd73d
author: Richard Westhaver <ellis@rwest.io>
date: Wed, 17 Apr 2024 22:53:44 -0400
permissions: -rw-r--r--
description: upgrades
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
1
 (defpackage :cli/tests
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
2
   (:use :cl :std :rt :cli :cli/shell :cli/progress :cli/spark :cli/repl :cli/ansi :cli/prompt))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
3
 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
4
 (in-package :cli/tests)
109
a5adbe8640b0 tests, bug fixes, parser init
ellis <ellis@rwest.io>
parents: 96
diff changeset
5
 (defsuite :cli)
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
6
 (in-suite :cli)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
7
 
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
8
 (defun ansi-t01 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
9
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
10
   (cursor-position 0 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
11
   (princ "0")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
12
   (cursor-position 2 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
13
   (princ "1")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
14
   (cursor-position 5 15)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
15
   (princ "test")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
16
   (cursor-position 10 15)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
17
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
18
   (let ((a (read-line)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
19
     (cursor-position 12 15)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
20
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
21
     (force-output)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
22
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
23
 (defun ansi-t02 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
24
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
25
   (.sgr 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
26
   (print "bold")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
27
   (.sgr 4)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
28
   (print "bold underline")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
29
   (.sgr 7)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
30
   (print "bold underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
31
   (.sgr 22)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
32
   (print "underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
33
   (.sgr 24)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
34
   (print "reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
35
   (.sgr 27)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
36
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
37
   (.sgr 1 4 7)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
38
   (print "bold underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
39
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
40
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
41
   (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
42
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
43
 (defun ansi-t03 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
44
   "Display the 256 color palette."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
45
   (clear)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
46
   (loop for i from 0 to 255 do
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
47
     (.sgr 48 5 i)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
48
     (princ #\space))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
49
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
50
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
51
   (loop for i from 0 to 255 do
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
52
     (.sgr 38 5 i)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
53
     (princ "X"))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
54
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
55
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
56
   (sleep 3)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
57
   (.ris)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
58
   (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
59
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
60
 (defun ansi-t04 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
61
   "Hide and show the cursor."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
62
   (princ "Cursor visible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
63
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
64
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
65
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
66
   (princ "Cursor invisible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
67
   (hide-cursor)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
68
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
69
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
70
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
71
   (princ "Cursor visible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
72
   (show-cursor)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
73
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
74
   (sleep 2))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
75
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
76
 (defun ansi-t05 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
77
   "Switch to and back from the alternate screen buffer."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
78
   (princ "Normal screen buffer. ")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
79
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
80
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
81
   (save-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
82
   (use-alternate-screen-buffer)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
83
   (clear)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
84
   (princ "Alternate screen buffer.")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
85
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
86
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
87
   (use-normal-screen-buffer)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
88
   (restore-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
89
   (princ "Back to Normal screen buffer.")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
90
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
91
   (sleep 1))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
92
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
93
 (defun ansi-t06 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
94
   "Set individual termios flags to enable raw and disable echo mode.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
95
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
96
 Enabling raw mode allows read-char to return immediately after a key is pressed.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
97
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
98
 In the default cooked mode, the entry has to be confirmed by pressing enter."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
99
   (set-tty-mode t :ignbrk nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
100
                   :brkint nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
101
                   :parmrk nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
102
                   :istrip nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
103
                   :inlcr  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
104
                   :igncr  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
105
                   :icrnl  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
106
                   :ixon   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
107
                   :opost  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
108
                   :echo   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
109
                   :echonl nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
110
                   :icanon nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
111
                   :isig   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
112
                   :iexten nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
113
                   :csize  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
114
                   :parenb nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
115
                   :vmin 1
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
116
                   :vtime 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
117
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
118
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
119
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
120
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
121
     (cursor-position 10 5)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
122
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
123
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
124
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
125
   (set-tty-mode t :echo t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
126
                   :brkint t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
127
                   :ignpar t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
128
                   :istrip t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
129
                   :icrnl t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
130
                   :ixon t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
131
                   :opost t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
132
                   :isig t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
133
                   :icanon t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
134
                   :veol 0))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
135
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
136
 (defun ansi-t07 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
137
   "Use combination modes that consist of several individual flags.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
138
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
139
 Cooked and raw are opposite modes. Enabling cooked disbles raw and vice versa."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
140
   (set-tty-mode t :cooked nil)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
141
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
142
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
143
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
144
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
145
     (cursor-position 3 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
146
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
147
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
148
   (set-tty-mode t :raw nil))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
149
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
150
 (defun ansi-t08 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
151
   "Why doesnt calling the stty utility work?"
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
152
   (uiop:run-program "stty raw -echo" :ignore-error-status t)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
153
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
154
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
155
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
156
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
157
     (cursor-position 2 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
158
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
159
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
160
   (uiop:run-program "stty -raw echo" :ignore-error-status t))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
161
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
162
 (defun ansi-t09 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
163
   "Query terminal size with ANSI escape sequences."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
164
   ;; Put the terminal into raw mode so we can read the "user input"
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
165
   ;; of the reply char by char
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
166
   ;; Turn off the echo or the sequence will be displayed
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
167
   (set-tty-mode t :cooked nil :echo nil)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
168
   (save-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
169
   ;; Go to the bottom right corner of the terminal by attempting
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
170
   ;; to go to some high value of row and column
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
171
   (cursor-position 999 999)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
172
   (let (chars)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
173
     ;; The terminal returns an escape sequence to the standard input
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
174
     (device-status-report)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
175
     (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
176
     ;; The reply isnt immediately available, the terminal does need
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
177
     ;; some time to answer
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
178
     (sleep 0.1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
179
     ;; The reply has to be read as if the user typed an escape sequence
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
180
     (loop for i = (read-char-no-hang *standard-input* nil)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
181
           until (null i)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
182
           do (push i chars))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
183
     ;; Put the terminal back into its initial cooked state
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
184
     (set-tty-mode t :raw nil :echo t)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
185
     (restore-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
186
     ;; Return the read sequence as a list of characters.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
187
     (nreverse chars)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
188
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
189
 (deftest ansi ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
190
   ;; (ansi-t01)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
191
   (ansi-t02)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
192
   (ansi-t03)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
193
   (ansi-t04)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
194
   ;;(ansi-t05)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
195
 )
116
797d729e14cc added cli/ansi and did some work on ffi/xkb
ellis <ellis@rwest.io>
parents: 110
diff changeset
196
 
282
da580c7fe954 upgrades
Richard Westhaver <ellis@rwest.io>
parents: 230
diff changeset
197
 (deftest cli-prompt (:disabled nil) ;; FIXME: hijacks io in slime
110
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
198
   "Test CLI prompts"
157
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
199
   ;; TODO: needs to be compiled outside scope of test - contender for
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
200
   ;; fixture API
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
201
   (defprompt tpfoo "testing: ")
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
202
   (defvar tcoll nil)
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
203
   (defvar thist nil)
110
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
204
   (let ((*standard-input* (make-string-input-stream 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
205
 			   (format nil "~A~%~A~%~%" "foobar" "foobar"))))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
206
     ;; prompts 
110
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
207
     (is (string= (tpfoo-prompt) "foobar"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
208
     (is (string= "foobar"
117
d0b235557fab test fixes, cli refactoring
ellis <ellis@rwest.io>
parents: 116
diff changeset
209
                  (completing-read "nothing: " tcoll :history thist :default "foobar")))))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
210
 
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
211
 (defparameter *opts* (cli:make-opts
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
212
                        (:name foo :global t :description "bar")
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
213
 		       (:name bar :description "foo")))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
214
 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
215
 (defparameter *cmd1* (make-cli :cmd :name "holla" :opts *opts* :description "cmd1 description"))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
216
 (defparameter *cmd2* (make-cli :cmd :name "ayo" :cmds #(*cmd1*) :opts *opts* :description "cmd1 description"))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
217
 (defparameter *cmds* (cli:make-cmds (:name "baz" :description "baz" :opts *opts*)))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
218
 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
219
 (defparameter *cli* (make-cli t :opts *opts* :cmds *cmds* :description "test cli"))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
220
 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
221
 (deftest cli ()
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
222
   "test MACS.CLI OOS."
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
223
   (let ((cli *cli*))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
224
     (is (eq (make-shorty "test") #\t))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
225
     (is (equalp (proc-args cli '("-f" "baz" "--bar" "fax")) ;; not eql
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
226
 		(make-cli-ast 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
227
 		 (list (make-cli-node 'opt (find-short-opt cli #\f))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
228
 		       (make-cli-node 'cmd (find-cmd cli "baz"))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
229
 		       (make-cli-node 'opt (find-opt cli "bar"))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
230
 		       (make-cli-node 'arg "fax")))))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
231
     (is (parse-args cli '("--bar" "baz" "-f" "yaks")))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
232
     (is (stringp
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
233
 	 (with-output-to-string (s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
234
 	   (print-version cli s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
235
 	   (print-usage cli s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
236
 	   (print-help cli s))))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
237
     (is (string= "foobar" (parse-str-opt "foobar")))))
110
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
238
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
239
 (deftest progress ()
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
240
   (flet ((%step () (cli/progress::update 1)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
241
     (let ((*progress-bar-enabled* t)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
242
           (n 100))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
243
       (with-progress-bar (n "TEST: # of steps = ~a" n)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
244
         (dotimes (i n) (%step))))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
245
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
246
 (deftest spark ()
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
247
   (is (string= 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
248
        (cli/spark:spark '(1 5 22 13 5))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
249
        "▁▂█▅▂"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
250
   (is (string= 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
251
        (spark '(5.5 20))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
252
        "▁█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
253
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
254
        (spark '(1 2 3 4 100 5 10 20 50 300))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
255
        "▁▁▁▁▃▁▁▁▂█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
256
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
257
        (spark '(1 50 100))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
258
        "▁▄█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
259
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
260
        (spark '(2 4 8))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
261
        "▁▃█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
262
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
263
        (spark '(1 2 3 4 5))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
264
        "▁▂▄▆█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
265
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
266
        (spark '(0 30 55 80 33 150))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
267
        "▁▂▃▄▂█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
268
   ;; null
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
269
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
270
        (spark '())
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
271
        ""))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
272
   ;; singleton
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
273
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
274
        (spark '(42))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
275
        "▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
276
   ;; constant
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
277
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
278
        (spark '(42 42))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
279
        "▁▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
280
   ;; min/max
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
281
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
282
        (spark '(0 30 55 80 33 150) :min -100)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
283
        "▃▄▅▆▄█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
284
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
285
        (spark '(0 30 55 80 33 150) :max 50)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
286
        "▁▅██▅█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
287
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
288
        (spark '(0 30 55 80 33 150) :min 30 :max 80)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
289
        "▁▁▄█▁█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
290
   ;; double-float, minus
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
291
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
292
        (spark '(1.000000000005d0 0.000000000005d0 1.0d0))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
293
        "█▁▇"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
294
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
295
        (spark '(-1 0 -1))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
296
        "▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
297
   (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
298
        (spark '(-1.000000000005d0 0.000000000005d0 -1.0d0))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
299
        "▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
300
   ;; *ticks*
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
301
   (let ((ternary '(-1 0 1 -1 1 0 0 -1 1 1 0)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
302
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
303
          (spark ternary)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
304
          "▁▄█▁█▄▄▁██▄"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
305
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
306
          (let ((*ticks* #(#\_ #\- #\¯)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
307
            (spark ternary))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
308
          "_-¯_¯--_¯¯-"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
309
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
310
          (let ((*ticks* #(#\▄ #\⎯ #\▀)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
311
            (spark ternary))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
312
          "▄⎯▀▄▀⎯⎯▄▀▀⎯"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
313
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
314
          (let ((*ticks* #(#\E #\O)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
315
            (spark '(4 8 15 22 42) :key (lambda (n) (mod n 2))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
316
          "EEOEE")))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
317
   ;; key
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
318
   (flet ((range (start end) (loop for i from start below end collect i))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
319
          (fib (n) (loop for x = 0 then y
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
320
                         and y = 1 then (+ x y)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
321
                         repeat n
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
322
                         finally (return x)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
323
          (fac (n) (labels ((rec (n acc) (if (<= n 1) acc (rec (1- n) (* n acc)))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
324
                     (rec n 1))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
325
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
326
          (spark (range 0 51)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
327
                 :key (lambda (x) (sin (* x pi 1/4))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
328
          "▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
329
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
330
          (spark (range 0 51)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
331
                 :key (lambda (x) (cos (* x pi 1/4))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
332
          "█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
333
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
334
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
335
          (spark (range 0 51)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
336
                 :key (lambda (x) (abs (cis (* x pi 1/4)))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
337
          "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
338
     
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
339
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
340
          (spark (range 0 51)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
341
                 :key (lambda (x) (float (phase (cis (* x pi 1/4))) 1.0)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
342
          "▄▅▆▇█▁▁▂▄▅▆▇█▁▁▂▄▅▆▇█▁▁▂▄▅▆▇█▁▁▂▄▅▆▇█▁▁▂▄▅▆▇█▁▁▂▄▅▆"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
343
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
344
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
345
          (spark (range 1 7) :key #'log)   
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
346
          "▁▃▅▆▇█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
347
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
348
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
349
          (spark (range 1 7) :key #'sqrt)  
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
350
          "▁▃▄▅▆█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
351
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
352
          (spark (range 1 7))              
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
353
          "▁▂▃▅▆█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
354
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
355
          (spark (range 1 7) :key #'fib)   
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
356
          "▁▁▂▃▅█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
357
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
358
          (spark (range 1 7) :key #'exp)   
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
359
          "▁▁▁▁▃█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
360
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
361
          (spark (range 1 7) :key #'fac)   
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
362
          "▁▁▁▁▂█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
363
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
364
          (spark (range 1 7) :key #'isqrt) 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
365
          "▁▁▁███"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
366
     ;; misc
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
367
     (flet ((lbits (n) (spark (map 'list #'digit-char-p (write-to-string n :base 2)))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
368
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
369
            (lbits 42) 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
370
            "█▁█▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
371
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
372
            (lbits 43) 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
373
            "█▁█▁██"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
374
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
375
            (lbits 44) 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
376
            "█▁██▁▁"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
377
       (is (string= 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
378
            (lbits 45) 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
379
            "█▁██▁█")))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
380
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
381
     ;; VSPARK
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
382
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
383
          (vspark '())
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
384
          ""))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
385
     ;; singleton
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
386
     (is (string= 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
387
          (vspark '(1))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
388
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
389
 1                      1.5                       2
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
390
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
391
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
392
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
393
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
394
     ;; constant
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
395
     (is (string= 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
396
          (vspark '(1 1))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
397
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
398
 1                      1.5                       2
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
399
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
400
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
401
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
402
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
403
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
404
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
405
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
406
          (vspark '(0 30 55 80 33 150))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
407
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
408
 0                      75                      150
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
409
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
410
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
411
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
412
 ██████████████████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
413
 ██████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
414
 ███████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
415
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
416
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
417
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
418
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
419
     ;; min, max
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
420
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
421
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
422
          (vspark '(0 30 55 80 33 150) :min -100)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
423
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
424
 -100                    25                     150
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
425
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
426
 ████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
427
 ██████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
428
 ███████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
429
 ████████████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
430
 ██████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
431
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
432
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
433
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
434
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
435
          (vspark '(0 30 55 80 33 150) :max 50)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
436
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
437
 0                      25                       50
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
438
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
439
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
440
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
441
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
442
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
443
 █████████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
444
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
445
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
446
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
447
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
448
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
449
          (vspark '(0 30 55 80 33 150) :min 30 :max 80)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
450
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
451
 30                      55                      80
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
452
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
453
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
454
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
455
 █████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
456
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
457
 ███▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
458
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
459
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
460
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
461
     ;; labels
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
462
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
463
          (vspark '(1 0 .5) :labels '("on" "off" "unknown")
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
464
                            :size 1
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
465
                            :scale? nil)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
466
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
467
      on █
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
468
     off ▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
469
 unknown ▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
470
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
471
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
472
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
473
          (vspark '(1 0 .5) :labels '("on" "off")
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
474
                            :size 1
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
475
                            :scale? nil)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
476
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
477
  on █
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
478
 off ▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
479
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
480
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
481
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
482
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
483
          (vspark '(1 0) :labels '("on" "off" "unknown")
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
484
                         :size 1
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
485
                         :scale? nil)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
486
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
487
  on █
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
488
 off ▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
489
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
490
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
491
     ;; key
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
492
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
493
          (vspark '(0 1 2 3 4 5 6 7 8) :key (lambda (x) (sin (* x pi 1/4))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
494
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
495
 -1.0                    0.0                    1.0
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
496
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
497
 █████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
498
 ██████████████████████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
499
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
500
 ██████████████████████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
501
 █████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
502
 ███████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
503
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
504
 ███████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
505
 ████████████████████████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
506
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
507
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
508
     ;; size
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
509
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
510
          (vspark '(0 1 2 3 4 5 6 7 8) :key (lambda (x) (sin (* x pi 1/4)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
511
                                       :size 10)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
512
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
513
 -1.0   1.0
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
514
 ˫--------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
515
 █████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
516
 ████████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
517
 ██████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
518
 ████████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
519
 █████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
520
 █▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
521
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
522
 █▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
523
 ████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
524
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
525
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
526
     ;; scale (mid-point)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
527
     (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
528
          (vspark '(0 1 2 3 4 5 6 7 8) :key (lambda (x) (sin (* x pi 1/4)))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
529
                                       :size 20)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
530
          "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
531
 -1.0     0.0     1.0
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
532
 ˫--------+---------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
533
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
534
 █████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
535
 ████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
536
 █████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
537
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
538
 ██▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
539
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
540
 ██▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
541
 █████████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
542
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
543
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
544
     (let ((life-expectancies '(("Africa" 56)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
545
                                ("Americans" 76)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
546
                                ("South-East Asia" 67)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
547
                                ("Europe" 76)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
548
                                ("Eastern Mediterranean" 68)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
549
                                ("Western Pacific" 76)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
550
                                ("Global" 70))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
551
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
552
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
553
            (vspark life-expectancies :key #'second)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
554
            "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
555
 56                      66                      76
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
556
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
557
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
558
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
559
 ███████████████████████████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
560
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
561
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
562
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
563
 ███████████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
564
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
565
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
566
       ;; newline?
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
567
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
568
            (vspark life-expectancies :key #'second :scale? nil :newline? nil)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
569
            "▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
570
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
571
 ███████████████████████████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
572
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
573
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
574
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
575
 ███████████████████████████████████▏"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
576
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
577
       ;; scale?
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
578
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
579
            (vspark life-expectancies :key #'second :scale? nil)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
580
            "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
581
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
582
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
583
 ███████████████████████████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
584
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
585
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
586
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
587
 ███████████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
588
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
589
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
590
       ;; labels
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
591
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
592
            (vspark life-expectancies
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
593
                    :key   #'second
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
594
                    :labels (mapcar #'first life-expectancies))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
595
            "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
596
                       56           66           76
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
597
                       ˫------------+-------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
598
                Africa ▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
599
             Americans ████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
600
       South-East Asia ███████████████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
601
                Europe ████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
602
 Eastern Mediterranean ████████████████▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
603
       Western Pacific ████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
604
                Global ███████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
605
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
606
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
607
       ;; title
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
608
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
609
            (vspark life-expectancies
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
610
                    :min 50 :max 80
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
611
                    :key    #'second
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
612
                    :labels (mapcar #'first life-expectancies)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
613
                    :title "Life Expectancy")
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
614
            "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
615
                  Life Expectancy                  
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
616
                       50           65           80
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
617
                       ˫------------+-------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
618
                Africa █████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
619
             Americans ████████████████████████▎
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
620
       South-East Asia ███████████████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
621
                Europe ████████████████████████▎
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
622
 Eastern Mediterranean ████████████████▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
623
       Western Pacific ████████████████████████▎
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
624
                Global ██████████████████▋
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
625
 "))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
626
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
627
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
628
            (spark (range 0 15) :key #'fib)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
629
            "▁▁▁▁▁▁▁▁▁▁▂▂▃▅█"))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
630
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
631
       (is (string=
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
632
            (vspark (range 0 15) :key #'fib)
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
633
            "
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
634
 0                    188.5                     377
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
635
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
636
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
637
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
638
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
639
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
640
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
641
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
642
 █▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
643
 █▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
644
 ██▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
645
 ████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
646
 ███████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
647
 ███████████▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
648
 ███████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
649
 ██████████████████████████████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
650
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
651
 ")))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
652
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
653
 (deftest repl ())
157
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
654
 
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
655
 (deftest env ()
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
656
   (is (ld-library-path-list))
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
657
   (is (exec-path-list))
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
658
   (is (find-exe "sbcl")))
229
7ca4cdbd52c2 bug fixes
Richard Westhaver <ellis@rwest.io>
parents: 157
diff changeset
659
 
7ca4cdbd52c2 bug fixes
Richard Westhaver <ellis@rwest.io>
parents: 157
diff changeset
660
 (deftest clap-ast ())