Skip to content

Instantly share code, notes, and snippets.

@ConorOBrien-Foxx
Created September 19, 2016 02:16
Show Gist options
  • Save ConorOBrien-Foxx/7f840203180e4124b5a9a832bf1d97b5 to your computer and use it in GitHub Desktop.
Save ConorOBrien-Foxx/7f840203180e4124b5a9a832bf1d97b5 to your computer and use it in GitHub Desktop.
asdf
f =: | , <.@%
q =: 0:`((, ; |) ; [ $: {:@f)@.(*@])
k =: |. @: > @ }: @ q
boxofstr =: [: <;._1 ' ' , ":
pipe =: '|' joinstring boxofstr
roof =: (|:@,.~ ('- ' {~ [: <./\ '|' i. ]))@pipe
boxroof =: roof @ ;
graph =: [: ; [: ,:@{.&.|: boxroof&.>
final =: graph @ k
NB. I need to work on hw >_<
NB. displaying
tobase =: #.inv
digits =: 10 & tobase
fromhex =: 16 #. digits
fromoct =: 8 #. digits
digrows =: (] ;"0 [ ^ |.@i.@#@]) digits
disp =: ' + ' joinstring [: dtb&.> [: ;/ '*' joinstring"1 ":&.>
expr =: disp @ digrows
twist =: |: @ ,:
res =: twist @ (expr;[#.digits@])
@ConorOBrien-Foxx
Copy link
Author

ConorOBrien-Foxx commented Sep 19, 2016

it may need require 'strings' or the like before running, idk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment