I’m following the LiveView course on Pragmatic Studio, listening to elixir-related podcasts and creating an online version of a card game I created to teach Scrum using LiveView 
Finally making my phoenix based pet project publicly available 
Originally I was not sure if I would make it open source or keep it to myself. In the end I choose another option, make a tiny business out of it.
Creating a racing fan site. New to elixir/phoenix but I like it better than django so far. Sure django made things very easy, but I didn’t like the serializations for json and how the rest framework is structured.
I really wish there was something like django-allauth for phoenix, I have spent few days just setting up basic/social auth with pow/assent and learned some things.
Reading Erlang and OTP in action.
Getting my first tiny PR merged into phoenix_ecto 
Staying ahead on ElixirForum because I’ve been too busy to actually write Elixir day-to-day lately.
Not today, but actually working in StylistEx package (https://github.com/aleDsz/stylistex) which is a CSS parser to make Surface a SSR library with styled components and compile-time CSS validation
We are now a team of 10 developers 4 of which (including myself) are elixir developers. 2 were trained from PHP developers into elixir. @blisscs is one of the team members.
We’re now buidling a core banking engine which is being used for money transfer business. It has a ledger, programmatic contract system and all the cool stuff to handle exchange rates like a champ.
I believe this is the first programmable financial system I’ve seen.
I’m still new to Elixir, so still learning a bit of the more basic stuff. I use Ruby for my job. So, functional programming is quite a bit different. The syntax with Elixir is pretty nice though!
I just wrote a bash script to ease my Elixir umbrella projects release assemblages.
It works by creating customized bash scripts per projects. This way whenever a project has a new version to be assembled I just re-run its specific script.
The main script asks for informations that can vary from a project to another such as the project local path, its Phoenix apps names, database url, smtp server infos and other secret data… The project .gitignore file will then be updated so that the files that will be generated won’t be tracked.
For now that’s all. The generated scripts fetch dependencies and compile an umbrella project for production, install and compile all phoenix apps assets, then build a new release.
Later I will automate the processes of sending the releases to their target machine and running them.
I’ve just deployed a very simple Chat App with a Phoenix back end on Heroku. It ended up being more trouble that I had anticipated, because the configuration given in the official docs doesn’t really work for Firefox. But in the end I found an article that solved it. Now I’m just going to keep improving the app.
Would you mind sharing it?
I too have a similar bash script that help me bootstrap a Phoenix project with adapting the defaults configs…
But I find working with bash not so easy compared to Elixir or even some other languages, particularly for file manipulation (sed, awk, grep, etc…). I would like to use Elixir but I’m working with Elixir in containers and the script is meant to run on the host. The lack of a standalone executable binary is really too bad here… Go for this kind of task might be well-suited…
Curious, can you forward that article? I had some trouble with lv in firefox and it would be nice to know if theres an easy fix
Yes you are totally right. As I was writing the script I realized it got complex and bushy very quickly. I think I will have to rewrite lately with some more appropriate scripting langage.
Sure, I just created a public git repository…
It is nothing very extraordinary and it may seem quite closely related to my own needs.
So let’s say I have a new project my_umbrella with 2 Phoenix apps: admin, front.
First I execute this bash script.
me@pc:~/Forge$ ./umbrella_releaser /path/to/my_umbrella/
This will generates .forge folder inside the project and add a directive into the project .gitignore file to not track it.
Here is the tree of that folder:
├── build
│ ├── compiler
│ ├── phx
│ │ ├── admin
│ │ └── front
│ ├── releaser
│ └── supervisor
└── env
└── release.env
When I want to build a new release I run .forge/build/supervisor:
- that will source the
env/release.env(export all necessary production secrets) - run the
build/compilerscript (update/install the whole project dependencies) - run each
build/phx/app_name(install and compile Phoenix assets) - run finally
build/releaserto build the actual release.
There are some requirements for that scripts to work but we can easily removes some lines to bypass that. This is essentially the lines I run audacious music player as background process. That is why there is a bgm folder in the repository root. Audacious will search for music in that folder and start playing them during the whole process. When the music stops I know that the script has done its job. ^^ For the Audacious to play the music we need also to add some music files into the bgm folder of course.
See lines: https://github.com/Kurisu3/Forge/blob/48bda00ce3826df8d833da8279d74899002b85b6/umbrella_releaser#L21
I certainly can! It’s this https://medium.com/@benhansen/lets-build-a-slack-clone-with-elixir-phoenix-and-react-part-7-deploy-to-heroku-6b3d1ce9bfd5
The part that helped me fix the issue is the configuration for the prod.ex toward the top.
Redoing a blackjack simulator I wrote in Ruby in 2015 (conclusion: don’t play blackjack unless you can count cards without getting beaten up by the casino) using Elixir.
Just getting started … got some card deck code from
And have ‘player’ and ‘hand’ and ‘card’ and ‘handvalue’ code kind of working … but wondering about the best way to handle persistent data: the deck(s) getting smaller as cards are dealt out.
So far I’ve seen:
- Tuples aren’t really immutable
- OTP and GenServer
- Ecto
Any suggestions for the best approach?
Thanks much!
Tuples are immutable, I would use GenServer with list. Using DB would be enormous overkill.
I suggest reading through @sasajuric’s to spawn or not to spawn it uses a blackjack game as the running example, showing how to model the game functionally and introduce processes to host a multiplayer server.
I actually figured it out; I’m using an Agent to handle the state of the “discard pile”. This was just a few extra lines of code and seems to be working fine.
I am just curious, what is the reasoning behind the idea that “tuples aren’t really immutable”?






















