A hook for handling very large lists with Phoenix Live View

How to stream very large lists to improve page load & rendering time.

https://alex-min.fr/phoenix-live-view-very-large-list-hook/

Working with decimals in Elixir

A quick guide on decimals in Elixir.

Elixir Wizards S5E7 Jason Axelson on the Elixir Language Server

Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s5e7-axelson/

RakNet game networking protocol in Elixir

We’ve open-sourced the most important component of the massive multiplayer server we use for the X-Plane flight simulator: an implementation of the RakNet protocol.

You can find it on GitHub, under the MIT license: https://github.com/X-Plane/elixir-raknet

A bit of background:

RakNet is a popular C++ library for doing game networking. It provides things like stateful connections, client clock synchronization (the bane of every network game programmers’ existence), and both reliable and unreliable UDP transmissions, so you can choose how much latency your packets can handle.

This is pretty niche stuff, but maybe it’ll be useful for someone else. Reverse-engineering this stuff from the RakNet source was, uh, a bit of a pain. 😄

EctoExtras - simple helper functions missing from the default Ecto implementation

EctoExtras is a set of simple helper functions for Ecto.Repo and Ecto.Query that I find missing from the default implementation. https://github.com/pawurb/ecto_extras

A guide to event handling in Elixir

6 ways of handling events in Elixir systems - a high level overview with trade-offs for each approach.

https://mkaszubowski.com/2021/01/09/elixir-event-handling.html

Elixir for Beginners: From Pipes to Pattern Matching and Beyond

We have collected all the tips, techniques, and patterns you need to do beginner-level Elixir programming in one article. Learn about higher-order functions, pattern matching, recursion, and more.

https://serokell.io/blog/elixir-for-beginners

ElixirCasts 128: Using Twilio with Elixir

In this episode we’ll explore how to send text messages from an Elixir application. We’ll use Phoenix LiveView for our UI and Twilio to deliver our messages.

https://elixircasts.io/using-twilio-with-elixir

ThinkingElixir 030: Mutation Testing using Muzak with Devon Estes

In episode 30 of Thinking Elixir, we talk with Devon Estes who has created a new Elixir mutation testing library called Muzak. Devon joins us to explain what mutation testing is and how it can help development teams in organizations move faster and with greater confidence. We cover when a project can benefit from it, the challenges of offering a PRO library version, where Muzak is going in the future, and more!

Podcast Episode

Elixir in 2021: The Now, The Tomorrow, The Future

In a new article by Michal Buszkiewicz, find out whether & why there’ll ever be an Elixir 2.0, and learn about the philosophy behind the language’s development and its current state in 2021.

Early alpha "Create a cryptocurrency bot in Elixir" ebook released!

I’m proud to release an early alpha version of my book: https://leanpub.com/create-a-cryptocurrency-trading-bot-in-elixir Feel free to grill it as much as you want - any feedback appreciated, that’s the only way to get it better really ;)

Enjoy

Advent Of Code makes me a better programmer

Advent Of Code is a yearly coding challenge offered by Eric Wastl for the Christmas season. In this article I will share my AOC takeaways as an Elixir programmer.

https://www.christianblavier.com/advent-of-code-makes-me-a-better-programmer/

Extracting LiveView Logic into LiveComponents

How to extract LiveView logic into a LiveComponent, and how to exchange data both ways.

https://s2g.io/extracting-liveview-logic-into-livecomponents

UUID Primay Key with Ecto

In episode #127 we’ll explore how to use UUID primary keys with Ecto.

https://elixircasts.io/uuid-primary-key-with-ecto

How to connect Pow and Live View in your Phoenix project

Wrote a short blogpost about connecting Pow and Live View in a Phoenix project. Basically, it is a summary of existing knowledge from the Live View documentation and a long thread in the Elixir forum. I hope it is helpful for others, that enjoy Pow as much as I do.

https://dev.to/oliverandrich/how-to-connect-pow-and-live-view-in-your-phoenix-project-1ga1

11th episode - Autostarting trading strategy - crypto trading in Elixir

11th video in the series about building cryptocurrency trading bot in Elixir - this time we will focus on autostarting, stopping, and graceful shutdown of our naive trading strategy.

Link: https://www.youtube.com/watch?v=Gm2v3E8fmAM&list=PLxsE19GnjC5Nv1CbeKOiS5YqGqw35aZFJ&index=11

Serving open street map vector tiles with elixir and phoenix

https://dev.to/dkuku/serving-open-street-map-vector-tiles-with-elixir-and-phoenix-40ip In this tutorial I’ll use a file has bundled the assets as *.pbf because it’s the most complicated format to set up. With images you don’t need any plugins for leaflet and the rendering should be much faster in user browser.

IntelliJ Elixir v11.9.0

Changelog

Enhancements

  • Make plugin updatable without a restart when installing from the JetBrains Marketplace. (If installing from file on GitHub you still need to restart due to a limitation in the JetBrains API.). JetBrains refers to this as a Dynamic Plugin.
    • Convert DepsWatcher from project component to project listener
    • Convert Watcher from module component to project listener
    • Make org.elixir_lang.packageManager extension point dynamic
  • Remove unnecessary assert.
  • Replace if with when
  • Include asd tool version Prevent me screwing up the quoter cache using the wrong elixir version again.
  • Update gradle project
    • gradlew 6.7.1
    • org.jetbrains.intellij 0.6.3
    • org.jetbrains.kotlin.jvm 1.3.70
    • de.undercouch.download to 4.4.1
  • Update to GitHub Environment Files
  • Update CI to Elixir 1.11.2 and Erlang 23.1
    • Quoting (for verification of correspondences between plugin and Elixir native lexer and parser.)
      • Port elixir-lang/elixir#9725
        • Indentations for sigil binaries with complex content. Makes sure the indentation metadata is added to sigils that have content with metadata already.
      • Quote charlist the same as string when used for a quoted atom
      • Port elixir-lang/elixir@e89e9d874bf803379d729a3bae185052a5323a85
      • Add sigil delimiter to metadata Ports elixir-lang/elixir#9671
        • Have 3 character delimiter for heredocs
      • Add no_parens: true metadata Port elixir-lang/elixir@8e7befb1087bd37d5acb883e21925b1c0eb0a55f
    • Remove elixir-lang parsing tests for files that don’t exist in Elixir 1.11
    • Add missing @Deprecated to match overridden method
    • Format expected and actual quoted Makes the diff not be a one-liner. so easier to spot the difference.
    • Convert Quoter to Kotlin
    • Regenerate Parser for newer GrammarParser version.
    • Port elixir-lang/elixir@1e4e05ef78b3105065f0a313bd0e1e78b2aa973e
  • Rewrote the DocumentationProvider so it no longer relies on invoking mix (which I admit was more like a hack than a real solution). This now works so quickly that it actually makes sense to show docs on mouse hover.
    • It can get the documentation from both the source code and decompiled .beam files.
  • Decompilation of documentation was implemented according to EEP-48.
  • The experience on navigating through decompiled file has also been improved a bit
    • See the @moduledoc and @docs
    • See if a function has been deprecated
    • See the original signature of the function (instead of just p0, p1, …).

