Erlang in 100 Seconds

Fireship · Beginner ·🛠️ AI Tools & Apps ·2y ago

Key Takeaways

This video teaches the basics of Erlang, a functional programming language with a message-based concurrency model

Full Transcript

erlang a functional fault tolerant programming language and runtime famous for scaling up the entire telecommunications industry with its bare hands it was developed in 1986 at Swedish company Ericson where massive concurrent systems were needed to handle millions of phone calls in parallel early implementations were written in prologue but that was too slow and that led to the development of beam a virtual machine that compiles earling to bite code which is then executed in a threaded environment where millions of processes can run concurrently with very low overhead but when your code breaks a process the earling philosophy is to let it fail so the entire system doesn't come crashing down that process isolation is what makes it fall tolerant in addition this facilitates hot code swapping at runtime to perform software updates with zero downtime in the late 9s the llang ecosystem was open source as the open Telecom platform and the beam BM is still in use today by modern languages like elixir and gleam and beam has help messaging tools like rabit mq Discord and WhatsApp handle billions of messages every day and that's all thanks to a programming model based on message passing that works just like your mailbox to understand erl Lang's legendary concurrency model though we need to look at some code get started by installing it then create a file ending in Earl first declare a module then write a function that contains one or more Expressions separated by commas just like a sentence the function ends when you hit a period Then export the function from the module and notice this sl0 here that indicates the function takes zero arguments now open the terminal and run Earl C to compile this code in into a Beam file and now we can use Earl to open the llang shell and execute this code pretty cool but now let's run the same function a thousand times concurrently in this function we'll use spawn one of LL Lang's concurrency Primitives that executes each function independently on its own process and returns a process ID for each one of them the double bars here will map those IDs to a new list now when we execute this code we get a lot more hello worlds and an array of their process IDs where this concurrency model really shines though is with message passing in this example the start function spawns a new process then passes it to the sender function from there we can use a bang which is called the send operator to send a message to itself with self or some other process ID we can then handle that message in another function that implements a receive block which allows a process to suspend execution until a message is received in its mailbox it uses pattern matching to look for the process ID and message then executes code when the message is received conceptually receive is kind of like a weight in C or JavaScript however it blocks the entire process until a message is received therefore we might want to add an optional after Clause to run some code after a timeout this has been earling in 100 seconds let me know what you want to see next in the comments thanks for watching and I will see you in the next one

Original Description

Erlang is a functional programming language know for message-based concurrency model. Its BEAM virtual machine is still used by modern languages like Elixir and Gleam. Learn the basics of Erlang in this quick tutorial. #programming #computerscience #100secondsofcode 💬 Chat with Me on Discord https://discord.gg/fireship 🔗 Resources Erlang https://www.erlang.org Elixir in 100 Seconds https://youtu.be/R7t7zca8SyM C in 100 seconds https://youtu.be/U3aXWizDbQ4 🔥 Get More Content - Upgrade to PRO Upgrade at https://fireship.io/pro Use code YT25 for 25% off PRO access 🎨 My Editor Settings - Atom One Dark - vscode-icons - Fira Code Font 🔖 Topics Covered - What is Erlang? - Who created Erlang/OTP? - Basics of Erlang - Elixir vs Erlang - Gleam vs Erlang - What is the BEAM vm? - How to get started with Erlang
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Fireship · Fireship · 0 of 60

