1. Bought some shoes, in the rain

    posted by cms on
    tagged as
  2. I've been writing a couple of things in hy again this week. What's Hy? It's a cute idea. It's a lisp that compiles? (transpiles? I never get the difference) to the Python AST. I guess the elevator pitch might be something like clojure but for python. So yeah, a rich, super stable class-tree sort of OO language, with enormous portablility and twenty-odd years of library support for everything you might want to do, but with a nice, dynamic, lispy language and a repl.

    I've played with hy a little bit on and off over the years. Actually, when I was working at SMR, I actually deployed some in production. (Somehow, I doubt that's still a thing). Python is my go-to scripting language, because it's very plain, very portable, batteries included, somewhat modern, probably already installed everywhere I work. I try to use it for scripty things, rather than shell or perl or something. Lisps are my favourite programming language. I just like how it fits together. I know lots of people don't, and I'm fine with that, but I always enjoy it.

    So over the holiday weekend I found myself wanting a couple of almost throwaway scripts, and I decided to reach back into the hy bucket, and give that another try. I wrote a script to grab my selfie tweets from a twitter archive, and a rough script to publish formatted micro-blog entries directly from the shell.

    It was a fun exercise. Hy has moved on a bit since I last tried. (They seem to have removed let, and car, and cdr, and lambda which I feel funny about), but by and large it works really well.

    Things I like

    • I like mapping over lists of things, and in straight Python this is often clumsy and leads to densely nested comprehensions
    • actual lambdas!
    • Python3 support ( hy3 )
    • easy importing of python modules
    • mostly seamless python interop
    • repl works great
    • the repl shows you the pythonic syntax of the forms it evaluates, which is helpful if you know Python
    • emacs mode (obv)
    • it has lazy sequences
    • and multimethods!
    • it is fun to work in

    Things I like less

    • Missing some olde lisp things like car/cdr/lambda
    • Things often expect you to be using methods on stateful objects, which gets you an OO impedance mismatch (I have the same problems in scala and clojure)
    • Slightly more typed than you expect, whilst not really offering you a type system. (Particularly with distinctions between lists, sequences, iterators.)
    • it often seems easier to imperative loop with for than map / reduce / filters, and this seems weird.
    • i don't feel I have any understanding about setv variable scoping.
    • no STM, which I think is one of the most interesting things about clojure
    • I don't think the error handling does restarts and conditions and things

    Summary

    I don't think I would choose to use it to build any complicated systems. (Typically this is true of Python as well to be fair). I'd love to see something like an idomatic web framework in it. I could imagine using it to build serverless workers over something like apex up or chalice perhaps. I should totally try that!

    I am not really very good at it yet, so I doubt I'm writing optimal programs. My scripts often look like Dr. Moreau designs halfway between a python script and something more lispy. This could well improve as I understand the underlying sequence / itertools glue a bit more, I'm often routing around confusing sequenced things. I absolutely enjoy writing little scripts like this in it, and I think I maybe enjoy it more than I would if I was writing plain python. I gave some thought about why this might be and I think I figured it out.

    It could just be as simple as being all about the code editing. Python, and it's whitespace delimited blocks, is fine, and super readable, but it's always slightly fiddly to edit. Some of this is my toolchain, I'm sure. There's a lot of bells and whistles you can glue over emacs for Python work, and they're pretty good, but I do always find it a slightly fiddly experience. Balanced expressions and sexprs though are obviously an absolute joy to edit in emacs, alongside an embedded inferior lisp repl, and although it's nowhere near as integrated an experience as using slime with a "real" lisp, it's closer to that than editing Python ever feels, and for me that's a significant productivity win. So I think it will stay in the toolbox.

    I recommend Hy to anyone who is interested in interesting lightweight languages, especially scripting languages. Obviously it's particularly relevant to anyone who likes python or lisps, even if just as a curiosity. If you work with Python and like using emacs though, and like the sound of 'Python but with structured editing' I would strongly recommend you look at how it might integrate into your workflow.

    posted by cms on
    tagged as
  3. I'm sick of Twitter, folks. I've decided to do something both mild and drastic about it. For 2018, I have resolved to stop using it.

    I am not sure what it is for anymore, it certainly doesn't feel like it is for me. I think I've been disengaging slowly for the last couple of years, and in 2017 I repeatedly found it too aggravating, and depressing to engage with. I think I would have already ragequit, had one of last year's resolutions not been that silly selfie thing. Thus a seed was planted about resolutions and exits. Brains often work that way. (Referendums are silly though)

    I was late to twitter. I downloaded my twitter archive, whilst I was scraping out all of the 2017 selfies, and apparently my first tweet is from Dec 2007.

    I was late to Battlestar Galactica as well.

    I probably spent a little while reading twitter before registering, although I don't remember anything specific. I can't remember why I signed up in the first place. Looking at that first month of odd, stilted entirely quotidian status posts, I can tell I'm working on Logical Bee, mostly alone, babysitting that dog. It's winter. Maybe I'm lonely? I have a dim memory of thinking it was pretty dumb for a long while before getting involved at all. I remember fiddling about connecting it to things, and experimenting with SMS tweets and emails. I don't think it really clicked for the longest while. I remember a sense of a clique I wasn't ever going to be able to get into. That first wave of web-natives, younger than my generation. More entuned to a web of application services and APIs than hypertexts and data servers. I remember tweetups being a thing, and a Bristol one being announced, and spending an hour or two before deciding firmly I wasn't the kind of person that went to that kind of thing. I quite wish I had gone now. I didn't used to be a very good joiner-in of things. I'm not much better at that now. A little bit, perhaps. Now I know to try.

    It took the longest while, but eventually it clicked. I liked the lightness of it. It was sort-of social networking, but social networking at arms length. Lots of irony, lots of whimsy. I just remembered the earliest phase of my binning Facebook was to convert my facebook to just echo my tweets back into it, for the muggles to read. I remember being very snobby and standoffish about things like hashtags and @replies. My first reply wasn't until August 2008.

    To Daveh! Either I don't know how to reply yet, or the Twitter archive has incorrectly threaded that reply back together. Either seems plausible.

    I didn't use a hashtag until May 2009. Even then I was repurposing "get off my lawn" meta-commentary. Amused to see that my next half dozen hashtags are complaining about moonfruit's use of them for viral marketing. Many years later I ended up working there for a season. Again we see the seeds are sown, and the fruit is reaped.

    Not too ashamed of that one. It's interesting looking back at tweets like that, I have a sense that the prevailing vibe of Twitter at the time was that the cool kids were beating out the idiots. I don't get that vibe off Twitter now.

    By this point it was clearly very firmly entrenched in my daily desktop routine. Once I got hold of smartphones that could run twitter, I think my usage ramped up. I remember by the time I got to last.fm, I was tweeting all the things, curating a couple of hashtags (#fantasypeelsessions for serendipitous word groups that sounded like band names, #fisharecool for cool fish facts), running multiple joke twitter accounts, writing bots, and generally really enjoying it. I remember when I got to Makeshift, and twitter seemed to be used as the wiring behind at least half of everything there, it then seemed like a necessary internet plumbing for web apps. With hindsight I think that was the peak. It was downhill from there. I don't like it any more, I have detected an opportune moment, and I have decided to leave. At least for one year.

    I'm not going to use this post for arguing about why I think it's broken. One of the largest problems I have with it is the sheer concentration of negativity. And one of the reasons I want to move away from it is to focus on building things that are more positive. It's not just Twitter. I'm pretty broken-hearted with the state of the web in 2017 - it's very far from what I signed on to help build as one of those idealistic Gen X web 1.0 types. And again, rather than just bemoan that, I'd rather start focusing on ways to think about fixing that. And for me, in 2018, this means I'm going to go small, and focus on building things and content I can own, in the sidelines. I expect I will be updating here more. I plan to double-down a bit harder on indieweb things, and federated stuff. POSSE all the things. Death to silos. I've been experimenting with micro.blogs and mastodon.social, and I want to play more with beaker and dat, and blockstack and IPFS and other idealistic p2p proto-webs. Maybe even frogans?. The real web looks more like that. Maybe I can help figure out how to make it a bit easier for everyone to clamber onboard.

    "But CMS, I think we're Twitter-friends, what does this mean for US?"

    First off, that's flattering, almost-certainly-entirely-imaginary-cms-fan, thanks! I like you too! Occasionally some of my tweets get as many as five or six engagements, and I do enjoy keeping up with some lovely people. Some of whom I met or perhaps only know through twitter. I'm sorry if this feels like a breakup; It's not you, it's me, as they say in the rom-coms. (Actually, I'm not dumping anyone.)

    Something else I want to push for in 2018 is better quality, stronger, social engagement. I want to cultivate more real contact, more high bandwidth engagement and connection with all the good people. This can work two ways of course. If you only really interact with me on a tweet by tweet basis, and you think you're going to miss that, then do please reach out. We can have coffee, or get beers, or just go fish in a lake or something else entirely. And I'm going to be pushing myself to reach out to more people in turn myself, something I'm astronomically poor at. Please help me with this if you can!

    IRL networking I plan to ramp up a bit. More meetups, tech and maybe otherwise. Maybe I'll rescind my conference ban. Maybe I'll start some of these things, or start helping to organise them more.

    I'm not doing an *infocide*. As well as publishing things hanging from here, which has plenty of RSS feeds, if you can still figure out how to integrate those into your workflows then I'll probably never be very far away. Also, if you look at the home page, there's a list of dozens of other not-Twitter platforms you can stalk me on or connect to me via (maybe we are already!) - If my plan comes together, I hope to be syndicating and updating the useful ones of these more actively.

    I don't intend to delete or remove my twitter account, and I will set things up so I still get notifications, so nobody gets ignored. I might even automate some notifications to my twitter feed about updates to things elsewhere. I'm just not going to be participating as a human. I expect I will remove all the apps, so my turnaround on mentions might slow right down.

    If you're in the select category of people who only know how to contact me with twitter, there are many options. I haven't changed my phone number, should you know me well enough to have one of those. If you're looking for a way to DM to me, I cannot endorse keybase strongly enough. I think they're trying to do something really interesting, and could do with some more network effect. Sign up to keybase, and keybase message me, I love getting keybase messages, and I always respond. Invite me to your keybase groups! Also, please share your slacks and your newsletters and your mailing lists with me, if you think I'd like them, or they'd like me.

    Email still works, and I still read it. My address is even on my website.

    Finally, if you're reading this, and we've Twitter interacted in some way, let me say a goodbye for now. If I was annoying, or argumentative, I'm sorry, I can be hard work soemtimes. Maybe some of that might have been caused by the platform? If I was fun or charming or interesting, then let's work to stay in touch! If you don't really care, you're not even sure how you got here from off of twitter, that's cool too, maybe I'll see you again in a year from now.

    posted by cms on
    tagged as
  4. With all this focus on RSS generation for micro blog, I've been optimising my engine. I've learned how to use SBCL's profiler, and I have shaved a third off the cost of generating indexes

    posted by cms on
    tagged as
  5. To think I used to worry about Disney Princesses

    posted by cms on
    tagged as
  6. Let sleeping dogs lie

    It's been a month now, and I ought to be used to it, and in many ways I am, but in surprisingly many ways I'm still not; I don't have a dog anymore. He got too old, and he got too sick, and tired, and uncomfortable, and he had to be put to sleep, back on the 28th of November. How does it feel? Terrible.

    It was an enlarged heart that did for him. Poetically enough, his heart was just too large for him to carry on. The photo above is taken on the last morning, before I headed out to work. I knew there was very little chance he'd be coming back from the vet's appointment later that day. We had a little conversation and I carefully explained to him that he was a very good dog.

    Of course he was actually a terrible dog. A brilliantly terrible one, as most dalmatians are born to be. He'd not really been himself for a couple of years, stumbling about and complaining about most things, but right up until the last couple of weeks he was coping mostly, and remained good company. In his prime though, that dog was an athlete, who used to literally fly, and if I open my mind's eye a little, that's what I can see, streaking around the Bristol countryside, barely controllable, raiding bins, and laughing at you, over his shoulder.

    I don't really know what to write. I have to write something though. This website, which has been knocking around for fifteen years or more, only really took initial form as a rudimentary 'blog' so I could share dog photos with his burgeoning fanbase. Most of that has bitrotted now, but when I feel better I would like to clean it up some. So I can't really even let go of him without marking some notice here. I don't need to trot out all of the anecdotes, they're probably dull and too personal. After all, outside of my immediate circles, he's just some bloke on the internet's dog. To me, and to some of his internet fans though, he's the best dog in the world. Every single word of that is true.

    posted by cms on
    tagged as
  7. When you have, as I have, a race condition in posting that exists somewhere between systemd, rsync, bash, perl, and that's before you even get to the CMS, it is probably time for some refactoring

    posted by cms on
    tagged as
  8. If I included an image maybe it would look like An image

    posted by cms on
    tagged as
  9. Shopkins movie, and perhaps a curry? I feel like death...

    posted by cms on
    tagged as
  10. Crash early, crash often

    posted by cms on
    tagged as
  11. Does anyone know if eating your own bodyweight in Stilton is a good way to clear up Xmas flu?

    posted by cms on
    tagged as
  12. In 2017 I decided to take, and tweet, a selfie at every single standup meeting I attended. Here they all are.

    It started out as a bit of a joke, at the start of the year documenting the fact that I was the only member of the, by then rapidly dwindling, LMN platform team at work for the first weeks. When I thought about it a little bit more I decided it might make a nice new year's resolution to add to the 2017 set. I'm a relentless, quixotic, self-improver, and I decided a selfie at every standup might make an interesting project.

    I really don't like having my photograph taken. I wondered if making myself do it enough might work as a half-assed form of exposure therapy. As a professional software developer in 2017, I could expect to be attending at least one standup/scrum meet a day. By the end of the year, I might be not so uncomfortable standing in front of a camera.

    A couple of rules. Every standup meet, even if there were multiple in a day. First shot, no matter how terrible. Immediately to twitter with it, no editing, filters, or multiple shots.

    By and large I think it worked. It's quite interesting looking back at them all now, a year later. Although I didn't plan it this way, I ended up switching jobs twice in 2017, so there's a document of me shifting out and in of three different roles and teams. It's interesting for me, reading my facial expression and mapping that onto how well or badly I know the meetings to be going at that point of time. So much hair, so little outfit variety. Originally, I was snapping quite a few of them on my XPS 13 webcam, because there was a lot of remoting in through Google Hangouts at Wonderbly, but eventually they're all WileyFox Swift2 and eventually 2X with maybe a couple of Jolla C shots

    You can see me losing interest somewhat in the device as time pans out - they start out with lots of experimentation of poses and framing and composition, but the second half of the year it's mostly routinely, quick-snapped head-shots. This isn't helped by the fact that the offices got a little bit duller. Synthace might be set within a literal vetinary hostpital, with all kinds of attendant freakish wonders, but for the entirety of my short tenure we were camped out in a very tight spot, with the standups awkwardly crammed into a tiny meeting room, or taken on the balcony.

    There's a few cameos, which are probably my favourite bits. @tomcartwrightuk is there, as is @dankitchen_uk, and there's a @paulcuth photobomb. And the ancient dog gets into one. I'm glad he's in there. I haven't written about the dog yet, and I need to soon.

    How well did it work? A bit. I don't flinch or freak out about how to act in front of a camera quite so much as I used to. I occasionally snap a selfie just for the heck of it. I accidentally ended up at the front of the Zego group shot that ended up going out with the press kit, and spent a day fielding queries from friends wondering why I was featured so heavily on techcrunch. I still don't enjoy looking at myself in photos, but I think I've started to engage with that more constructively. As resolutions go, I think I won this one.

    posted by cms on
    tagged as
  13. Last week I started a new job and with a new job comes a new computer. These days, I am once again a fairly comitted desktop linux user, for my sins, and so I asked for a Lenovo ThinkPad x270. Not without trepidation, because even though I'm a fairly expert user, it's been some time since I put a linux distribution onto a modern PC-laptop flat, and more recent hardware can present some driver challenges. It all went on pretty well, nonetheless, with just a moderate amount of tweaking, and a week or so in I can report that I'm pretty delighted with it. It's a wonderfully solid and useful piece of kit, everything works. Screen, keyboard and portability are spot on, battery life is a phenomenon, and there's at least one of every kind of useful port I care about.

    It's my first ThinkPad with a 'chiclet' keyboard. It's my first without a seven-row keyboard actually. I was a little bit worried about that. Keyboards are one of those things you like ThinkPads for, if you're the kind of person who likes ThinkPads, and of course I am. Actually, the keyboard is great. I think I can type faster on it than I can on my well-loved x220 model, which is basically my high-water mark for a laptop keyboard. Trackpoint is present and works as well as ever, trackpad is a huge improvement. I am not going to say that I wouldn't like the missing keys and ThinkLight back, but I'm not aggravated by their absence. After all I can use my 3l337 remapping skills to make sure I have everything I need somewhere that I can access it, and the less often used things can just go on mod key combinations and function shifts. It has the makings of a truly great keyboard if I'm honest, although I accept these things are subjective. There was just one amusing wrinkle though.

    IMG_20171111_150121

    For some reason they've put the PrtSc key in where the menu key was. This seemed pretty weird, but it could be worse. At least I still have a balanced group of three modifier keys either side of the space bar. It goes LCTRL WINDOWS ALT SPACE BAR ALTGR PRTSC RCTRL. I just modified my xkb settings very slightly to redefine PRTSC, and I was back to using my happy path of SUPER LMETA LCTRL SPACE BAR RCTRL RMETA SUPER, and emacsing about with gay abandon. Right up to the first time I hit backward-sexp whilst cheerfully editing code, and to my astonishment my laptop immediately rebooted without any warnings. I was so stunned I immediately tried that again. Same result. I was dumbfounded for maybe sixty seconds before I figured it out.

    PrtSc is an old key, although unlike many of the old dedicated PC buttons, (Scroll lock anyone?), it's managed to reinvent itself for modern generations. Typically it is used to trigger a screenshot. GNOME sets it up for that, and while I was remapping it I figured I would be able to manage just fine without a dedicated key for screenshotting. Print screen often used to share a key with another ancient button, SysReq, and System Request is a really interesting beast. Turns out, even though it's not labelled like that, the PrtSc key on my x270 was also a SysReq. And system requests are the key to this laptop narcolepsy.

    System Request was a button deliberately designed to bypass as much of your software as possible, and send a hardware interrupt direct to the operating system hardware event loop. Normal keyboard handling is entirely bypassed. It's a brain probe. No matter how elaborate your interface, or hotkey macros become, you have a dedicated batphone right there on your keyboard, a zap line into the mainframe. Even in its most locked up system crash, this is a signal that could still get through.

    Originally, SysReq had its own proud dedicated button. Then, as its usage was a little bit esoteric, it became seconded to PrtSc. If you wanted to access the magic zap you still could. You just hit Alt in conjunction with PrtSc. And that happens to be the second piece of our puzzle. SysReq lingered on over there for some decades, largely entirely unused. A vestigial organ, like an appendix, or a supernumerary nipple. One of those dorky joke keys on a PC nobody understands or uses, that cool Apple systems condesncendingly wink at. Linux uses it though. Linux doesn't mind being dorky, and can always use a spare modifier key. Especially one with a hardware function.

    It's called the Magic SysRq key. Linux has a special interrupt handler sat there in the kernel listening for it. You can hit Alt + SysReq and then another key, and trigger special, super low level system recovery or debugging features, such as triggering a crash dump, forcing an OOM kill, or yes, rebooting the system. And that's where I was hitting it. With my remapping in place, ALT is CTRL, PRTSC is META, so when I am editing a lisp file, and hit C-M-b to move backwards one sexp, I'm actually banging on the chord that bypasses all my software stack, and pushes a reboot lever deep in my computer's lizard brain, which it dutifully obeys. A little bit frustrating, but honestly, as soon as I figured out what must be going on, it made me chuckle out loud.

    Linux being linux, it's entirely configurable of course. You can build a kernel with the feature missing, you can disable it in software, or you can configure a bitmask to define which key sequences are trapped and acted upon. I have opted to disable it for now. I would rather have my META key where I like it to be, than have an easy access debugger's powertool. Now everything is closer to perfect.

    posted by cms on
    tagged as
  14. The Zombie Song by Stephanie Mabey

    The girls are pretty keen on this one right now. It's pretty catchy, and I have had it lodged in my mind's ear for a few days. It is a few years old, so sorry if it was a big meme and I missed it, what can you do. News travels slow out here on the indieweb.

    The embed is a bandcamp link, you can buy the digital album. You can buy the single track from amazon if you prefer , because supporting artists is awesome.

    posted by cms on
    tagged as