Programming w/o Language

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 287

  • @dejanlekic5513
    @dejanlekic5513 2 місяці тому +312

    LLVM IR _is_ a language...

    • @TsodingDaily
      @TsodingDaily  2 місяці тому +205

      No, it's an Intermediate Representation.

    • @samuraijosh1595
      @samuraijosh1595 2 місяці тому +45

      @@TsodingDaily why did you try to compile it then 😁👊🏻😂

    • @dejanlekic5513
      @dejanlekic5513 2 місяці тому +43

      @@TsodingDaily even the LLVM guys call it a language. (Doc title for an example is "LLVM Language Reference Manual")

    • @TsodingDaily
      @TsodingDaily  2 місяці тому +370

      LLVM guys are wrong

    • @samuraijosh1595
      @samuraijosh1595 2 місяці тому +37

      @@TsodingDaily Lmao

  • @Mozartenhimer
    @Mozartenhimer 2 місяці тому +89

    Next up is writing an ELF directly in hex.

    • @bullpup1337
      @bullpup1337 2 місяці тому +4

      and then, hardwire an algorithm with patch cables.

  • @arcxm
    @arcxm 2 місяці тому +23

    The recipe for a great Tsoding video: literally anything + Raylib. And it always works

    • @theevilcottonball
      @theevilcottonball 2 місяці тому +6

      Trying to find a counterexample... Didn't find one. Can we make raylib% a thing....

  • @nashiora
    @nashiora 2 місяці тому +29

    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.

  • @AnastasisGrammenos
    @AnastasisGrammenos 2 місяці тому +64

    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)

  • @killedinit
    @killedinit 2 місяці тому +178

    Next step: Making cpu with from scratch with silicon dioxide

    • @fus3n
      @fus3n 2 місяці тому +16

      Next: going back to the mines to mine for quartzite to make computer from THE scratch

    • @kennedyvnak
      @kennedyvnak 2 місяці тому +9

      Next: Doing nuclear fusion to Hydrogen Atoms to turn them into Silicon and then make computer from SCRATH

    • @GY-bd9bo
      @GY-bd9bo 2 місяці тому +5

      to make a CPU from scratch, you must first invent the universe

    • @Kitulous
      @Kitulous 2 місяці тому +2

      i'd watch tsoding make a cpu from the fpga or something honestly
      or ben eater

  • @oserodal2702
    @oserodal2702 2 місяці тому +52

    First 15 minutes is what peak programming looks like.

  • @alexnik1181
    @alexnik1181 2 місяці тому +275

    Next: Programming without PC

    • @cslearn3044
      @cslearn3044 2 місяці тому +10

      After that: programming

    • @badstep495
      @badstep495 2 місяці тому +20

      punchcards

    • @ismaelvc3728
      @ismaelvc3728 2 місяці тому +10

      Paper computing

    • @dodgeclub7162
      @dodgeclub7162 2 місяці тому

      ​@@badstep495waiting 3 years before hello world on fortran compiles

    • @davidlarsson7555
      @davidlarsson7555 2 місяці тому +8

      University programming on a paper exam is a good exercise, actually. Not useful for work, but as an intellectual challenge.

  • @ninadsachania3652
    @ninadsachania3652 2 місяці тому +71

    Average Russian programmer

  • @donkeyy8331
    @donkeyy8331 2 місяці тому +22

    "you don't need any of that crap" is such a vibe, I live for it.

  • @varshneydevansh
    @varshneydevansh 2 місяці тому +154

    Me: Programming without using my brain

    • @dodgeclub7162
      @dodgeclub7162 2 місяці тому +1

      He uses his own

    • @Bublerkin
      @Bublerkin 2 місяці тому +32

      Hello. We have open positions at CrowdStrike. Would you like to apply?

    • @ismbks
      @ismbks 2 місяці тому +7

      @@Bublerkin double it and give it to the next person

    • @varshneydevansh
      @varshneydevansh 2 місяці тому +2

      Sure! I don't really have job from 2021 😊

    • @Darqonik
      @Darqonik 2 місяці тому

      @@ismbksdouble the bugs 😂

  • @lixlip
    @lixlip 2 місяці тому +12

    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" ;)

  • @haakonness
    @haakonness 2 місяці тому +8

    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

    • @Windeycastle
      @Windeycastle Місяць тому

      Cool!
      Throwing that on my idea-list to do some day, as that sounds like a fun project.

  • @findjonmoses
    @findjonmoses 2 місяці тому +19

    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! :)

    • @darkphotonllc
      @darkphotonllc Місяць тому

      Literally as I read this comment, lol

  • @IconOfCyn
    @IconOfCyn 2 місяці тому +10

    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

  • @neil1629
    @neil1629 2 місяці тому +7

    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.

  • @GillesLouisReneDeleuze
    @GillesLouisReneDeleuze Місяць тому +4

    > Programming w/o Language
    > look inside
    > a language

  • @warren2406
    @warren2406 2 місяці тому +3

    Hmm, this channel is gold. Where was I to discover it only now.

  • @Siroitin
    @Siroitin 2 місяці тому +6

    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

  • @khusros
    @khusros 2 місяці тому +2

    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!

  • @nirajandata
    @nirajandata 2 місяці тому +16

    MSVC/ GCC left the chat

  • @mthia
    @mthia 2 місяці тому +25

    "x86... arm... leg... i mean i'm sorry there's no leg"
    - žežin z bažin močálem se plíží 2024

    • @shrddrz
      @shrddrz 2 місяці тому +1

      ah i see you're a man of culture as well

  • @tianned
    @tianned 2 місяці тому +46

    I like the part when tsoding casually strips off 80% of bloat and the ir still compiles

    • @nel_tu_
      @nel_tu_ 2 місяці тому +33

      i like the part where tsoding casually strips

    • @maxrinehart4177
      @maxrinehart4177 2 місяці тому

      ​@@nel_tu_ Onlyfans when?

    • @animeseries7326
      @animeseries7326 2 місяці тому

      @@nel_tu_me who is not subscribed on his OF 😢😢

    • @me_12-vw1vi
      @me_12-vw1vi 2 місяці тому +2

      @@nel_tu_😳

    • @tianned
      @tianned 19 днів тому

      @@nel_tu_ sorry I don’t speak English…moment

  • @paper_cut9457
    @paper_cut9457 2 місяці тому +1

    great concept, at the heart of software: there is always a lower level. also, nice pacing and lots of insights !

  • @duality4y
    @duality4y 2 місяці тому +4

    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.

    • @Windeycastle
      @Windeycastle Місяць тому +3

      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...

  • @Akronsus
    @Akronsus 2 місяці тому +4

    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?)

  • @sabelch
    @sabelch 2 місяці тому +1

    Drinking game: drink every time tsoding raises a cup to drink and then puts it back down.

  • @ivanjermakov
    @ivanjermakov 2 місяці тому +2

    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.

  • @AmauryJacquot
    @AmauryJacquot 2 місяці тому +2

    the align statements are important if you are not on x86. your program will blow up on things like ARM for instance

  • @JLarky
    @JLarky 2 місяці тому +2

    It took him only 9 minutes to establish the dominance over llvm IR

  • @LewisCampbellTech
    @LewisCampbellTech 2 місяці тому +2

    Jokes on you, you using tabs has made me very happy.

  • @mrbrownfr
    @mrbrownfr 2 місяці тому +31

    Next step: programming w/o computer

    • @acchx
      @acchx 2 місяці тому +2

      GNUstep: ...

    • @luxluth
      @luxluth 2 місяці тому +1

      pencil and paper

    • @OverWilliam
      @OverWilliam 2 місяці тому +2

      Programming without computer is easy. Streaming without computer is hard

    • @joshuadonahue5871
      @joshuadonahue5871 2 місяці тому

      plankalkül stream when

  • @ChaoticNeutral6
    @ChaoticNeutral6 2 місяці тому +4

    Tsoding: i probably stands for signed but I have no idea what that s stands for 😅

    • @seanhdka
      @seanhdka 2 місяці тому

      only moment i understood something before him, ever

  • @bullpup1337
    @bullpup1337 2 місяці тому +1

    with that much swearing youtube algorithm will crush you.

  • @Jutastre
    @Jutastre 2 місяці тому +2

    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

  • @11WicToR11
    @11WicToR11 2 місяці тому +1

    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

  • @cramble
    @cramble 2 місяці тому +2

    01:12 the surname "mididoddi" looks like the sentence "mi di doddi" which similar to the Welsh for "I have melted"

  • @bloom945
    @bloom945 2 місяці тому +2

    At 13:40 I suspect the 0 is for the 'return 0' in main, just guessing though

  • @ashwinmurali4345
    @ashwinmurali4345 2 місяці тому

    Tsoding, you are a true genius

  • @cubernetes
    @cubernetes 2 місяці тому +6

    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.

    • @frechjo
      @frechjo 2 місяці тому +2

      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...

    • @cubernetes
      @cubernetes 2 місяці тому +2

      My mind is changed and my horizon expanded. Thank you

    • @jlewwis1995
      @jlewwis1995 Місяць тому

      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

    • @jlewwis1995
      @jlewwis1995 Місяць тому

      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

    • @cubernetes
      @cubernetes Місяць тому +1

      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.

  • @nikkehtine
    @nikkehtine 2 місяці тому +5

    so basically LLVM is a precompiled JVM

    • @kebien6020
      @kebien6020 2 місяці тому +5

      Conversely, you could say that JVM languages outsource half the compilation to the runtime

    • @psteven5
      @psteven5 2 місяці тому +3

      “money is not the most important thing in your life. what’s important is knowing how to parse LLVM”

  • @rogo7330
    @rogo7330 2 місяці тому +9

    Tabs are based. That's what coding-style.html says in the first chapter.

  • @tiyez3944
    @tiyez3944 2 місяці тому +5

    when I switched to spaces, zoz switched to tabs

  • @_simoncurtis
    @_simoncurtis 2 місяці тому +6

    Next: Programming by growing the rocks yourself

    • @TsodingDaily
      @TsodingDaily  2 місяці тому +11

      Bro, rocks just grow on the trees. You don't have to grow them yourself.

    • @PRIMARYATIAS
      @PRIMARYATIAS 2 місяці тому +1

      Not growing rocks but purifying existing sand into silicon (there are some videos on chemistry channels that demonstrate the process)

    • @_simoncurtis
      @_simoncurtis 2 місяці тому +2

      @@PRIMARYATIAS I heard that they teach rocks how to think

    • @PRIMARYATIAS
      @PRIMARYATIAS 2 місяці тому +3

      @@_simoncurtisonly after they carve into them patterns

    • @spht9ng
      @spht9ng 2 місяці тому +3

      Programming on a Ben Eater breadboard computer.

  • @monad_tcp
    @monad_tcp 2 місяці тому +4

    1:56 Lets create a "Leg" architecture

    • @melangearrakis
      @melangearrakis 2 місяці тому +3

      wanna be fast? hit the ground running with Leg

    • @theevilcottonball
      @theevilcottonball 2 місяці тому +1

      @@monad_tcp It has to be big endian, otherwise it is geL.

  • @shreyassanthu77
    @shreyassanthu77 2 місяці тому +2

    loll 🤣🤣 maybe i should ask tsoding to do more stuff like this

  • @hammerheadcorvette4
    @hammerheadcorvette4 2 місяці тому

    42:21 💯 No truer words have ever been uttered.

  • @BloodRoseRecords
    @BloodRoseRecords 2 місяці тому +2

    > "Programming w/o Language"
    > is using a language

  • @btarg1
    @btarg1 2 місяці тому +2

    Tsoding LLVM-based Programming Language when?

  • @blastygamez
    @blastygamez 2 місяці тому

    Please never give up!

  • @GaryChike
    @GaryChike 2 місяці тому

    Next step: "The Paper Computer Unfolded: A Twenty-First Century Guide to the Bell Labs CARDIAC (CARDboard Illustrative Aid to Computation)"

  • @draxiii9765
    @draxiii9765 2 місяці тому +2

    This guy has gone mad 😂

  • @TheDude-fx6tk
    @TheDude-fx6tk 2 місяці тому +3

    This is wild 😅

  • @Ripred0219
    @Ripred0219 Місяць тому

    THIS is 10x dev phrenology

  • @bigmistqke
    @bigmistqke 2 місяці тому

    I would be curious to see u do something with wat, the webassembly text format. Mb some dsp would be cool.

  • @darthmoomoo
    @darthmoomoo 2 місяці тому

    Dear Mr. Tsoding. Love your videos. How do you come up with these project ideas? Thx.

    • @RJ-or8bw
      @RJ-or8bw 2 місяці тому +1

      People trolling him on twitter

  • @bbq1423
    @bbq1423 2 місяці тому +1

    Why code in LLVM IR when you can just use C preprocessor and LLVM binary format? Look, it even has copy-paste constants!

  • @platin2148
    @platin2148 2 місяці тому

    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.

  • @itzerrio
    @itzerrio 2 місяці тому

    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 :/

  • @fg786
    @fg786 2 місяці тому +1

    So it's like the CIL for .NET?

  • @alexey2044
    @alexey2044 2 місяці тому +1

    Based and LLVM pilled

  • @lambdacalculus3385
    @lambdacalculus3385 2 місяці тому +21

    llvm ir is a language though

  • @hebozhe
    @hebozhe 2 місяці тому +1

    "It's written by people who are smarter than you."

    • @me_12-vw1vi
      @me_12-vw1vi 2 місяці тому

      the voices in my head be like:

  • @elgalas
    @elgalas 2 місяці тому

    59:42 I think you meant GraphQL~ oh, nvm haha you were spot on

  • @Muskar2
    @Muskar2 2 місяці тому

    A text-based IR... I'm now less surprised that LLVM is allegedly designed by some of the same key people that built Boost

  • @ramsey2155
    @ramsey2155 2 місяці тому +1

    Today I watched a man play roulette for a whole hour

  • @nevokrien95
    @nevokrien95 2 місяці тому

    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.

  • @Kitulous
    @Kitulous 2 місяці тому

    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.

  • @RafaelMilewski
    @RafaelMilewski 2 місяці тому +2

    Next programming only with a mouse

  • @dompasmaco5266
    @dompasmaco5266 2 місяці тому +1

    Next episode: GCC IR

  • @konstantinsotov6251
    @konstantinsotov6251 2 місяці тому

    ChatGPT can't handle this one guys

  • @errelin1326
    @errelin1326 2 місяці тому +3

    Keep fucking around 😂❤

  • @scoffpickle9655
    @scoffpickle9655 2 місяці тому

    Next up: Programming with space time

  • @alexandersanchez9138
    @alexandersanchez9138 2 місяці тому +2

    34:00 "arROW-knee-us"
    >TFW English is harder to read than LLVM IR...

  • @matthias916
    @matthias916 2 місяці тому

    Seeing as how you liked qbe, maybe try writing a backend for oakc so it compiles to one of your languages

  • @sven179
    @sven179 2 місяці тому

    We're not gonna talk about the perfect corner bounce at 1:46:32?

  • @danielschmitt5750
    @danielschmitt5750 2 місяці тому

    What happened to the raycaster game project mr zozin ?

  • @diegoqueiroz6054
    @diegoqueiroz6054 2 місяці тому

    I miss you creating your own language. Is there a new language project?

  • @pbentesio
    @pbentesio 2 місяці тому

    I think the %1 variable in main is used for an implicit return in C++

  • @vitorsantos6310
    @vitorsantos6310 2 місяці тому

    Always questioned myself how you learn/know about cs topics. You are my source of information but whats yours?

  • @general9064
    @general9064 Місяць тому

    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.

  • @DarioSterzi
    @DarioSterzi 2 місяці тому

    To be fair probably running the optimizer would have removed some of the "crap"

  • @bean_TM
    @bean_TM 2 місяці тому

    how much do you need to afford a new streaming PC?

  • @MatthisDayer
    @MatthisDayer 2 місяці тому

    In Soviet Russia, you don't write the IR, the IR writes you

  • @proxeIO
    @proxeIO 2 місяці тому

    Spaces more reliable outside of tables, no?

  • @bbq1423
    @bbq1423 2 місяці тому

    5:55 Why use a single tab when you can use two?

  • @manacht2727
    @manacht2727 2 місяці тому

    next: programming w/o seeing what you're typing

  • @cewla3348
    @cewla3348 Місяць тому

    what are these subtitles?

  • @timofeysobolev7498
    @timofeysobolev7498 2 місяці тому

    Yay, new video)

  • @thenwhoami
    @thenwhoami 2 місяці тому +5

    LLVM IR LSP wen

  • @ВладиславГришин-ш7ш
    @ВладиславГришин-ш7ш 2 місяці тому

    Chat GPT умеет в LLVM IR?

  • @hubstrangers3450
    @hubstrangers3450 2 місяці тому

    Thank you....

  • @lonelylad9818
    @lonelylad9818 Місяць тому

    This looks harder than assembly

  • @ethanmartin2781
    @ethanmartin2781 2 місяці тому

    help! i don’t get it, just learned hello world yesterday

  • @pranavsuryavanshi408
    @pranavsuryavanshi408 21 день тому

    next step : writing ur own OS so that ur mom can also use it.

  • @sanjaygatne1424
    @sanjaygatne1424 2 місяці тому

    Next Programming w/o 0's/1's only electrons.

  • @asparkoffire220
    @asparkoffire220 2 місяці тому

    Next: Programming in opcodes

  • @DylanMatthewTurner
    @DylanMatthewTurner 2 місяці тому

    I've been wanting to do a project with raw LLVM for a while now just like this

  • @fbiofusa3986
    @fbiofusa3986 2 місяці тому

    I built a Brainfuck compiler in LLVM IR to compile brainfuck into LLVM IT

  • @meanmole3212
    @meanmole3212 2 місяці тому

    B E C O U S E
    E
    C
    O
    U
    S
    E