pacme
An acme-inspired GNU poke interface
This project consists of a bunch of small C programs that used together and
collated by a screen manager (at the moment tmux
is supported) provide
a very flexible and powerful user interface to GNU poke, the extensible
editor for binary data.
These small C programs communicate with the poke daemon acting as pokelets, executing Poke code, processing the results, and implementing the several components of the user interface: REPL, byte-dump output, input and evaulation of multi-line Poke programs, tree viewer and editor of Poke data structures, etc.
Code
To browse the git repository via the web use the gitweb interface.
You can check out a copy of the git repository directly using the following command:
git clone https://sourceware.org/git/pacme.gitAfter cloning the repository, you have to bootstrap it:
cd pacme ./bootstrapTo build:
mkdir build && cd build ../configure make make install
Pokelets
Pokelets are small programs that interact with poked
daemon. This project provides the following pokelets:
plet-in
Reads from stdin
and send it to an input channel over
/tmp/poked.ipc
unix domain socket. By default, it sends
the data to input channel 1.
Examples:
# Send `var a = 1;' string to channel 1 (code channel) echo 'var a = 1;' | plet-in # Send `a;' string to channel 2 (command channel) # (You can see the value of `a' in output channel 1) echo 'a;' | plet-in -c 2
plet-out
Subscribes to output channel (over /tmp/poked.ipc
) and
prints the data in stdout
. If subscribed to output channel 1
(default Poke output channel), it'll process data before printing to
stdout
. To disable the processing, you can use -r
option.
Examples:
# Process and show data written to output channel 1 (Poke stdout output) plet-out # In raw mode: plet-out -r
plet-repl
A REPL (Read/Evaluate/Print Loop) to send code/command to input channel 1 and channel 2.
Every input will be send to code channel (evaluated by
pk_compile_buffer
function in poked
) unless the
first (non-whitespace) character is a semi-colon (;
).
A line that starts with a ;
will be send to the command
channel (evaluated by pk_compile_statement
and the value
will be printed in the output channel 1 in poked
). This behavior
is different from the poke CLI application; to enable compatibility use
option -p
.
Example:
plet-repl #!poke#!
plet-poke-disas
Show disassembly of Poke functions and expressions (as PVM instructions or
native instructions) produced using plet_disas_func
and
plet_disas_expr
Poke functions.
plet-cpu-disasm
A multi-platform, multi-architecture disassembly pokelet based on Capstone.
pacme
Layouts
There are a bunch of pre-defined layouts to arrange pokelets.
When you open the pacme
, you have two options:
- Invoke one of pre-defined layouts like
C-g F1
key-binding (press g while holding the control, and then press F1 key). - Open tmux panes and arrange them as you like and open pokelets in them.
List of pre-defined layouts:
Layout Key | Appearance |
---|---|
F1 |
+-----------+ | | | Editor | | | +-----------+ | plet-repl | +-----------+ | plet-out | +-----------+ |
F2 |
+-----------+ | | | plet-repl | | | +-----------+ | plet-vu | +-----------+ | plet-out | +-----------+ |
Community
- IRC channel at Libera.chat:
#poke
- Mailing list:
poke-devel@gnu.org