home.social

#elixirinaction — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #elixirinaction, aggregated by home.social.

  1. Fault Tolerant Basics Elixir in Action Chapter 8. A walk through run-time errors and Supervisors.

    “Instead of obsessively trying to reduce the number of errors, your priority should be to minimize their effects and recover from them automatically.”

    #Learning Elixir #MyElixirStatus #ElixirInAction

  2. Building a Concurrent System Elixir in Action Chapter 7. The GenServer handle_call function returns state to the GenServer, which messages it back to the caller. You can also spawn a worker process, return state to the GenServer instructing it not to message back to the caller, then send a message directly from the spawned worker function.

    #LearningElixir #MyElixirStatus #ElixirInAction

  3. GenServer Powered Todo Server Elixir in Action: Chapter 6 Exercise

    • Functions are applied to data.
    • Functions are applied to data.
    • Functions are applied to data!!

    My Python-brain still sees TodoList.add_entry(todo_list, new_entry) as an object method call and not a Module.function to modify todo_list.

    Additionally, when inside a GenServer cast or call I’m thinking, “Where did the todo_list come from?” It came from the GenServer and is the GenServer’s state.

    Brain is slowly switching to functional mode.

    #LearningElixir #MyElixirStatus #ElixirInAction

  4. Generic Server Processes Elixir in Action: Chapter 6.

    I knew about the GenServer handle_call function for synchronous message handling and handle_cast for async, and learned about handle_info for “non-GenServer-specific” message handling.

    The chapter provides a clean-up timer as an example.

    Implements a simple GenServer which is a big help in understanding the internals.

    #LearningElixir #MyElixirStatus #ElixirInAction

  5. [Data Abstractions(https://rgacote.github.io/dinosaurdance/posts/elixir-in-action-3rd-edition/chapter-04/).

    I found that typing and testing all the small code snippets added to my Elixir “muscle memory” and seeing what standard practices look like. For example, when updating the todo list example, I would not have thought of passing a lambda function for the update vs. just passing new data. The lambda function provides much more flexibility at the cost of some slight complexity increase (at least I’m still seeing it as a complexity increase at this stage).

    I need to remember that anonymous functions don’t need to be simple one-liners.

    #LearningElixir #MyElixirStatus #ElixirInAction

  6. Control Flow Elixir in Action: Chapter 3 opens with an introduction to pattern matching, with details on tuples, lists, maps, bitstrings, binaries, and of course functions, then delves into function guards to implement extended pattern matching in functions.

    Multi-clause anonymous functions were new to me:

    test_num =
              fn
                x when is_number(x) and x < 0 -> :negative
                x when x == 0 -> :zero
                x when is_number(x) and x > 0 -> :positive
              end
    

    Started working more with the Stream module.

    #LearningElixir #MyElixirStatus #ElixirInAction

  7. Building Blocks Elixir in Action: Chapter 2 dives into the nitty gritty of what you need to know to get started programming Elixir. From IEx and code organization to variables, types, operators, and the runtime.

    I finally clicked on the use of & in lambdas. The syntax always looked foreign to me and I kept thinking there was somehow more magic going on. I think The Erlangelist macro articles helped clear that up for me.

    The following are equivalent:

    lambda = fn a, b, x -> a + b - c
    lambda = &(&1 + &2 - &3)

    #LearningElixir #MyElixirStatus #ElixirInAction

  8. Overview of Erlang/Benefits of Elixir

    Elixir in Action: Chapter 1 is a high level overview of the technologies on which Elixir is built: Erlang and the BEAM.

    I’ve always benefitted from being familiar with the level below where I was programming. In Python, I’d look at the AST and bytecode; in Pascal, the p-code; in C, the assembly code, and in assembly code I had hardware emulators (and Soft-ICE back in the day).

    Notable Quote: “Unless a system is responsive and reliable, it will eventually fail to fulfill its purpose.”

    #LearningElixir #Elixir #ElixirInAction

  9. Distracted by Saša Jurić’s old The Erlangist blog referenced in the preface. I’m particularly interested in the “Why Elixir” and six-part “Understanding macros” posts.

    Back to the book in a day or so.

    #LearningElixir #Elixir #ElixirInAction

  10. You can read his book, but you can also join his talks and trainings!
    Saša Jurić is our speaker and trainer at Code BEAM America in San Francisco in March and at ElixirConf EU in Lisbon in April.

    See you there! Tickets:
    🔥 codebeamamerica.com
    🔥 elixirconf.eu


    #myelixirstatus #elixirinaction #elixirlang #codebeam #elixirconf #elixirconfeu #codebeamamerica @ManningPublications @elixir @sasajuric

    RE: https://hachyderm.io/users/sasajuric/statuses/111896306303158921
  11. You can read his book, but you can also join his talks and trainings!
    Saša Jurić is our speaker and trainer at Code BEAM America in San Francisco in March and at ElixirConf EU in Lisbon in April.

    See you there! Tickets:
    🔥 codebeamamerica.com
    🔥 elixirconf.eu


    #myelixirstatus #elixirinaction #elixirlang #codebeam #elixirconf #elixirconfeu #codebeamamerica @ManningPublications @elixir @sasajuric

    RE: https://hachyderm.io/users/sasajuric/statuses/111896306303158921
  12. You can read his book, but you can also join his talks and trainings!
    Saša Jurić is our speaker and trainer at Code BEAM America in San Francisco in March and at ElixirConf EU in Lisbon in April.

    See you there! Tickets:
    🔥 codebeamamerica.com
    🔥 elixirconf.eu


    #myelixirstatus #elixirinaction #elixirlang #codebeam #elixirconf #elixirconfeu #codebeamamerica @ManningPublications @elixir @sasajuric

    RE: https://hachyderm.io/users/sasajuric/statuses/111896306303158921
  13. You can read his book, but you can also join his talks and trainings!
    Saša Jurić is our speaker and trainer at Code BEAM America in San Francisco in March and at ElixirConf EU in Lisbon in April.

    See you there! Tickets:
    🔥 codebeamamerica.com
    🔥 elixirconf.eu


    #myelixirstatus #elixirinaction #elixirlang #codebeam #elixirconf #elixirconfeu #codebeamamerica @ManningPublications @elixir @sasajuric

    RE: https://hachyderm.io/users/sasajuric/statuses/111896306303158921
  14. @timClicks oy vey, was looking for the latest #ElixirInAction version by @sasajuric (to suggest it to a friend), landed on twitter and read the news.

    If you want to do some producty stuff or need contributors, I would love to do something for you / with you, as our biggest contract in #doma is reaching its conclusion soon. Maybe hack together some product or somesuch?

    P.S. "Submit" is white on white (see attachment)

  15. @timClicks oy vey, was looking for the latest #ElixirInAction version by @sasajuric (to suggest it to a friend), landed on twitter and read the news.

    If you want to do some producty stuff or need contributors, I would love to do something for you / with you, as our biggest contract in #doma is reaching its conclusion soon. Maybe hack together some product or somesuch?

    P.S. "Submit" is white on white (see attachment)

  16. @timClicks oy vey, was looking for the latest #ElixirInAction version by @sasajuric (to suggest it to a friend), landed on twitter and read the news.

    If you want to do some producty stuff or need contributors, I would love to do something for you / with you, as our biggest contract in #doma is reaching its conclusion soon. Maybe hack together some product or somesuch?

    P.S. "Submit" is white on white (see attachment)

  17. @timClicks oy vey, was looking for the latest #ElixirInAction version by @sasajuric (to suggest it to a friend), landed on twitter and read the news.

    If you want to do some producty stuff or need contributors, I would love to do something for you / with you, as our biggest contract in #doma is reaching its conclusion soon. Maybe hack together some product or somesuch?

    P.S. "Submit" is white on white (see attachment)