One-dimensional cellular automata: Difference between revisions
Content added Content deleted
(Added PicoLisp) |
m (→[[One-dimensional cellular automata#ALGOL 68]]: fix pre tag) |
||
Line 72: | Line 72: | ||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
===Using the low level packed arrays of BITS manipulation operators=== |
===Using the low level packed arrays of BITS manipulation operators=== |
||
{{works with|ALGOL 68|Revision 1 - no extensions to language used}} |
|||
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}} |
|||
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of FORMATted transput}} |
|||
<lang algol68>INT stop generation = 9; |
<lang algol68>INT stop generation = 9; |
||
INT universe width = 20; |
INT universe width = 20; |
||
Line 115: | Line 119: | ||
universe := next universe |
universe := next universe |
||
OD</lang> |
OD</lang> |
||
Output: |
|||
<pre> |
|||
⚫ | |||
Generation 1: _#_#####_#_#_#______ |
|||
Generation 2: __##___##_#_#_______ |
|||
Generation 3: __##___###_#________ |
|||
Generation 4: __##___#_##_________ |
|||
Generation 5: __##____###_________ |
|||
Generation 6: __##____#_#_________ |
|||
Generation 7: __##_____#__________ |
|||
Generation 8: __##________________ |
|||
Generation 9: __##________________ |
|||
</pre> |
|||
===Using high level BOOL arrays=== |
===Using high level BOOL arrays=== |
||
{{works with|ALGOL 68|Revision 1 - no extensions to language used}} |
|||
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}} |
|||
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of FORMATted transput}} |
|||
<lang algol68>INT stop generation = 9; |
|||
<lang algol68>INT stop generation = 9; |
<lang algol68>INT stop generation = 9; |
||
INT upb universe = 20; |
INT upb universe = 20; |
||
Line 152: | Line 174: | ||
OD</lang> |
OD</lang> |
||
Output: |
Output: |
||
<pre> |
|||
⚫ | |||
Generation 0: _###_##_#_#_#_#__#__ |
|||
Generation 1: _#_#####_#_#_#______ |
Generation 1: _#_#####_#_#_#______ |
||
Generation 2: __##___##_#_#_______ |
Generation 2: __##___##_#_#_______ |
||
Line 161: | Line 184: | ||
Generation 7: __##_____#__________ |
Generation 7: __##_____#__________ |
||
Generation 8: __##________________ |
Generation 8: __##________________ |
||
Generation 9: __##________________ |
Generation 9: __##________________ |
||
</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |
||
ahk [http://www.autohotkey.com/forum/viewtopic.php?t=44657&postdays=0&postorder=asc&start=147 discussion] |
ahk [http://www.autohotkey.com/forum/viewtopic.php?t=44657&postdays=0&postorder=asc&start=147 discussion] |