“tl;dr I just made a tool to transform any javascript code into an equivalent sequence of ()[]{}!+ characters. You can try it here, or grab it from github or npm. Keep on reading if you want to know how it works.”
JavaScript has some crazy implicit casts.
Sarah and I just got back home from a Eric and Jane's wedding / Sarah and Dave's vacation trip to the Bahamas (note the lack of activity for the past twelve days on my website). I've got plenty of photos and things to post but for now I'll just relate this humorous anecdote during the rehearsal dinner. I had said something about photos to Jim, Eric's brother and he gave me a crazy look. "Oh, I thought you meant like pho-tos" he said. It took me a moment to realize he misunderstood what I said as "faux toes". I laughed until I cried a little. Also works with digital faux toes.
I watched the new Star Trek movie Thursday morning, along with many others who work on Windows. Microsoft rented out a theater and played the movie on all screens. I greatly enjoyed the movie!
Spoilers follow... I'm obviously not the biggest Star Trek nerd (or at least TOS nerd) since I didn't even pick up on the fact that Kirk's dad being dead was a discrepancy from the TV series. I only figured out the alternate time-line stuff when they killed most of the Vulcans. I was just surprised they didn't set right what once went wrong by the end of the movie with some more time travel magic to bring back Vulcan. On that note, I'm pretty sure the Spock-Spock conversation at the end, is Nimoy Spock sending Sylar Spock off to school so that Nimoy Spock can get freaky repopulating the Vulcan race. Although at first after his 'two places at once' comment I thought he was saying... something else. Also, was the main evil guy a random miner turned psycho? And his crazy looking spaceship that destroys the Federation fleet was just a mining vessel from the future? Once they invent time travel anybody can get drunk, go back in time, and conquer Earth.
When I woke up this morning for some reason I was thinking about Polytope Tetris, my N-D Tetris game, and specifically generating Tetris pieces in various number of dimensions. When I first wrote PTT I thought that as the number of dimensions increased you could end up with an infinite number of non-equivalent crazy Tetris pieces. However this morning I realized that because you only get four blocks per piece there are only a possible three joints in a single Tetris piece which means that you only need three dimensions to represent all possible distinct N-D Tetris pieces.
Below is the table of the various possible pieces per number of dimensions and sorted by the number of joints in the piece. Notice that the 'J' and 'L' become equivalent in 3D because you can rotate the 'J' through the third dimension to make it an 'L'. The same happens for 'S' and 'Z' in 3D, and 'S+' and 'Z+' in 4D.
Joints | Name | 1D | 2D | 3D | + |
---|---|---|---|---|---|
1 | I | ||||
2 | J | ||||
L | |||||
3 | O | ||||
T | |||||
S | |||||
Z | |||||
T+ | |||||
S+ | |||||
Z+ | |||||
Total | 1 | 7 | 8 | 7 |
As a consequence of not realizing there's a finite and small number of N-D Tetris pieces, I wrote code that would randomly generate pieces for a specified number of dimensions by wandering through Tetris space. This consists of first marking the current spot, then randomly picking a direction (a dimension and either forward or backward), going in that direction until hitting a previously unvisited spot and repeating until four spots are marked, forming a Tetris piece. However this morning I realized that continuing in the same direction until reaching am unvisited spot means I can't generate the 'T+' piece. I think the better way to go is keep the list of all possible pieces, pick one randomly, and rotate it randomly through the available dimensions. Doing this will also allow me to give distinct pieces their own specific color (like the classic Tetris games do) rather than picking the color randomly like I do now.
[some college]
and I told her where I was from. She then asked me, "You have your
Doctorate in Computer Science?" "No," I said, "My Bachelors... I'm working on my Bachelors." "Oh," she said, "Well you look very mature." I'm fairly certain that's a first for me -- being told I look
"very mature" that is. Unfortunately, at that point my tram showed up and I had to travel to a different building. Now I'm left wondering what made me look mature. It could have been the gel or the
slacks or the tucked in shirt. The day previous while dressed casually, hanging out with my friend Jeannie, some of her friends thought I was her age, about eight years older. The common element
between my two appearances were my new black dressy-ish shoes. Maybe its just that easy.