Skip to content

Instantly share code, notes, and snippets.

@0racle
Created February 16, 2023 01:51
Show Gist options
  • Save 0racle/0020e0a1c3f120baab31d724086925e6 to your computer and use it in GitHub Desktop.
Save 0racle/0020e0a1c3f120baab31d724086925e6 to your computer and use it in GitHub Desktop.
Parsing 2 ways
Parse =. (' ' joinstring ])@((3 1 0 { ])`(6 4 1 { ])@.(5 < #@]))@;:
<@Parse;._2 'x-' rplc~ fread 'input'
NB. or
Parse =. (' ' joinstring |.@}. , {.)@('rect|row|column|\d+'&rxall)
<@Parse"1 'm' fread 'input'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment