Recurse Center Week 4

Oh ahh week 4. I’m sure the Winter 2 batch is starting to freak out, cause for Spring 1, we’re way too close to half-way for my taste. A couple new outward-facing things I made:


Many diversions from making actual project progress, but there were some cool things that contributed. For one, a workshop on formal mathematical notation, which was very helpful and now I have a bunch of links on that subject.

The other diversion is that someone’s server was hacked, and I sat with that person for a bit to discuss what happened, how they figured it out, and generally learned quite a bit about security.

Monday night talk was great, and I made a memo-to-self to make a silly notation joke, and did so later in the week (btw, := is “colon equals”, shorthand for declaration + instantiation):


Inspired by the Monday night talk on PEGs, I started exploring what it might look like to build a PEG or a context-free grammar in Swift.

What I learned is that there’s not yet a PEG library, and the major context-free grammar library is literally called Madness. After lots of diversions into that, I decided to write my own simple, not special parser that specifically fits my special snowflake needs and is generic for no one and would be a pain to extend for new cases. So murr. But the alternative was a (likely long) diversion into possibly building the library I was looking for, and I’d like to finish what I’m working on first before doing that.


I woke up and felt like I’d been punched in the face by allergies, but went in anyhow and recording Turing-Incomplete first thing before getting some serious allergy stuff.

Once I got going, I made a lot of progress on the project, including a parser that covers two of my (probably) ~6 cases for parsing, and using the data that it parses to do what I want it to do! Also in this process I ended up writing a tiny utility function to map over the values of a dictionary in Swift, because I was a bit surprised Dollar didn’t have it.

I also started writing tests on Wednesday, and had issues exposing Swift methods to the test suite, and at some point XCode stopped fighting me (after I’d done proper setup and it still complained) and I’m not 100% sure why. I’m testing using the unsexy XCTest after trying to install Quick.

My suspicion I can’t use Quick because I don’t have a paid developer account, and thus can’t do the code-signing I need 🙁 I can’t will myself to drop $100 on a dev account while on sabbatical, so XCTest it is. I keep running into this issue though (it’s also an issue I had with Madness the day before so … maybe I should just suck it up and buy one :/)

Still, particularly because I was starting to take functions and refactor them, it was SO useful to have even just a few tests set up. Yay, tests!


Got some BIG updates to my parser done. The magic is disturbingly close to coming together. For whatever reason, I don’t remember much writing now, on Friday. But lots of code happened! Also tests are awesome. Yay, tests!

Be Sociable, Share!

Tags: ,

No comments yet.

Leave a Reply