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