Live data from Hacker News

A Lisp Interpreter Implemented in Conway's Game of Life

github.com

81–88 of 88 posts

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#81
post #74

Earlier quoted context omitted.

You might be interested to learn that DNA is not actually read-only. Besides viruses like HIV and transposable elements which permanently splice themselves in to the host's DNA, antibodies gain specificity through irreversible self-editing of the lymphocyte's genome via a similar (and perhaps, evolutionarily related) mechanism. https://en.wikipedia.org/wiki/V(D)J_recombination

Is the current vaccination sort of editing as well?

No. It doesn’t change the DNA. It only uses the existing RNA messaging system to tell the body to product antibodies. What you are suggesting is like expecting Ethernet to change the source code.

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#82
post #73

Earlier quoted context omitted.

Special-purpose hardware for cellular automata would not evaluate it "step-by-step" either, but in parallel. Every cell could evaluate its next state independently of others. We could think of some kind of version of RAM where each 'cell' would implement this behavior. Perhaps similar optimizations like HashLife could be developed for such special purpose hardware as well.

"evaluate its next state" is what I meant by "step-by-step". There could certainly be a dedicated hardware implementation of HashLife. It would not be based on the idea "cells are almost bits", nor would it be faster than a direct CPU implementation of Lisp.

But isn't the idea of Game of Life to evaluate all its states, all the steps, step by step?

Or is HashLife doing something like "Calculating state N + 100 without having to calculate all states in between?

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#83
post #73

Earlier quoted context omitted.

"evaluate its next state" is what I meant by "step-by-step". There could certainly be a dedicated hardware implementation of HashLife. It would not be based on the idea "cells are almost bits", nor would it be faster than a direct CPU implementation of Lisp.

But isn't the idea of Game of Life to evaluate all its states, all the steps, step by step? Or is HashLife doing something like "Calculating state N + 100 without having to calculate all states in between?

Hi, I'm the author of this project. HashLife actually does just that, by memoizing and reusing past occurrences and outcomes of the same pattern. Since one cell can only interact with its 8 neighbors in one timestep, there is a limit to the distance that a fixed-size pattern can interfere with in a fixed amount of time, analogous to the speed of light in physics. (It is in fact called the speed of light for cellular automatons as well, as described in https://en.wikipedia.org/wiki/Speed_of_light_(cellular_autom... .) Therefore, by remembering the outcomes of a certain pattern in a certain timeframe, you can jump to that amount of time in one step by using the memoized pattern. More details are explained in this article: https://www.drdobbs.com/jvm/an-algorithm-for-compressing-spa...

By the way, with all the passion for Lisp, simple but Turing-complete systems, and programming that I put into this project, I'm very happy that other people have enjoyed it too. Thanks to everyone for checking it out!

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#84
post #80
post #61

Earlier quoted context omitted.

Wow, thanks for those links. I am well acquainted with Lisp, but I never stumbled upon these. The video was great too. I have played with Wasp Lisp which is very cool and the Wasp VM. And checkout how it can spawn drone nodes on different machines[1,2]. I think C and Lisp together are amazing. I have been using them for decades, but J and APL entered my life over 8 years ago, and I am hooked! Checkout a rework of the…

Thanks for the links. Stumbled upon Otus Lisp / Owl-Lisp while looking for a sh/lua replacement for OpenWrt - the small footprint and architecture independend binary format as well as the FFI for .so files are looking great for that. Here is a complete documentation for the language: https://haltp.org/posts/owl.html that applies to both.

The one block for me is that I work on Windows, Linux, and Mac, and I don't like using Cygwin or MinGW with Windows. I am using Corman Lisp on my Windows machine for Windows-specific stuff and Jane before I heard of Owl and Otus Lisp. I do like Wasp Lisp's VM and C FFI too. Are you sticking with Owl/Otus?

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#86

Earlier quoted context omitted.

But isn't the idea of Game of Life to evaluate all its states, all the steps, step by step? Or is HashLife doing something like "Calculating state N + 100 without having to calculate all states in between?

Hi, I'm the author of this project. HashLife actually does just that, by memoizing and reusing past occurrences and outcomes of the same pattern. Since one cell can only interact with its 8 neighbors in one timestep, there is a limit to the distance that a fixed-size pattern can interfere with in a fixed amount of time, analogous to the speed of light in physics. (It is in fact called the speed of light for cellular…

Very interesting project. What I don't quite get is if you can calculate the state after 100 steps in one go what would make you select exactly100? Why not select 1007 or 10 million etc. ?

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#87

Earlier quoted context omitted.

Hi, I'm the author of this project. HashLife actually does just that, by memoizing and reusing past occurrences and outcomes of the same pattern. Since one cell can only interact with its 8 neighbors in one timestep, there is a limit to the distance that a fixed-size pattern can interfere with in a fixed amount of time, analogous to the speed of light in physics. (It is in fact called the speed of light for cellular…

Very interesting project. What I don't quite get is if you can calculate the state after 100 steps in one go what would make you select exactly100? Why not select 1007 or 10 million etc. ?

Thanks! That would be since the skippable timestep width is bounded by the size of the size of the patterns that you've memorized. Say we have a square pattern of size W. The outcome of this pattern within this region in 1 timestep is completely determined by its surrounding square region of size W+2c, with c as the speed of light (pixels per timestep), since patterns beyond that can never interfere with it unless its interference travels beyond the speed of light. For two timesteps the surrounding region would be of size W+4c, since more pixels can interfere with it within that amount of time. Therefore, If you memorize a pattern of size W+4c, you can predict the outcome of the inner square of size N after 2 timesteps, or the inner square of size W+2c after 1 timestep, etc. This sets an upper bound to the number of timesteps you can skip, depending on the sizes of the patterns that you have memorized. So if you've memorized a pattern of size W+200c, you can predict the outcome of the inner square of size c after 100 timesteps, but predicting the 101st timestep would require information of a region beyond the memorized pattern.

Re: A Lisp Interpreter Implemented in Conway's Game of Life

#88

Earlier quoted context omitted.

Very interesting project. What I don't quite get is if you can calculate the state after 100 steps in one go what would make you select exactly100? Why not select 1007 or 10 million etc. ?

Thanks! That would be since the skippable timestep width is bounded by the size of the size of the patterns that you've memorized. Say we have a square pattern of size W. The outcome of this pattern within this region in 1 timestep is completely determined by its surrounding square region of size W+2c, with c as the speed of light (pixels per timestep), since patterns beyond that can never interfere with it unless it…

Cool
Post reply on HN