changelog shortlog graph tags branches changeset files file revisions raw help

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

changeset 426: 3e721a3349a0
parent: 1816f9c53453
child: 0a197b3b6995
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 07 Jun 2024 18:06:41 -0400
permissions: -rw-r--r--
description: completed phase2 of clap migration
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
1
 (defpackage :cli/tests
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
2
   (:use :cl :std :rt :cli :cli/shell :cli/progress :cli/spark :cli/repl :cli/ansi :cli/prompt :cli/clap))
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
3
 
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
4
 (in-package :cli/tests)
405
1816f9c53453 work on sk.el
Richard Westhaver <ellis@rwest.io>
parents: 381
diff changeset
5
 (declaim (optimize (debug 3) (safety 3)))
109
a5adbe8640b0 tests, bug fixes, parser init
ellis <ellis@rwest.io>
parents: 96
diff changeset
6
 (defsuite :cli)
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
7
 (in-suite :cli)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
8
 
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
9
 (defun ansi-t01 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
10
   (erase)
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
11
     (cursor-position 0 0)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
12
     (princ "0")
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
13
     (cursor-position 2 2)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
14
     (princ "1")
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
15
     (cursor-position 5 15)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
16
     (princ "test")
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
17
     (cursor-position 10 15)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
18
     (force-output)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
19
   (with-input-from-string (in (format nil "test~%~%"))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
20
     (let ((a (read-line in)))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
21
       (cursor-position 12 15)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
22
       (princ a)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
23
       (force-output))))
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
24
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
25
 (defun ansi-t02 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
26
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
27
   (.sgr 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
28
   (print "bold")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
29
   (.sgr 4)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
30
   (print "bold underline")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
31
   (.sgr 7)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
32
   (print "bold underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
33
   (.sgr 22)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
34
   (print "underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
35
   (.sgr 24)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
36
   (print "reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
37
   (.sgr 27)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
38
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
39
   (.sgr 1 4 7)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
40
   (print "bold underline reverse")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
41
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
42
   (print "normal")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
43
   (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
44
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
45
 (defun ansi-t03 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
46
   "Display the 256 color palette."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
47
   (clear)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
48
   (loop for i from 0 to 255 do
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
49
            (.sgr 48 5 i)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
50
            (princ #\space))
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
51
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
52
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
53
   (loop for i from 0 to 255 do
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
54
            (.sgr 38 5 i)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
55
            (princ "X"))
230
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
56
   (.sgr 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
57
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
58
   (sleep 3)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
59
   (.ris)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
60
   (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
61
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
62
 (defun ansi-t04 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
63
   "Hide and show the cursor."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
64
   (princ "Cursor visible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
65
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
66
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
67
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
68
   (princ "Cursor invisible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
69
   (hide-cursor)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
70
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
71
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
72
   (terpri)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
73
   (princ "Cursor visible:")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
74
   (show-cursor)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
75
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
76
   (sleep 2))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
77
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
78
 (defun ansi-t05 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
79
   "Switch to and back from the alternate screen buffer."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
80
   (princ "Normal screen buffer. ")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
81
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
82
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
83
   (save-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
84
   (use-alternate-screen-buffer)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
85
   (clear)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
86
   (princ "Alternate screen buffer.")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
87
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
88
   (sleep 2)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
89
   (use-normal-screen-buffer)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
90
   (restore-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
91
   (princ "Back to Normal screen buffer.")
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
92
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
93
   (sleep 1))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
94
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
95
 (defun ansi-t06 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
96
   "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
97
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
98
 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
99
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
100
 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
101
   (set-tty-mode t :ignbrk nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
102
                   :brkint nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
103
                   :parmrk nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
104
                   :istrip nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
105
                   :inlcr  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
106
                   :igncr  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
107
                   :icrnl  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
108
                   :ixon   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
109
                   :opost  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
110
                   :echo   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
111
                   :echonl nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
112
                   :icanon nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
113
                   :isig   nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
114
                   :iexten nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
115
                   :csize  nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
116
                   :parenb nil
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
117
                   :vmin 1
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
118
                   :vtime 0)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
119
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
120
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
121
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
122
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
123
     (cursor-position 10 5)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
124
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
125
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
126
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
127
   (set-tty-mode t :echo t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
128
                   :brkint t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
129
                   :ignpar t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
130
                   :istrip t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
131
                   :icrnl t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
132
                   :ixon t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
133
                   :opost t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
134
                   :isig t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
135
                   :icanon t
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
136
                   :veol 0))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
137
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
138
 (defun ansi-t07 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
139
   "Use combination modes that consist of several individual flags.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
140
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
141
 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
142
   (set-tty-mode t :cooked nil)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
143
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
144
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
145
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
146
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
147
     (cursor-position 3 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
148
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
149
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
150
   (set-tty-mode t :raw nil))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
151
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
152
 (defun ansi-t08 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
153
   "Why doesnt calling the stty utility work?"
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
154
   (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
155
   (erase)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
156
   (cursor-position 1 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
157
   (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
158
   (let ((a (read-char)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
159
     (cursor-position 2 1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
160
     (princ a)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
161
     (force-output))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
162
   (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
163
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
164
 (defun ansi-t09 ()
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
165
   "Query terminal size with ANSI escape sequences."
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
166
   ;; 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
167
   ;; of the reply char by char
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
168
   ;; 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
169
   (set-tty-mode t :cooked nil :echo nil)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
170
   (save-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
171
   ;; 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
172
   ;; 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
173
   (cursor-position 999 999)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
174
   (let (chars)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
175
     ;; 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
176
     (device-status-report)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
177
     (force-output)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
178
     ;; The reply isnt immediately available, the terminal does need
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
179
     ;; some time to answer
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
180
     (sleep 0.1)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
181
     ;; 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
182
     (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
183
           until (null i)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
184
           do (push i chars))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
185
     ;; Put the terminal back into its initial cooked state
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
186
     (set-tty-mode t :raw nil :echo t)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
187
     (restore-cursor-position)
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
188
     ;; Return the read sequence as a list of characters.
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
189
     (nreverse chars)))
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
190
 
282991a71fe5 fix ansi and add equiv
Richard Westhaver <ellis@rwest.io>
parents: 229
diff changeset
191
 (deftest ansi ()
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
192
   (with-input-from-string (in (format nil "~%~%"))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
193
     (ansi-t01)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
194
     (ansi-t02)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
195
     (ansi-t03)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
196
     (ansi-t04)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
197
     (ansi-t05)))
116
797d729e14cc added cli/ansi and did some work on ffi/xkb
ellis <ellis@rwest.io>
parents: 110
diff changeset
198
 
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
199
 ;; TODO: needs to be compiled outside scope of test - contender for
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
200
 ;; fixture API
405
1816f9c53453 work on sk.el
Richard Westhaver <ellis@rwest.io>
parents: 381
diff changeset
201
 (defprompt tpfoo :prompt "testing:")
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
202
 
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
203
 (deftest cli-prompt ()
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
   "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
205
   (defvar tcoll nil)
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
206
   (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
207
   (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
208
 			   (format nil "~A~%~A~%~%" "foobar" "foobar"))))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
209
     ;; 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
210
     (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
211
     (is (string= "foobar"
117
d0b235557fab test fixes, cli refactoring
ellis <ellis@rwest.io>
parents: 116
diff changeset
212
                  (completing-read "nothing: " tcoll :history thist :default "foobar")))))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
213
 
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
214
 (defparameter *opts* (make-opts
377
49357f8b5e65 xdb fixes (one test still broken), fixed cli main test
Richard Westhaver <ellis@rwest.io>
parents: 289
diff changeset
215
                        (:name "foo" :global t :description "bar")
49357f8b5e65 xdb fixes (one test still broken), fixed cli main test
Richard Westhaver <ellis@rwest.io>
parents: 289
diff changeset
216
 		       (:name "bar" :description "foo")))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
217
 
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
218
 (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
219
 (defparameter *cmd2* (make-cli :cmd :name "ayo" :cmds #(*cmd1*) :opts *opts* :description "cmd1 description"))
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
220
 (defparameter *cmds* (make-cmds (:name "baz" :description "baz" :opts *opts*)))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
221
 
377
49357f8b5e65 xdb fixes (one test still broken), fixed cli main test
Richard Westhaver <ellis@rwest.io>
parents: 289
diff changeset
222
 (defparameter *cli* (make-cli :cli :opts *opts* :cmds *cmds* :description "test cli"))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
223
 
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
224
 (deftest clap-basic ()
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
225
   "test basic CLAP functionality."
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
226
   (let ((cli *cli*))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
227
     (is (eq (make-shorty "test") #\t))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
228
     (is (equalp (proc-args cli '("-f" "baz" "--bar" "fax")) ;; not eql
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
229
 		(make-cli-ast 
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
230
 		 (list (make-cli-node 'opt (find-short-opts cli #\f))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
231
 		       (make-cli-node 'cmd (find-cmd cli "baz"))
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
232
 		       (make-cli-node 'opt (find-opts cli "bar"))
96
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
233
 		       (make-cli-node 'arg "fax")))))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
234
     (is (parse-args cli '("--bar" "baz" "-f" "yaks")))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
235
     (is (stringp
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
236
 	 (with-output-to-string (s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
237
 	   (print-version cli s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
238
 	   (print-usage cli s)
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
239
 	   (print-help cli s))))
301fd45bbe73 big refactor of lisp code
ellis <ellis@rwest.io>
parents:
diff changeset
240
     (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
241
 
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
242
 (make-opt-parser thing $val)
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
243
 (deftest clap-opts ()
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
244
   "CLAP opt tests."
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
245
   (is (reduce (lambda (x y) (when x (when y t)))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
246
               (loop for k across *cli-opt-kinds* collect (cli-opt-kind-p k))))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
247
   (is (parse-thing-opt t))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
248
   (is (null (parse-thing-opt nil))))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
249
 
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
250
 (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
251
   (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
252
     (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
253
           (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
254
       (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
255
         (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
256
 
cae8da4b1415 rocksdb macrofication, fixes 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
 (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
258
   (is (string= 
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
259
        (spark '(1 5 22 13 5))
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
260
        "▁▂█▅▂"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
262
        (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
263
        "▁█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
265
        (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
266
        "▁▁▁▁▃▁▁▁▂█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
268
        (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
269
        "▁▄█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
271
        (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
272
        "▁▃█"))
cae8da4b1415 rocksdb macrofication, fixes 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 '(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
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
   (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
277
        (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
278
        "▁▂▃▄▂█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   ;; 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
280
   (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
281
        (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
282
        ""))
cae8da4b1415 rocksdb macrofication, fixes 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
   ;; 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
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 '(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
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
   ;; 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
288
   (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
289
        (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
290
        "▁▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
   ;; 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
292
   (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
293
        (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
294
        "▃▄▅▆▄█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
296
        (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
297
        "▁▅██▅█"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
299
        (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
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
301
   ;; 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
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 '(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
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
        (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
307
        "▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
   (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
309
        (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
310
        "▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
   ;; *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
312
   (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
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
          (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
315
          "▁▄█▁█▄▄▁██▄"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
317
          (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
318
            (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
319
          "_-¯_¯--_¯¯-"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
321
          (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
322
            (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
323
          "▄⎯▀▄▀⎯⎯▄▀▀⎯"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
325
          (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
326
            (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
327
          "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
328
   ;; 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
329
   (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
330
          (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
331
                         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
332
                         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
333
                         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
334
          (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
335
                     (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
336
     (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
337
          (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
338
                 :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
339
          "▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█▆▄▂▁▂▄▆█"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
341
          (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
342
                 :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
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
 
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
346
          (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
347
                 :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
348
          "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
     
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
351
          (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
352
                 :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
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
 
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
356
          (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
357
          "▁▃▅▆▇█"))
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
360
          (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
361
          "▁▃▄▅▆█"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
363
          (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
364
          "▁▂▃▅▆█"))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
366
          (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
367
          "▁▁▂▃▅█"))
cae8da4b1415 rocksdb macrofication, fixes 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
          (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
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
          (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
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
          (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
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
     ;; 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
378
     (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
379
       (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
380
            (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
381
            "█▁█▁█▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
            (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
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
       (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
386
            (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
387
            "█▁██▁▁"))
cae8da4b1415 rocksdb macrofication, fixes 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
       (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
389
            (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
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
     ;; 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
393
     (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
394
          (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
395
          ""))
cae8da4b1415 rocksdb macrofication, fixes 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
     ;; 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
397
     (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
398
          (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
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
 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
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
     ;; 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
406
     (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
407
          (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
408
          "
cae8da4b1415 rocksdb macrofication, fixes 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
 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
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
     (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
417
          (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
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
 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
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
 
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes 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
     ;; 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
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
     (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
433
          (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
434
          "
cae8da4b1415 rocksdb macrofication, fixes 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
 -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
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
 ████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
446
          (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
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
 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
449
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
460
          (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
461
          "
cae8da4b1415 rocksdb macrofication, fixes 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
 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
463
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes 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
 ███▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes 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
     ;; 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
473
     (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
474
          (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
475
                            :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
476
                            :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
477
          "
cae8da4b1415 rocksdb macrofication, fixes 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
      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
479
     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
480
 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
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
 
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
484
          (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
485
                            :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
486
                            :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
487
          "
cae8da4b1415 rocksdb macrofication, fixes 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
  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
489
 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
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
 "))
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
494
          (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
495
                         :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
496
                         :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
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
  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
499
 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
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
     ;; 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
503
     (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
504
          (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
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
 -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
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
 █████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████▋
cae8da4b1415 rocksdb macrofication, fixes 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
 ███████▍
cae8da4b1415 rocksdb macrofication, fixes 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
     ;; 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
520
     (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
521
          (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
522
                                       :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
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
 -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
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
 █████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ████████▌
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████
cae8da4b1415 rocksdb macrofication, fixes 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
 ████████▌
cae8da4b1415 rocksdb macrofication, fixes 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
 █▌
cae8da4b1415 rocksdb macrofication, fixes 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
     ;; 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
538
     (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
539
          (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
540
                                       :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
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
 -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
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
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 █████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ████████████████████
cae8da4b1415 rocksdb macrofication, fixes 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
 █████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ██▉
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
 █████████▉
cae8da4b1415 rocksdb macrofication, fixes 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
 "))
cae8da4b1415 rocksdb macrofication, fixes 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
     (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
556
                                ("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
557
                                ("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
558
                                ("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
559
                                ("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
560
                                ("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
561
                                ("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
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
       (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
564
            (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
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
 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
567
 ˫-----------------------+------------------------˧
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
       ;; 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
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 :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
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
       ;; 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
589
       (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
590
            (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
591
            "
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes 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
 ███████████████████████████▌
cae8da4b1415 rocksdb macrofication, fixes 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
 ██████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 ███████████████████████████████████▏
cae8da4b1415 rocksdb macrofication, fixes 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
 "))
cae8da4b1415 rocksdb macrofication, fixes 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
 
cae8da4b1415 rocksdb macrofication, fixes 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
       ;; 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
602
       (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
603
            (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
604
                    :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
605
                    :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
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
                       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
608
                       ˫------------+-------------˧
cae8da4b1415 rocksdb macrofication, fixes 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
                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
610
             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
611
       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
612
                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
613
 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
614
       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
615
                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
616
 "))
cae8da4b1415 rocksdb macrofication, fixes 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
       ;; 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
619
       (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
620
            (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
621
                    :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
622
                    :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
623
                    :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
624
                    :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
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
                  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
627
                       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
628
                       ˫------------+-------------˧
cae8da4b1415 rocksdb macrofication, fixes 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
                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
630
             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
631
       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
632
                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
633
 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
634
       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
635
                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
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
       (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
639
            (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
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
       (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
643
            (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
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
 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
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
 █▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
654
 █▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
655
 ██▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
656
 ████▌
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
657
 ███████▍
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
658
 ███████████▊
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
659
 ███████████████████▏
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
660
 ██████████████████████████████▉
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
661
 ██████████████████████████████████████████████████
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
662
 ")))))
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
663
 
cae8da4b1415 rocksdb macrofication, fixes for RDB (C Strings will be the death of me), removed PWN - quicklisp package conflict, smh.
ellis <ellis@rwest.io>
parents: 109
diff changeset
664
 (deftest repl ())
157
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
665
 
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
666
 (deftest env ()
193d1ea7d684 renamed ascii functions - prefixed with . to prevent conflicts with cl symbol ED
ellis <ellis@rwest.io>
parents: 117
diff changeset
667
   (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
668
   (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
669
   (is (find-exe "sbcl")))
229
7ca4cdbd52c2 bug fixes
Richard Westhaver <ellis@rwest.io>
parents: 157
diff changeset
670
 
7ca4cdbd52c2 bug fixes
Richard Westhaver <ellis@rwest.io>
parents: 157
diff changeset
671
 (deftest clap-ast ())
289
c4682fedd73d added krypt lib, will probably add homer too
Richard Westhaver <ellis@rwest.io>
parents: 282
diff changeset
672
 
c4682fedd73d added krypt lib, will probably add homer too
Richard Westhaver <ellis@rwest.io>
parents: 282
diff changeset
673
 (deftest main-output ()
426
3e721a3349a0 completed phase2 of clap migration
Richard Westhaver <ellis@rwest.io>
parents: 405
diff changeset
674
   (let ((*test-target* nil))
381
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
675
     (defmain (:return *test-target* :exit nil :export nil)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
676
       (let ((*test-target* t))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
677
         *test-target*))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
678
     (compile 'main)
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
679
     (is (main))
386d51cf61ca add ffi/readline, net updates
Richard Westhaver <ellis@rwest.io>
parents: 377
diff changeset
680
     (is (null *test-target*))))