Skip to content

milahu/treepipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

treepipes

incremental tree transformers

status

concept

example

┌──────────┐              ┌──────────┐
│ TSX Text │ ── Parse ──► │ TSX Tree │
└──────────┘              └──────────┘
                               |
                            Compile
                               │
                               ▼
                          ┌──────────┐
                          │ JSX Tree │
                          └──────────┘
                               |
                            Compile
                               │
                               ▼
┌──────────┐              ┌──────────┐
│ JS  Text │ ◄── Print ── │ JS  Tree │
└──────────┘              └──────────┘

every arrows is an incremental transformer, aka "pipe"

compiler 1 is typescript (tsc)

compiler 2 is a web framework like svelte, solid, qwik ...

goal: low latency between input and output

incremental parsing

incremental transforming

term rewriting

incremental computing

incremental compilers

incremental compiler generators

  • https://github.com/nfomon/shok/tree/master/statik - http://statik.rocks/ - https://doi.org/10.1145/2814189.2817278 at https://sci-hub.ru/ - Statik: an incremental compiler generator, Michael Biggs, 2015. Statik allows you to write a compiler as a sequence of "phases" of parsing. Each phase incrementally translates an input list to an output list. For example, your compiler might be constructed as the pipeline: lexer -> parser -> code-generator. The lexer incrementally translates source-code characters to tokens. The parser translates incremental changes to the token list, to an incrementally-updating parse tree. The code-generator responds to the changing parse tree by generating the bytecode for those changes, and emits the bytecode changes incrementally.

incremental code generators

aka: incremental codegen

differential dataflows

focus on GraphQL

reactive programming

functional reactive programming

program-transformation

source to source compilers

hot module reload

incremental printing

TODO

electrical engineering

"durchgriff" is a german term in electrical engineering

in english: reachthrough, punchthrough, passthrough, passage, control ratio, penetration factor

we can reduce complex (non-linear) systems to simple (linear) systems, by limiting the range of input parameters

example: amplifier

for high-fidelity signal amplfication, you want to run the amplifier in its linear range

if you make it too loud then you get clipping, if you make it too silent then you get no output

in the linear range, the amplifier has a linear "durchgriff" from input to output: a small change on the input will produce a small change on the output

see also