Hacker News new | past | comments | ask | show | jobs | submit login
Excel Turing Machine (felienne.com)
55 points by pjvds on Sept 20, 2013 | hide | past | favorite | 11 comments



Having implemented AES and a few other algorithms in "pure formula" Excel, I fully support seeing more things implemented in Excel!

One of the biggest things to wrap your head around is that cells in Excel are write-once, read many. This forces you to unroll all of your loops, and you generally end up with a giant state machine, with each state occupying a row and depending on the state of the previous row.


So Excel is a pure functional language?


Yep. Additionally, there are no user-defined functions, and the limit on the length of the "code" that makes up a cell is low enough that you occasionally bump into it when trying to "program" in Excel.

Excel also has a tendency to get crashy when you have a very complex cell dependency tree...


I wouldn't call it functional. It's dataflow programming : http://en.wikipedia.org/wiki/Dataflow_programming


Cool. I was working on simulating turing machines in excel last year and got an a^ib^i acceptor working but never finished creating a full universal turing machine. https://github.com/Jonahss/Spreadsheets-Without-Macros

I create a circular dependency and set Microsoft excel to evaluate circular dependencies through one iteration. Every time you tell it to calculate, it steps through another clock cycle. This way I got a cool animated tapehead.


Somewhat related, my friend's enigma machine in an excel spreadsheet: http://williamedwardscoder.tumblr.com/post/19946053957/enigm...


This is very cool! I've sometimes wondered about doing that.

An obvious question is whether this suffices to show Turing completeness. I think the answer is no: because Excel has a finite number of cells, there are programs that this Turing machine won't have enough cells for. To get around that, you'd have to do something clever with iterative calcs (i.e. circular references) that effectively reuse the same cells behind the scenes. VBA is out of the question, of course. :)



And the bandwidth from HN has killed their server...


Just because you can, doesn't mean it's right ;)

Nice work by the way. It's quite amazing the odd things you can do in Excel.


Since Excel is Turing complete, you can do ''every possible calculation'' on it ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: