Is this the Future of Programming Languages?

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ต.ค. 2024

ความคิดเห็น • 167

  • @flleaf
    @flleaf 7 หลายเดือนก่อน +425

    Me when i wake up: looks like we are alive

    • @Maggrathka
      @Maggrathka 7 หลายเดือนก่อน +126

      Pinging all my body parts that are interested in being pinged

    • @henrikholst7490
      @henrikholst7490 7 หลายเดือนก่อน +76

      The day has officially started.

    • @ignaciogaete2536
      @ignaciogaete2536 7 หลายเดือนก่อน +38

      I bet you didn't expect that sh!t to happen

    • @dimator
      @dimator 7 หลายเดือนก่อน +51

      *looking around my apartment* it is what it is, and it isn't what it isn't.

    • @wade__
      @wade__ 7 หลายเดือนก่อน +15

      Rubbing the morning crusties out of my eyes: I can't see shit in this mist

  • @IgorGuerrero
    @IgorGuerrero 7 หลายเดือนก่อน +179

    "LLVM is the React of compilers" hahaha I loved that one, it's a great analogy though

    • @digitalworm-y1o
      @digitalworm-y1o 7 หลายเดือนก่อน +24

      "minus the toxic community" lol

    • @dtomvan
      @dtomvan 7 หลายเดือนก่อน +5

      Rather create-react-app 😂

    • @themiddlelayer
      @themiddlelayer 7 หลายเดือนก่อน +14

      Rust is the React of system programming

    • @jma42
      @jma42 7 หลายเดือนก่อน +15

      @@themiddlelayer more like C++, Rust is like Solid/Svelte

    • @meanmole3212
      @meanmole3212 7 หลายเดือนก่อน +1

      @@themiddlelayer looooooooooooooool

  • @AdamSrgnt
    @AdamSrgnt 7 หลายเดือนก่อน +18

    Your videos remind me why I fell in love with programming. They're also more informative than most of the university classes I recall.
    Good for the mind and the soul.

  • @ErikBongers
    @ErikBongers 7 หลายเดือนก่อน +101

    "LLVM is basically the React of compilers, minus the toxic community."

    • @t2b1
      @t2b1 7 หลายเดือนก่อน +4

      lasted almost 5 whole minutes without talking shit about React

  • @BenjaminRosseaux
    @BenjaminRosseaux 7 หลายเดือนก่อน +76

    I'm surprised to see my name here in this TH-cam video at 38:30 +/- along with my old PACC project. 🙂

  • @shynrez340
    @shynrez340 7 หลายเดือนก่อน +23

    Hey tsoding, I was thinking that maybe I'm the only person watching your videos from Iran :] Thank you they're great and worth the spended time

    • @layar_hape_tangkap
      @layar_hape_tangkap 7 หลายเดือนก่อน +3

      I'm Indonesia btw

    • @rubah_bukan_singa
      @rubah_bukan_singa 7 หลายเดือนก่อน

      ​@@layar_hape_tangkap 2

    • @-ciii-
      @-ciii- 7 หลายเดือนก่อน

      @@layar_hape_tangkap i dont usually do this but me too btw

    • @Doice68-cu4qp
      @Doice68-cu4qp หลายเดือนก่อน

      هِلو

  • @naoldereje2066
    @naoldereje2066 7 หลายเดือนก่อน +14

    The most genuine channel I've ever seen on youtube.

  • @Momoyon
    @Momoyon 7 หลายเดือนก่อน +15

    Mr. Zozin congratulations on 100K subs! (it's funny how the "vod's" channel has more subs than the "main" channel lol). Anyways i just want to thank you for being the cool guy that you are. I really love programming, but i cannot keep programming much on my own because i get discouraged or distracted really easily. But watching your videos give me motivation to code again. So thank you really much! again congrats on 100K (you deserve more than 100K). love from maldives 💖

  • @twenty-fifth420
    @twenty-fifth420 7 หลายเดือนก่อน +21

    I am putting QBE under “I want to build compilers, but I have no patience to try and learn GCC and Clang because they are somehow longer then Wheel of Time”
    I even have the dragon book. Lets do this.

    • @rj7250a
      @rj7250a 7 หลายเดือนก่อน +4

      It is impossible for a hobbyist to build something close to LLVM or GCC.
      LLVM is 20 millions lines of C++ code. For comparision, Linux Kernel is 35 millions lines of C code.
      Remember that C++ is less verbose than equivalent C code, wich make them even closer in complexity.
      Also half of Linux code is just drivers, so you could say that it is less complex than LLVM in some aspects.

  • @diegorocha2186
    @diegorocha2186 7 หลายเดือนก่อน +2

    100k subscriber well deserved, amazing content as usual!!!!! You're making the difference my dear friend!

  • @SeishukuS12
    @SeishukuS12 7 หลายเดือนก่อน +10

    Love the rant about the lexer, that's a reason I usually just end up writing all my own stuff...
    A friend of mine always like to tell me "why do you waste your time writing your own stuff when there are perfectly good libraries you could use", I tell him A) what fun is that and B) stuff like you've just found. lol :)

  • @batlin
    @batlin 7 หลายเดือนก่อน +8

    I saw QBE in the recording of the Hare stream and was immediately excited... last time I build a toy language was in college like 18 years ago. But I had to use LLVM when contributing to one or two other language projects and it definitely felt too big (mentally and diskwise...). Cranelift seems like another simpler option but QBE takes it to another level.

  • @adr420
    @adr420 7 หลายเดือนก่อน +18

    congrats on 100k❤🎉

  • @RicardoValero95
    @RicardoValero95 7 หลายเดือนก่อน +5

    9:45 "let's actually set the highlighting to javascript" LOL

  • @packediceisthebestminecraf9007
    @packediceisthebestminecraf9007 7 หลายเดือนก่อน +6

    3:43 I think Zig used LLVM in the past, but will transition or has transitioned to being entirely self-hosted
    Rust does use LLVM though

    • @ecosta
      @ecosta 7 หลายเดือนก่อน

      Do you know why Zig did it?

    • @109Rage
      @109Rage 6 หลายเดือนก่อน +5

      Zig still uses LLVM. They plan to keep using LLVM for the foreseeable future, and plan to continue supporting using LLVM as a backend in the long-run. The plan is to *eventually* not depend on LLVM to compile Zig itself, as it causes quite a bit of friction with Zig's own development, and furthermore, LLVM is very slow to compile. The Zig team plans to slowly over time build up their own internal backend, that you can choose to use instead of LLVM. In the short-term, this custom backend is only going to be meant for Debug builds, where you want to build the project quick, test bugs and features, make an edit, and recompile it in an instant-basically almost no optimizations. In the long term, the custom backend should be good enough to compete with LLVM, while hopefully learning from the mistakes that have been found over the years.

  • @RuslanKovtun
    @RuslanKovtun 7 หลายเดือนก่อน +4

    4:59 - in ideal world people program in python because it meets particular speed requirements, not because nobody cares about performance at all.

  • @MrPetzold123
    @MrPetzold123 7 หลายเดือนก่อน +6

    This guy is cool, knowledgeable, funny and one of the best teachers i've seen. Not bad at all :-)
    Edit. Aaand the expression compiles to 69, also known as urmom 😂.

  • @mattshu
    @mattshu 7 หลายเดือนก่อน +9

    how did i never notice the 'Porn Folder' in the lower status bar

    • @ecosta
      @ecosta 7 หลายเดือนก่อน +1

      I wish I knew what exactly that number is. Long time ago it was around 8GiB, then it raised to 63, now it is around 57... I never cared about that number, but since it is changing so much - it started to trigger my curiosity... 😄

    • @mfy0108
      @mfy0108 7 หลายเดือนก่อน +1

      @@ecosta It's obvious that at the time he had 8GiB, he thought that wasn't enough and decided to "update" his "collection" to, for example, 63GiB. And from that moment he deleted another 8GiB since he has already "researched" it lol.

    • @ecosta
      @ecosta 7 หลายเดือนก่อน +1

      @@mfy0108 what kind of twisted mind deletes "material" after the "research"? lol

  • @glowiak3430
    @glowiak3430 7 หลายเดือนก่อน +50

    9:52 Vim actually has syntax hightlighting for Hare out of the box. Can your emacs do that?

    • @angelcaru
      @angelcaru 7 หลายเดือนก่อน +1

      "no way"
      $ vim a.ha
      export fn main()
      *code highlights correctly*
      "wtf"

    • @sofiaknyazeva
      @sofiaknyazeva 7 หลายเดือนก่อน +4

      Yes, it definitely can. Hare does provide emacs configuration (syntax highlighter) alongside. Besides, you can always write your own syntax highlighter for a specific language.

    • @anon_y_mousse
      @anon_y_mousse 7 หลายเดือนก่อน +1

      They must've added it since I first downloaded it, because two years ago they didn't and I had to copy it into my personal ~/.vim/ folder.

    • @crix_h3eadshotgg992
      @crix_h3eadshotgg992 7 หลายเดือนก่อน +16

      Blud asked if emacs couldn’t do something 💀💀💀

    • @eeriemyxi
      @eeriemyxi 7 หลายเดือนก่อน +4

      ​@@sofiaknyazeva
      1. That solution isn't available out of the box.
      2. The comment was sarcasm.

  • @kiosmallwood576
    @kiosmallwood576 7 หลายเดือนก่อน +1

    1:48:02 Really good perspective on lsp that I had not considered. I think this should be it's own clip.

  • @maman14141414
    @maman14141414 7 หลายเดือนก่อน +10

    From the user perspective prefixes were useful in the absence of LSPs and other code analysis tools to understand what you are looking at, it's for the same raison we see p_*,m_* conventions in old codebases

    • @jordanmcconnon6214
      @jordanmcconnon6214 7 หลายเดือนก่อน

      Working on a code base rn with that exact convention
      I appreciate it because all I have is vim and grep 😂

    • @anon_y_mousse
      @anon_y_mousse 7 หลายเดือนก่อน

      Depends on the programmer really. I've always hated Hungarian notation, especially as I'm typing something in. Even now that tab completion is everywhere, I still prefer to not use it.

    • @marcs9451
      @marcs9451 7 หลายเดือนก่อน +3

      some versions of C (pre C89) had global identifiers for structs. so people would also prefix things with the struct name.
      struct Foo {
      int foo_value;
      bool foo_enabled;
      }
      it was... not a great time

  • @SiddheshPardeshi-mp9cr
    @SiddheshPardeshi-mp9cr 7 หลายเดือนก่อน +13

    Yoooooooooo!!!! zozin fam 100kkkk
    congo 🎊🎋🎉🎈✨zozin

  • @AK-vx4dy
    @AK-vx4dy 7 หลายเดือนก่อน +2

    Perfixes are (for php case) for speed up parser/lexer interpreter

  • @halfsourlizard9319
    @halfsourlizard9319 3 หลายเดือนก่อน

    Coming from a functional background, it is mind-blowing to me that funcs and vars would live in separate namespaces. Lambdas evaluate to closures ... and closures are just vals like any other.

  • @angelcaru
    @angelcaru 7 หลายเดือนก่อน +2

    first time i've seen a tsoding vod before it got auto-generated captions

  • @blackhaze3856
    @blackhaze3856 7 หลายเดือนก่อน +6

    QBE stands for query-by-example compiler? sounds pretty poggers.

    • @SimGunther
      @SimGunther 7 หลายเดือนก่อน +1

      Quick Backend.
      It even says so on 8l's repo

    • @blackhaze3856
      @blackhaze3856 7 หลายเดือนก่อน

      @@SimGunther I know. It was a kind of dadjoke 😂

  • @nashiora
    @nashiora 7 หลายเดือนก่อน +1

    13:40 zozin talking about storing names as various types, like tagged unions, in tables while I'm in the process of creating a tagged union to put in my symbol tables.

  • @SimGunther
    @SimGunther 7 หลายเดือนก่อน +2

    31:05 It isn't. That's why Austral (and an earlier version of C++) generates C code before compilation with gcc

  • @halfsourlizard9319
    @halfsourlizard9319 3 หลายเดือนก่อน

    As regards SSA: People don't normally write SSA by-hand ... rather, they'll implement an automated correctness-preserving transformation to SSA as one of the intermediate phases of their compiler, basically for the reasons that you said (further static analysis is way easier on already-SSA'ed code -- dead code elim, const prop, registerisation, liveness, etc.).

  • @dieSpinnt
    @dieSpinnt 7 หลายเดือนก่อน +4

    BNF is not useful?
    I grew up with yacc and bison. There is no better way of understanding the syntax of a language than the condensed DESCRIPTION of the language in that metasyntax form.
    Okay, with the BNF of C++ (which isn't possible to describe C++ in that way, as a sidenote) your head will blow up. But you do not have to look at all the "arms". You can slowly crawl down from up to the bottom, which also represents DETAIL. Go as far as your head-internal-pressure allows. Don't be afraid!?!:)

  • @halfsourlizard9319
    @halfsourlizard9319 3 หลายเดือนก่อน

    Wowza, you're way more patient than I am: I tried using QBE, and the err msgs are shockingly unhelpful / terse ... It's like Ed-level unhelpfulness.

  • @ivanjermakov
    @ivanjermakov 7 หลายเดือนก่อน +2

    Would love to see how to compile a toy language from unusual paradigm, like purely functional or array language.

  • @oeerturk
    @oeerturk 7 หลายเดือนก่อน +2

    zig used to use llvm(still do i guess) but theyre in the process of migrating into their own backend for reasons similiar to yours which i find very exciting

    • @rj7250a
      @rj7250a 7 หลายเดือนก่อน +3

      Llvm will become a optional backend, as the self-hosted backend only support x86, ARM, Risc-v and Wasm. So you still need LLVM to compile for MIPS or Sparc for example.
      Also the new backend is optimized for fast compile times, it is almost impossible to compete with LLVM in optimizations, so to ship the fastest binary for the user, LLVM still the best.

  • @Heater-v1.0.0
    @Heater-v1.0.0 7 หลายเดือนก่อน +3

    Nooo....don't let it leak. Sure the OS cleans up for you most of the time. But sometimes someone will want to build your code to run in an environment where it does not. I had this problem with a compiler for the Spin language for the Parallax Inc. Propeller micro-controller. I built the copier with Emscripten into asm.js to run in the browser. Problem was everyone it was run it leaked and eventually crashed the page. The emscripten run time did not clean up. Luckily I convinced the author to fix that leak and all was well eventually.

    • @ax13h
      @ax13h 7 หลายเดือนก่อน

      Working as intended.

    • @eeriemyxi
      @eeriemyxi 7 หลายเดือนก่อน +1

      you're in the extreme minority, the effort isn't worth the overall return value (in a hobby proj like this)

    • @Heater-v1.0.0
      @Heater-v1.0.0 7 หลายเดือนก่อน

      @@eeriemyxi Sure, very likely a minority. Mind you ,both my software and that I was trying to use were hobby projects.

  • @yash1152
    @yash1152 7 หลายเดือนก่อน

    3:51
    yeah, glad i guessed the problem with llvm correct. huuuge size. the talk about zig (with trans) mentioned it - "it takes 4 hrs to compile"

  • @FDominicus
    @FDominicus 7 หลายเดือนก่อน

    Congratulations to 100 000 subscribers. You deserve that and even much more IMHO.

  • @ratchet1freak
    @ratchet1freak 7 หลายเดือนก่อน +1

    2:30:00 that in particular looks like a bug: on in stb_lexer.h line 565 it sets string_len to n (aka 0) before the loop looking at the characters, but then doesn't set it after the loop when it is done.
    moreover it reuses the string storage, so if you have 2 different identifiers it the string view of the previous one will get overwritten.

  • @AndreSilva-bv7qg
    @AndreSilva-bv7qg 7 หลายเดือนก่อน +2

    That is a very big folder! 58.2gb!

  • @rogo7330
    @rogo7330 7 หลายเดือนก่อน +1

    The keepeer of enjoyment through programming. The saviour of fun through making computer go brrr.
    The code clown.

  • @dieSpinnt
    @dieSpinnt 7 หลายเดือนก่อน +4

    You should be fair in regards of LLVM. OF COURSE it is "bloated". Look at the options and possibilities it gives you. For me, targeting X86, ARM, MIPS and RISCV this package is a gift ... all under one hood and standardized. Oh and BTW I am on Gentoo. So don't tell me what is "Bloat" as I have to recompile LLVM every time when there is an update. Oh ... and who would've guessed it? I compile only THE BACKENDS I USE! You didn't know that this is an option and absolutely speeds up compilation times and also space requirements? Now you know!
    For others that get a binary package ... WTF? You install that in seconds. It is 2024, so who cares about 1 or 2 GB disk space? Period!
    There is nothing wrong with using a dedicated solution like QBE or specialized compilers, f.e. for older hardware or electronic projects, etc. But that is a question of using "the right tool for the job", which is YOUR responsibility (and shows your expertise ... or not). Acting like a child and beaching(spelling) around about general purpose compiler infrastructure, which is OF COURSE big in every aspect, doesn't help you in any way besides getting your steam off. There are better ways, like touching grass, or getting laid, don't you think?:P
    P.S.: Oh and this comment is not directed at Tsoding. He is joking. "... React of compilers", hehehe. So do I. This comment is for YOU. Yes you, angry looking motherboard who didn't even understood my "tool" analogy, with that stick up your back:P
    Have fun coding and thanks for the great video!:)

    • @_garicas
      @_garicas 7 หลายเดือนก่อน +2

      👍

  • @halfsourlizard9319
    @halfsourlizard9319 3 หลายเดือนก่อน

    Awesome stream ... would be fun to see something with a bigger impedance mismatch -- maybe Scheme -- compiled to QBE ... Scheme's parsing is basically easier than falling off a log (since the programmer is basically writing the AST directly), but dealing with call/cc and lambdas would be ... a fun challenge to represent in the QBE instructions.

    • @halfsourlizard9319
      @halfsourlizard9319 3 หลายเดือนก่อน

      (Ignoring macros -- obviously -- I mean.)

  • @acquite
    @acquite 5 หลายเดือนก่อน

    2:44:30 you have to copy the constant into that temporary. you can do this like `%s0 =w copy 3` or whatever. I got stumped on this too when trying to figure it out for my own language
    edit: nvm you figured this out later lmao

  • @iWillAvert
    @iWillAvert 7 หลายเดือนก่อน

    51:35 Not only is raylib pretty easy to implement and work with, but it also has bindings for basically every language under the sun. It is pretty awesome lol. The fact that you can interface with it surprisingly easily from Assembly is icing on the cake. Name another framework that can do all of that! Lol

  • @theaugur1373
    @theaugur1373 6 หลายเดือนก่อน

    Zig uses LLVM but they at one point said it will eventually not use LLVM.

  • @albinekb
    @albinekb 7 หลายเดือนก่อน

    Congrats to 100K!

  • @kaltwarraith5172
    @kaltwarraith5172 7 หลายเดือนก่อน

    I've been trying to explain that a pointer is just a number to all the new developers i work with for years. it sometimes takes a while to stick.

  • @ecosta
    @ecosta 7 หลายเดือนก่อน

    My couple of cents:
    1. Using "$" and "%" in IR is justifiable - as a language writer, you can define symbols without any keyword clash. Example: write a function named "$export" which compiles to a symbol named "export" - perfect valid as a C function, but it would be a mess if QBE IR had no symbol prefix.
    2. That "string_len" in the lexer probably makes only sense if you parse a literal string. I haven't checked the code, but I guess literals are pointer-copied to that "string" attribute - that would be a optimisation to avoid copying/strlen a string constant. That's why I favour writing my own libs when programming for fun. There is always some nasty surprise from an undocumented/unexpected behaviour that takes hours or more to troubleshoot.

  • @labsendeyshent
    @labsendeyshent 7 หลายเดือนก่อน +1

    *ParserC* pronunciation strikes back 💀

  • @henrikholst7490
    @henrikholst7490 7 หลายเดือนก่อน

    The begin end convention also allows a nice way to describe an empty range. begin=end. The begin end token's does not need to point to anything real. Null is fine.

  • @billynugget7102
    @billynugget7102 7 หลายเดือนก่อน +1

    The only problem with qbe is no windows support which is its only real problem

  • @diegorocha2186
    @diegorocha2186 7 หลายเดือนก่อน

    It looks like the trend is to either slap your wrist before you even start or try to read your mind before you code. Basically, it's getting to the point where you're almost scared to hit the keyboard, lol.

  • @timwhite1783
    @timwhite1783 7 หลายเดือนก่อน

    My only complain is there isn't support for WASM. If there was that would be genuinely awesome.

  • @no_hurry7000
    @no_hurry7000 6 หลายเดือนก่อน

    You are insanely good at programming.

  • @Kane0123
    @Kane0123 7 หลายเดือนก่อน

    When your backend is essentially voodoo for most developers.

  • @FicoosBangaly
    @FicoosBangaly 7 หลายเดือนก่อน +1

    The problem with QBE is that it doesn't have a way to add debugging information. This makes it a no-started for me as any language that can't be easily debugged is useless IMHO.
    I know they are working on adding some support for it.

    • @linearz
      @linearz 6 หลายเดือนก่อน

      Good point

    • @zenshade2000
      @zenshade2000 6 หลายเดือนก่อน +2

      printf is available, why would anyone ever need more than that? :^

  • @omgboy4939
    @omgboy4939 7 หลายเดือนก่อน +5

    49:42 nice non 0 exit xd

  • @fleaspoon
    @fleaspoon 7 หลายเดือนก่อน

    this seems much more easier to use than llvm

  • @rednibcoding3412
    @rednibcoding3412 7 หลายเดือนก่อน

    Yes, another language. That's why I initially subscribed to Tsoding Daily: because of the language creation content. :)
    What about creating a minimalist yet useful language? Not another Porth, though.
    Maybe a language that includes just: if, elif, else, while, variables, and functions. That would essentially be Turing complete. Perhaps arrays could be added, but that’s about it.
    The goal would be to have as few keywords as possible.
    Or, implementing some sort of old-school BASIC could be fun. You know, the kind without proper loops, relying solely on 'goto' and 'gosub' for control flow.

  • @alexpyattaev
    @alexpyattaev 7 หลายเดือนก่อน

    Make a fast compiler for a small scripting language? Such that it is super-easy to integrate into C/rust applications like games, but does not do any IO (such that it is designed for embedding into other apps from ground up, but compiled into native code).

  • @kala-telo
    @kala-telo 7 หลายเดือนก่อน +2

    Is there chance to see more hare and qbe on this channel?
    And congratulations on 100k!

  • @00jknight
    @00jknight 7 หลายเดือนก่อน

    I wonder if QBE could be used to compile GDScript and massively benefit the Godot engine.

  • @satchelfrost6531
    @satchelfrost6531 7 หลายเดือนก่อน

    start == (break main && run)

  • @StevenMartinGuitar
    @StevenMartinGuitar 7 หลายเดือนก่อน

    Sounds good? Sounds gucci? Sounds atamagucci? Let'sa go!

  • @LeCockroach
    @LeCockroach 7 หลายเดือนก่อน

    Zig uses LLVM indeed, but they are working on their own backend and their plan is to throw LLVM, mostly because it's slow and bloated. And they might succeed, they are very focused on that

  • @user-tw2kr6hg4r
    @user-tw2kr6hg4r 6 หลายเดือนก่อน

    you gotta enable sub-pixel anti-aliasing

  • @zlatkovidlanovic6454
    @zlatkovidlanovic6454 วันที่ผ่านมา

    I have specifiq question about recursive user defined function calls
    I asked so many people and nobody can explain to me how to do that properly
    that actually work ...i make interpreter in Oxygen basic which is written in FreeBasic
    Oxygenbasic not work in linux because is Windows only ..sorry ...
    my interpreter is token interpreter and i don't generate any intermediate code
    recursion in general work ..i can call function from itself
    my problem begin when i want to execute recursive call with params
    which also work work as it is ...but i can execute only one call
    not two or more
    so i am asking is there any general method to save function call state
    thanks in advance ...and maybe you can make video about this thematic

  • @dieSpinnt
    @dieSpinnt 7 หลายเดือนก่อน

    "Who TF is Alexa?" **singing**
    hehehe

  • @SlinkyD
    @SlinkyD 7 หลายเดือนก่อน

    Wat up with that regex-escape codes combo. New hax with old techniques, I like.

  • @skaruts
    @skaruts 7 หลายเดือนก่อน

    Odin uses LLVM indeed, but I think they're planning of getting rid of it. Ginger Bill has stated in interviews that LLVM is the bottleneck of Odin's compile times.

  • @RavinderRam
    @RavinderRam 7 หลายเดือนก่อน

    awesome brother

  • @berndeckenfels
    @berndeckenfels 7 หลายเดือนก่อน

    2:37:06 hm.. stacksize-=1 hm, why can you reassign those stack slots in ssa.

  • @monomere
    @monomere 7 หลายเดือนก่อน +3

    qbe outputs pretty bad assembly though, unfortunately

    • @ishanagarwal475
      @ishanagarwal475 7 หลายเดือนก่อน +2

      It is simpler than llvm. It might be a good thing to play around and learn.

    • @paulredmond6467
      @paulredmond6467 7 หลายเดือนก่อน +3

      @@ishanagarwal475 I don’t really understand the argument. Why does the complexity of the implementation matter if you’re just spitting out IR?

    • @ishanagarwal475
      @ishanagarwal475 7 หลายเดือนก่อน

      @@paulredmond6467 simplicity meaning it would be easier to read the source code and step through the code while debugging if some just wants to see how things are implemented and how they work.

    • @lassipulkkinen273
      @lassipulkkinen273 7 หลายเดือนก่อน

      Having looked at a fair amount of qbe output in the context of Hare, it's definitely better than directly spitting out unoptimized asm like tcc, and can even elide some bounds checks, but definitely worse than LLVM or GCC (as expected).
      I'd say the biggest problem for Hare at least is the handling of aggregate function parameter and return types. As far as I can tell ABI lowering happens after most optimization passes, so you get tons of unnecessary copying around that won't get optimized out. There's definitely also more register shuffling than bigger compilers would produce. I'd expect both of these to improve eventually.
      Personally I also think qbe should have the ability to generate blits with a non-constant size parameter, falling back to memcpy if it can't work out the size statically or it's too big. At the moment harec just uses a constant threshold for struct copies, and always uses memcpy for slices. But I don't know what the Hare or qbe people would say about that.
      Oh, and qbe at the moment is _way_ below the "10% of LLVM LoC" goal (and probably also the performance one...), so there's room for improvement left for sure.

    • @_garicas
      @_garicas 7 หลายเดือนก่อน

      @@paulredmond6467QBE is really lightweight, so you don't need a huge dependency. The code of QBE is small and easier to modify and play around it

  • @dieSpinnt
    @dieSpinnt 7 หลายเดือนก่อน

    around 1:51:20 . Absolutely true. The -React- sorry, the Rust developers got on a path where they thought it was a good Outlook(pun intended) to the future. But in many cases this looks like patronizing the Rust language user. And another disturbing point: That "thing" we are talking about here is actually called "clippy". You remember that annoying BS from the Windows/Office 97/98-2003 (internal name "Clippit", publicly used was "Clippy") that permanently wants to "fix" and harass the User with its demands and "well-intentioned advice" = YOU!? So, the question is: Are the Rust developers comedians, or are they outright evil? Hehehehe:)
    (Switching of that clippy BS, including warnings needs its own manual itself, LOL. And wow: Entries in the actual code. Like "#[allow(clippy::wrong_self_convention)]". What a joke!:)
    Or, examples:
    rustc -A dead_code / RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo build
    look into "RUSTFLAGS=-Awarnings", when you are down on your knees:)
    Edit: I think this plague was introduced by languages like C# and their extensions/helper, like StyleCop, etc. C# a wonderful but also horrible language. A mish-mash and disaster that actually needs such documentation helpers and external styling tools, because of oversights of the language developers and what this abomination lacks of features. Also "Design Principles", all those fancy hard rules and all this great advice and guidelines that suffocate the programmer like a corset. Test Driven BS. And last but not least: effing AGILE Brainfart ... Not only "should" ... your "friends" will clearly suggest that to you! ... the professional programmer follow all those rules and "ideas", but also the hobby programmer, because it is better to learn it the "right way", yeah ... surely it is. Maybe you should question your friendship with those plonkers?!:)
    All what I addressed has its use and can hopefully be switched off. Nonetheless forms every single piece of this modern infrastructure together not only a great toolbox, that may help you and give you good advice, but it also is a tool that easily allows to suppress individuality, own thoughts and worse: critical thinking. It also may have negative effects on creativity, deep knowledge or deepening your knowledge (WhyTF shudd I leearn orthUgraphI, whenn I has audo-corect? LOL) and is always biased in favor of the mainstream opinion and established values (especially A.I. BS, which is by design an horror example on that matter). Oh and all of those nice anti-democratic, anti-freedom, anti-artist, anti-human features are ENABLED BY DEFAULT! (Ask your management if he can wipe his own a... **g** )

  • @GillesLouisReneDeleuze
    @GillesLouisReneDeleuze 7 หลายเดือนก่อน +1

    cuik tb (tilde) > qbe

  • @GeorgijTovarsen
    @GeorgijTovarsen 7 หลายเดือนก่อน

    I am a simple man, I see a yt video on QBE and I press the "thumb up"

  • @plazeblogl9081
    @plazeblogl9081 7 หลายเดือนก่อน

    Great video! Which font do you use inside emacs? It looks really cool :)

    • @ecosta
      @ecosta 7 หลายเดือนก่อน +1

      If I recall correctly, he uses VictorMono everywhere

  • @grumble2009
    @grumble2009 7 หลายเดือนก่อน +1

    Repo for the code?

  • @PankajDoharey
    @PankajDoharey 7 หลายเดือนก่อน

    You should work at a promising startup with good ESOPS.

  • @hubstrangers3450
    @hubstrangers3450 7 หลายเดือนก่อน

    Thank you....

  • @litfill54
    @litfill54 7 หลายเดือนก่อน

    the non-zero is not non-zeroing 49:42

  • @KerryFalconer-z7r
    @KerryFalconer-z7r 24 วันที่ผ่านมา

    Gerlach Lock

  • @fdwr
    @fdwr 7 หลายเดือนก่อน

    0:15 Hare language: "fn"

    • @chri-k
      @chri-k 7 หลายเดือนก่อน +1

      fn is bad because it's too short.
      f sub n is definitely a name you could encounter while translating math into code, and "f_n" doesn't look very appealing.
      Of course unless it's not reserved despite being a keyword, but that's even worse.

  • @simonfarre4907
    @simonfarre4907 7 หลายเดือนก่อน

    I have no idea, but having developed debuggers, I'm guessing @start either means that the function prologue is done or that it starts there. Also you're not supposed to write IR directly. You're supposed to translate your higher level constructs, into IR. The QBE IR looks exactly like LLVM IR (also looks a bit like wasm if i'm not mistaken, which also is just another form of IR).

    • @Kersich86
      @Kersich86 7 หลายเดือนก่อน +1

      Why you are not supposed to. Who will stop you? The compiler police😂

  • @williamragstad
    @williamragstad 7 หลายเดือนก่อน

    I would love to see you build a language with QBE as backend

  • @apestogetherstrong341
    @apestogetherstrong341 6 หลายเดือนก่อน

    Not a Lisp, so not the future. Next.

  • @ax13h
    @ax13h 7 หลายเดือนก่อน

    A hard watch.

  • @llothar68
    @llothar68 6 หลายเดือนก่อน

    Would have needed this 15 years ago, when i had to use C as a target output. How does it handle stack unwinding, multiple results, stack switching and all this things that are not possible in C? Everything is easy when you have an add function. But C itself is limited and unfortunately had more influence to language design then necessary. In the good old SPARC register file days you had upto 7 return variables build into hardware.
    Also how is this working with incremental compilation? Recompiling only when offset values change? Okay, this one you can add with comments and string compares as i did, but whats about linkers? Unfortunately LLVM is not language independent for a decade or more, its total focused on creating a C++ compiler (or something like this). Linking was the main problem i had with my language. Like Jonathan Blow, i was writting on a system that should build one milion line program in under a second (incremental) and five seconds (full compile). Got the compiler that way but failed on the linking terrible.

  • @fleaspoon
    @fleaspoon 7 หลายเดือนก่อน

    where I can see the source for nob.h?

  • @fredow123456
    @fredow123456 หลายเดือนก่อน

    firstly i was like "wow this dude is making his own garbage collector kind of, fucking json in the code, efficient debugger almost like a visual studio, lists ects like as is he writing some c# that's fucking cool" then the last 30mins reminded me why you shouldn't use C 🤣

  • @SassoonLionel-y9y
    @SassoonLionel-y9y 20 วันที่ผ่านมา

    Amara Cove

  • @dieSpinnt
    @dieSpinnt 7 หลายเดือนก่อน +1

    around 1:49:00 . If you do not like LSPs (Language Server Protocol implementations, Immediate Error/Syntax Helpers), or syntax-highlighters, tags, clang-format and all of that fuzz ... I have a REVOLUTIONARY NEW IDEA here for you: SWITCH THEM OFF! (Instead of moaning and whining around **g** )
    I know, I am the world famous inventor of off-switches(ROTFL) and such a concept lies in my nature. But I shared that idea with you all. Now you know!:)))))
    No offense, Tsoding! I'm just kidding you:P

  • @quantumbacon
    @quantumbacon 7 หลายเดือนก่อน

    @TSODING you cant make a new language that doesnt have createWindow in 2024¡

  • @joshuadonahue5871
    @joshuadonahue5871 7 หลายเดือนก่อน

    1:12:57 classic segfault face

  • @JakeSilva-67
    @JakeSilva-67 7 หลายเดือนก่อน

    1:55:55

  • @bordercut1
    @bordercut1 7 หลายเดือนก่อน

    w humor.

  • @sinamobasheri
    @sinamobasheri 7 หลายเดือนก่อน

    37:00

  • @damnloveless
    @damnloveless 7 หลายเดือนก่อน

    skill issue, dab dab dab

  • @sinamobasheri
    @sinamobasheri 7 หลายเดือนก่อน

    54:00

  • @teesh3rt
    @teesh3rt 7 หลายเดือนก่อน +1

    yoooo

  • @devqbasic2384
    @devqbasic2384 7 หลายเดือนก่อน

    No the best is QBasic