Skip to content
0:00 / 0:00

#keyme#spaceleaks#lazyevaluation

Deploying Haskell in a Python Microservice Environment: Also Robots

Compose Conference

2.9K subscribers • 31 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Jeff Ciesielski and Lianne Lairmore, Software Engineers at KeyMe

Intermediate. Assumes working knowledge.

750 views7 years ago1 recommendation

Programming languagesSystems programmingHaskellPythonMicroservices and monoliths

Jeff Ciesielski and Lianne Lairmore share their experience migrating a core robotics infrastructure service from Python to Haskell, including dealing with space leaks.

Compose NYC 2019 Speaker: Jeff Ciesielski and Lianne Lairmore After struggling with global variables, mismatched types, and being constantly afraid to change any code for fear of runtime errors, our team decided to move a core piece of our robotics infrastructure from Python to a type safe language. After developing proofs of concept in Rust, OCaml, Crystal, Scala, and Go (and even getting close to a production candidate in Nim) an enterprising member of our team wrote a prototype in Haskell and the results were outstanding. With its emphasis on type safety, the elimination of global state, and an established library ecosystem, Haskell has been a great fit for our team. That said, our rollout wasn’t without hiccups! Once deployed we learned about space leaks and what lazy evaluation really means for continuously running software.

Why it's here

1 person recommends this

What people say. Recommended as a practical case study of migrating a production service from Python to Haskell.

u/vaibhavsagarin r/haskell • Recommends

On “Software Engineer role at KeyMe Locksmiths!”

Our kiosk is essentially a Linux computer running our software, some of which connects to a cutter motor that cuts key blanks to duplicate keys. Some of this software is written in Haskell because we wanted a statically-typed language with more compile-time guarantees than Python provides. This includes our credit card processing code and the code that translates the information we get from our cameras into cutting paths for our motor. My team did a presentation about our architecture at Compose NYC 2019. As for why I chose it: it seemed like an interesting domain and a great job in a bunch of other ways, with the opportunity to write Haskell.

u/Instrumein r/haskell • Mentions

Haskell vs Python for Production: Old Compose Conference Video from 2019 [video It's not such an interesting video; the immediate impression I get from the video is that the firm had a spaghetti Python codebase, were looking for something to migrate into, and they coincidentally had a moderately-skilled Haskeller on the team who was able to Just Do It and hack together something that worked, whereas the Rust attempt got stuck at the borrow checker and OCaml didn't have the libraries available for the task. On the negative side, they were unable to deal with Haskell's laziness semantics and had to enable strict for everything. Same thing happened with NoRedInk; they just wanted Elm for b…