Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,6 @@
dlb
}.~ (=&' ' (i.) 0:)
dtb
#~ ([: +./\. ' '&~:)
deb
#~ ((+.) (1: |. (> </\)))@(' '&~:)

View file

@ -0,0 +1,34 @@
'x' squeeze 'xabxxcxdxxx' NB. example
xabxcxdx
,.' -7. -r' main&.> <;._2 to_be_squished
┌──────────────────────────────────────────────────────────────────────────────┐
│squeeze ' ' reduces the length from 0 to 0 │
│<<<>>> │
│<<<>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze '-' reduces the length from 71 to 69 │
│<<<"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln>>> │
│<<<"If I were two-faced, would I be wearing this one?" - Abraham Lincoln>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze '7' reduces the length from 72 to 69 │
│<<<..1111111111111111111111111111111111111111111111111111111111111117777888>>>│
│<<<..1111111111111111111111111111111111111111111111111111111111111117888>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze '.' reduces the length from 71 to 71 │
│<<<I never give 'em hell, I just tell the truth, and they think it's hell.>>> │
│<<<I never give 'em hell, I just tell the truth, and they think it's hell.>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze ' ' reduces the length from 70 to 19 │
│<<< --- Harry S Truman>>> │
│<<< --- Harry S Truman>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze '-' reduces the length from 70 to 68 │
│<<< --- Harry S Truman>>> │
│<<< - Harry S Truman>>> │
├──────────────────────────────────────────────────────────────────────────────┤
│squeeze 'r' reduces the length from 70 to 69 │
│<<< --- Harry S Truman>>> │
│<<< --- Hary S Truman>>> │
└──────────────────────────────────────────────────────────────────────────────┘

View file

@ -0,0 +1,2 @@
NB. Note |.!.1 here instead of the APL version's 1 , }. to more elegantly handle the null case in J
sq =: ] #~ ~: +. _1 |.!.1 ] ~: 1 |. ]

View file

@ -0,0 +1,10 @@
require'format/printf' NB. For formatting the output
'C I' =: <"1 |: P =: ; ;"0 1^:(0<#@[)&.>/"1 (({.~ ; (}.~>:)) i.&'|')&> LF cut noun define
|
-|"If I were two-faced, would I be wearing this one?" --- Abraham Lincoln
7|..1111111111111111111111111111111111111111111111111111111111111117777888
.|I never give 'em hell, I just tell the truth, and they think it's hell.
-r| --- Harry S Truman
)
S =: sq&.>/"1 P
smoutput 'chr: ''%s''\nin: %d «««%s»»»\nout: %d «««%s»»»\n' sprintf C ,. (#&.>I),.I ,. (#&.>S),.S