[Vm-dev] Tangential: A Lisp Interpreter Implemented in Conway's Game of Life
hernan.wilkinson at 10pines.com
Fri Jan 20 13:02:16 UTC 2023
don't you find it difficult to understand? I mean, I do not understand how
it goes from the rules of the game (*) to that code... I can not map that
implementation to the rules of the game... Can someone explain to me or
point me to a paper/description of why that implementation works?
I did two implementations of the game a long time ago. One that goes over
the board twice and another that goes only once.
These implementations try to be as declarative as possible. For example,
the one that passes over the board twice is:
aliveCells := self cellsToSurviveOnNextGeneration union: self
The one that passes over the board once is:
aliveCells := self boardCellsSelect: [ :aCell | self
shouldBeAliveOnNextGeneration: aCell ]
aliveCells is a Set of the alive cells of the game. I think you can deduce
what the other messages do.
Of course it is not as performant as Dan's implementation... If someone can
direct me to some info or explain to me why Dan's implementation works I
will appreciate it.
(*) I use the definition of
On Thu, Jan 19, 2023 at 5:54 AM Vanessa Freudenberg <vanessa at codefrau.net>
> On Wed, Jan 18, 2023 at 11:33 AM karl ramberg <karlramberg at gmail.com>
>> Here is a version of Dans Game of Life that almost work ;-P
>> Some methods have changed names and I'm not sure about the BilBlt
>> combinations rules used.
> Here's one that does work. Took the liberty to reorder things a bit so I
> could better understand what it does.
> On Mon, Jan 16, 2023 at 9:55 PM tim Rowledge <tim at rowledge.org> wrote:
>>> > On 2023-01-16, at 12:00 PM, karl ramberg <karlramberg at gmail.com>
>>> > Very cool. I would not volunteer to refactor that :-D
>>> > It's tricky to get high performance GameOfLife in Squeak.
>>> Have you never seen the BitBLT based version Dan Ingalls wrote a
>>> gazillion years ago? It used to be in the Squeak image, or at least I feel
>>> pretty sure it was.
>>> Oh, wait! It was written up in the Byte81 issue, so see
>>> and the following pages.
>>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>>> Klingon Code Warrior:- 8) "By filing this bug you have questioned my
>>> family honor. Prepare to die!"
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev