Witchcraft: the magic of math, functional programming, and community

Alanna Irving
Jun 19 · 11 min read

Interview with Brooklyn Zelenka, blockchain engineer, functional programming & math wizard, community builder, and founder of Fission and Witchcraft.

Brooklyn giving a conference talk

What was your journey to your current work?

I studied music theory and composition originally. Unbeknownst to me, it had the same prereqs as computer science. I learned category theory, linear algebra, and a smattering of techniques. They didn’t tell us what they were called at the time, but later as a programmer I realized what they were.

I worked as a graphic designer for a few years after music school and wound up at a startup. They needed me to do a little programming, and I found I was better at that than graphic design. I was surrounded by functional programmers there, and open source, so I got involved in both right out of the gate. Because of my background and interests, I ended up learning a lot of straight up computer science and fell in love with Haskell.

Later, I met some people involved in Elixir, and I was surprised to find it was missing a number of things that I expected. So, partly to scratch my own itch and partly as a teaching tool, I started working on the Witchcraft project, which is now six libraries however many modules, and did conference talks and all this other stuff along the way.

Has your music and design background affected your programming?

Programming absolutely scratches the same part of my brain as music composition. Instead of writing instructions for an instrumentalist, you’re writing it for a computer, but the parallels are very clear. All but one person in my composition cohort (who became a professor of music) are now programmers, because it was a crash course in that way of thinking.

There’s a beauty to the more math-y styles of programming. You start thinking more in terms of geometry, pictures, and graphs, than in lines of code. You start to see how things flow and work, because you have more control and you understand how different pieces follow rules.

Instead of writing procedural or imperative programs, where the computer just follows the steps you give it, you can get closer to the way people actually think. Because math is universal, it’s a nice bridging language between people and machines.

Because math is universal, it’s a nice bridging language between people and machines.

Why open source?

Remember, my original career path was going to be ‘starving artist’! I’m intrinsically motivated: it’s less about a huge salary and more about interesting work. I also enjoy the community aspect of scratching my own itch and then sharing with others as a collaborative experience.

These days, I run my own company and we open source everything, but even at previous jobs I was always advocating for open sourcing our work so others didn’t have to go through the same pain. Software duplication is essentially free, so why have fifty people writing the same thing? It feels more efficient to be open source.

I was always advocating for open sourcing our work so others didn’t have to go through the same pain. Software duplication is essentially free, so why have fifty people writing the same thing?

What’s your startup about?

It’s called Fission. There are a lot of distributed and peer-to-peer technologies just emerging, like blockchain, Ethereum, IPFS, and WebAssembly. They have advantages over how we do things today, but are hard to use because they are still very new. We want them to be accessible to everyone, not only people who are already in that little sliver of tech.

Fission makes it easy for developers to write a front-end without having to write a back-end. Instead of having to write your own database, host it, and build your own login system, users can own their own data and identities (self-sovereign identity).

We’re still in the early stages, but work has started. In the next couple weeks we’ll be releasing a Heroku add-on for IPFS.

What is Witchcraft?

Functional programming has been around since the beginning, at least since the late 1940s. It’s a more mathematical approach with more types of abstraction. We can take certain patterns and code them in a library. Instead of having to memorize or recreate them, you can just use what’s in the library and it works.

Because you have more abstraction, you can write more general code that will work in more contexts and do more kinds of things. Elixir as a language is very pragmatic. But it was missing some of the standard things from functional programming.

Because you have more abstraction, you can write more general code that will work in more contexts and do more kinds of things.

Vancouver Functional Programmers in their natural habitat

I run a couple meetups, one of which is Vancouver Functional Programmers. There’s a strong Ruby community here, so people were interested in learning both Elixir and some terms and concepts they hadn’t heard of before.

I figured, let’s merge the two needs and rewrite these concepts in Elixir, open source it, and use the documentation as a teaching tool along the way. I wanted to get people interested in this style of programming, to help them write more reusable and reliable code, and to spread these concepts over time.

I figured, let’s open source it and use the documentation as a teaching tool along the way.

What has been built with Witchcraft?

There are a few libraries that have been built on top of Witchcraft, because it has some patterns that are really good for error handling. You don’t have to constantly check for problems when you make a request to another server; you can just pretend like everything was correct and handle error checking at the end.

Because the abstractions are more structured, and they follow certain principles and laws, it makes it easier to write really solid software. A large multi-national bank is writing part of their stock trading platform with Witchcraft. I know of a couple consultancies using it in client work as well.

I’ve personally used Witchcraft in a number of projects, both in-house and for clients when I used to run a consultancy. For the most part, it’s all deep in the internals of the server, in everything from dashboards to financial transactions to blockchain. It’s pretty widely applicable, being low level, but on the math side.

You do a lot of outreach work—why?

If people don’t know about something, then they’re not going to do it. They need to be familiar with the concepts, and a lot of these techniques aren’t standard yet. We’re seeing a general industry shift from pure object-oriented programming toward functional programming, but it still requires some evangelism.

Community outreach for Witchcraft has primarily been through the Vancouver functional programming community, and through quite a few conference talks and keynotes I’ve given over the past few years.

I also run meetups to help bridge people just entering the industry with people who’ve been there for a while. They provide a place for people to talk about their work and interests, connect with other people, work on side projects, and just get excited about new things.

One of the meetups, Code & Coffee, is very broad and general. It has unintentionally worked as a feeder. People come in through that and end up at a functional programming meetup or a workshop on Witchcraft and Elixir, and then start adopting these technologies in their work. That’s always fun to watch.

We’re seeing a general industry shift from pure object-oriented programming toward functional programming, but it still requires some evangelism.

What led you to start fundraising for Witchcraft?

