58:48 LLVM does all of the hard work that most people don't have the time for, and by the time they start having the time to manage a backend themselves it's often the better choice, yes. Being a competitive optimizing compiler for multiple targets is no easy task. If you're not looking to be an optimizing compiler, don't use LLVM in 2024 yeah, keep doing your own simple backend code generation. If you're trying to be competitive, then early on supporting LLVM primarily gets you much of the way through so you can keep experimenting with the higher level language semantics, and once you're more stable you can think about replacing LLVM entirely. Zig, as an example, now has the funding to do this, and some motivations that many other projects can't afford to have yet. This trend is leading to more people trying to build lighter LLVM alternatives which is great, we compiler writers may be able to target and stick to a completely different backend without much worry in the near(ish) future and I'd love to have that monopoly broken.
clang generates extra stuff cuz it's needed for other targets, remember llvm IR is a universal assembly as you said :) (align being a prime example, in other targets it might not work with the default alignment, so clang makes sure to specify it)
What at 42:00 Tsoding mention is really true. Also Casey Muratori and many other told about it how broken this system is (take Open Source and don't pay). It's a shame for the companies who make money with it and give nothing back. It was even a long discussion in the company where I work. The understanding was very slowy. Until the "openssl-drama". After that they decided to support financial the developers, who spend their free time to create programs or OS what we use. Here is an extra idea in my mind... For every video, where Tsoding or other people show non profit software etc. like Raylib, I will give a donation (even I already do). With the notice like "Tsoting ( or who ever) send me..." . Who came in this "club"? Must not much... Even 1 Euro or Dollar or whatever is a message to say: Thank you! P.S.: And don't forgot Tsoding for the "Marketing" ;)
A fun thing with LLVM IR is that if you compile your own language with it, or for example brainfuck to start simple. And you add all the line reference debugging tags to the llvm ir output, you can actually use lldb (gdb, but for llvm) and debug your own language, stepping instruction by instruction. I did it with brainfuck, and I could step through the brainfuck code, and it even highlights what character you are currently on in the brainfuck source file :D
Count how many times he picks up his tea without drinking it...thats how focused he was...it was killing me, just wanted him to take a damn sip of the tea! :)
Funny thing about LEG is when I took a CPU Architecture Design that was the name of the ARM subset we were required to implement. So i do have a VHDL simulator written for "LEGv8" somewhere. Have you ever delved into hardware design languages? They're super interesting
LLVM is basically just a decomposition of C into its constituent parts - LLVM IR being the "next C" isn't an unreasonable statement in that light. It's why if you're writing a language that looks and acts vaguely like C/C++, LLVM is good (if not heavy) place to start if you don't want to compile to machine code yourself. The real benefit with LLVM is the architecture support - that alone can make it a worthwhile backend target.
For real, one of my favorite courses in university was machine coding. My neurotic brain wasn't able to just accept "loop goes brrrrr..." so machine code simplified it a lot made it intuitive
Tsodin is absolutely the most talented software engineer/developer/etc person I have seen on the web. He's an inspiration to those who are learning the ropes!
Funny, it's just a small abstraction over ASM. It handles some deallocations, register allocations and instructions in a more human way. But still feels like it is intended to be autogenerated. FASM is the GOAT though, it's both low level and semantically appealing.
tabs will always be aligned correctly where as spaces ... that is up to the ide + the font you use. tab size might change but everything will stay aligned. That is why i use tabs.
I realized the same as well, so made the switch to tabs. The whole debate about how many spaces you use for indentation becomes obsolete, because you can set that to whatever you want (7 if you want), and others looking at your code don't have to refactor the file to make it readable. I don't understand why spaces are being used in the first place...
Llvm might never have been a virtual machine but I feel like llvm-ir still can be seen as operating a virtual machine that just hasn't been built. It's like a virtual virtual machine. Should have named it llvvm
13:45 it looked like a exit code being set to 0 by default expecting it to change, but something optimized out the last part with hardcoded "0" because it in fact did not change. Thats why we dont read compiled IR xD
10:30 i find it quite funny that clangs llvm ir compiler does support function declarations after use, while the c and c++ ones do not (although that is probably due to the standards?)
What the title is: "Programming w/o Language" What the title means: "Programming w/o Programming Language" What people think the title means: "Programming w/o formal Language" Of course llvm is a formal language, and by extension, a language. It has a formal grammar, a formal alphabet, production rules, etc. That does not mean it's a language AS IN programming language that is used for getting stuff done. Yes, you heard right, llvm is not a programming language because it is not used for people to get stuff done. It's sole purpose is for higher level formal languages (aka (real) programming languages) to build on top of it. Don't tell me someone ever put into their CV "Senior LLVM programmer", it's not something you "use". Change my mind.
Your definition is more in line with functionalism. Saying it's a PL (or not) because of its own intrinsic characteristics is more in line with classical naturalistic thought(Aristotelic), or maybe even some form of idealism (Platonism). You could go other ways as well. Maybe from a dialectical perspective, using as a PL creates a contradiction that resolves in a transformation of both the IR and the programmer. From a phenomenological perspective, we might proceed similar to your approach, reducing the way we perceive it to it's essential characteristics, but acknowledging our own involvement in the process, and also subject our ideas to interpersonal corroboration. In the end, it is what you make of it...
Well it's still a programming language because it gets compiled to machine code by LLVM, imo any piece of text that can deterministically be converted into a working executable is a programming language. Are you gonna tell me assembly isn't a programming language just because it's low level and not many people actually use it these days? LLVM ir is on a similar level to assembly so I'd say it's at least as much of a programming language as assembly is
On the other hand xml and html ARENT programming languages because they don't have any text structures that can result in machine code or even bytecode, they just describe other things
I think you should carefully assess what @frechjo has written. From the perspective of functionalism, you could argue that it is not a programming language. The number of people that actually *use* it as a language, directly, is *vastly* inferior to the number of people that use assembly. You do not hear people saying that conways game of life is a programming language, do you? (Since it's turing complete and fits your necessary condition of what a language needs to be a programming language). Now, you can go through the other perspectives and derive the conditions necessary to determine the necessary conditions for a language to be a programming language. From my perspective, you could argue it's functionalistic, I would argue it's not a programming language, merely because of it's empirical *direct* use.
If translate english to japanese to brazilian, the japanese is IR. Dammit! LLVM IR is a language, period. Stop creating non sense takes for giggles. Appreciate the video. Love you. See ya next time.
42:45 idk if it goes against FOSS or something, but I would mandate it in the license for the corpos to pay usage fees or something. volunteers need to eat too. so individual developers can continue to use the software but corpos either need to pay to use it or they need to contribute, so they basically either pay with money or with man-hours.
LLVM IR is not platform agnostic as it has the ABI defined in it. So you need to change the way how you pass things if you want it to be truely re-targatable.
unfortunately there's no way to include other ll file, so either you write everything in single file, or write duplicate type declarations in files that need it :/
LLVM IR _is_ a language...
No, it's an Intermediate Representation.
@@TsodingDaily why did you try to compile it then 😁👊🏻😂
@@TsodingDaily even the LLVM guys call it a language. (Doc title for an example is "LLVM Language Reference Manual")
LLVM guys are wrong
@@TsodingDaily Lmao
58:48 LLVM does all of the hard work that most people don't have the time for, and by the time they start having the time to manage a backend themselves it's often the better choice, yes. Being a competitive optimizing compiler for multiple targets is no easy task. If you're not looking to be an optimizing compiler, don't use LLVM in 2024 yeah, keep doing your own simple backend code generation. If you're trying to be competitive, then early on supporting LLVM primarily gets you much of the way through so you can keep experimenting with the higher level language semantics, and once you're more stable you can think about replacing LLVM entirely. Zig, as an example, now has the funding to do this, and some motivations that many other projects can't afford to have yet. This trend is leading to more people trying to build lighter LLVM alternatives which is great, we compiler writers may be able to target and stick to a completely different backend without much worry in the near(ish) future and I'd love to have that monopoly broken.
The recipe for a great Tsoding video: literally anything + Raylib. And it always works
Trying to find a counterexample... Didn't find one. Can we make raylib% a thing....
clang generates extra stuff cuz it's needed for other targets, remember llvm IR is a universal assembly as you said :) (align being a prime example, in other targets it might not work with the default alignment, so clang makes sure to specify it)
First 15 minutes is what peak programming looks like.
So true!
Next up is writing an ELF directly in hex.
and then, hardwire an algorithm with patch cables.
Next step: Making cpu with from scratch with silicon dioxide
Next: going back to the mines to mine for quartzite to make computer from THE scratch
Next: Doing nuclear fusion to Hydrogen Atoms to turn them into Silicon and then make computer from SCRATH
to make a CPU from scratch, you must first invent the universe
i'd watch tsoding make a cpu from the fpga or something honestly
or ben eater
Average Russian programmer
"you don't need any of that crap" is such a vibe, I live for it.
What at 42:00 Tsoding mention is really true. Also Casey Muratori and many other told about it how broken this system is (take Open Source and don't pay). It's a shame for the companies who make money with it and give nothing back. It was even a long discussion in the company where I work. The understanding was very slowy. Until the "openssl-drama". After that they decided to support financial the developers, who spend their free time to create programs or OS what we use. Here is an extra idea in my mind... For every video, where Tsoding or other people show non profit software etc. like Raylib, I will give a donation (even I already do). With the notice like "Tsoting ( or who ever) send me..." . Who came in this "club"? Must not much... Even 1 Euro or Dollar or whatever is a message to say: Thank you!
P.S.: And don't forgot Tsoding for the "Marketing" ;)
Nice idea...
A fun thing with LLVM IR is that if you compile your own language with it, or for example brainfuck to start simple. And you add all the line reference debugging tags to the llvm ir output, you can actually use lldb (gdb, but for llvm) and debug your own language, stepping instruction by instruction. I did it with brainfuck, and I could step through the brainfuck code, and it even highlights what character you are currently on in the brainfuck source file :D
Cool!
Throwing that on my idea-list to do some day, as that sounds like a fun project.
Count how many times he picks up his tea without drinking it...thats how focused he was...it was killing me, just wanted him to take a damn sip of the tea! :)
Literally as I read this comment, lol
Next: Programming without PC
After that: programming
punchcards
Paper computing
@@badstep495waiting 3 years before hello world on fortran compiles
University programming on a paper exam is a good exercise, actually. Not useful for work, but as an intellectual challenge.
Funny thing about LEG is when I took a CPU Architecture Design that was the name of the ARM subset we were required to implement. So i do have a VHDL simulator written for "LEGv8" somewhere.
Have you ever delved into hardware design languages? They're super interesting
LLVM is basically just a decomposition of C into its constituent parts - LLVM IR being the "next C" isn't an unreasonable statement in that light. It's why if you're writing a language that looks and acts vaguely like C/C++, LLVM is good (if not heavy) place to start if you don't want to compile to machine code yourself. The real benefit with LLVM is the architecture support - that alone can make it a worthwhile backend target.
For real, one of my favorite courses in university was machine coding.
My neurotic brain wasn't able to just accept "loop goes brrrrr..." so machine code simplified it a lot made it intuitive
Me: Programming without using my brain
He uses his own
Hello. We have open positions at CrowdStrike. Would you like to apply?
@@Bublerkin double it and give it to the next person
Sure! I don't really have job from 2021 😊
@@ismbksdouble the bugs 😂
Tsodin is absolutely the most talented software engineer/developer/etc person I have seen on the web. He's an inspiration to those who are learning the ropes!
> Programming w/o Language
> look inside
> a language
Hmm, this channel is gold. Where was I to discover it only now.
"x86... arm... leg... i mean i'm sorry there's no leg"
- žežin z bažin močálem se plíží 2024
MSVC/ GCC left the chat
I like the part when tsoding casually strips off 80% of bloat and the ir still compiles
i like the part where tsoding casually strips
@@nel_tu_ Onlyfans when?
@@nel_tu_me who is not subscribed on his OF 😢😢
@@nel_tu_😳
@@nel_tu_ sorry I don’t speak English…moment
Funny, it's just a small abstraction over ASM. It handles some deallocations, register allocations and instructions in a more human way. But still feels like it is intended to be autogenerated. FASM is the GOAT though, it's both low level and semantically appealing.
Drinking game: drink every time tsoding raises a cup to drink and then puts it back down.
great concept, at the heart of software: there is always a lower level. also, nice pacing and lots of insights !
the align statements are important if you are not on x86. your program will blow up on things like ARM for instance
It took him only 9 minutes to establish the dominance over llvm IR
tabs will always be aligned correctly where as spaces ... that is up to the ide + the font you use.
tab size might change but everything will stay aligned.
That is why i use tabs.
I realized the same as well, so made the switch to tabs. The whole debate about how many spaces you use for indentation becomes obsolete, because you can set that to whatever you want (7 if you want), and others looking at your code don't have to refactor the file to make it readable.
I don't understand why spaces are being used in the first place...
Jokes on you, you using tabs has made me very happy.
Llvm might never have been a virtual machine but I feel like llvm-ir still can be seen as operating a virtual machine that just hasn't been built. It's like a virtual virtual machine. Should have named it llvvm
13:45 it looked like a exit code being set to 0 by default expecting it to change, but something optimized out the last part with hardcoded "0" because it in fact did not change. Thats why we dont read compiled IR xD
10:30 i find it quite funny that clangs llvm ir compiler does support function declarations after use, while the c and c++ ones do not (although that is probably due to the standards?)
with that much swearing youtube algorithm will crush you.
What the title is: "Programming w/o Language"
What the title means: "Programming w/o Programming Language"
What people think the title means: "Programming w/o formal Language"
Of course llvm is a formal language, and by extension, a language. It has a formal grammar, a formal alphabet, production rules, etc.
That does not mean it's a language AS IN programming language that is used for getting stuff done. Yes, you heard right, llvm is not a programming language because it is not used for people to get stuff done. It's sole purpose is for higher level formal languages (aka (real) programming languages) to build on top of it. Don't tell me someone ever put into their CV "Senior LLVM programmer", it's not something you "use".
Change my mind.
Your definition is more in line with functionalism. Saying it's a PL (or not) because of its own intrinsic characteristics is more in line with classical naturalistic thought(Aristotelic), or maybe even some form of idealism (Platonism).
You could go other ways as well.
Maybe from a dialectical perspective, using as a PL creates a contradiction that resolves in a transformation of both the IR and the programmer.
From a phenomenological perspective, we might proceed similar to your approach, reducing the way we perceive it to it's essential characteristics, but acknowledging our own involvement in the process, and also subject our ideas to interpersonal corroboration.
In the end, it is what you make of it...
My mind is changed and my horizon expanded. Thank you
Well it's still a programming language because it gets compiled to machine code by LLVM, imo any piece of text that can deterministically be converted into a working executable is a programming language. Are you gonna tell me assembly isn't a programming language just because it's low level and not many people actually use it these days? LLVM ir is on a similar level to assembly so I'd say it's at least as much of a programming language as assembly is
On the other hand xml and html ARENT programming languages because they don't have any text structures that can result in machine code or even bytecode, they just describe other things
I think you should carefully assess what @frechjo has written.
From the perspective of functionalism, you could argue that it is not a programming language. The number of people that actually *use* it as a language, directly, is *vastly* inferior to the number of people that use assembly. You do not hear people saying that conways game of life is a programming language, do you? (Since it's turing complete and fits your necessary condition of what a language needs to be a programming language).
Now, you can go through the other perspectives and derive the conditions necessary to determine the necessary conditions for a language to be a programming language. From my perspective, you could argue it's functionalistic, I would argue it's not a programming language, merely because of it's empirical *direct* use.
01:12 the surname "mididoddi" looks like the sentence "mi di doddi" which similar to the Welsh for "I have melted"
Tsoding: i probably stands for signed but I have no idea what that s stands for 😅
only moment i understood something before him, ever
42:21 💯 No truer words have ever been uttered.
when I switched to spaces, zoz switched to tabs
loll 🤣🤣 maybe i should ask tsoding to do more stuff like this
Tsoding, you are a true genius
1:56 Lets create a "Leg" architecture
wanna be fast? hit the ground running with Leg
@@monad_tcp It has to be big endian, otherwise it is geL.
Next step: "The Paper Computer Unfolded: A Twenty-First Century Guide to the Bell Labs CARDIAC (CARDboard Illustrative Aid to Computation)"
Please never give up!
Tabs are based. That's what coding-style.html says in the first chapter.
Use vertical tabs....
At 13:40 I suspect the 0 is for the 'return 0' in main, just guessing though
Next: Programming by growing the rocks yourself
Bro, rocks just grow on the trees. You don't have to grow them yourself.
Not growing rocks but purifying existing sand into silicon (there are some videos on chemistry channels that demonstrate the process)
@@PRIMARYATIAS I heard that they teach rocks how to think
@@_simoncurtisonly after they carve into them patterns
Programming on a Ben Eater breadboard computer.
Next step: programming w/o computer
GNUstep: ...
pencil and paper
Programming without computer is easy. Streaming without computer is hard
plankalkül stream when
This guy has gone mad 😂
so basically LLVM is a precompiled JVM
Conversely, you could say that JVM languages outsource half the compilation to the runtime
“money is not the most important thing in your life. what’s important is knowing how to parse LLVM”
Based and LLVM pilled
If translate english to japanese to brazilian, the japanese is IR. Dammit! LLVM IR is a language, period. Stop creating non sense takes for giggles. Appreciate the video. Love you. See ya next time.
This is wild 😅
Me thinking about learning llvm ir so I can make yet another wrapper for it.
Tsoding both support the idea and dunking on it at the same time.
34:00 "arROW-knee-us"
>TFW English is harder to read than LLVM IR...
llvm ir is a language though
THIS is 10x dev phrenology
lol
> "Programming w/o Language"
> is using a language
Dear Mr. Tsoding. Love your videos. How do you come up with these project ideas? Thx.
People trolling him on twitter
We're not gonna talk about the perfect corner bounce at 1:46:32?
59:42 I think you meant GraphQL~ oh, nvm haha you were spot on
Tsoding LLVM-based Programming Language when?
A text-based IR... I'm now less surprised that LLVM is allegedly designed by some of the same key people that built Boost
LLVM IR LSP wen
after installing the archived syntax highlighting tool what does he do? where did he place it and more importantly how did he source/activated it?
idk about programming with llvm ir, but programming with qbe ir seems like an actionable plan
Keep fucking around 😂❤
Thank you....
Next programming only with a mouse
osk.exe
To be fair probably running the optimizer would have removed some of the "crap"
Why code in LLVM IR when you can just use C preprocessor and LLVM binary format? Look, it even has copy-paste constants!
42:45 idk if it goes against FOSS or something, but I would mandate it in the license for the corpos to pay usage fees or something. volunteers need to eat too.
so individual developers can continue to use the software but corpos either need to pay to use it or they need to contribute, so they basically either pay with money or with man-hours.
I think the %1 variable in main is used for an implicit return in C++
I would be curious to see u do something with wat, the webassembly text format. Mb some dsp would be cool.
LLVM IR is not platform agnostic as it has the ABI defined in it. So you need to change the way how you pass things if you want it to be truely re-targatable.
Today I watched a man play roulette for a whole hour
So it's like the CIL for .NET?
I've been wanting to do a project with raw LLVM for a while now just like this
"It's written by people who are smarter than you."
the voices in my head be like:
Real programmers use a needle and magnet.
Get down to the metal or GTFO.
next: programming w/o seeing what you're typing
Next episode: GCC IR
unfortunately there's no way to include other ll file, so either you write everything in single file, or write duplicate type declarations in files that need it :/
Spaces more reliable outside of tables, no?
ChatGPT can't handle this one guys
B E C O U S E
E
C
O
U
S
E
This looks harder than assembly
Next up: Programming with space time
What happened to the raycaster game project mr zozin ?
Programming w transistors on white board
how much do you need to afford a new streaming PC?
Next Programming w/o 0's/1's only electrons.
Always questioned myself how you learn/know about cs topics. You are my source of information but whats yours?
Cross Platform Assembly ❤
Seeing as how you liked qbe, maybe try writing a backend for oakc so it compiles to one of your languages
I built a Brainfuck compiler in LLVM IR to compile brainfuck into LLVM IT
If you want to piss off even more people then use 3 space tabs, like I do. (3 is the smallest number that's not too close to 1)
вы в новосибирске живете?
In Soviet Russia, you don't write the IR, the IR writes you
Next: Programming in opcodes