How matz/streem works
Project type and purpose
• Streem is a standalone, stream-based concurrent scripting language runtime and interpreter written in C.
• It compiles a small DSL (inspired by shell pipelines, Ruby, Erlang) into an in-memory dataflow graph and executes it via an event loop and worker threads.
File structure
• Top-level: Dockerfile, Makefile, CI workflows, docs/, examples/
• src/:
• lex.l / parse.y – scanner and parser (Flex/Bison)
• main.c – command-line entry point
• init.c, core.c, graph.c, node.c – AST → dataflow graph construction
• exec.c, io.c, pollfd.c, signal.c – event loop & OS integration (Reactor pattern)
• ncpu.c, latch.c, atomic.h – concurrency primitives & worker threads
• math.c, array.c, csv.c, kvs.c, sort.c, random.c, etc. – built-in stream operators & libraries
• utils/ & vagrant/ for dev environment scripts
README for additional insights
• Describes the pipeline DSL (stdin | stdout, seq(100) | map{…} | stdout)
• Key concepts: streams, nodes (operators), event loop, mapping/filtering functions, concurrency
Detail without over-splitting
• Every major phase, module group, and external dependency
• Keep component granularity at the level of “parser vs. execution engine” rather than every .c file