source: project/wiki/eggref/5/beaker @ 36651

Last change on this file since 36651 was 36651, checked in by evhan, 12 months ago

wiki/beaker: Update docs

File size: 5.8 KB
Line 
1== Beaker
2
3Lab supplies for CHICKEN Scheme.
4
5[[toc:]]
6
7== Description
8
9Beaker is a collection of development tools.
10
11It is currently fairly limited, including only two programs and a small
12handful of libraries to make common development tasks easier. If you
13have an idea for something that would be useful to include, don't
14hesitate to contact the [[#author|author]].
15
16== Dependencies
17
18* [[/eggref/5/schematic|schematic]]
19* [[/eggref/5/srfi-1|srfi-1]]
20* [[/eggref/5/srfi-13|srfi-13]]
21* [[/eggref/5/srfi-14|srfi-14]]
22* [[/eggref/5/vector-lib|vector-lib]]
23* [[/eggref/5/with-current-directory|with-current-directory]]
24
25== Programs
26
27=== chicken-clean
28
29 Usage: chicken-clean [-interactive | -quiet | -verbose]
30
31The {{chicken-clean}} program deletes egg build artifacts.
32
33A simple set of file patterns is used to determine what should be
34deleted. This includes binary objects ({{o}}, {{obj}}, {{so}}, {{dll}}) and
35files generated by the CHICKEN toolchain ({{build.sh}}, {{install.sh}},
36{{import.scm}}, {{inline}}, {{profile}}, {{types}}).
37
38When run with the {{-interactive}} flag, a confirmation prompt will be
39displayed before any files are deleted.
40
41=== chicken-lint
42
43 Usage: chicken-lint [csc-options ...] filename ...
44
45The {{chicken-lint}} program a source file with a set of simple lint rules.
46
47Issues are written as s-expressions to standard error.
48
49== Extensions
50
51=== Repository Management
52
53The {{(beaker repository)}} library provides a handful of procedures
54to help manage egg repositories.
55
56<procedure>(chicken-install)</procedure>
57
58Returns the full pathname of the {{chicken-install}} command.
59
60<procedure>(egg-files #!optional (path repository-path))</procedure>
61
62Returns a list of all egg-info files in the repository path.
63
64The {{path}} argument can be used to specify an alternative repository
65path, which should be a thunk returning a list of pathname strings.
66
67<procedure>(create-repository destination #!optional source)</procedure>
68
69Initialises a new egg repository at the pathname {{destination}}.
70
71If the directory {{destination}} doesn't exist, it is created. The core
72CHICKEN libraries are then installed into the repository and a new
73modules database is generated
74
75If a {{source}} repository is given, its contents are also copied into
76the new repository. This can be used to copy an existing repository
77to another location.
78
79=== Systems
80
81The {{(beaker system)}} library provides an API for dynamically
82building, loading, and reloading extension libraries. It's intended
83to help enable rapid development in a manner similar to [[https://common-lisp.net/project/asdf/asdf/index.html|asdf]] from
84Common Lisp or the [[https://wiki.call-cc.org/eggref/4/system|system]] egg from CHICKEN 4.
85
86Rather than introduce a new way to define a system's components and
87dependencies, this library reuses the [[http://wiki.call-cc.org/man/5/Egg%20specification%20format|egg]] specification format.
88In fact, you can generally think of a "system" and an "egg" as one
89and the same.
90
91An example {{csi}} session that loads, edits, and reloads an example
92system might look like the following:
93
94 #;> (import (beaker system))
95 #;> (load-system "example.egg")
96 building example
97 ... output ...
98 ; loading /tmp/temp70d6.29489.example.import.so ...
99 ; loading /tmp/temp4871.29489.example.so ...
100 #;> (load-system "example.egg")
101 building example
102 #;> ,e example.scm
103 #;> (load-system "example.egg")
104 building example
105 ... output ...
106 ; loading /tmp/temp44a2.29609.example.so ...
107
108Modules are imported automatically and import libraries are reloaded
109whenever a module's exports list changes. Note that removing a value
110from a module's export list does not remove it from the session when
111the extension is reloaded.
112
113<procedure>(compile-system egg-file)</procedure>
114
115Compiles all out-of-date components for the given egg.
116
117This is equivalent to running {{chicken-install -no-install}}.
118
119<procedure>(clean-system egg-file)</procedure>
120
121Deletes all compiled programs and extension libraries for the given egg.
122
123Auxiliary files such as import libraries are preserved.
124
125<procedure>(load-system egg-file #!key (skip (quote ())))</procedure>
126
127Builds and loads the given egg.
128
129When called for the first time, all out-of-date components are
130recompiled, the egg's extension libraries are loaded into the calling
131program and its modules are immediately imported.
132
133Subsequent calls cause the components to be recompiled and reloaded
134as necessary.
135
136== Author
137
138[[/users/evan-hanson|Evan Hanson]]
139
140== License
141
142 Copyright (c) 2015-2018, Evan Hanson <evhan@foldling.org>
143 All rights reserved.
144 
145 Redistribution and use in source and binary forms, with or without
146 modification, are permitted provided that the following conditions
147 are met:
148 
149   * Redistributions of source code must retain the above copyright
150     notice, this list of conditions and the following disclaimer.
151   * Redistributions in binary form must reproduce the above copyright
152     notice, this list of conditions and the following disclaimer in the
153     documentation and/or other materials provided with the distribution.
154   * The name of the author may not be used to endorse or promote products
155     derived from this software without specific prior written permission.
156 
157 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
158 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
159 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
160 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
161 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
162 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
163 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
164 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
165 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
166 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
167
168[[tags: egg]]
169
Note: See TracBrowser for help on using the repository browser.