I could use some help
I started using Phoenix again to build web applications with Elixir.
I had used it a few years ago but it seems some stuff has changed in the meantime. I remember a lot how you build things in Rails but now I'm struggling a bit to get up to speed again.
Are there any good books and tutorials that walk through building complete web applications?
Big weekend for the stovetop! 10 gallons of apricots put up, including a gallon of jam and 2 gallons of secret elixir, a pot of Whipple Beans, courtesy @ranchogordo, and a fresh batch of homemade enchilada sauce from the dried chilis. Can't live without my enchilada sauce, so cannot explain the first 30 years of my life to the contrary!
#reformed #thewholeenchilada #saucy #elixir
#Elixir #saucy #thewholeenchilada #reformed
Every Elixir (and Erlang) module has the function module_info. E.g. Atom.module_info
Useful for listing exported functions in a module.
My take on dynamically typed languages
Deploying #Elixir Applications with #Docker
https://scalio.blog/posts/deploying-elixir-applications/
If you see anything that can be improved, let me know! This is the first technical piece I've written
Everytime I write in #elixir, I miss static typing. Dialyzer is pretty great, but it seems to struggle with optional fields in structs and maps within pattern matching. Maybe I'm just not experienced enough to know the solution, but it's also not possible to have this issue in #rust
Besides that, the rest of the language is phenomenal (so far)
I just completed "Proboscidea Volcanium" - Day 16 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/16
Yay! Finally finished this one. Found good bounding for part 1, but used a lot of brute force for part 2. I should have distributed part 2 across multiple #Elixir processes though. I might modify it to do that just for the practice.
I just completed "Beacon Exclusion Zone" - Day 15 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/15
Between life interfering and the time it took me to figure out an efficient way to do part 2, it took me quite a while to finish this one. I guess now I'll shoot for finishing them all by the end of the year. #Elixir
I just completed "Distress Signal" - Day 13 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/13
Made it past the halfway point! #Elixir
I just completed "Hill Climbing Algorithm" - Day 12 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/12
A straightforward search problem. Solving these puzzles in #Elixir has really confirmed my love for functional programming.
I just completed "Cathode-Ray Tube" - Day 10 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/10
Maps and reduces for the win. #Elixir
I just completed "Rope Bridge" - Day 9 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/9
Challenging but fun. My solution could definitely be refactored. A suggestion for part 2, start by generalizing your part 1 code as smaller instance of part 2. #Elixir
I just completed "Treetop Tree House" - Day 8 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/8
#Elixir doesn't appear to have 2d arrays, so I put the input into a map. There's probably a better way to do it, but I got the correct answer.
I just completed "No Space Left On Device" - Day 7 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/7
I took some extra time to figure out how to parse the lines with NimbleParsec. #Elixir
I just completed "Tuning Trouble" - Day 6 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/6
Some faulty logic tripped me up for a bit, but didn't take as long as yesterday's. #Elixir
I've completed "Supply Stacks" - Day 5 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/5
It's pretty amazing what you can do with maps and folds. #Elixir
I just completed "Rucksack Reorganization" - Day 3 - Advent of Code 2022 #AdventOfCode https://adventofcode.com/2022/day/3
I've been enjoying doing these in #Elixir. Here's the top level code I used to solve the second part:
File.read!(input_file)
|> String.trim()
|> String.split(~r/\n/)
|> Stream.chunk_every(3)
|> Enum.map(&group_value/1)
|> Enum.sum()