ElixirMix Podcast 092: Elixir and Python interoperability with Alvise Susmel
In this episode of ElixirMix, we talk with Alvise Susmel about building Elixir systems that leverage Python image detection on video frames. We cover Ports vs NIFs, using different platforms for their strengths, cool embedded hardware, displaying real time results in Phoenix or Scenic, and much more!
ElixirMix Podcast 092: Elixir and Python interoperability with Alvise Susmel
In this episode of ElixirMix, we talk with Alvise Susmel about building Elixir systems that leverage Python image detection on video frames. We cover Ports vs NIFs, using different platforms for their strengths, cool embedded hardware, displaying real time results in Phoenix or Scenic, and much more!
Send Email from @elixirphoenix using Bamboo from @thoughtbot
Using Bamboo and Mailgun to configure different environments and send emails from Phoenix.
https://phxroad.com/phoenix/use-bamboo-to-send-email-in-phoenix
Vnu v1.0.0 released - a library for validating HTML, CSS, and SVG documents
I wrote an Elixir client for the Nu HTML Checker (validator.w3.org/nu). It offers ExUnit assertions for validating dynamic content in tests (e.g. in Phoenix controller tests), Mix tasks for validating static content, and general purpose functions to fulfill other needs.
Simple Phoenix LIveView App: Show & Edit Pages
Part 7 of the Simple Phoenix LiveView App series.
In this episode, we’ll build the live views and templates for the show and edit pages, fix a few bugs and finish converting users from traditional CRUD to LiveView. After this episode, we won’t need the user controller at all.
https://alchemist.camp/episodes/phoenix-live-view-show-and-edit
How Phoenix Live Reload works behind the scene?
I wrote a blog post explaining the internals of how Phoenix Live Reload works:
https://shankardevy.com/code/phoenix-live-reload/
For the brave ones, I have 3 challenge questions towards the end of the post. Will be happy to see devs solve them :-)
Use Context in Phoenix
Refactor my application to use Context.
https://github.com/co0lsky/deep-work-hours-phoenix/commit/2d290265ad4b017d4399145ebfa87ea215a4aae1
A couple of blog posts about the fundamentals
I wrote a couple of blog posts that are seemingly as basic as they come but I dug a little deeper than you’d expect. :)
IntelliJ Elixir v11.6.0
Changelog
Enhancements
-
Treat
.leexfiles as.eexfiles, so same features apply to both. - Switch build to GitHub Actions.
- Update build to IntelliJ IDEA 2020.1
Bug Fixes
-
Swap improperly sized
General.QuestionDialogicon forRunConfigurations.TestUnknownicon for Unknown icon in Structure View. -
Fix
MODULENAMEvariable indefmlive template, so that the file name is camel-cased before being capitalized. -
Update
README.mdabout information for Goland IDE since has been released for awhile and no longer only an EAP. -
Restore canary builds being published to JetBrains Marketplace.
-
JetBrains IDEs 2020.1 compatibility
-
Change obsolete references to
AllocIconsinIconsto new ones inAlllIconsthat are recommended in documentation. -
Update to
@NotNullannotation onPsiElementVisitor-
DepGatherer -
QuotableImpl.quote
-
-
Fix tests for IDEA 2020.1.
-
Get
ProjectImportProviderbuilder indoGetBuilderinstead of constructor.Fixes use of deprecated constructor dependency injection that is incompatible with dynamic, injectable plugins in 2020.1.
com.intellij.diagnostic.PluginException: getComponentAdapterOfType is used to get org.elixir_lang.mix.project._import.Builder( requestorClass=org.elixir_lang.mix.project._import.Provider, requestorConstructor=protected org.elixir_lang.mix.project._import.Provider(org.elixir_lang.mix.project._import.Builder) ). Probably constructor should be marked as NonInjectable. [Plugin: org.elixir_lang]
-
-
Allow underscores in binary (
0b), octal (0o) , and hexadecimal (0x) numbers.
Live Elixir Wizards Betweenisode recording today at 11AM EDT
Special live episode recording today at 11AM EDT - with many special guests including the Elixir Outlaws, Dave Thomas, Meryl Dakin, Saša Jurić, the Freezes, Frank Hunleth, and lots more!
ExUnited - Easily spawn Elixir supervising nodes within ExUnit tests
ExUnited is a Hex package designed to easily facilitate spawning supervising local Elixir nodes within tests. Unfortunately, I was not able to properly setup a spawned node for supervisioning with the Erlang :slave.start_link/1 function. So I have written ExUnited to accomplish that, along with supporting Mix.Config configurations, additional loaded code, and a developer friendly way of writing assertions and refutations in the context of a spawned node which really improved the readability of the tests and more.
Features
- Spawn nodes for testing purposes
- Spin up “partially connected” vs “fully connected” nodes
- Run in “verbose” mode which prints a colorized STDOUT of the nodes
-
Specify extra “code paths” which will be included (
config.exsincluded) - Support child supervisioning within a spawned node
- Exclude certain dependencies for spawned nodes
- Easily assert and refute within the context of spawned nodes
Example
defmodule MyNodeClusterTest do
use ExUnited.Case
setup do
{:ok, spawned} =
ExUnited.spawn(
david: [code_paths: ["test/nodes/beckham"], supervise: [David]]
)
on_exit(fn ->
ExUnited.teardown()
end)
spawned
end
test "executes code in spawned node", spawned do
assert :"captain@127.0.0.1" = Node.self()
refute :"david@127.0.0.1" == Node.self()
sentence = "The only time you run out of chances is when you stop taking them."
as_node(:david, phrase: sentence) do
assert :"david@127.0.0.1" = Node.self()
refute :"captain@127.0.0.1" == Node.self()
assert ^phrase = David.talk()
foo = :bar
refute match?(%{node: ^foo}, %{node: :foo})
end
end
end
See full example.
Enjoy the package! I would love to receive a shoutout and/or your feedback ;)
AyeSQL: Writing Raw SQL in Elixir
A small tutorial on how, why and when to use raw SQL, as well as giving some examples using Ecto and AyeSQL.
Deploying to Gigalixir Tutorial
Gigalixir is Elixir’s Platform as a Service. In this episode we create and deploy a new Elixir application with Gigalixir.
Custom IEx Prompt : Elixir
You might be bored being locked down and using the same default IEx prompt. Let’s turn our boredom interesting by decorating IEx look out.
Check out the Setup and Installation
https://medium.com/@blackode/custom-iex-prompt-elixir-c95b7f5bf8c3
gen_rmq 2.6.0 version release
GenRMQ is a set of behaviours meant to be used to create RabbitMQ consumers and publishers.
With the redesigned queue configuration options, users have bigger flexibility in creating their desired consumer setup. This includes support for quorum queues as well. Check our documentation to learn more: https://github.com/meltwater/gen_rmq#documentation
Files watcher and compiler for elixir projects (only: :dev) 😉
Lettuce is a generic server process that checks the files within an elixir project that has lettuce as a dependency and then runs iex -S mix. It initialises the state of the generic server with the .ex files inside lib and their last modified time.
Elixir Wizards S3E19 Season Three Wrap and Remote Work Tips
Final episode of the Elixir Wizards Podcast third season. Check it out here: https://podcast.smartlogic.io/s3e19-season-wrap
Simple DIY Persistence for Mailgun
We created and open sourced a small tool to persist events from Mailgun, since the retention they offer is expensive. Mailgun boost a fantastic tool, we just wanted simple logging in case we needed it. Fork, run the source or use the docker container.
For comprehensions in Elixir
Going beyond simple mapping - a refresher on comprehensions and what they can do.