I became aware of Open Collective a few years ago, through people involved in Feathers, Javascript project with a successful Collective and a large community. They’ve done a very good job getting and engaging contributors.

I looked at how well they were doing, and wondered why I would even bother with fundraising for my obscure little side project. But eventually I just decided to go for it and created a Collective. It took 5 minutes to set up, and within a couple days I had several backers. To my surprise, there were people supporting us who I had never interacted with before. People started Tweeting it out. Now when I go to conferences, I get asked about “this Open Collective thing on your repo”.

I wondered why I would even bother with fundraising for my obscure little side project. But eventually I just decided to go for it. It took 5 minutes to set up, and within a couple days I had several backers.

Witchcraft has always been a labor of love. If I wanted to improve documentation, or get a logo designed, or host extra resources, that was coming out of my pocket or my time. And I only have so many resources as an individual. Sometimes people volunteer their skills. Like my friend who did the logo — it was very nice for a professional designer to do that. But that’s not always possible.

Witchcraft’s lovely logo

There have been times where I’m too busy to look at the docs or respond to a feature request. Me and the other regular contributors all have other projects and day jobs. Our Collective budget gives us the ability to promote our work, pay for hosting, get stickers printed, and helps with travel to conferences.

We really want Witchcraft to be accessible to everyone, and that means a lot of documentation and examples. It’s very much a production library, but it’s also meant to educate people about how to do these things in any language. We’ve already put a lot of effort into that, but we’d like to expand on it. It would be amazing to be able to hire a professional technical writer.

I only have so many resources as an individual…. Our Collective budget gives us the ability to promote our work, pay for hosting, get stickers printed, and helps with travel to conferences.

What’s your fundraising strategy?

Even the relatively small amount we’ve raised since starting our Collective a couple months ago is amazing: $1,100 is $1,100 that we didn’t have last year. Our strategy is to grow the budget over time through direct outreach. GitHub has recently turned on a “funding.yml” option, so we can point people at Open Collective from our repo, which is pretty great.

In contrast, the GitHub Sponsors model is just about funding individuals. I would like to see this project outlive my personal involvement. Ten years from now I may still be building stuff for Witchcraft, but there will probably be other people interested in taking over at some point. If the funding and the Collective can outlive me, that’s a huge win. Everyone should really be looking to see how they can grow a community beyond themselves.

I would like to see this project outlive my personal involvement…. Everyone should really be looking to see how they can grow a community beyond themselves.

What have you learned about leading communities?

Over the years, I’ve been involved in various kinds of community activism, open source projects, and meetups. I’ve seen how getting burned out and dropping off the face of the earth for six months isn’t good for anyone.

We need what my co-founder at Fission calls “ego death”: let go and make it about the work, not being the hero. Making source code available but keeping a death-grip on the project is not what peer-based community production is about. Everyone in the community should be able to participate.

For projects to live beyond burnout, or the founder getting an interesting job, or whatever it is, you need to get other people involved.

Let go and make it about the work, not being the hero. Making source code available but keeping a death-grip on the project is not what peer-based community production is about.

Any thoughts about open source sustainability?

My previous venture was trying to solve sustainability in the Ethereum community, primarily through grants. There was a lot of money around the Blockchain space. But as soon as crypto markets hit hard times, all the grants dried up. The mentality immediately slipped into “What can this do for me?”

Sustainability for open source is very challenging because of the Tragedy of the Commons: everyone thinking everyone else should be funding it instead of themselves. It’s like figuring out who should pay for the roads that everyone uses. Unless it’s mandated by the government, it’s hard to get individuals to step up.

People think, “I’m just one person in a small startup. Microsoft, Apple, and Google should be funding this, not me.” And yeah, they should! Big tech companies run their business largely on open source. Amazon is essentially grabbing and reselling open source projects. It would be nice to see more support.

Sustainability for open source is very challenging because of the Tragedy of the Commons: everyone thinking everyone else should be funding it.

Sustainability really means being able to afford — in funds, time, and effort — to continually improve a project ad infinitum. Large important projects like Linux can have their own foundation and resource finding more donations. Small projects don’t have that. There are some things people can do with licensing, but it’s a hard problem.

I don’t have the answer, but I think Open Collective is helping a lot. It’s enabling us to crowdfund a large number of projects that people use and care about. It has a layer of discoverability. You can go there looking to support some open source projects and explore. You can throw some money in even if you don’t have a lot of time and energy to contribute.

Open Collective is helping a lot. It’s enabling us to crowdfund a large number of projects that people use and care about.

What’s your fundraising advice for others?

There are two Collectives from the Elixir community that are already active, Witchcraft and the Nerves Project. These two are on opposite ends of the spectrum: Nerves is a surprisingly slick tool for making hardware programming much easier, while Witchcraft is about hardcore math. It would be great to see the rest of the Elixir spectrum filled in with Collectives, too.

Most open source projects are just people volunteering their time on evenings and weekends, who are at risk of burnout. Helping them grow their projects beyond the limitations of their own time is really important. It’s critical to survive past the 6-month horizon you can see now, to that 5 year horizon further on.

Part of the reason why Witchcraft has been successful is good documentation, outreach, and productizing it with a logo and design. I’m lucky to be surrounded by people who can contribute those skills, or to have them myself. Getting funding through a Collective could enable other projects to do these things.

Set up a Collective. It’s easy. It takes 5 minutes. Tweet it out. Get as many people on board as possible, and make sure your backers get recognition. Just go for it.

Helping maintainers grow their projects beyond the limitations of their own time is really important.


Go along to one of Brooklyn’ meetups in Vancouver, and support Witchcraft!

Open Collective

Official blog of OpenCollective.com

Alanna Irving

Written by

Exploring bossless leadership, collaborative tech, and co-op systems — https://alanna.space

Open Collective

Official blog of OpenCollective.com