Maartz

Maartz

Build It With Nitrogen Book Club

The very first time I’ve seen a line of Elixir I was in awe. Coming from Ruby the syntax was familiar.
But I wanted to know what was this “Erlang” beast, scaring so many people.
Erlang’s syntax was in fact not so “atrocious” and even quite nice.
And after watching this talk from Todd Resudek, I was convinced that to better appreciate the BEAM ecosystem, you need to grasp Erlang.

And so I’ve bought this book, it’s pretty thick but, I’m very eager to read how they dealt with all HTML, forms, string, etc. that the web represents.

I’ll use this book club to tell you how’s the journey and what are my thoughts about it.

Most Liked

OvermindDL1

OvermindDL1

The Nitrogen library is so fun. ^.^

Maartz

Maartz

Chapter 1 - Frying Pan to Fire

I really like the way the book is written. It’s like a story. It’s very different from all the other books of the same category.

Installing Nitrogen is not like installing rails nor phoenix, you need to clone the nitrogen repo under nitrogen/nitrogen.

After that, by cd into the nitrogen folder, it will generate a fresh new app with make.

make rel_inets PROJECT=devtalk

By inspecting the Makefile I can see that you’re not forced to use one specific web server like Erlang’s basic one.
You can choose between – all with different versions like slim:

  • Cowboy
  • Inets
  • Mochiweb
  • Webmachine
  • Yaws

To be honest I only knew the existence of Cowboy and Inets. Probably gonna check the others.

By cd into devtalk and running bin/nitrogen console the server starts running on 8080.

The code which interests me is under the site folder.

By crack opening the templates/bare.html as suggested by the book, I can see this:

It seems to be the Nitrogen’s “secret sauce”. Like sharding for MongoDB web-scale…

I really like the little notes like this one:

Most of the Erlang community prefers Emacs,
but the authors are oddballs and prefer Vim.

I agree a 100 percent :laughing:

It’s important to note that since Nitrogen 3, it uses Rebar3.
Also that ViM and Emacs got an extension to handle a special indentation for Nitrogen.

It goes from this:

Elements = #panel { body=[
                         #span { text="Hello, World"}
                         ]},

to this:

Elements = #panel {body=[
    #span{text="Hello, World!"}
]},

Which is in fact probably quite helpful in a big file.
The syntax reminds me of Elm, and its special way to define HTML in this style.

This first chapter is a little ice breaker, nothing too technical, but it lays the foundation of the book. I kinda like it.

AstonJ

AstonJ

Ooo exciting stuff @Maartz!! I’m looking forward to following your journey with this book and Nitrogen!

I’ll be interested in hearing your thoughts how things differ from Elixir/Phoenix-land as well if you post any :nerd_face:

Popular Community topics Top

Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
finner
As one of my New Year resolutions is to read more tech I’ve decided on an attempt to document my travels in Mannings Modern Java in Actio...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
mafinar
I am going to dump my thoughts, methods, codes, experiences and rants while learning OCaml into this thread. This is probably the 5th or...
New
RobertKielty
My overall initial first impressions of this book are very good. I will document my local spacemacs setup to as I work through the book.
New
Maartz
The very first time I’ve seen a line of Elixir I was in awe. Coming from Ruby the syntax was familiar. But I wanted to know what was thi...
New
TwistingTwists
I have read first chapter. Will add my notes / code tries / self exploration as I go along! Thank you @AstonJ for encouraging to start ...
New
adamaiken89
Anyone is interested in a classical textbook for algorithms can go and check that.
New
AstonJ
With AI set to play a big role in our industry Elixir users are lucky to have Nx, so we’re running our Nx related book club on Genetic Al...
New
AstonJ
With Phoenix and LiveView having recently had a fairly major release, and Programming Phoenix LiveView being updated too, we thought it w...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
AstonJ
Or looking forward to? :nerd_face:
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
Margaret
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
1134 25456 753
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New