8 comments

[ 3.0 ms ] story [ 33.0 ms ] thread
Author here. I had a great time figuring out how exactly to write the queries in the blog post. If you have any questions, feel free to ask.
I don't have any questions, just wanted to comment on this amazing work.

It's been a while since I last played with SQL; at one time, it seemed like I was always doing something with SQL, mainly for MySQL - but everything now seems to be "locked" behind an API and all I do is interact with the API. Which isn't a bad thing, but it does mean my SQL skills are accumulating rust.

I do recall, though, enjoying the task of figuring out solutions to problems where the work could be done in SQL rather than in code. Sometimes, this resulted in SQL that, while valid, took some interesting twists similar to what you have shown.

I have probably made some later developers lives a bit of a hell, unfortunately. The closest I ever came to something like what I see here, was implementing GPS distance calculation code for a map lookup (basically, to allow for a search on "show me nearby locations" based on lat/lon coordinates from a zip code database).

I know what you're doing is all in good fun and seeing how hard you can push SQL into doing certain things; hopefully nobody will take this idea and run with it for something "production", if you know what I mean.

But I'm probably being too optimistic...

Very cool! What gave you the idea to (ab)use a database to generate fractals? ;)
I was trying to think of an idea to submit to !!con West: http://bangbangcon.com/west/

My original idea was to write a compiler from a programming language to SQL. I was trying to think of what would be cool examples of programs that you can write. One of the first ideas that came to mind was to write some programs that would produce fractals. After I thought about it some more, I realized it would be easier to write SQL queries that generate fractals than it would be to write the compiler. I wound up giving a talk on that instead.

I actually am giving a talk next month on making a programming language interpreter with SQL. Sometime after I give that talk, I'll turn that one into a blog post too.

Nice, look forward to that one too. Also, not being familiar with !!Con, have queued up the videos of the talks.