Concatenative language
Concatenative topics
Concatenative meta
Other languages
Meta
Trawl is a small stack-based concatenative language for searching for patterns in the integers. Every number is an exact integer of any size. It has a reference interpreter in Python and a native compiler through C for long searches. Loops can detect when their state repeats, and searches can guess and rewind. It is developed by connabyss: [[https://github.com/connabyss/trawl]] = Example = Follow the rule x -> x + (digit sum of x)^2 from 1 for 15 steps: [{ : flow dup 10 digsum dup * + ; 1 15 [ swap dup . flow swap 1 - ] drop drop }] Output: [{ 1 2 6 42 78 303 339 564 789 1365 1590 1815 2040 2076 2301 }] Trawl's search for OEIS A343507 (from Erdős problem 727) reproduces the terms a(10) to a(12): [[https://oeis.org/A343507]]
Describe this revision:
Save