Parsing nested lists in BQN
Three methods are presented for parsing nested lists from Advent of Code 2022 day 13 in BQN. The first approach, known as cheating, utilizes the •BQN function to handle the heavy lifting. The second method involves writing a conventional recursive descent parser. The third method employs an array-style parser. Benchmarks are conducted to compare the performance of the three approaches. The data is tested using a file containing the Advent of Code input.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.