Avoiding recompilation hell in Elixir with mix xref
Recompilation hell: what it feels like Elixir is an amazing language and it’s been a huge privilege being able to work with it for over a decade now (how time flies)!\nI’d like to point out an issue that, if overlooked, can severely impact productivity in your team. Yes, I’m talking about module (re)compilation.\nYou make a few changes to a single file in your codebase and hit recompile. Boom: Compiling 93 files (.ex). Then you make another change and boom: Compiling 103 files (.ex).\n
How to use Jina embeddings in Elixir with Bumblebee | bitcrowd blog
When directly compared with OpenAI's 8K model text-embedding-ada-002, the jina-embeddings-v2 stand out in terms of quality. Their long context length is a game changer. Don't let a missing model implementation stop you from realizing your awesome AI project in Elixir. Instead, follow three steps to convert a Python model to Elixir.
Build a Static Site in Elixir Under 5 Minutes with Phoenix Components
Learn how to quickly build a static blog site using Elixir and Phoenix components. This guide covers converting markdown files to HTML, using MDEx, Nimble Publisher and rendering Phoenix components for a dynamic yet static blog experience.
In Elixir, once you have clustering set up, it's ridiculously easy to run some code on another node in your cluster:
Node.spawn(:"[email protected]", fn -
# This runs on a different node
send(self(), node())
end)
receive do
response - IO.puts "Got response:
I love parsing! I really do. There's something very satisfying about converting input into usable data structures that help me accomplish some task.
Parsing is important. How well we construct those data structures and the quality of the structures we choose can massively impact the work that comes after. We should probably all be worrying about parsing a little more than we do.
The good news is that Elixir is the best language I have ever worked with for doing serious parsing. Let's prove it. Let's pull the data out of a SQLite database file using vanilla Elixir and some tricks from my Scrappy Programmer Livebook series. (You don't need to have read that to follow along with this article. Everyone is welcome.)
Getting and Displaying the User’s Local Time in LiveView
In a Phoenix/LiveView application, it's a bit of a challenge to display the current time to the user in the user's time zone but this can be solved with a time zone library and a little JavaScript.
Working With the File System in Elixir | Envato Tuts+
Working with the file system in Elixir does not really differ from doing so using other popular programming languages. There are three modules to solve this task: IO, File, and Path. They provide...
Working with images & qr codes in Elixir Phoenix - Phoenix Forum / Questions / Help - Elixir Programming Language Forum
I’m trying to get an QR code from the google API. url = "https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=Hello%20world" response = HTTPoison.get!(url) How do I send the body of the response as json out in my Phoenix application? Right now I’m getting the following error: ** (exit) an exception was raised: ** (Jason.EncodeError) invalid byte 0x89 in 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 150, 0, 0, 0, 150, 8, 2, 0, 0, 0, 179, 99, 230, 18...
QRCode - a library for generating QR code - Your Libraries & OS Mentoring / Libraries - Elixir Programming Language Forum
Hi folks! We’ve just finished (me and @smita) our new QRCode library for Elixir. Now you can generate QR code whenever you’ll want… 🎉 Basic usage looks like: iex qr = QRCode.create("Hello World") iex qr | Result.and_then(&QRCode.Svg.save_as(&1,"/path/to/hello.svg")) {:ok, "/path/to/hello.svg"} If you want to change, for example, ecc level and the color of QR code you can write iex settings = %QRCode.SvgSettings{qrcode_color: {17, 170, 136}} iex qr = QRCode.create("quiz_string", :h...