Talk on Birdhouse at Lambda Jam

Posted on July 29, 2014

Last week, I spoke about one of my side projects, Birdhouse (my Elm library for building Twitter bots), at Lambda Jam 2014 in Chicago.

I’ve made my slides and demos available on GitHub.

You can watch the (interactive) slideshow on its own page, download a static PDF, or play through it right here:1

Updates

I made a bunch of updates to the project itself; my original blog post, Functional reactive Twitter bots, is still mostly accurate, but it only covers about the first third of my talk.

The second third, which explains @EveryMNLake, is about stuff I had done but hadn’t written up, and the final third, on combinator bots, was entirely new for Lambda Jam.

I also made a number of changes to restore compatibility with the latest Elm release.

  • 0.12:
    • made breaking changes to the Text library
    • changed the unqualified import syntax for packages
  • 0.12.1:
    • changed the Dict API, breaking backward-compatibility for lookups
    • completely redesigned the Json and JS data interoperability libraries, which broke most of the data conversion code in @EveryMNLake2

Technical details

The presentation itself was written with Markdown, HTML, and CSS, and converted into a slideshow using the Remark library. I usually use Keynote (because it has nice built-in themes!),3 but for this talk I wanted to show Elm demos during my presentation without awkwardly switching to and from a browser window. With Remark, my slideshow just compiles into an HTML page, and I can embed demos as iframes.

I also wrote several demos in Elm for the presentation, mostly extending those in my first blog post (seeing signals as lists of events, visualizing a signal graph as a pipeline).

One new kind of demo I made up is a side-by-side comparison of the events of a signal and a transformed version of that signal. For instance, I can compare a signal that ticks with the timestamp every second (every second) to a signal that counts up every second (count (every second)):

To me, part of the promise of functional reactive programming is that you can do this kind of analysis without having to constantly surface the code like in the essay Learnable Programming. In Learnable Programming, showing data is coupled with showing code, because the data changes when mutation commands happen in the code, and those commands are in arbitrary places. In Elm, the data the program manipulates has this signal structure, independent of if statements and for loops and function blocks, so you don’t need to show the code to show the data.

Conclusion

I had a lot of fun writing and giving the talk, and I liked getting the chance to revisit this project. It was a ton of work to get it back up and running and add the new stuff, but it was worthwhile.

I’d like to write up the last two-thirds of the talk’s material (@EveryMNLake and combinators) as blog posts. I’d also like to write some more interesting bots using the new combinator tools! The ability to take information from existing Twitter feeds, including other bots’ feeds, opens up a lot of cool possibilities. We could have bots which track hashtags and retweet relevant stuff, or multiplex together a few users, or bots that act like circuits or logic gates, or bots that are interfaces to games and simulated worlds.

if you have questions or thoughts (or if any of this inspires you to do something). You can also keep up with my work by following @rsnous on Twitter.


  1. Click on the slide and press the right and left arrow keys to move between slides.

  2. I used to convert JSON to records and manipulate the records; now I have to pattern-match into a JSON abstract syntax tree directly to get the data out. The problem is that my JSON comes as a String from an HTTP response, rather than from JavaScript through a port. Objects going through ports get some interoperability with Elm records, but you can no longer automatically convert JSON data into ‘legitimate Elm data.’

  3. The logic of using Remark instead of Keynote or PowerPoint is sort of like the logic of using LaTeX instead of Word. Either you use this awkward but versatile and unambiguous language and compile it to something displayable, or you use this nice all-in-one tool that lets you preview and directly manipulate your presentation, but edge cases mess you up.

    (I know that you can use Beamer to actually make LaTeX presentations, but I feel like that system encourages totally the wrong kinds of presentations—making math, writing, and symbols easier, and layout, interactivity, and graphics harder.)