What Elixir related stuff are you doing?

Last month I finished to go through of the second edition of @pragdave video course:

The final result of this course is the Hangman game, and I decided to make it available online:

Screenshot from 2022-05-12 08-43-00

7 Likes

Did you read the 1st edition as well @Exadra37?
If so, did you think it was worth going through both?

Do you mind posting your CSS? It looks like you were more successful than me in keeping the layout consistent with different screen sizes/orientations.

Yes I did. No need to go through both. The second edition is an update for the first edition, but the main idea and goals are the same.

3 Likes

I am checking in on this forum for Elixir resources.

1 Like

The video from my “Kill All Mutants! (Intro to Mutation Testing)” talk at Code BEAM Europe is out already, at Intro to Mutation Testing - Dave Aronson - Code BEAM Europe 2022 - YouTube

6 Likes

I define a similar macro as happy_with. I call it maybe.

After reading so many forum post here, implementing and extracting ideas i would’ve never considered that all you shared, and debugging for the past year. I’m proud to finally have launched https://rtwjobs.com another job board but for remote technical writers.

5 Likes

Still learning Elixir, but actually making an app that scrapes data in csv files, uses geocoding then formats the result. I’m at the point of making it async

3 Likes

Building a phoenix app that should help people arranging fleemarkets.

5 Likes

To get a break from regular coding and to get more comfortable with using Liveview, text parsing and doing calculations on server side. I made https://rpn.startkoden.com, which is a simple reverse polish notation calculator. Also tried using fly.io for hosting which was good experience.

2 Likes

Mostly just trolling ElixirForum.

Na for real, we’re breaking a giant Rails monolith into a bunch of services. Kind of like event sourcing, but our streams are made from database CDC. I’m not sure if there is a specific term for that.

So far our “Postgres CDC to stream” and “Cassandra CDC to stream” is all written in Elixir. There was some reason why we didn’t use Debezium, but I can’t remember… :grimacing:

Then a lot of our services (stream consumers) are in Elixir.

Further, we’re making a GraphQL API for our product (which is pretty big) and it’s all done with Elixir and Absinthe.

Elixir is easy to program in, has pretty decent static analysis, and is easy to horizontally scale in a Kubernetes environment.

2 Likes

I want to expound on this. Most of our “RPC” and API Elixir services do not have a queue of any sort. Similar to Phoenix, when a web request comes in, a task/process is spawned to handle it. If there are 1000 requests, then 1000 tasks/processes are spawned; nothing is queued.

This works well with Kubernetes and its HPA (horizontal pod autoscaling) feature which is (can be) triggered off of CPU usage.

1 Like

:joy: GitHub - filipmnowak/ex_tic_tac_toe: Elixir, MapSet-based, variable board size, Tic-tac-toe implementation (WIP)

1 Like

Actually learning Phoenix by making an RSS feed

3 Likes

Starting to extract the notification and reminder system from my Reservations Calendar (https://reservationscalendar.com) to be its own external service.

1 Like

Mostly feature development for Paraxial.io, published a few blog posts about Elixir/Phoenix security, going deeper on LiveView.

1 Like

Bumping this thread that I always enjoy reading.

I make optics and build telescopes for a hobby, and surprisingly found myself building my next telescope with Elixir ! This one is special as it will be used as a daytime camera, so it won’t see a star and will work with finite object distances (stars are considered to be at optical infinity).

First, I dug a bit of optical theory and papers (since I don’t have a math background) and wrote small utilities to calculate the best mirror shape for this terrestrial scope. Then, 2D raytracing (in the optical sense, not in the graphics sense) calculations for a parabolic mirror, then a depth of field simulation that allowed me to play a bit more with Rustler.
The project evolved to simulate the future scope with a three.js scene representing the telescope, controlled by a web UI with websockets and a genserver holding and transitioning telescope state.
Now, I’m digging into doing serial from Elixir to communicate with the arduino that will be responsible of moving the physical telescope and live-displaying a picture.

All of this will run on a MangoPi, a small single-core 1GHz RISC-V board. What really excites me is how the current phoenix “telescope simulator” runs on it. Despite the weak single core, I can run a heavy picture generation task in the background taking ~15s while the websocket communicaton stays snappy. Both the background task and the foreground tasks are a bit slowed down, but everything stays responsive on this €25 board.

When I’m done, I’ll do a full write-up on that. Currently preparing a blog post for each step, but it’ll be better to share the whole thing.

So, as of jan 2023, I still think my 2018 decision to go all-in on Elixir was a good one, despite being able to identify what I’d like to be different, or what I’m missing from other languages.

9 Likes

That sounds really cool! Would you mind elaborating more on how you managed to integrate your 3D CAD design with the LiveView simulator and three.js? I’m about to embark on a similar task to use elixir/nerves to control hardware via an Arduino, and I’m looking into ways of showing the current hardware position on the user interface. My friend is supplying the CAD files, so I don’t have much experience with the modeling.

Thanks!

1 Like

Hi ! I’m not using LiveView here.

Basically, I have a GenServer representing telescope state : current altitude position, current azimuth position. When I click on the UI button to move left in azimuth, a “turn left” event is sent to this GenServer, which enters a loop simulating movement at 0.1deg each 16ms. Each state update is broadcast on the websocket. When I release the button, a “stop moving” event is sent, breaking the loop. This mimics how the physical buttons will be used.

On the UI side, I “just” listen to websocket events and update the rotation of the two scope parts (base moving in azimuth, arm moving in altitude). It’s really rough at the moment and looks like this, but the POC works :

On the physical telescope, I’ll have position encoders (and endstops : I need endstops to avoid a code mistake breaking something) filling this role of updating state, so Elixir will be able to know the absolute position of the telescope.

5 Likes