← Previous Next →
1 Angular 4 Development and Production Environments with Firebase
Angular 4 Development and Production Environments with Firebase
Fireship
2 OAuth with Angular and Firebase Tutorial
OAuth with Angular and Firebase Tutorial
Fireship
3 Anonymous Authentication with Angular and Firebase - Lazy Registration
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
4 Angular Router Guards for Firebase Users
Angular Router Guards for Firebase Users
Fireship
5 Angular Firebase CRUD App with NoSQL Database Tutorial
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
6 Upload Files from Angular to Firebase Storage
Upload Files from Angular to Firebase Storage
Fireship
7 How to Deploy an Angular App to Firebase Hosting
How to Deploy an Angular App to Firebase Hosting
Fireship
8 Sharing Data between Components in Angular
Sharing Data between Components in Angular
Fireship
9 Loading Spinners for Asynchronous Firebase Data
Loading Spinners for Asynchronous Firebase Data
Fireship
10 Angular 4 Transactional Email with Google Firebase Cloud Functions
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
11 Firebase Database Rules Tutorial
Firebase Database Rules Tutorial
Fireship
12 Autocomplete Search with Angular4 and Firebase
Autocomplete Search with Angular4 and Firebase
Fireship
13 Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
14 Angular Drag-and-Drop File Uploads to Firebase Storage
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
15 Text Translation with Firebase Cloud Functions onWrite and Angular 4
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
16 Custom Usernames with Firebase Authentication
Custom Usernames with Firebase Authentication
Fireship
17 Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
18 Simple Pagination with Firebase and Angular 4
Simple Pagination with Firebase and Angular 4
Fireship
19 How to Connect Firebase Users to their Data - 3 Methods
How to Connect Firebase Users to their Data - 3 Methods
Fireship
20 Add Toast Message Notifications to your Angular App
Add Toast Message Notifications to your Angular App
Fireship
21 Facebook-Inspired Reactions System with Angular and Firebase
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
22 Learn NgModule in Angular with Examples
Learn NgModule in Angular with Examples
Fireship
23 Lazy Loading Components in Angular 4
Lazy Loading Components in Angular 4
Fireship
24 Stripe Checkout Payments with Angular and Firebase - Part 1
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
25 Process Stripe Payments with Firebase Cloud Functions - Part 2
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
26 Selling Digital Content in Angular with Stripe Payments - Part 3
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
27 Angular 4 Full Text Search with Algolia - Part 1
Angular 4 Full Text Search with Algolia - Part 1
Fireship
28 Algolia with Firebase Cloud Functions - Part 2
Algolia with Firebase Cloud Functions - Part 2
Fireship
29 Firebase Phone Authentication in Angular 4
Firebase Phone Authentication in Angular 4
Fireship
30 Top 7 RxJS Concepts for Angular Developers
Top 7 RxJS Concepts for Angular Developers
Fireship
31 Learn Angular Animations with 5 Examples
Learn Angular Animations with 5 Examples
Fireship
32 Advanced Firebase Data Filtering (Multi-Property)
Advanced Firebase Data Filtering (Multi-Property)
Fireship
33 Realtime Maps with Mapbox + Firebase + Angular
Realtime Maps with Mapbox + Firebase + Angular
Fireship
34 Angular Reactive Forms with Firebase Database Backend
Angular Reactive Forms with Firebase Database Backend
Fireship
35 Send Push Notifications in Angular with Firebase Cloud Messaging
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
36 Top 7 Ways to Debug Angular 4 Apps
Top 7 Ways to Debug Angular 4 Apps
Fireship
37 Infinite Scroll with Angular and Firebase
Infinite Scroll with Angular and Firebase
Fireship
38 Use TypeScript with Firebase Cloud Functions
Use TypeScript with Firebase Cloud Functions
Fireship
39 Realtime Graphs and Charts with Plotly and Firebase
Realtime Graphs and Charts with Plotly and Firebase
Fireship
40 Role-Based User Permissions in Firebase
Role-Based User Permissions in Firebase
Fireship
41 User Presence System in Realtime - Online, Offline, Away
User Presence System in Realtime - Online, Offline, Away
Fireship
42 Location-based Queries with GeoFire and Angular Google Maps
Location-based Queries with GeoFire and Angular Google Maps
Fireship
43 Angular ngrx Redux Quick Start Tutorial
Angular ngrx Redux Quick Start Tutorial
Fireship
44 Angular Ngrx Effects with Firebase Database
Angular Ngrx Effects with Firebase Database
Fireship
45 Progressive Web Apps with Angular
Progressive Web Apps with Angular
Fireship
46 Angular Ngrx with Firebase Google OAuth User Authentication
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
47 RxJS Quick Start with Practical Examples
RxJS Quick Start with Practical Examples
Fireship
48 Send SMS Text Messages with Twilio and Firebase
Send SMS Text Messages with Twilio and Firebase
Fireship
49 Firebase Database Performance Profiling
Firebase Database Performance Profiling
Fireship
50 Native Desktop Apps with Angular and Electron
Native Desktop Apps with Angular and Electron
Fireship
51 Subscription Payments with Stripe, Angular, and Firebase
Subscription Payments with Stripe, Angular, and Firebase
Fireship
52 Firestore with AngularFire5 Quick Start Tutorial
Firestore with AngularFire5 Quick Start Tutorial
Fireship
53 Angular HTTP Client Quick Start Tutorial
Angular HTTP Client Quick Start Tutorial
Fireship
54 Google Sign-In with Firestore Custom User Data
Google Sign-In with Firestore Custom User Data
Fireship
55 Star Review System from Scratch with Firestore + Angular
Star Review System from Scratch with Firestore + Angular
Fireship
56 Angular Chatbot with Dialogflow (API.ai)
Angular Chatbot with Dialogflow (API.ai)
Fireship
57 Learn @ngrx/entity and Feature Modules
Learn @ngrx/entity and Feature Modules
Fireship
58 Infinite Scroll Pagination with Firestore
Infinite Scroll Pagination with Firestore
Fireship
59 Faster Firestore via Data Aggregation
Faster Firestore via Data Aggregation
Fireship
60 Contentful - CMS for Angular Progressive Web Apps
Contentful - CMS for Angular Progressive Web Apps
Fireship

Related Reads

📰
I Did the Math on Claude Opus 5: Max Effort Cost 94% More Than High Effort
Understand how effort levels impact costs in Claude Opus 5, a crucial factor for budgeting and resource allocation
Dev.to · tokenmixai
📰
I Banned AI Tools From My Creative Process for 30 Days. Here’s What Happened to My Brain
A creator banned AI tools from their process for 30 days and observed significant changes in their thinking and creativity, highlighting the impact of AI on human cognition
Medium · AI
📰
Best AI Tools for Content Creators With Zero Budget
Discover the best free AI tools for content creators with no budget, and learn how to leverage them for high-quality content
Medium · AI
📰
Stop Building AI Chatbots. Build These 7 AI Products Instead.
Diversify your AI portfolio by building products that solve real-world problems beyond chatbots, attracting clients and generating revenue
Medium · Machine Learning
Up next
3 Game-Changing Claude Design Hacks
MailerLite
Watch →