This is Better than C for Binary Files

  Рет қаралды 34,944

Tsoding Daily

Tsoding Daily

Күн бұрын

References:
- Erlang - www.erlang.org/
- Elixir - elixir-lang.org/
- Wikipedia - Arity - en.wikipedia.org/wiki/Arity
- The BEAM Book - blog.stenmans.org/theBeamBook/
Support:
- BTC: bc1qj820dmeazpeq5pjn89mlh9lhws7ghs9v34x9v9
- Servers: zap-hosting.com/en/shop/donat...
Chapters:
- 0:00:00 - Announcement
- 0:01:10 - Intro
- 0:05:23 - New Project
- 0:05:54 - Entry Point
- 0:06:47 - Functions
- 0:07:58 - Prolog Syntax
- 0:08:49 - Printing
- 0:09:40 - Shell
- 0:10:05 - Module Definition and Exports
- 0:10:51 - Function Signatures
- 0:12:45 - Compilation
- 0:13:31 - Erlang is Old
- 0:14:25 - BEAM file
- 0:15:36 - First Look at BEAM
- 0:16:43 - Hex Literals
- 0:18:54 - Size of BEAM file
- 0:20:17 - Chunks
- 0:21:11 - Q: What if it's not size?
- 0:21:23 - The BEAM Book
- 0:23:01 - Modules and The BEAM File Format(16p)
- 0:24:16 - Bit Syntax
- 0:33:46 - Chunks Format
- 0:35:51 - Limited Memory
- 0:38:06 - Reading File
- 0:38:17 - Tuples
- 0:38:49 - Variables and Atoms
- 0:40:01 - Error Handling
- 0:42:57 - read/1
- 0:44:36 - Error Messages
- 0:46:10 - Planning
- 0:46:51 - Erlang is Better than C
- 0:47:40 - Factoring out hello module
- 0:48:55 - erlang-compile
- 0:51:08 - beam:read_chunks/1
- 0:53:52 - binary to string
- 0:55:24 - Accumulating Names of Chunks
- 0:58:10 - Q: Is this Polymorphism?
- 0:58:41 - All Chunks are Align by 4 bytes
- 1:00:15 - Alignment Formula
- 1:05:45 - Education System Sucks
- 1:07:01 - Intuitive Understanding of Division
- 1:09:13 - No Shame in Elementary Things
- 1:12:03 - Installing Dark Reader
- 1:13:14 - Skipping Chunks by Size
- 1:17:03 - Length of the List
- 1:18:25 - Extracting Chunk Content
- 1:19:01 - Regretting Installing Dark Reader
- 1:19:35 - Atom Table Format
- 1:22:09 - Export Table Format
- 1:22:33 - Import Table Format
- 1:23:15 - Code Chunk Format
- 1:27:42 - Getting the Code Chunk
- 1:28:23 - Immutability
- 1:32:06 - Filtering Lists
- 1:33:28 - Uninstalling Dark Reader
- 1:34:01 - Anonymous Functions
- 1:35:37 - Getting the Binary of Code
- 1:37:02 - Parsing Code Chungus
- 1:40:18 - Associative Array
- 1:42:03 - Implicit Module Functions
- 1:44:27 - How do I learn things
- 1:46:10 - SubSize
- 1:50:35 - Better Chunk Parser
- 1:59:14 - Skipping the Info
- 2:02:17 - Getting the OpCodes
- 2:04:36 - Parsing OpCodes
- 2:05:35 - Future Plans
- 2:06:05 - Summary
- 2:06:36 - Outro

