Here lie the posts of the past
Sometimes, the cobwebs have cobwebs.
Sometimes, the cobwebs have cobwebs.
The day after I go and look at writing an operator to mimic ‘in’ in Python, I read a blog post on undocumented Swift functions and come across the ‘contains’ function, which does pretty much that (although it doesn’t work quite the same way for dicts and for strings it only works for character elements, so I guess I like one consistent operator better). contains("happy", "a") // true contains([1: "A", 2:"B"].keys,2) // true contains([1,2,3,4,5,6],4) // true As you can see the dictionary context of the function doesn’t work without referring to the keys component of the dict. If you use a substring rather than a single character for the string context then you get an error since it doesn’t conform to the generic used to define the function. ...
Like a whole bunch of people I was quite interested to learn about Apple’s introduction of their new language Swift, at their WWDC event this year. I’ve been trying to come to terms with ObjectiveC for a couple of years now without much success and this seemed like a good opportunity to learn something new and at the same time finally get around to starting to write some iOS and potentially OSX software. ...
I got around to updating (I say update and I mean totally rewrite) my twitter script this weekend to clear out all the manual cruft that made it so painful to use when I first wrote it. I got a Twitter API key for it a while back so I didn’t have to depend on someone else’s search tool and can get mine to automatically store tweets via a cron and a SQLite database, and bolted on the really quite pretty pygal graphing library (seriously, go look, it’s super nice) so I don’t have to fiddle around with CSVs and Excel to make graphs. ...
(I’m going to prepend this with the premise that stuff like TeX has probably been able to do all this stuff for ages, but this is looking to do things in a more automated fashion.) Over the last couple of years I’ve been listening to more techy podcasts and it’s been interesting learning a bit about some of the tools which people use to get things done. A lot of it is productivity software which I just can’t use since I’m a fundamentally disorganised person, but there have been some interesting editors that have been promoted which has gotten me thinking about where that could go. ...