about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2023-12-10 11:32:50 -0500
committerelioat <elioat@tilde.institute>2023-12-10 11:32:50 -0500
commit4035bec450015f8be01bea499ee58236d3a6ab40 (patch)
tree2a18a965fa0fd14804581d19a1c16cc32f38eab6
parent83efc374fdcbe66b3975fea6b7dd1df2c3d0d131 (diff)
downloadtour-4035bec450015f8be01bea499ee58236d3a6ab40.tar.gz
*
-rw-r--r--bqn/life.bqn8
1 files changed, 8 insertions, 0 deletions
diff --git a/bqn/life.bqn b/bqn/life.bqn
new file mode 100644
index 0000000..a7be050
--- /dev/null
+++ b/bqn/life.bqn
@@ -0,0 +1,8 @@
+Life←{
+   r←¯1(⌽⎉1)¯1⌽(2+≢𝕩)↑𝕩
+   s←∨´ (1∾<r) ∧ 3‿4 = <+´⥊ ¯1‿0‿1 (⌽⎉1)⌜ ¯1‿0‿1 ⌽⌜ <r
+   1(↓⎉1) ¯1(↓⎉1) 1↓ ¯1↓s
+}
+
+blinker←>⟨0‿0‿0,1‿1‿1,0‿0‿0⟩
+(<".#") ⊏¨˜  Life⍟(↕3) blinker
\ No newline at end of file