Nile language

Created on 2021-01-28T02:33:18-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

The thesis of Nile appears to be:

A language based around data flow

Think of it as a fancy map/reduce helper.

Functions have a "A >> B" signature which means it consumes a stream of A and emits a stream of B.

To read an event means to either take an item which was requeued, or to consume an event from the input stream.

A function or kernel reads events, maps them, and emits new events.

">>" means to send a value to the output stream

"<<" means to kick one or more objects back to the input stream

"∀" means "for each" and indicates a block to be run for every input to the kernel

Kicking back to the input stream

In the case of flattening beziers you must divide and conquer line segments. If a line segment is too curvy to draw then you split it in half, re-queue both halves, and repeat until you are either done or out of memory.

Pairwise things

Built-ins like "DupZip" duplicate incoming values, run them through two sub-streams and zips the results.