Hacker News new | ask | show | jobs
by rorygreen 2214 days ago
Oh. Dropping IO.inspect into the pipeline is embarrassingly obvious! I can't believe I didn't think to do that. I always used IO.inspect as a pretty printer during development but I guess I didn't think it would return/pass through its input. Thanks for pointing that out.

I clearly hadn't bothered to read the 'Getting Started - Debugging' page on the Elixir website at any point.

1 comments

Oh man I'm so sorry. The difference between using io.inspect like this and not is a the difference between "huge pain, worst ever" and "best concurrent debugging feature ever". IO in erlang is atomic, so in concurrent systems IO output will never be interrupted by IO output from another thread, which is not generally true in other systems (c, c++, rust, go). It makes a HUGE difference.