Civstack
Let's work together to create and refine a public domain tech stack which
enables learning through simple but powerful software. This project is for
students, teachers, professionals, and creators to use for learning and
to supercharge their personal development stack.
The Civstack is a complete and well documented software development tech stack
built from scratch. It encompases an
editor,
version control>,
build system and package
manager and
documentation language. Soon it will have
educational games and tutorials, a custom assembly language, and its own
implementation of lua, which all of the high-level software is implemented in.
First, install Lua5.4 with
apt-get install lua,
brew lua,
pkgin install
lua5.4
or however you normally install software, or follow directions at
https://lua.org/start.html. You will also need a C compiler.
Then run the following (or equivalent). Make certain to follow the
directions for
PATH variables.
lua bootstrap.lua init # create .civconfig.lua
lua bootstrap.lua boot-test # run tests for your system
# !-- IMPORTANT: run, then do what it says for PATH vars --!
lua bootstrap.lua install civ:cmd/civ # install civ
source ~/.bashrc # load new PATH vars
civ test civ:.# # test all targets
civ install civ:#full # install main civ software
By default, civ software will be put in ~/.local/civ/. You can
modify this by changing .civconfig.
Commands installed by
civ install civ:#full. You can view their command
documentation using
luadoc <cmd>.
- civ: the civ build system. Modeled off of
bazel, it is simpler than Make but much more
ergonomic and powerful. All of the PKG.luk files exist for the civ build
system.
- pvc: patch version control -- like git but in ~1k LoC.
- Ele: Extendable Lua Editor and Lua-first shell --
not quite ready for full use.
- luadoc: get help on any package or lua object as cxt or
rendered with color on the terminal.
- cxt: this document and all code documentation is written in
cxt, a powerful ultra-simple markup language which is designed to be as
easy as possible to parse (for computers and humans) while maintaining
conciseness.
- ff: find and fix utility, like a superchanged find+grep
from unix land, being able to search and replace source code is an essential
developer tool.
The following are the "core libraries" and represent the "batteries included"
of Civlua. They maintain minimalism but enable ergonomic programming, powerful
scripting, asynchronous file access and other goodies.
- shim: write scripts for Lua, execute from shell. Think
python's argparse but cleaner and allows for Lua OR shell execution.
- metaty: enable typosafe, self documenting records (aka
structs) which utilize Lua metatables.
- fmt: format strings and lua nested types with an (optional)
style interface.
- ds: Data Structures and algnorithms. This module is
packed with tons of tiny functions, types and interfaces which enable ergonomic
scripting as well as creating applications such as editors and version
control systems in pure Lua.
- lines: treat files like tables of lines and apply
algorithms for that interface. The lines.File and lines.EdFile are
especially worth checking out.
- civix: unix system interface: ergonomic unix sh,
time and file modification are here.
- lap: Lua Asynchronous Protocol, for advanced users who want
concurrency in pure-lua.
- fd: file-descriptor library for async files and other file
operations.
- pegl: general-purpose PEG-like parser library, used
for cxt and will help provide syntax-highlighting in ele.
- lson: implements de/serialization of arbitrary
concrete data (including tables) to/from JSON and an extension called LSON.
- asciicolor: specify color and styles using
ascii characters, i.e. "BW" is bold+underlined black text on white
background.
- vt100: defines common VT100 (aka standard unix)
terminal input and output.
All software, tests, documentation, notes and anything else in this repository
is released into the public domain (
LICENSE) unless otherwise noted in the
given source file.
If you find any of this software helpful or copy large parts of it, please give
us a a shoutout in your own projects and let us know by opening an
issue. Please note that this is not
required but is highly appreciated, thanks!