migrate last of system definitions into cls.asd. We now need to be careful that...
[CommonLispStat.git] / TODO.lisp
blob4c1d249be92da0462926019e962e1e6961ffe8b4
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-12-21 13:13:55 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 ;;INFRA
38 ;; (asdf:oos 'asdf:compile-op 'asdf-system-connections :force t)
39 ;; (asdf:oos 'asdf:compile-op 'lisp-matrix)
40 ;; (asdf:oos 'asdf:load-op 'xarray)
42 ;;DOCS
43 ;; (asdf:oos 'asdf:compile-op 'metatilities-base :force t)
44 ;; (asdf:oos 'asdf:load-op 'metatilities-base)
45 ;; (asdf:oos 'asdf:load-op 'anaphora)
46 ;; (asdf:oos 'asdf:load-op 'tinaa)
47 ;; (asdf:oos 'asdf:load-op 'cl-ppcre)
48 ;; (asdf:oos 'asdf:load-op 'cl-markdown)
50 ;;VIZ
51 ;; (asdf:oos 'asdf:compile-op 'cffi :force t)
52 ;; (asdf:oos 'asdf:load-op 'cl-opengl)
53 ;; (asdf:oos 'asdf:load-op 'cl-glu)
54 ;; (asdf:oos 'asdf:load-op 'cl-glut)
55 ;; (asdf:oos 'asdf:load-op 'cl-glut-examples)
57 ;; (asdf:oos 'asdf:load-op 'cells)
58 ;; (asdf:oos 'asdf:load-op 'bordeaux-threads)
59 ;; (asdf:oos 'asdf:load-op 'cells-gtk)
61 (init-CLS))
63 (in-package :lisp-stat-unittests)
65 ;; tests = 80, failures = 7, errors = 21
66 (run-tests :suite 'lisp-stat-ut)
67 (describe (run-tests :suite 'lisp-stat-ut))
69 (describe 'lisp-stat-ut)
70 (documentation 'lisp-stat-ut 'type)
72 ;; FIXME: Example: currently not relevant, yet
73 ;; (describe (lift::run-test :test-case 'lisp-stat-unittests::create-proto
74 ;; :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
76 (describe (lift::run-tests :suite 'lisp-stat-ut-dataframe))
77 (lift::run-tests :suite 'lisp-stat-ut-dataframe)
79 (describe (lift::run-test
80 :test-case 'lisp-stat-unittests::create-proto
81 :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
83 (in-package :ls-user)
85 ;;; Tasks working on...
87 #+nil
88 (progn
89 ;; use of extension packages supporting versioning and validation of
90 ;; CLOS objects?
91 (asdf:oos 'asdf:load-op 'versioned-objects)
92 (asdf:oos 'asdf:load-op 'validations))
94 #+nil
95 (progn
96 ;; Syntax examples using lexical scope, closures, and bindings to
97 ;; ensure a clean communication of results
98 (with-data dataset ((dsvarname1 [usevarname1])
99 (dsvarname2 [usevarname2]))
100 @body))
102 (defparameter *df-test*
103 (make-instance 'dataframe-array
104 :storage #2A (('a "test0" 0 0d0)
105 ('b "test1" 1 1d0)
106 ('c "test2" 2 2d0)
107 ('d "test3" 3 3d0)
108 ('e "test4" 4 4d0))
109 :doc "test reality"
110 :case-labels (list "0" "1" "2" "3" "4")
111 :var-labels (list "symbol" "string" "integer" "double-float")
112 :var-types (list 'symbol 'string 'integer 'double-float)))
114 *df-test* ; but with SBCL, ints become floats?
116 (defun check-var (df colnum)
117 (let ((nobs (xdim df 0)))
118 (dotimes (i nobs)
119 (check-type (xref df i colnum) (elt (var-types df) i)))))
121 (check-var *df-test* 0)
123 (xref *df-test* 1 2)
125 (integerp (xref *df-test* 1 2))
126 (floatp (xref *df-test* 1 2))
127 (integerp (xref *df-test* 1 3))
128 (type-of (xref *df-test* 1 3))
129 (floatp (xref *df-test* 1 3))
131 (type-of (vector 1 1d0))
135 (loop )
137 (xref *df-test* 2 1)
138 (xref *df-test* 0 0)
139 (xref *df-test* 1 0)
140 (xref *df-test* 1 '*)
142 ;;; Experiments with cl-variates
144 ;; (asdf:oos 'asdf:compile-op 'cl-variates :force t)
145 ;; (asdf:oos 'asdf:compile-op 'cl-variates-test :force t)
146 ;; (asdf:oos 'asdf:load-op 'lift)
147 ;; (asdf:oos 'asdf:load-op 'cl-variates)
148 (asdf:oos 'asdf:load-op 'cl-variates-test)
150 (in-package :cl-variates-test)
151 ;; check tests
152 (run-tests :suite 'cl-variates-test)
153 (describe (run-tests :suite 'cl-variates-test))
155 (in-package :cl-variates-user)
156 ;; example usage
157 (defparameter state (make-random-number-generator))
158 (setf (random-seed state) 44)
159 (random-seed state)
160 (loop for i from 1 to 10 collect
161 (random-range state 0 10))
162 ;; => (1 5 1 0 7 1 2 2 8 10)
163 (setf (random-seed state) 44)
164 (loop for i from 1 to 10 collect
165 (random-range state 0 10))
166 ;; => (1 5 1 0 7 1 2 2 8 10)
168 (setf (random-seed state) 44)
169 (random-seed state)
170 (loop for i from 1 to 10 collect
171 (normal-random state 0 1))
172 ;; =>
173 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
174 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
175 ;; 0.20750134211656893 -0.14501914108452274)
177 (setf (random-seed state) 44)
178 (loop for i from 1 to 10 collect
179 (normal-random state 0 1))
180 ;; =>
181 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
182 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
183 ;; 0.20750134211656893 -0.14501914108452274)
186 ;;; experiments with LLA
187 (in-package :cl-user)
188 (asdf:oos 'asdf:load-op 'lla)
189 (in-package :lla-user)