
Show HN: Interactive guide to Tetris in ClojureScript - undershirt
http://shaunlebron.com/t3tr0s-slides
======
ibdknox
This is a great example of the magic of open source. He took a project I
haven't touched in almost 3 years and made something wonderful out of it. That
may very well have never happened 10 years ago.

Awesome work Shaun, thanks for contributing back to the ecosystem.

~~~
undershirt
Thanks, Chris. I hope github attains longevity for reasons like this.

------
mrcwinn
Even aside from the specifics of ClojureScript, this is just a wonderful
example of separating and planning for the requirements of an application.

How is a piece defined and drawn? What control does the user have over a
piece? Since two pieces cannot intersect, how can I detect that? And so on...

Not unique to ClojureScript, it's a great reminder the best way to write great
code is to ask these questions and answer them before you begin composition.

Anyway, great work!

------
tgriesser
Resources like this are exactly what I've been searching for while learning
clojure(script). Really great work.

------
kcorbitt
Just an FYI in case the creator is here: on my 13" Macbook Pro the bottom of
the slides are cut off at the default zoom level. I had to decrease the size
to 75% to see the whole thing.

~~~
roryokane
Same for me on my 1080p external display on a Mac.

To clarify, the part that is cut off is the code inside the black rectangle,
not the black rectangle itself. The problem is only on slides where the output
is the 20-row board matrix. Since I can’t scroll the code, I could only fix it
by zooming out (text-only zoom).

------
arms
Wow - perfect timing. My copy of Clojure Programming should be delivered
tomorrow, and this looks like a nice way to complement my learning. Plus, I
love Tetris :)

------
arsenerei
Fantastic work. As 'ibdknox said, a wonderful display of open source and
ingenuity. Here the links to Shaun's work.

slides:
[https://github.com/shaunlebron/t3tr0s-slides](https://github.com/shaunlebron/t3tr0s-slides)

game:
[https://github.com/imalooney/t3tr0s](https://github.com/imalooney/t3tr0s)

~~~
angersock
Shaun is a really cool guy, very friendly and helpful. :)

------
tl
Cool presentation, but I have a question: go to slide #1, mouse over the top
row, move your mouse along the element to the bottom row. There is noticeable
lag in Chrome 37 as the page tries to re-draw the rows highlighted.

Other slides seem to have reasonable performance; is there something in
ClojureScript that we should avoid here?

~~~
undershirt
Thanks for bringing this up, I noticed that too. I think I might be handling
React.js keys incorrectly, causing the DOM-diffing to perform poorly for
number-highlighting. Haven't really looked into it too deeply.

------
adrianm
Color me impressed with this. Kudos to the author! It's a fantastic example of
not only how to progress through concept to implementation with a game, but
how interactive development can make this process all the more enjoyable for
the developer, with a much faster feedback loop than more traditional
(statically compiled) game design allows.

------
robertfw
Really nice interactive demo! Great work!

