At the beginning of March, I went on a cruise in the Galapagos. It was an interesting place to visit, and I took advantage of the unique wildlife to take a few photos. Well, more than a few photos; I took 5700 photos. Here are my favorite 30:
I recently changed my comment syntax to allow multi-line comments through indentation, which you can see an example of in the below code. If a line comment is followed by indented lines, then the comment continues until the indentation level returns to the initial level.
This approach supports nesting, doesn’t require an explicit terminal symbol, and is also useful for string literal parsing.
There were two hard parts to implement it:
- I previously translated leading tabs into indent/outdent tokens after the lexer turned the input string into tokens. Since comments and string literals are parsed by the lexer, I had to move that translation to happen before lexing. However, I cannot strip white-space until after lexing, so these new indentation-aware components of the lexer needed to explicitly handle superfluous white-space. The indentation-aware components of the parser don’t need to do so, since it occurs after white-space is stripped.
- It was tricky to make syntax highlighting in Sublime Text handle the new syntax. The problem is that it just uses a set of regexes to classify subsequences of the buffer. However, it does support nested regexes, so I ended up writing code to generate the syntax highlighting definition file, and use that to nest the indentation-dependent classifications within an explicitly enumerated regex for each indentation level.
It’s been a long time since I wrote here, but I’ll try to bring you up to date with what I’ve been doing.
In March, Epic debuted UE4 at GDC, including a dynamic GI solution that I worked on. The system was inspired by Cyril Crassin’s Interactive Indirect Illumination Using Voxel Cone Tracing, but we made some different trade-offs to meet our performance goals. Martin Mittring gave a talk at the Advances in Real-Time Rendering in Games course at SIGGRAPH 2012 that talks about some of the differences: The Technology Behind the Elemental Demo.
Developing the dynamic GI solution was a very fulfilling project for me, but in July I decided to leave Epic to work on my own projects. It was a very difficult decision to make; not only because I enjoyed the work, but also because after 12 years, Epic is part of my identity. However, I decided it was time to work on some projects of my own. It’s just recreational programming for now, but I will commercialize it if I see a good opportunity. In the mean time, I’m hoping to write more on this blog about programming than I was able to while employed. Stay tuned!
I’m also spending more of my time traveling. So far this year I’ve visited Cuba, Paris, Svalbard, and Norway/Sweden; not to mention San Francisco for GDC, and two trips to visit my family in Iowa with some time in Chicago.
My trip to Cuba was organized through National Geographic Expeditions, and was a rare opportunity to see the country within the US’s restrictions on trade with Cuba. It wasn’t a very comfortable trip, but I found it very interesting and educational to see how people lived there. Here are my photos from the Cuba trip.
The arctic trip was a Lindblad cruise that spent a week exploring Svalbard, and then a week cruising down the coast of Norway to Bergen. It was one of the most memorable and enjoyable trips I’ve been on; memorable for the surreal and isolated environments, and enjoyable for the life on the ship. Here are my photos from the Arctic trip.
This February, I had a month-long sabbatical. I spent the month flying around the world. I’ve posted a gallery of my best photos from the trip here.