~ilmu/cxp

CLI for rearranging text.
Managed to build bin by entering shell and loading hack.lisp into sbcl
add hack.lisp fixed asd
small hints

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~ilmu/cxp
read/write
git@git.sr.ht:~ilmu/cxp

You can also use your local clone with git send-email.

Overview
--------
The cxp command gives you access to a DSL that shares many similarities with
string diagrams.  See graphicallinearalgebra.net for more information (note
that netstrings are formed from a product of the natural number monoid and
the bytestring monoid).

The idea is to break text up into regions (snippets) that can be recomposed
into new files. We treat all data as being composed of bytes so that we can
break it up into netstrings (although cxp may support nitstrings as well in
the future).

In bash you would
cat somefile | cxp $cmd0 $arg0 | cxp $cmd1 $arg1 | ... \
                           ... | cxp $cmdn $argn > otherfile

An alternative way to achieve the same thing is using the following syntax:
cat somefile | cxp $cmd0 $arg0 - ... - $cmdn $argn > otherfile

or even:
cxp read somefile - quote - $cmd0 ... $argn - unquote - write otherfile

Currently implemented commands:

- quote :: Collect stdin and prefix it, stream resulting netstring to stdout.

See SPECIFICATION for missing functionality.

Please check out http://git.sr.ht/~ilmu/tala for the next layer of
abstraction (name system built on top of cxp's).

Hacking
-------

First enter a guix shell, then you can try the following:

Currently the way I am working is via repl and buffer and then occasionally
I sbcl --load cxp.lisp in a terminal to write the bin and test it.

There are several things that remain to be done to make this accessible to
others, first thing would be to make the path to the binary relative.. or
make asdf able to build the binary so that guix can manage it.

Other missing things: tests / assurances, functionality, ux, ...