Пікірлер: 85
@michaelflynn6952
@michaelflynn6952 5 ай бұрын
"forgive my track suit... I'm just Russian" starting off strong
@chudchadanstud
@chudchadanstud 5 ай бұрын
"it's -28°C, it's getting warmer"
@sortof3337
@sortof3337 5 ай бұрын
Never thought I'd see it, thank the coding gods for this. Very enjoyable stream. :D Erlang is how I make bread as a telecom engineer. Also, I am finally doing more c because of you. Hoping to see more of erlang stuff on stream because its an awesome language. :D
@sortof3337
@sortof3337 5 ай бұрын
Btw, you can write stuff for beam in c. we do it in cursed cpp at work. but you can do it in c as well. that would be very interesting to c.
@MyShakeweight
@MyShakeweight 5 ай бұрын
That sounds cool! is there a lot of work in telecom?
@L0wPressure
@L0wPressure 5 ай бұрын
I thought you guys should have switched to elixir by now, but i guess it's a pretty conservative industtry. Similar to banks some of which still use older versions of Java even though Kotlin exists.
@CuriousCyclist
@CuriousCyclist 5 ай бұрын
-40 degrees C. That's crazy. 😅 No wonder that region produces great programmers. Nothing to do outside in the winter. 😂
@sfulibarri
@sfulibarri 5 ай бұрын
omg super excited to watch this one. I did my capstone project at uni in erlang even though the program was generally built around java/c#/js so it was a bit of an adventure to learn but I had so much fun. The pattern matching is so powerful and feels so good to work with, I've yet to find another language that compares. I'm always excited to see matching get implemented in other languages but it never quite as good as erlang.
@efkastner
@efkastner 5 ай бұрын
This was awesome! I didn’t want it to end and can’t wait for the follow up. I need to play with Erlang/Elixir!
@matthias916
@matthias916 5 ай бұрын
just wanted to say, i really appreciate the dark mode. i tend to watch your videos at night and constantly getting flashed isnt particularly pleasant
@matthias916
@matthias916 5 ай бұрын
ok nvm :p
@jasonrothfuss1631
@jasonrothfuss1631 5 ай бұрын
I've been wanting to do something like this since I bought Joe Armstrong's Programming Erlang book 15 years ago. Thank you for this video!!!
@MrPetzold123
@MrPetzold123 5 ай бұрын
Wow, Erlang is super capable for pattern matching binary formats ! Very interesting video 🤟
@AlfredBaudischCreations
@AlfredBaudischCreations 5 ай бұрын
And you only touched the surface of the language itself! You should really try the built-in OTP framework (i.e. Erlang Actor Model with processes, supervisors and the like), the possibilities are endless (it's also built-in with Elixir with even more capabilities). So cool to see you doing Erlang! (Erlang and Elixir are my bread winner since 2015, in agrotech).
@ziggy6698
@ziggy6698 5 ай бұрын
I'm a web dev, what React plugin is this?
@RealCatDev
@RealCatDev 5 ай бұрын
It is python obviously
@ziggy6698
@ziggy6698 5 ай бұрын
@@RealCatDev sounds fancy but can it make modals?
@RealCatDev
@RealCatDev 5 ай бұрын
@@ziggy6698 of course, but you have to download additional 10 libraries that don't do anything usefull
@cheema8649
@cheema8649 5 ай бұрын
Is the framework of the framework used to make the phoenix framework
@wernersmidt3298
@wernersmidt3298 5 ай бұрын
The tracksuit bit 😂😂 46:30
@norskeld
@norskeld 5 ай бұрын
That's some pretty kinky stuff @ 39:25. As always, great content.
@Tabongadoo
@Tabongadoo 5 ай бұрын
Oh my goodness I've been waiting for this day for ages. Such a good base platform, can't wait to watch.
@LuisCarlosBolanhosVillalobos
@LuisCarlosBolanhosVillalobos 3 ай бұрын
Great content, you deserve billions of followers, likes and support. Awesome video and work.
@sugrado
@sugrado 5 ай бұрын
I'm actually amazed at what Erlang can do
@ecosta
@ecosta 5 ай бұрын
Surprisingly, this works in that niche gaming operating system called Windows. Easier language to install by far. EDIT: also, big thanks for showing a Prolog-like language. Amazing stream!
@9nr
@9nr 5 ай бұрын
For Russian living in Novosibirsk, your English is incredible, @tsoding. I'm a Russian who lived for few years in Novosibirsk, and moved to US 25 years ago - my English is way worse than yours!
@user-ri4ib3qb3t
@user-ri4ib3qb3t 5 ай бұрын
I'm from Novosibirsk too) Love your videos by the way)
@anon_y_mousse
@anon_y_mousse 5 ай бұрын
I've had Erlang on my TODO list for a long time and still haven't done anything with it. You've at least gotten me to download and install it, as well as to write a "hello world". I like the ease with which it can read from a binary file and I think I may add some of this into my own language. Though, I'll have to use a different syntax, because this is weird to my eyes.
@jasonrothfuss1631
@jasonrothfuss1631 5 ай бұрын
Btw, would love to see you do a Prolog video 😁
@RealCatDev
@RealCatDev 5 ай бұрын
Was waitin for it
@cobbcoding
@cobbcoding 5 ай бұрын
8:43 the prologue iterator looks quite interesting :-
@Catterjeeo
@Catterjeeo 5 ай бұрын
Pingu
@FunkschyIsWatchingYou
@FunkschyIsWatchingYou 5 ай бұрын
I can't resist this
@LSHV
@LSHV 5 ай бұрын
nice, finally an erlang vid
@StaRiToRe
@StaRiToRe 5 ай бұрын
erlang bin matching is really elegant!
@yiannig7347
@yiannig7347 5 ай бұрын
Sick! Good exploration session!!
@NoOne-ev3jn
@NoOne-ev3jn 5 ай бұрын
If only all the programming languages documentations were written this way
@safertao
@safertao 5 ай бұрын
zozin, how about to write your own dark reader browser extension?? i think this will be pretty damn interesting)
@RandomGeometryDashStuff
@RandomGeometryDashStuff 5 ай бұрын
01:08:38 notice how when you divide by result of division you get same rectangle of As but rotated
@GegoXaren
@GegoXaren 5 ай бұрын
Erling, the Swedish programming language. 🇸🇪
@remondrk
@remondrk 5 ай бұрын
Unimportant detail
@GegoXaren
@GegoXaren 5 ай бұрын
@@remondrk That is what you mother said... Now you are here, and we all suffer for it.
@remondrk
@remondrk 5 ай бұрын
@@GegoXaren lol okay angry Swedish guy
@GegoXaren
@GegoXaren 5 ай бұрын
@@remondrk Not even a retort? Your ancestors most be ashamed of you. Forshame, forshame.
@nevokrien95
@nevokrien95 5 ай бұрын
I LOVE elixir. My job is python, I would learn c for cuda. But elixir is ❤❤❤. Love building websites with it. Love learning about it.
@replikvltyoutube3727
@replikvltyoutube3727 5 ай бұрын
Make porth (or any language starting with 'p') compiler to BEAM and call it perlang
@abanoubha
@abanoubha 5 ай бұрын
how Tsoding magnify the screen like that ?
@drJnmrH
@drJnmrH 4 ай бұрын
How about organize offline meeting with fellow recreational programmers in one of the bars in Nsk? I will come for sure.
@L0wPressure
@L0wPressure 5 ай бұрын
Patttern matching - i do understand it's a functional languages concept, but now i see where rust took it from.
@bebre_2288
@bebre_2288 5 ай бұрын
I was on the stream, but that title made me wath it again, great clickbait as always Mr. Streamer
@berndeckenfels
@berndeckenfels 2 ай бұрын
Unit 8 means 8bit aka byte 33:20
@apenaswellignton
@apenaswellignton 5 ай бұрын
pog
@user-qt4gz1dl6w
@user-qt4gz1dl6w 5 ай бұрын
What about Elixir?
@elldorado423
@elldorado423 5 ай бұрын
video idea: flash emulator that actually runs on web like Ruffle does. It is not hard to parse SWF and the hardest part are only the action script VM, but you don't need it to play some flash animations on browser
@Person1873
@Person1873 5 ай бұрын
Lol, Alexey is a low level god. Flash? Browser? Pah, don't make me laugh. /s
@elldorado423
@elldorado423 5 ай бұрын
@Person1873 lol, C is not low level and Alexey is just a regular programmer, living in a world of idiots
@huistelefoon5375
@huistelefoon5375 4 ай бұрын
​@@elldorado423Well the thing that makes C unique is how nicely it maps to x86 assembly and how it interacts with the OS (at least that's more specific to unix-like systems). You could argue C is not a low-level language in a literal sense, since it's not a machine language--but it's relation to machine language and the OS is closer than just about anything else.
@phase_commander
@phase_commander 5 ай бұрын
I should really get back to Erlang, this language is bonkers in a good way.
@SlinkyD
@SlinkyD 5 ай бұрын
EFEM - engineer friendly error messages
@A1KANO
@A1KANO 5 ай бұрын
You're effective.
@noctavel
@noctavel 5 ай бұрын
Why are you trying to understand BEAM? 🤬🤬
@noctavel
@noctavel 5 ай бұрын
WTF???? are you trying to understand division now ?? 🤬🤬
@foifirst
@foifirst 5 ай бұрын
Oh adidas session
@berndeckenfels
@berndeckenfels 2 ай бұрын
660 seems not small if the source is smaller ..
@Nate77HK
@Nate77HK 5 ай бұрын
"ur mom is a valid erlang expression" I'll never recover from this
@RealYukiSan
@RealYukiSan 5 ай бұрын
13:51 TIL !w 😂
@ratherbyexploring4898
@ratherbyexploring4898 5 ай бұрын
Bro nobody is going to be binding my mom to any variable
@fullstack_journey
@fullstack_journey 5 ай бұрын
crazy russian hacker
@dieSpinnt
@dieSpinnt 3 ай бұрын
While your explanation and educational approach to division is great ( 1:09:16 ), your worldview about the (not a specific one, but "many" ... hmm" education systems is itself a little childish and unfairly simplistic. Like (beware of stereotypes, incoming! Hehehe) what you expect from a programmer/computers people?:P Some of your fellow humans (and not a few!) are demonstrably not "good" at math. BESIDES the education system (that manages at least to teach basic and needed knowledge about day to day math), some people simply don't have the interest, understanding, desire or talent[1] to deal with mathematics intuitively. And there is nothing wrong with that. They may have other skills that you can only dream of or are absolute geniuses in a field that you will never perfect to mastery. No matter how hard you try! I find it absolutely unfair and short-sighted to make one's own characteristic or ability the basic standard expectation for ALL PEOPLE. This is not only cheeky, but also short-sighted and above all: stupid! And that is NOT how the world works or what we achieve. After all and in general: The specialization of professions and skills, the pursuit of modern science has brought our cultures to where we are today. This happened PRIMARY through collaboration (otherwise specialization would be unthinkable) and not through exclusion or coercion to learn, practice or do something that is not your thing! You may not have intended it, but at the core of it, your view and behavior towards others is just arrogance and hubris (on this one point). Of course, you never spoke of coercion, but the whole topic came across with a sadness that you somehow felt sorry for people who don't have certain skills. No blame on you, but if you don't think about freedom when talking about learning and education, then there is something lacking with YOUR (pun intended:P) education, and you just have to learn about ethics in education! Thanks for the wonderful video, which was highly of educational value, sharing your thoughts with us and taking your time to explain basic and advanced stuff to others, free of charge. You are a great guy!:) [1] Every single point is a valid one. It doesn't matter if people like to do other things, or just do not like maths, can't wrap their head around or feel uncomfortable. THEY DON'T HAVE TO EXPLAIN THEMSELVES in front of you!!! People are diverse, without that very important characteristic to us humans ... we wouldn't even be here and alive on this planet ... PERIOD!
@callyral
@callyral 5 ай бұрын
erlang is older than C89
@claudiusraphael9423
@claudiusraphael9423 5 ай бұрын
38:49 Tsoding 3000 - Episode 69: Urmom is unbound!
@marc-dantas
@marc-dantas 5 ай бұрын
BEFORE I CLICK ON THIS VIDEO I BET YOU WOULD SAY/DO SOMETHING RELATED TO PORTH LMAOOO 4:13 "PORTH-LIKE THINGY" LMAO
@alpaslaneldemir6904
@alpaslaneldemir6904 5 ай бұрын
This looks like Rust nom parser.
@MilanVVVVV
@MilanVVVVV 3 ай бұрын
Naming a builtin fn "f" is fucking crazy 😆
@NoOne-ev3jn
@NoOne-ev3jn 5 ай бұрын
Never forget to bind urmom 😂😂
@user-ji6ip7ou8d
@user-ji6ip7ou8d 5 ай бұрын
Beamoogle
@MrKoroff
@MrKoroff 5 ай бұрын
ahaha ...nice joke at 0:21 about some problems with Windows)))
@anon-fz2bo
@anon-fz2bo 5 ай бұрын
i dislike expression based langs coz im !a mathematician 😂
@WiseWeeabo
@WiseWeeabo 5 ай бұрын
just pick golang
Weird Parts of C you probably never heard of...
38:06
Tsoding Daily
Рет қаралды 54 М.
I made a New Programming Language
3:12:50
Tsoding Daily
Рет қаралды 53 М.
How many pencils can hold me up?
00:40
A4
Рет қаралды 18 МЛН
Indian sharing by Secret Vlog #shorts
00:13
Secret Vlog
Рет қаралды 53 МЛН
ELE QUEBROU A TAÇA DE FUTEBOL
00:45
Matheus Kriwat
Рет қаралды 20 МЛН
Data Mining in C
1:59:50
Tsoding Daily
Рет қаралды 38 М.
Functional Programming & Haskell - Computerphile
9:19
Computerphile
Рет қаралды 656 М.
I fixed Lua
2:16:48
Tsoding Daily
Рет қаралды 43 М.
This Release is Insane!
1:25:56
Tsoding Daily
Рет қаралды 50 М.
Lambda in a Loop is a Code Smell
8:20
mCoding
Рет қаралды 60 М.
Web in Native Assembly (Linux x86_64)
2:03:41
Tsoding Daily
Рет қаралды 53 М.
Can you actually see more than 30 FPS?
1:41:36
Tsoding Daily
Рет қаралды 15 М.
Why I prefer attrs over dataclasses
6:21
mCoding
Рет қаралды 60 М.
Hash Table in C
2:11:31
Tsoding Daily
Рет қаралды 56 М.
You don't need Generics in C
1:37:38
Tsoding Daily
Рет қаралды 56 М.
как спасти усилитель?
0:35
KS Customs
Рет қаралды 504 М.
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,5 МЛН
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 6 МЛН
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,3 МЛН