Bug Fixes

  • Fix deprecation warnings for IntelliJ IDEA 2020.2
    • Replace fileTypeFactory extensions with fileType
    • Convert fileTypes to Kotlin
    • Replace uses of deprecated Project#baseDir
    • Replace uses of deprecated ContainerUtil.newHashMap
    • Replace defaultLiveTemplatesProvider with defaultLiveTemplates
    • spaceExistanceTypeBetweenTokens replaced with spaceExistenceTypeBetweenTokens
    • Replace ListCellRendererWrapper with SimpleListCellRenderer
    • Replace StdFileTypes.PLAIN_TEXT with FileTypes.PLAIN_TEXT
    • Replace LanguageSubstitutors.INSTANCE with getInstance()
    • Replace ReportMessages.ERROR_REPORT with ReportMessages.getErrorReport()
    • Replace DefaultProgramRunner with GenericProgramRunner
      • Have only one runner for all configurations in plugin since body of runner was all the same for non-debug.
    • Don’t override deprecated flushBufferBeforeTerminating()
    • Don’t override deprecated acceptsFile
    • Override initExtra(Project) instead of initExtra(Project, MessageBus, Engine)
    • Replace NamedFoldingDescriptor with FoldingDescriptor
      • Convert folding.Builder to Kotlin
    • Replace file with value for @Storage annotation
    • Replace checkBox(fieldName, title) with checkBox(title, getter, setter)
    • Replace com.intellij.util.contains.Predicate with java.util.function.Predicate
    • Replace CodeStyleSettingsManager with CodeStyle
    • Replace Comparing.equal with Objects.equals
    • Replace UsageType(String) with UsageType(Supplier)
    • Replace PluginManager with PluginManagerCore
    • Replace WakValueHashMap with createWakeValueMap
    • Don’t pass Pass to LineMarkerInfo
    • Replace newArrayListWithCapacity with ArrayList
    • Replace newIdentityHashMap with IdentityHashMap
    • Replace RefElement#element with #psiElement
    • Pass columnMargin to setupCheckboxColumn
    • Extensions.getExtensions(name) -> name.extensionList
    • Extensions.findExtension -> ExtensionPointName.findExtensionOrFail
    • Object -> Any
    • Replace choseAndSetSdk with SdkPopupFactory
  • Fix error reporting formatting
    • Fix new lines around excerpts so that code blocks quote correctly
    • Use FILE:LINE format for excerpt location, so it can be used in editors for rapid lookup.
    • Separate title from message
    • Remove use of ErrorBean
    • Pass project for LevelPropertyPusher DumbModeTask
    • Don’t use constructor injection for SetupSDKNotificationProvider
    • Don’t use AnnotationHolder::create* APIs and use AnnotationBuilder instead.
      • Convert Annotators to Kotlin
    • Use logger.error directly instead of LogMessageEx
  • Fix Atom annotator to only annotator within current element. Annotation keyword pair’s key and colon instead of annotating the keyword key and the colon outside of it.
  • Fix Macro parsing in DbgI
    • ifAccessToString I missed taking the 3rd element of the tuple to get [Access, :get] and was checking the outer tuple directly.
      • Convert beam.assembly.ParserDefinition to Kotlin
    • ifWhenToString where as should be as?
  • Suppress unused variables for TODO()s
  • Remove unnecessary Line chunk dependency on Atom chunk
  • Switch unused unsignedInt values to _ as Kotlin doesn’t support _name
  • Use key instead of environment for computeIfAbsent
  • Replace lambda with constructor reference
  • Remove unnecessary !!s
  • Replace mapIndexed with map because index is unused
  • Remove open that has no effect in object
  • Fix is overrides by converting to Kotlin
  • Remove unused Call from Implementation. and CallDefinitionClause .elementDescription(Call, ElementDescriptionLocation).
  • Don’t shadow resolveResultList in addToResolveResultList
  • Remove useless ?:
  • Remove unnecessary != null
  • Fix named argument calling by using super argument name
  • Change Float.from(ByteArray, Int) to TODO() as implementation is invalid.
  • Remove unused ModuleChooserDialog
  • Setup EncodingManager for ParsingTestCase
  • Remove redundant internal
  • Don’t highlight resolved callables along with referrers Newest annotation API asserts that the annotator only annotates the PsiElement being visited, so can’t highlight the resolved call definitions at the same time anymore.
  • Differentiate signs, unary +/-, and addition/subtraction in lexer. Fix parsing of -1 for case clauses (#1316) by more strictly parsing decimal exponent signs differently than addition/subtraction and differently from unary + and -. No longer have a “dual” operation emitted from the lexer like the Elixir native lexer and instead use specific tokens for each use case so that the parser doesn’t need to decide on the operation.
  • Heredoc with escapable newlines (#1843) Heredocs allow the final newline to be escaped so you can write a heredoc in the code, but have no newlines in the string term at runtime.
  • Fix terminators docs to show closing version and not opening version
  • Protect against IndexOutOfBounds from highlighterIterator in QuoteHandler.

Installation Instructions

Elixir Wizards: Steve Domin on Innovating Travel APIs

This week on Elixir Wizards, we talk with Steve Domin, CEO and Co-Founder of Duffel.com: https://smartlogic.io/podcast/elixir-wizards/s5e6-domin/

Grax 0.1: a graph data mapper for Elixir

Grax is a light-weight graph data mapper which maps RDF graph data on to Elixir structs, like Ecto.Schemas for graph data.

https://github.com/rdf-elixir/grax

Read all about it in the guide: https://rdf-elixir.dev/grax/

Next page