Live data from Hacker News

3D engine entirely made of MS Excel formulae

gamasutra.com

41–50 of 78 posts

Re: 3D engine entirely made of MS Excel formulae

#41
post #7

This reminds me of the 3D roller coaster simulator in Excel[1]. The difference here is this was made for readability in mind and even works without macros. [1] http://www.excelunusual.com/coaster/

I love how the suggested video at the end is "Introduction to pivot table"

anyway, that's absolutely insane. The 3D engine seems to be laggy, on the video anyway, whereas this rollecoaster is pretty smooth !

Re: 3D engine entirely made of MS Excel formulae

#43

Anyone created a RESTful framework for excel yet? Maybe a package management tool as well?

I wrote this [0] little quick and dirty snippet to enable a Google Sheet as a JSON data source via GET requests. Unfortunately Google App Scripts only accept GET and POST requests [1] so it wouldn't be semantically RESTful, but adding update and delete features in the script are trivial if you send an action param along with your POST.

Using that data source snippet I wrote a 'static' CMS that pulls the JSON data from sheets in the workbook and then compiles and deploys a Jekyll site. I've been enthusiastically replacing WordPress sites with this wherever possible when clients only need data to change and don't require actual page editing (this system is perfect for restaurants - think menu changes). The "deploy" event is a little convoluted since I wanted to control what happens and when it happens, but it is all kicked off by submitting a Google Form which is attached to the Sheet.

The script as-is returns one object per row but converting it to key/value responses is also pretty easy. If Office365 has an equivalent to Google App Scripts that can publish a script as a web app, I'd love to hear about it.

[0] https://gist.github.com/chrsstrm/3fb0ce6820acecf62c5490d220d...

[1] https://developers.google.com/apps-script/guides/web

Re: 3D engine entirely made of MS Excel formulae

#44

Earlier quoted context omitted.

If Excel had just a couple more features it could be much more ergonomic and not even need macros. Specifically: anonymous functions/lambdas made with just pure formulas. Define a function in a cell like `=($s) => [expr]` (or something idc). Call it with `=A1("string arg", B2:B100)` or by name if you name it via named ranges. Functions are obviously a new data type, so you can pass them as parameters to each other or…

I think I disagree entirely. The typical things one gains from higher order functions are things like mapping and filtering of data structures. Excel only has one data structure—the table. Mapping is done by writing the formula once and then dragging it from the corner to the whole column. Filtering is not really done. Normally use the gui to hide the rows to be filtered away. Functions add in questions of scoping. H…

Filtering is very much done in sheets I have seen and used

Re: 3D engine entirely made of MS Excel formulae

#46

I should open this in LibreOffice :-) Actually, I’ve been wondering how to create a comprehensive spreadsheet that tests all of Excel’s features. Kind of like an ACID3 for spreadsheets...

Yes it actually works quite well as long as you use the 1st, macro version.

If you have LibreOffice installed, it takes less time to actually try it, than to post a comment.

Re: 3D engine entirely made of MS Excel formulae

#48
post #7

This reminds me of the 3D roller coaster simulator in Excel[1]. The difference here is this was made for readability in mind and even works without macros. [1] http://www.excelunusual.com/coaster/

I love how the suggested video at the end is "Introduction to pivot table" anyway, that's absolutely insane. The 3D engine seems to be laggy, on the video anyway, whereas this rollecoaster is pretty smooth !

Well, the roller coaster sim is wireframes only, which is always much easier to compute. You’ll notice that the Doom clone has lighting and shaders, which, however primitive, add complexity to the render.

It’s like the difference between text rendering versus decompressing JPEG images. Both can pile up enough data to exhibit lag, but you get more bang for your buck with the lighter data stream.

Re: 3D engine entirely made of MS Excel formulae

#49

Earlier quoted context omitted.

You jest, but people really do underestimate Excel. Yes, it sucks - but there is a reason that despite all its flaws, people keep trying to use it for things . (And no, that reason is not "they're too stupid to learn how to code") And I'm not sure the things that make Excel so crappy could really be fixed without sacrificing the things that make it such a flexible and useful tool. For instance, adding the ability to…

For me it usually is "I would like to use some sensible tools, but corporate policy requires me to not do that (because they are not available) - so I have to (ab)use Excel/Office/VBA to get things done." It's not pretty, stable, efficient or really maintainable, but if you are forced to use a hammer.. ps. Excel does some things OK, like drawing pretty graphs on smallish datasets and visualize quick analysis with piv…

I’ve been solving this problem with PowerShell for the last year or so. It’s usually available on locked-down corporate Windows boxes, and you can use the entire .NET Framework, as well as third-party .NET libraries, without admin rights. I’m using it with System.Data.SQLite to build a WPF application at the moment, which will hopefully replace a whole bunch of messy and hard-to-maintain Excel sheets and Access databases.

Re: 3D engine entirely made of MS Excel formulae

#50

Earlier quoted context omitted.

You jest, but people really do underestimate Excel. Yes, it sucks - but there is a reason that despite all its flaws, people keep trying to use it for things . (And no, that reason is not "they're too stupid to learn how to code") And I'm not sure the things that make Excel so crappy could really be fixed without sacrificing the things that make it such a flexible and useful tool. For instance, adding the ability to…

I work for NASA JPL... I think most people would be amazed if they knew how much “rocket science” was done in Excel.

I work at an engineering firm (not software), and for performing and presenting manual calculations it it great. You wouldn't write a Python or Julia script or use a Jupyter notebook for any of it. Because I like to code, I've written small programs for more involved calculations in J, C, F#, and my favorite Frink. Frink is great for engineering because it handles different units and systems throughout a calculation. Mathcad is also good for laying out manual calculations. Excel is the engineer's scratchpad. There are just certain things that are just easier to do in Excel, and not everything turns into a problem that needs a programming language. But there are ways of working with Excel from most programming languages aside from VBA.
Post reply on HN