Skip to content

Commit

Permalink
modified: sample.ua
Browse files Browse the repository at this point in the history
  • Loading branch information
shnarazk committed Oct 28, 2023
1 parent 422d96e commit 67160c2
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions sample.ua
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#!/usr/bin/env uiua run
FirstColumn ← 16
SecondColumn ← 6
---
⍤ ≥FirstColumn SecondColumn
---
F!! ← (+|-|^2|^2)
Column ← 16
Fill ← ⊂∶⬚∘↙∘⊃(∘)(∶""↥0-∶Column ⧻⋅.)
CommentChar ← @# # this is comment
FileList ← ↘1&args
FileList ← (∘|["sample.ua"];)=0⧻.↘1&args
NotBlankLine ← ▽∵(≠0⧻).
NotStartsWithComment ← ▽∵(/<⊂⊃(⊗CommentChar⊔)(⊗0=@ ⊔)).
LoC ← |1 ⧻NotStartsWithComment NotBlankLine ⊜□¬=@\n.&fras
≡(&fe⊔)..FileList
≡(|2 ?(LoC)(□"N/A";))
≡(|2 □$"| _ | _ |"⬚@\s(↙) FirstColumn $"_" ⊙(⬚@\s(↙) dump∘ SecondColumn $"_")∶∩⊔)
⊂□$"|-_-|-_-:|" ⬚@-↙ FirstColumn "" ⬚@-↙ - 1 SecondColumn ""
⊂□$"| File_ | LoC_ |" ⬚@\s↙ - 4 FirstColumn "" ⬚@\s↙ - 3 SecondColumn ""
∵&p
NotStartsWithComment ← ⊐▽∵(/<⊂⊃'⊗CommentChar(⊗0=@\s)).
LoC ← |1 ⧻NotStartsWithComment NotBlankLine ⊜□≠@\n.&fras
&p $"| _ | _ |" ∩Fill @\s "File" @\s "LoC"
&p $"|-_-|-_:|" .Fill @- ""
;⊐≡(0 &p $"| _ | _ |" ∩'Fill@\s ∶?'$"_"LoC'"N/A";&fe)..FileList
---
m ← ↯ 10_9_3_3 ⇡ 810
⍜≡≡□⍉ m
---

0 comments on commit 67160c2

Please sign in to comment.