<div dir="ltr">Hi Vanessa,<div> 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? </div><div><br></div><div> I did two implementations of the game a long time ago. One that goes over the board twice and another that goes only once. </div><div> These implementations try to be as declarative as possible. For example, the one that passes over the board twice is: </div><div>nextGeneration<br>    aliveCells := self cellsToSurviveOnNextGeneration union: self cellsToResurectOnNextGeneration<br></div><div><br></div><div> The one that passes over the board once is:</div><div>nextGeneration<br>  aliveCells := self boardCellsSelect: [ :aCell | self shouldBeAliveOnNextGeneration: aCell ]</div><div><br></div><div>aliveCells is a Set of the alive cells of the game. I think you can deduce what the other messages do.</div><div>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.</div><div><br></div><div>Thanks!</div><div>Hernan</div><div><br></div><div>(*) I use the definition of <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 19, 2023 at 5:54 AM Vanessa Freudenberg <<a href="mailto:vanessa@codefrau.net">vanessa@codefrau.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div dir="ltr">On Wed, Jan 18, 2023 at 11:33 AM karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr"><div>Here is a version of Dans Game of Life that almost work ;-P</div><div>Some methods have changed names and I'm not sure about the BilBlt combinations rules used.</div><div><br></div><div>Best,</div><div>Karl</div></div></blockquote><div><br></div><div>Here's one that does work. Took the liberty to reorder things a bit so I could better understand what it does.</div><div><br></div><div>Vanessa</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 16, 2023 at 9:55 PM tim Rowledge <<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
<br>
> On 2023-01-16, at 12:00 PM, karl ramberg <<a href="mailto:karlramberg@gmail.com" target="_blank">karlramberg@gmail.com</a>> wrote:<br>
> <br>
> Very cool. I would not volunteer to refactor that :-D<br>
> <br>
> It's tricky to get high performance GameOfLife in Squeak. <br>
<br>
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.<br>
<br>
Oh, wait! It was written up in the Byte81 issue, so see <a href="https://archive.org/details/byte-magazine-1981-08/page/n181/mode/2up?view=theater" rel="noreferrer" target="_blank">https://archive.org/details/byte-magazine-1981-08/page/n181/mode/2up?view=theater</a> and the following pages. <br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Klingon Code Warrior:- 8) "By filing this bug you have questioned my family honor. Prepare to die!"<br>
<br>
<br>
</blockquote></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>