ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
Let’s look on CSRF protection in Phoenix. Multi-part forms, React forms and APIs in general.
A small post about case insensitive columns https://minhajuddin.com/2019/04/14/how-to-store-username-or-email-with-case-insensitive-search-using-ecto/
Updating the Phoenix LiveViews from outside the process
The latest Versioning has added extensive support for Phoenix applications. Make your API future-proof by adding versioning support!
- An easy-to-use DSL for building a schema representing the changes across versions.
- Simple integration with Phoenix controllers and views. Modify incoming params and outgoing data.
- Support for multiple version types - from date to semantic. Or build your own.
- Create a changelog based on the changes in your versioning schema.
Check it out:
I just published a post today ‘Graph to graph with Elixir Moving data between semantic and property graphs’.
This post shows how we can use Elixir to move data between semantic and property graph databases, and back again. As well as the worked examples in the text, a small number of sample scripts are also provided.
Graph conversions are handled by applying simple wrapper functions over the neosemantics library from Jesús Barrasa. We also use the bolt_sips package from Florin Pătraşcu and the sparql_client package from Marcel Otto to interface respectively with Neo4j and RDF graph databases using Cypher and SPARQL, respectively.
We talk with Jeffrey Matthias from Community about their current and past Elixir projects and how they are deployed.
This is my latest post for the Hashrocket blog, an interview with Jeremy Huffman, maintainer of Dialyxir.
Introducing the AST Ninja for helping you understand Elixir’s AST https://www.botsquad.com/2019/04/11/the-ast-explained/
Morphix 0.7.0 published. Now with generic morphiforming of map keys! https://hex.pm/packages/morphix/0.7.0
Morphix 0.7.0 published.
We noticed that we had some duplicated code, and that that duplicated code could be used to apply any function to recursive key transforms in maps, so we made the generic method public. Later releases will have better information about how to implement this, in the meantime, check the test examples. https://hex.pm/packages/morphix/0.7.0
I took the release of benchee 1.0 for a spin and redid one of the first benchmarks I ever did with benchee - looking at tail call optimization in elixir and erlang to show off how benchee has improved over time. The original blog post can be found here.
Link following is the process for dynamically redirecting a user after successful authentication.
I briefly detail how to implement this using the Phoenix and Ueberauth libraries.
As you know, the @assigns map of connection in Phoenix is the data map of variables to be rendering in view templates. We often use this conn.assigns to store our value. But how to store a function inside this?
Recently on my side project Grapevine, I wanted to start shuffling up the featured games on the homepage. To do this, I set up a nightly process that does the re-ordering. This uses OTP primitives (plus Timex for time manipulating) in order to achieve this.
I’ve created an Elixir Orb for CircleCI. If you build projects in Elixir using CircleCI take a look into this blog post https://circleci.com/blog/contributing-the-elixir-orb/. Feel free to leave any feedback and/or contribute to the orb.
This is a second part of the article of last week.
This time we are going to process on the fly a 30 million lines remote file, summing the numbers of each line. We will see how to implement the functions we need to convert a stream of chunks (the one built in the part 1) to a stream of lines. We’ll then run a benchmark of two different implementations.
We will then see how easy and quick is to process just the first 30 lines of the same 125mb file.