moved example into TODO where it belonged.
[CommonLispStat.git] / README.org
blobb264e3d3d03deeeb855f33338a54c0d6e60dbb67
2 Time-stamp: <2012-10-04 02:30:43 tony>
4 * Fast Start
6   You probably did  (preferred)
8 #+name: GitClone
9 #+begin_src shell
10   git clone git://github.com/blindglobe/common-lisp-stat.git
11 #+end_src
13   or (coming soon!) from within a Lisp instance, 
15 #+name: QuickLispLoad
16 #+begin_src lisp
17   (ql:quickload :cls)
18 #+end_src
20   At one point, I planned on git-delivery via submodules, but this
21   proved to be a bit more complex than needed, thanks to the creation
22   of quicklisp.  
24   There will need to be a version for delivering a development QL
25   environment (for development) and this will consist of git
26   repositories, possibly through submodules, but this is for
27   discussion. 
29   There are quite a few libraries that are needed, and right now we
30   are working on simplifying the whole thing.   Once you get past
31   this step, then you should:
33   1. run a common lisp (SBCL, CMUCL, CLISP, CLOZURE-CL) starting in
34      the current directory.  Recent versions of CFFI and LIFT can be
35      found in the external/ subdirectory, and should be autoload-able,
36      assuming that you are using a Lisp implementation supporting
37      ASDF.  (AJR-FIXME: need to upload my GIT mirrors to repo.or.cz or
38      similar, and have them potentially available as submodules if
39      needed)
41   2. (on Debian or similar systems: can use CLC (Common Lisp
42      Controller) or SBCL approaches, i.e.  ~/.clc/systems or
43      ~/.sbcl/systems should contain softlinks to the cls, cffi, and
44      lift ASDF files (i.e. cls.asd, cffi.asd, and lift.asd).
45      AJR-FIXME: There is probably a similar incantation for other
46      CL's, need to record that here!).
48   Step through ls-demo.lisp for a range of examples of activities.
50 ** Example Usage steps
51   
52 *** change directory into the CommonLispStat working directory.
53 *** start your lisp
54 *** follow the commands in the *ls-demo.lisp* (need to add link) file, i.e.
56 **** (ql:quickload :cls)
58      use QUICKLISP to load lispstat
61 **** (in-package :ls-user)
63      work in the scratch user package.  Normally, one would create a
64      special package to work in.
66 **** (normal-rand 20)
68 **** (setf mytest (normal-rand 20))
70 **** ... (and so on) ...
72    and see if they work (basic CFFI functionality for external C
73    library, LIFT package for unit-testing framework to ensure run time
74    stability).
75   
76 *** Inform  moi of problems or successes
78     mailto:blindglobe@gmail.com if there is anything wrong, or
79     even if something happens to work.
81     Current beliefs:
82     - CMUCL and SBCL seem to work just fine at this stage.
83     - CLISP is finicky regarding the problems that we have with CFFI
84       conversation.  In particular that we can not really do typing
85       that we need to take care of.  I think this is my problem, not
86       someone elses.
87     - Need to test ECL.  Clozure-CL seems to work.
89 * History
91    See Doc/README* for history and design considerations
92    See Doc/INSTALL for getting this to work and run
94 * Working on your own modifications
96 #+begin_src shell
97    git clone git://repo.or.cz/CommonLispStat.git 
98    cd CommonLispStat
99    git submodules init
100    git submodules update
101 #+end_src
103    will pull the whole repository, and create a "master" branch to
104    work on.  If you are making edits, which I'd like, you don't want
105    to use the master branch, but more to use a topic-centric branch,
106    so you might:
108 #+begin_src shell
109     git checkout -b myTopicBranch
110 #+end_src
112 and then work on myTopicBranch, pulling back to the master branch when
113 needed by
115 #+begin_src shell
116     git checkout master
117     git pull . myTopicBranch
118 #+end_src
121 #+begin_src shell
122     git rebase myTopicBranch
123 #+end_src
126 of course, perhaps you want to contribute to the mob branch.   For
127 that, after cloning the repository as above, you would:
129 #+begin_src shell
130     git checkout -b mob remotes/origin/mob
131 #+end_src
133 (work, work, work... through a cycle of
135 #+begin_src shell
136          <edit>
137          git add <files just edited>
138          git commit -m "what I just did"
139 #+end_src
141  ad-nauseum.  When ready to commit, then just:
143 #+begin_src shell
144      git push git+ssh://mob@repo.or.cz/srv/git/CommonLispStat.git mob:mob
145 #+end_src
149 and it'll be put on the mob branch, as a proposal for merging.
151 Another approach would be to pull from the topic branch into the mob
152 branch before uploading.   Will work on a formal example soon.
154 (the basic principle is that instead of the edit cycle on mob, do
155 something like:
157 #+begin_src shell
158   git checkout mob
159   git pull . myTopicBranch   
160   git push git+ssh://mob@repo.or.cz/srv/git/CommonLispStat.git mob:mob
161 #+end_src
165 Alternatively, one can work on the github repositories as well.  They
166 are a bit differently organized, and require one to get a github
167 account and work from there.  In that case, you'd need to D/L the
168 libraries. 
170 That gets a bit tricky, but see ./bin/GetRepos.sh for an example. 
172 * Documentation and examples
174   I've started putting examples of use in function documentation.  If
175   you are a lisp'er, you'll find this pendantic and insulting.  Many
176   of the uses are trivial.  However, this has been tested out on a
177   number of research statisticians (the primary user audience) and
178   found useful.
180   Still need to write the (run-doc-ex 'function-name) function, which
181   would print out the example and run it live.  Hopefully with the
182   same results.  I've used XML markup for this, but for no particular
183   reason, we could have used SEXPs as well.  This is currently done by
184   using an <example> tag set, as in
186 #+srcname: 
187 #+begin_src xml
188   <example>
189   (progn
190     (example-code-for-function))
191   </example>
192 #+end_src
194 * Footnotes
196 [fn:1] I´m not including instructions for Emacs or git, as the former
197 is dealt with other places and the latter was required for you to get
198 this.  Since disk space is cheap, I´m intentionally forcing git to be
199 part of this system.  Sorry if you hate it.  Org-mode, org-babel, and
200 org-babel-lisp, and hypo are useful for making this file a literate
201 and interactively executable piece of work.