Skip to content

Commit 13dd82e

Browse files
keep more vocabs (#16)
I have already received a request for `interpolate`, and it seems reasonable to support a few more vocabs. We no longer delete source for the following: - interpolate - lazy - lcs - lists - search-deques
1 parent a2cd1ff commit 13dd82e

1 file changed

Lines changed: 67 additions & 53 deletions

File tree

Dockerfile

Lines changed: 67 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -29,69 +29,83 @@ RUN sed -i 's#-i="\$BOOT_IMAGE"#-i="$BOOT_IMAGE" -exclude="'"${FACTOR_EXCLUDE}"'
2929
RUN ./build.sh net-bootstrap
3030

3131
# Precompile tools.test AND the common exercise vocabs into factor.image, then re-save it.
32-
RUN ./factor -e='USING: accessors arrays ascii assocs calendar calendar.english combinators combinators.short-circuit command-line concurrency.combinators concurrency.locks continuations debugger deques destructors dlists formatting fry generic grouping hash-sets hashtables io io.encodings.utf8 io.files io.streams.string kernel lexer locals macros make math math.bitwise math.combinatorics math.constants math.functions math.order math.parser math.primes math.statistics namespaces prettyprint.config quotations random random.mersenne-twister ranges regexp sequences sets sorting source-files.errors.debugger splitting splitting.monotonic strings system tools.test typed unicode vectors vocabs vocabs.loader memory ; save'
32+
RUN ./factor -e='USING: accessors arrays ascii assocs bit-arrays calendar calendar.english combinators combinators.short-circuit command-line concurrency.combinators concurrency.locks continuations debugger deques destructors disjoint-sets dlists formatting fry generic grouping hash-sets hashtables heaps io io.encodings.utf8 io.files io.streams.string kernel lexer locals macros make math math.bitwise math.combinatorics math.constants math.functions math.order math.parser math.primes math.statistics namespaces prettyprint.config quotations random random.mersenne-twister ranges regexp sequences sets sorting source-files.errors.debugger splitting splitting.monotonic strings system tools.test tr typed unicode vectors vocabs vocabs.loader memory ; save'
3333

3434
# Remove files not needed at runtime
3535
RUN rm -rf .git build vm src misc Factor.app \
3636
factor.image.fresh boot.*.image libfactor.a libfactor-ffi-test.so \
3737
extra GNUmakefile Nmakefile LICENSE.txt README.md \
3838
build.sh build.cmd unmaintained
3939

40-
# Prune basis subdirs that exercism tests cannot reach. Source files only —
41-
# the precompiled bytecode for these is in factor.image, which is unaffected.
42-
# - GUI and graphics: ui, opengl, cairo, gdk2/3/4, gtk2/3/4, gdk-pixbuf, gsk4,
43-
# glib, gmodule, gobject, gio, graphene, atk, gobject-introspection, gir,
44-
# pango, x11, fonts, images
45-
# - macOS-specific: cocoa, core-foundation, core-graphics, core-text, iokit
46-
# - Windows-specific: windows
47-
# - Linux-specific: linux
48-
# - Networking, RPC, web: dns, ftp, html, http, mime, oauth1, oauth2, openssl,
49-
# resolv-conf, smtp, syndication, urls, webbrowser, xml, xml-rpc
50-
# - Data formats: cbor, csv, ini-file, json, msgpack, pack, quoted-printable,
51-
# serialize, toml, uu
52-
# - Persistence / db: couchdb, db
53-
# - Encoding / hashing / compression: base16, base24, base32, base36, base45,
54-
# base58, base62, base64, base85, base91, base92, checksums, compression,
55-
# crypto, hex-strings
56-
# - Specialised data structures with no exercise use: biassocs, bit-arrays,
57-
# bit-sets, bit-vectors, bitstreams, bloom-filters, boxes, circular,
58-
# columns, cuckoo-filters, disjoint-sets, dlists, heaps, interval-maps,
59-
# interval-sets, lazy, linked-assocs, linked-sets, lists, named-tuples,
60-
# nibble-arrays, reservoir-sampling, search-deques, specialized-arrays,
61-
# specialized-vectors, suffix-arrays, tuple-arrays, unrolled-lists, vlists
62-
# - Pattern, parsing, text utilities: globs, lcs, match, peg,
63-
# porter-stemmer, regexp, simple-tokenizer, tr, wrap
64-
# - Editor / interactive only: documents, inspector, listener, see, xdg
65-
# - Other unused: xmode (syntax highlighting), game, farkup (markup),
66-
# colors, delegate, escape-strings, etc-hosts, eval, interpolate,
67-
# ip-parser, logging, memoize, method-chains, mirrors, models, nmake, ntp,
68-
# protocols, quoting, refs, retries, roman, simple-flat-file, system-info,
69-
# timers, typed, uuid, validators
40+
# Prune basis subdirs that exercism tests cannot reach, one category per rm so
41+
# each vocab is named exactly once. Source files only — any bytecode already in
42+
# factor.image is unaffected. A few pruned vocabs (bit-arrays, disjoint-sets,
43+
# heaps, tr, plus regexp, dlists, typed) ARE used by exercises, but they are
44+
# precompiled into factor.image at the step above, so deleting their source
45+
# here is safe — they load from the image. interpolate, search-deques,
46+
# lcs, lists and lazy are deliberately absent: no exemplar needs them, but a
47+
# fluent solver might reach for them, and their source (~20 KB, no extra deps)
48+
# is kept so it compiles on demand at runtime.
49+
50+
# GUI and graphics
51+
RUN cd basis && rm -rf \
52+
atk cairo fonts gdk-pixbuf gdk2 gdk3 gdk4 gio gir glib gmodule gobject \
53+
gobject-introspection graphene gsk4 gtk2 gtk3 gtk4 images opengl pango \
54+
ui x11
55+
56+
# macOS-specific
57+
RUN cd basis && rm -rf cocoa core-foundation core-graphics core-text iokit
58+
59+
# Windows-specific
60+
RUN cd basis && rm -rf windows
61+
62+
# Linux-specific
63+
RUN cd basis && rm -rf linux
64+
65+
# Networking, RPC, web
66+
RUN cd basis && rm -rf \
67+
dns ftp furnace html http mime oauth1 oauth2 openssl resolv-conf smtp \
68+
syndication urls webbrowser xml xml-rpc
69+
70+
# Data formats
71+
RUN cd basis && rm -rf \
72+
cbor csv ini-file json msgpack pack quoted-printable serialize toml uu
73+
74+
# Persistence / db
75+
RUN cd basis && rm -rf couchdb db
76+
77+
# Encoding / hashing / compression
7078
RUN cd basis && rm -rf \
71-
atk cairo cocoa core-foundation core-graphics core-text fonts \
72-
farkup game gdk2 gdk3 gdk4 gdk-pixbuf gio gir glib gmodule \
73-
gobject gobject-introspection graphene gsk4 gtk2 gtk3 gtk4 \
74-
images iokit linux opengl pango ui windows x11 xmode \
75-
editors furnace help \
76-
dns ftp html http mime oauth1 oauth2 openssl resolv-conf smtp \
77-
syndication urls webbrowser xml xml-rpc \
78-
cbor csv ini-file json msgpack pack quoted-printable serialize toml uu \
79-
couchdb db \
8079
base16 base24 base32 base36 base45 base58 base62 base64 base85 base91 \
81-
base92 checksums compression crypto hex-strings \
80+
base92 checksums compression crypto hex-strings
81+
82+
# Specialised data structures (bit-arrays, disjoint-sets, heaps, dlists are
83+
# precompiled above, so pruning their source here is safe)
84+
RUN cd basis && rm -rf \
8285
biassocs bit-arrays bit-sets bit-vectors bitstreams bloom-filters boxes \
83-
circular columns cuckoo-filters disjoint-sets dlists heaps \
84-
interval-maps interval-sets lazy linked-assocs linked-sets lists \
85-
named-tuples nibble-arrays reservoir-sampling search-deques \
86-
specialized-arrays specialized-vectors suffix-arrays tuple-arrays \
87-
unrolled-lists vlists \
88-
globs lcs match peg porter-stemmer regexp simple-tokenizer tr wrap \
89-
documents inspector listener see xdg \
90-
colors delegate escape-strings etc-hosts eval interpolate \
91-
ip-parser logging memoize method-chains mirrors models nmake ntp \
92-
protocols quoting refs retries roman simple-flat-file system-info \
93-
timers typed uuid validators \
94-
bootstrap environment persistent
86+
circular columns cuckoo-filters disjoint-sets dlists heaps interval-maps \
87+
interval-sets linked-assocs linked-sets named-tuples nibble-arrays \
88+
reservoir-sampling specialized-arrays specialized-vectors suffix-arrays \
89+
tuple-arrays unrolled-lists vlists
90+
91+
# Pattern, parsing, text utilities (regexp and tr are precompiled above)
92+
RUN cd basis && rm -rf \
93+
globs match peg porter-stemmer regexp simple-tokenizer tr wrap
94+
95+
# Editor / interactive only
96+
RUN cd basis && rm -rf documents editors help inspector listener see xdg
97+
98+
# Other not needed at runtime. memoize here is basis/memoize (the memoize.syntax
99+
# vocab); the canonical memoize and MEMO: live in core and are untouched. typed
100+
# is precompiled above.
101+
RUN cd basis && rm -rf \
102+
colors delegate escape-strings etc-hosts eval farkup game ip-parser \
103+
logging memoize method-chains mirrors models nmake ntp protocols quoting \
104+
refs retries roman simple-flat-file system-info timers typed uuid \
105+
validators xmode
106+
107+
# Bootstrap-only components
108+
RUN cd basis && rm -rf bootstrap environment persistent
95109

96110
# Asian and rare encodings: only utf8 / latin1 / strict are kept (everything
97111
# bundled streams use). 8-bit is the multi-codepage non-utf umbrella.

0 commit comments

Comments
 (0)