Back to Elixir

I’m ready to get back to Elixir after spending the last few weeks using Python and ReportLab/RML to generate multi-thousand line PDF reports. The project is only about 2/3 finished and currently stalled waiting for client answers.

While coding the Python project I kept trying to think about how I’d approach the work in Elixir (assuming a ReportLab-style package was available). In order to create a ReportLab/RML report, I first create a (fairly large) blob of data containing information loaded from multiple .csv files and then arranged and summarized multiple ways.

In Python I use multiple classes (a base class contains many attributes that are themselves classes). Historically, I’d tend to use dictionaries instead of classes, but I also used an IDE (VS Code) for the first time and wanted to get the IDE hints as well as type hint everything.

In Elixir:

[Read More]

A Short Python Break

and some Elixir reading for homework

A short break while I return to the land of Python and ReportLab PDF generation. This is my first time using the commercial ReportLab PLUS markup language (RML). Already have about 1,500 lines of RML generating multi-hundred page reports.

I’ll be doing some reading homework with the early release version of Elixir in Action, Third Edition by Saša Jurić.

Plan to be back in April.

[Read More]

Programming Elixir Wrap-up

Final Thoughts

Step #1 of my Learning Elixir journey is complete.

I had expected to mostly read and instead I worked through most of the exercises.

A useful first step:

  • The Elixir syntax no longer looks quite so foreign.
  • Pattern matching caused a fundamental shift in how I think about writing functions.
  • I’m confident I can write and deploy a simple application.
  • I have a reasonable understanding of message passing.
  • Still lots of practice mapping and reducing.
  • Actors!

I appreciate the positive feedback I’ve received from my posts. The primary audience for these posts is myself, to keep myself motivated and gauge my progress.

Still lots to learn, the dance continues and yes, Dave, I did have fun. Thank you.

[Read More]

Quotes from Programming Elixir

Threads Programming Elixir ≥1.6: Functional |> Concurrent |> Pragmatic |> Fun by Dave Thomas.

Some of Dave’s words I found particularly interesting, insightful, or inspiring.

“But mostly, I want you to have fun.”

“…you can think about programming in a different way.”

“You no longer have to think too hard about protecting your data consistency in a multithreaded environment.”

“I don’t want to hide data. I want to transform it.”

[Read More]

Programming Elixir Chapter 22 Notes

Macros and Code Evaluation

My interest is in application development so macros are not something I expect to ever be creating. So this is mostly a chapter for reading.

Did work through the first two exercises. Took awhile for me to understand that I cannot use a macro-defined function in the module where it was expanded. Makes sense since Elixir first compiles then loads, so the dynamically-created function isn’t available for use.

[Read More]