tek/edn
2025-01-18 13:38:21 +01:00
..
src wip: overcomplicating it on the way to simplifying it ultimately 2025-01-18 13:38:21 +01:00
Cargo.lock use Arc<str> where applicable; use konst split_at 2025-01-08 00:53:00 +01:00
Cargo.toml wip: more const parsing 2025-01-17 22:26:49 +01:00
README.md once again, why did i begin to refactor this 2025-01-18 00:13:36 +01:00

ket

ket is the configuration language of tek. it's based on edn but without all the features.

usage

with tek_output

this is a tek_output view layout defined using ket:

(bsp/s (fixed/y 2 :toolbar)
  (fill/x (align/c (bsp/w :pool
    (bsp/s :outputs (bsp/s :inputs (bsp/s :tracks :scenes)))))))

with tek_input

this is a tek_input keymap defined using ket:

(@u       undo 1)
(@shift-u redo 1)
(@e       editor show :pool-clip)
(@ctrl-a  scene add)
(@ctrl-t  track add)
(@tab     pool toggle)

tokens

ket has 5 "types":

  • nil
  • numeric literal
  • symbol
  • key
  • group

nil

this does nothing.

numeric literal

numbers are passed through as is. only non-negative integers are supported.

0
123456

keys

keys are the names of available operations. they look like this:

simple-key
multi-part/key

keys are implemented by the underlying subsystem:

  • in tek_output, keys are names of layout primitives
  • in tek_input, keys are names of commands

symbols

symbols that start with : represent the names of variables provided by the Context trait - such as command parameters, or entire layout components:

:symbol-name

symbols that start with @ represent keybindings. they are parsed in tek_tui and look like this:

@ctrl-alt-shift-space

groups

groups represent things like expressions or configuration statements, and look like this:

(some-key :symbol (some/other-key @another-symbol 123) 456)

goals

  • const parse
  • live reload
  • serialize modified code back to original indentation