playing with graphics and docs systems.
[CommonLispStat.git] / TODO.lisp
blobf19051324b5727a1c1c1f0be0d7b9528c4257850
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-12-17 17:19:03 tony>
4 ;;; Creation: <2008-09-08 08:06:30 tony>
5 ;;; File: TODO.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c) 2007-2008, AJ Rossini <blindglobe@gmail.com>. BSD.
8 ;;; Purpose: Stuff that needs to be made working sits inside the
9 ;;; progns... This file contains the current challenges to
10 ;;; solve, including a description of the setup and the work
11 ;;; to solve....
13 ;;; What is this talk of 'release'? Klingons do not make software
14 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
15 ;;; designers and quality assurance people in its wake.
17 ;;; SET UP
19 (in-package :cl-user)
21 (progn
22 (defun init-CLS ()
24 ;; core system
25 ;;(asdf:oos 'asdf:load-op 'lisp-matrix)
26 ;;(asdf:oos 'asdf:compile-op 'cls :force t)
27 (asdf:oos 'asdf:load-op 'cls)
29 ;; visualization
30 (asdf:oos 'asdf:load-op 'cl-cairo2-x11)
31 (asdf:oos 'asdf:load-op 'cl-2d)
33 ;; doc reporting
34 (asdf:oos 'asdf:load-op 'cl-pdf)
35 (asdf:oos 'asdf:load-op 'cl-typesetting))
37 ;; (asdf:oos 'asdf:compile-op 'asdf-system-connections :force t)
39 ;; (asdf:oos 'asdf:load-op 'xarray)
41 ;; (asdf:oos 'asdf:compile-op 'metatilities-base :force t)
42 ;; (asdf:oos 'asdf:load-op 'anaphora)
43 ;; (asdf:oos 'asdf:load-op 'tinaa)
45 ;; (asdf:oos 'asdf:load-op 'cl-opengl)
46 ;; (asdf:oos 'asdf:load-op 'cl-glu)
47 ;; (asdf:oos 'asdf:load-op 'cl-glut)
48 ;; (asdf:oos 'asdf:load-op 'cl-glut-examples)
50 (init-CLS))
52 (in-package :lisp-stat-unittests)
54 ;; tests = 80, failures = 7, errors = 21
55 (run-tests :suite 'lisp-stat-ut)
56 (describe (run-tests :suite 'lisp-stat-ut))
58 (describe 'lisp-stat-ut)
59 (documentation 'lisp-stat-ut 'type)
61 ;; FIXME: Example: currently not relevant, yet
62 ;; (describe (lift::run-test :test-case 'lisp-stat-unittests::create-proto
63 ;; :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
65 (describe (lift::run-tests :suite 'lisp-stat-ut-dataframe))
66 (lift::run-tests :suite 'lisp-stat-ut-dataframe)
68 (describe (lift::run-test
69 :test-case 'lisp-stat-unittests::create-proto
70 :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
72 (in-package :ls-user)
74 ;;; Tasks working on...
76 #+nil
77 (progn
78 ;; use of extension packages supporting versioning and validation of
79 ;; CLOS objects?
80 (asdf:oos 'asdf:load-op 'versioned-objects)
81 (asdf:oos 'asdf:load-op 'validations))
83 #+nil
84 (progn
85 ;; Syntax examples using lexical scope, closures, and bindings to
86 ;; ensure a clean communication of results
87 (with-data dataset ((dsvarname1 [usevarname1])
88 (dsvarname2 [usevarname2]))
89 @body))
91 (defparameter *df-test*
92 (make-instance 'dataframe-array
93 :storage #2A (('a "test0" 0 0d0)
94 ('b "test1" 1 1d0)
95 ('c "test2" 2 2d0)
96 ('d "test3" 3 3d0)
97 ('e "test4" 4 4d0))
98 :doc "test reality"
99 :case-labels (list "0" "1" "2" "3" "4")
100 :var-labels (list "symbol" "string" "integer" "double-float")
101 :var-types (list 'symbol 'string 'integer 'double-float)))
103 *df-test* ; but with SBCL, ints become floats?
105 (defun check-var (df colnum)
106 (let ((nobs (xdim df 0)))
107 (dotimes (i nobs)
108 (check-type (xref df i colnum) (elt (var-types df) i)))))
110 (check-var *df-test* 0)
112 (xref *df-test* 1 2)
114 (integerp (xref *df-test* 1 2))
115 (floatp (xref *df-test* 1 2))
116 (integerp (xref *df-test* 1 3))
117 (type-of (xref *df-test* 1 3))
118 (floatp (xref *df-test* 1 3))
120 (type-of (vector 1 1d0))
124 (loop )
126 (xref *df-test* 2 1)
127 (xref *df-test* 0 0)
128 (xref *df-test* 1 0)
129 (xref *df-test* 1 '*)
131 ;;; Experiments with cl-variates
133 ;; (asdf:oos 'asdf:compile-op 'cl-variates :force t)
134 ;; (asdf:oos 'asdf:compile-op 'cl-variates-test :force t)
135 ;; (asdf:oos 'asdf:load-op 'lift)
136 ;; (asdf:oos 'asdf:load-op 'cl-variates)
137 (asdf:oos 'asdf:load-op 'cl-variates-test)
139 (in-package :cl-variates-test)
140 ;; check tests
141 (run-tests :suite 'cl-variates-test)
142 (describe (run-tests :suite 'cl-variates-test))
144 (in-package :cl-variates-user)
145 ;; example usage
146 (defparameter state (make-random-number-generator))
147 (setf (random-seed state) 44)
148 (random-seed state)
149 (loop for i from 1 to 10 collect
150 (random-range state 0 10))
151 ;; => (1 5 1 0 7 1 2 2 8 10)
152 (setf (random-seed state) 44)
153 (loop for i from 1 to 10 collect
154 (random-range state 0 10))
155 ;; => (1 5 1 0 7 1 2 2 8 10)
157 (setf (random-seed state) 44)
158 (random-seed state)
159 (loop for i from 1 to 10 collect
160 (normal-random state 0 1))
161 ;; =>
162 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
163 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
164 ;; 0.20750134211656893 -0.14501914108452274)
166 (setf (random-seed state) 44)
167 (loop for i from 1 to 10 collect
168 (normal-random state 0 1))
169 ;; =>
170 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
171 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
172 ;; 0.20750134211656893 -0.14501914108452274)
175 ;;; experiments with LLA
176 (in-package :cl-user)
177 (asdf:oos 'asdf:load-op 'lla)
178 (in-package :lla-user)