we need to depend on the LISTOFLIST package.
[CommonLispStat.git] / TODO.lisp
blobf2a927fa32e7b3cff9669e97b5f798fdc6b36fa7
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-12-19 00:10:59 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 (init-CLS))
59 (in-package :lisp-stat-unittests)
61 ;; tests = 80, failures = 7, errors = 21
62 (run-tests :suite 'lisp-stat-ut)
63 (describe (run-tests :suite 'lisp-stat-ut))
65 (describe 'lisp-stat-ut)
66 (documentation 'lisp-stat-ut 'type)
68 ;; FIXME: Example: currently not relevant, yet
69 ;; (describe (lift::run-test :test-case 'lisp-stat-unittests::create-proto
70 ;; :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
72 (describe (lift::run-tests :suite 'lisp-stat-ut-dataframe))
73 (lift::run-tests :suite 'lisp-stat-ut-dataframe)
75 (describe (lift::run-test
76 :test-case 'lisp-stat-unittests::create-proto
77 :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
79 (in-package :ls-user)
81 ;;; Tasks working on...
83 #+nil
84 (progn
85 ;; use of extension packages supporting versioning and validation of
86 ;; CLOS objects?
87 (asdf:oos 'asdf:load-op 'versioned-objects)
88 (asdf:oos 'asdf:load-op 'validations))
90 #+nil
91 (progn
92 ;; Syntax examples using lexical scope, closures, and bindings to
93 ;; ensure a clean communication of results
94 (with-data dataset ((dsvarname1 [usevarname1])
95 (dsvarname2 [usevarname2]))
96 @body))
98 (defparameter *df-test*
99 (make-instance 'dataframe-array
100 :storage #2A (('a "test0" 0 0d0)
101 ('b "test1" 1 1d0)
102 ('c "test2" 2 2d0)
103 ('d "test3" 3 3d0)
104 ('e "test4" 4 4d0))
105 :doc "test reality"
106 :case-labels (list "0" "1" "2" "3" "4")
107 :var-labels (list "symbol" "string" "integer" "double-float")
108 :var-types (list 'symbol 'string 'integer 'double-float)))
110 *df-test* ; but with SBCL, ints become floats?
112 (defun check-var (df colnum)
113 (let ((nobs (xdim df 0)))
114 (dotimes (i nobs)
115 (check-type (xref df i colnum) (elt (var-types df) i)))))
117 (check-var *df-test* 0)
119 (xref *df-test* 1 2)
121 (integerp (xref *df-test* 1 2))
122 (floatp (xref *df-test* 1 2))
123 (integerp (xref *df-test* 1 3))
124 (type-of (xref *df-test* 1 3))
125 (floatp (xref *df-test* 1 3))
127 (type-of (vector 1 1d0))
131 (loop )
133 (xref *df-test* 2 1)
134 (xref *df-test* 0 0)
135 (xref *df-test* 1 0)
136 (xref *df-test* 1 '*)
138 ;;; Experiments with cl-variates
140 ;; (asdf:oos 'asdf:compile-op 'cl-variates :force t)
141 ;; (asdf:oos 'asdf:compile-op 'cl-variates-test :force t)
142 ;; (asdf:oos 'asdf:load-op 'lift)
143 ;; (asdf:oos 'asdf:load-op 'cl-variates)
144 (asdf:oos 'asdf:load-op 'cl-variates-test)
146 (in-package :cl-variates-test)
147 ;; check tests
148 (run-tests :suite 'cl-variates-test)
149 (describe (run-tests :suite 'cl-variates-test))
151 (in-package :cl-variates-user)
152 ;; example usage
153 (defparameter state (make-random-number-generator))
154 (setf (random-seed state) 44)
155 (random-seed state)
156 (loop for i from 1 to 10 collect
157 (random-range state 0 10))
158 ;; => (1 5 1 0 7 1 2 2 8 10)
159 (setf (random-seed state) 44)
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)
164 (setf (random-seed state) 44)
165 (random-seed state)
166 (loop for i from 1 to 10 collect
167 (normal-random state 0 1))
168 ;; =>
169 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
170 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
171 ;; 0.20750134211656893 -0.14501914108452274)
173 (setf (random-seed state) 44)
174 (loop for i from 1 to 10 collect
175 (normal-random state 0 1))
176 ;; =>
177 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
178 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
179 ;; 0.20750134211656893 -0.14501914108452274)
182 ;;; experiments with LLA
183 (in-package :cl-user)
184 (asdf:oos 'asdf:load-op 'lla)
185 (in-package :lla-user)