rishenko's menagerie

musings about programming, with a focus on Elixir and erlang

rishenko • Nov 2, 2018 • 18 min read

Deep Dive with Leex and Yecc - Part 2

This is the second post in a series about using Erlang’s leex and yecc in Elixir. In part one, we introduced dice rolling calculations and the need for a DSL to more easily translate those systems into functional code. We looked at various types of arithmetic notations systems to learn how we should structure our DSL, and ended up settling on one that is most familiar with the world at large - infix notation. Today, we take our next step in the journey and learn how to use leex to tokenize our DSL.  Read →

rishenko • Nov 1, 2018 • 15 min read

Deep Dive with Leex and Yecc - Part 1

This is the first post in a series that show how to use Erlang’s leex and yecc to tokenize and parse strings in Elixir. Our case study will involve parsing dice rolling expressions and writing code that turns our parse trees into dynamic, reusable functions. We are kicking off the series by describing dice rolls, the need for a dice-rolling DSL, and some basic considerations when creating our new DSL.  Read →

rishenko • Oct 29, 2018 • 17 min read

Fun Times with IEx

Today I wanted to mention just a few of the not widely discussed things that can be done with elixir’s interactive shell, IEx. Hopefully one or more are new to you and can help improve your development workflow.  Read →