4 ms·
Oh, man. This is a VM in JS ("Google Script") with a UI in Google Sheets. If I had more time I'd post a VM in Google Sheets formulas only. Anyone want to take
by SonOfLilit 9y ago
Oh, man. This is a VM in JS ("Google Script") with a UI in Google Sheets.
If I had more time I'd post a VM in Google Sheets formulas only.
Anyone want to take it up?
Edit: hold my beer (see my reply below)
- ulucs 9y agoThis popped into my mind https://www.youtube.com/watch?v=uNjxe8ShM-8 https://www.youtube.com/watch?v=uNjxe8ShM-8
- samfisher83 9y agoPeople have done some absolutely crazy things with Excel as well. To some people its like an OS.
- sogen 9y agoWasn't there a flight simulator or a Doom a decade ago?
- khedoros1 9y agoExcel 97 had a sort of flight simulator. Excel 2000 had a car game. Earlier versions had other little easter eggs, but I think that Microsoft cracked down on them after Excel 2000.
- mikestew 9y agoTurns out the federal government to which Microsoft sells wondered, “if they’re sneaking in flight simulators and dungeons, what else are they sneaking in?” That’s the version I was told, anyway. That, and Easter eggs are another attack vector. How much of a security audit do you think those get?
- euyyn 9y agoExcel had a flight simulator as an easter egg, but it wasn't written in Excel formulas or VBA :)
- wolfgke 9y agoIndeed - some people have implemented games in it: http://mashable.com/2014/08/27/microsoft-excel-games/ http://mashable.com/2014/08/27/microsoft-excel-games/
- lenocinor 9y agoMy favorite is the Puerto Rico Evolver ( http://www.tropiceuro.com/puerto-rico-evolver/ http://www.tropiceuro.com/puerto-rico-evolver/ ), which both allows you to play (vanilla) Puerto Rico (the board game), AND evolves to your playstyle as you play. Pretty amazing.
- SonOfLilit 9y agoI have met an accountant with no knowledge in programming that wrote an entire accounting suite in an excel spreadsheet, which he would copy for each client.
- tosaket 9y agoYou would be surprised how many accountants still do that. Accountants are a finicky bunch and they don't trust what a cloud accounting platform such as Xero/QB spit out, so they end up writing their own "custom software" in excel.
- SonOfLilit 9y ago"Still"? I met him like three years ago. And the Israeli Xero/QB hasn't changed in like 20 years.
- grenoire 9y agoI am 99% sure you cannot do that. Cross-referencing cell loops are detected and prohibited, so you cannot even make a tape reader. Also, I'm not sure if you can set cell formulas with formulas either.
- SonOfLilit 9y agoWell, I already have parentheses parsing working, which is the biggest challenge. The rest should be really easy. Of course I'm working on Brainfk, both because of how cool it is and how simple for a Turing Complete VM. Also, because I have a lot of practice implementing it (https://www.slideshare.net/AurSaraf/virtual-machines-and-brainfuck https://www.slideshare.net/AurSaraf/virtual-machines-and-bra...) https://docs.google.com/spreadsheets/d/1g3-FZBnkDuLqFYOmk457hOvyrS798vO4X2nV77gVzGI/edit?usp=sharing https://docs.google.com/spreadsheets/d/1g3-FZBnkDuLqFYOmk457... Stay tuned.
- briansteffens 9y agoAwesome! I originally wanted to use only cell formulas to do this but couldn't figure out how to modify cell contents from other cells. Can't wait to see what you put together.
- SonOfLilit 9y agoI'd love to hear your thoughts. It's done! https://news.ycombinator.com/item?id=14703098 https://news.ycombinator.com/item?id=14703098
- ucaetano 9y agoNot really, circular references and iterative calculations are supported in Google Sheets, as in Excel.
- SonOfLilit 9y agoOK, Gimme back my beer, it's done! A Brainfk interpreter in pure Google Sheets formulas. I chose BF because of how cool and simple and powerful and turing complete it is and because I have a lot of practice implementing it (Just gave a talk at PyCon IL where I live coded one, https://www.slideshare.net/AurSaraf/virtual-machines-and-brainfuck https://www.slideshare.net/AurSaraf/virtual-machines-and-bra...). Of course it would be at least as easy to implement any other virtual machine, you might not need the parentheses matcher which was the biggest challenge and I had to go through a few designs until it worked.
- taftster 9y ago> "OK, Gimme back my beer, it's done!" 2 hours later. In BF none-the-less. You're my hero, you put me to shame.
- SonOfLilit 9y agoThese things are so much easier than they seem. I just did a PyCon IL talk where I livecoded a BF interpreter just so the audience gets a feel for how easy it is. Try sometime :-)
- amirhirsch 9y agoI created a VM in excel in my master's thesis. Table 1-4 https://dspace.mit.edu/handle/1721.1/45983 https://dspace.mit.edu/handle/1721.1/45983
- SonOfLilit 9y agoWow, this is extremely cool. You created a VM in Excel and a VM that runs Excel in an FPGA, proving equivalence of Excel and an FPGA :-P
- amirhirsch 9y agoTry implementing a simple FPGA in Excel. 4-input look-up-table: MID(lutcell,bin2dec(concat(inputcells),1) and hten the input cells can be done with OFFSET to support programmable routing. You can set the values by hand at first, but then connect it to your VM to load in bitstreams :)