Hacker News new | ask | show | jobs
by peheje 1883 days ago
Only a few pages in. Had to try: https://gist.github.com/peheje/8076f619f6fbc1202954bc70720ef...
2 comments

And here it is in apl :)

  (width iterations) ← 127 64 ⍝ perfect size for a nice sierpinski
  
  advance ← {2|-⌿¯1 1⊖⍤0 1⊢⍵} ⍝ on a torus
  x←width⍴0 ⋄ x[⌊width÷2] ← 1
  {⎕←' ⌹'[⍵]⋄advance ⍵}⍣iterations⊢x
And the random variant (not as pretty, but still has some nice triangles):

  {⎕←' ⌹'[⍵]⋄advance ⍵}⍣iterations ?width⍴2
First time seeing .nim code in the wild! Seems like a fun/ fast language to use.