here's what we currently require. Sigh.
[CommonLispStat.git] / TODO.lisp
blob31b64752a3cb59d2a38a6e7fc7eb2744b9cf6578
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-09-21 22:53:53 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:load-op 'xarray)
39 (init-CLS))
41 (in-package :lisp-stat-unittests)
43 ;; tests = 80, failures = 7, errors = 21
44 (run-tests :suite 'lisp-stat-ut)
45 (describe (run-tests :suite 'lisp-stat-ut))
47 (describe 'lisp-stat-ut)
48 (documentation 'lisp-stat-ut 'type)
50 ;; FIXME: Example: currently not relevant, yet
51 ;; (describe (lift::run-test :test-case 'lisp-stat-unittests::create-proto
52 ;; :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
54 (describe (lift::run-tests :suite 'lisp-stat-ut-dataframe))
55 (lift::run-tests :suite 'lisp-stat-ut-dataframe)
57 (describe (lift::run-test
58 :test-case 'lisp-stat-unittests::create-proto
59 :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
61 (in-package :ls-user)
63 ;;; Tasks working on...
65 #+nil
66 (progn
67 ;; use of extension packages supporting versioning and validation of
68 ;; CLOS objects?
69 (asdf:oos 'asdf:load-op 'versioned-objects)
70 (asdf:oos 'asdf:load-op 'validations))
72 #+nil
73 (progn
74 ;; Syntax examples using lexical scope, closures, and bindings to
75 ;; ensure a clean communication of results
76 (with-data dataset ((dsvarname1 [usevarname1])
77 (dsvarname2 [usevarname2]))
78 @body))
80 (defparameter *df-test*
81 (make-instance 'dataframe-array
82 :storage #2A (('a "test0" 0 0d0)
83 ('b "test1" 1 1d0)
84 ('c "test2" 2 2d0)
85 ('d "test3" 3 3d0)
86 ('e "test4" 4 4d0))
87 :doc "test reality"
88 :case-labels (list "0" "1" "2" "3" "4")
89 :var-labels (list "symbol" "string" "integer" "double-float")
90 :var-types (list 'symbol 'string 'integer 'double-float)))
92 *df-test* ; but with SBCL, ints become floats?
94 (defun check-var (df colnum)
95 (let ((nobs (xdim df 0)))
96 (dotimes (i nobs)
97 (check-type (xref df i colnum) (elt (var-types df) i)))))
99 (check-var *df-test* 0)
101 (xref *df-test* 1 2)
103 (integerp (xref *df-test* 1 2))
104 (floatp (xref *df-test* 1 2))
105 (integerp (xref *df-test* 1 3))
106 (type-of (xref *df-test* 1 3))
107 (floatp (xref *df-test* 1 3))
109 (type-of (vector 1 1d0))
113 (loop )
115 (xref *df-test* 2 1)
116 (xref *df-test* 0 0)
117 (xref *df-test* 1 0)
118 (xref *df-test* 1 '*)
120 ;;; Experiments with cl-variates
122 ;; (asdf:oos 'asdf:compile-op 'cl-variates :force t)
123 ;; (asdf:oos 'asdf:compile-op 'cl-variates-test :force t)
124 ;; (asdf:oos 'asdf:load-op 'lift)
125 ;; (asdf:oos 'asdf:load-op 'cl-variates)
126 (asdf:oos 'asdf:load-op 'cl-variates-test)
128 (in-package :cl-variates-test)
129 ;; check tests
130 (run-tests :suite 'cl-variates-test)
131 (describe (run-tests :suite 'cl-variates-test))
133 (in-package :cl-variates-user)
134 ;; example usage
135 (defparameter state (make-random-number-generator))
136 (setf (random-seed state) 44)
137 (random-seed state)
138 (loop for i from 1 to 10 collect
139 (random-range state 0 10))
140 ;; => (1 5 1 0 7 1 2 2 8 10)
141 (setf (random-seed state) 44)
142 (loop for i from 1 to 10 collect
143 (random-range state 0 10))
144 ;; => (1 5 1 0 7 1 2 2 8 10)
146 (setf (random-seed state) 44)
147 (random-seed state)
148 (loop for i from 1 to 10 collect
149 (normal-random state 0 1))
150 ;; =>
151 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
152 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
153 ;; 0.20750134211656893 -0.14501914108452274)
155 (setf (random-seed state) 44)
156 (loop for i from 1 to 10 collect
157 (normal-random state 0 1))
158 ;; =>
159 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
160 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
161 ;; 0.20750134211656893 -0.14501914108452274)
164 ;;; experiments with LLA
165 (in-package :cl-user)
166 (asdf:oos 'asdf:load-op 'lla)
167 (in-package :lla-user)