Is this the Future of Programming Languages?

  Рет қаралды 61,047

Tsoding Daily

Tsoding Daily

Күн бұрын

References:
- Source Code: github.com/tsoding/qbe-notes
- c9x.me/compile/
- Tsoding Daily - Hare Programming Language - • Hare Programming Language
- llvm.org/
- en.wikipedia.org/wiki/Static_...
- en.wikipedia.org/wiki/Operato...
- github.com/tsoding/arena

Пікірлер: 159
@flleaf
@flleaf 3 ай бұрын
Me when i wake up: looks like we are alive
@Maggrathka
@Maggrathka 3 ай бұрын
Pinging all my body parts that are interested in being pinged
@henrikholst7490
@henrikholst7490 3 ай бұрын
The day has officially started.
@ignaciogaete2536
@ignaciogaete2536 3 ай бұрын
I bet you didn't expect that sh!t to happen
@dimator
@dimator 3 ай бұрын
*looking around my apartment* it is what it is, and it isn't what it isn't.
@wade__
@wade__ 3 ай бұрын
Rubbing the morning crusties out of my eyes: I can't see shit in this mist
@IgorGuerrero
@IgorGuerrero 3 ай бұрын
"LLVM is the React of compilers" hahaha I loved that one, it's a great analogy though
@user-xy2mw3il8b
@user-xy2mw3il8b 3 ай бұрын
"minus the toxic community" lol
@dtomvan
@dtomvan 3 ай бұрын
Rather create-react-app 😂
@themiddlelayer
@themiddlelayer 3 ай бұрын
Rust is the React of system programming
@jma42
@jma42 3 ай бұрын
@@themiddlelayer more like C++, Rust is like Solid/Svelte
@meanmole3212
@meanmole3212 3 ай бұрын
@@themiddlelayer looooooooooooooool
@BenjaminRosseaux
@BenjaminRosseaux 3 ай бұрын
I'm surprised to see my name here in this KZfaq video at 38:30 +/- along with my old PACC project. 🙂
@ErikBongers
@ErikBongers 3 ай бұрын
"LLVM is basically the React of compilers, minus the toxic community."
@t2b1
@t2b1 2 ай бұрын
lasted almost 5 whole minutes without talking shit about React
@Momoyon
@Momoyon 3 ай бұрын
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 💖
@diegorocha2186
@diegorocha2186 2 ай бұрын
100k subscriber well deserved, amazing content as usual!!!!! You're making the difference my dear friend!
@AdamSrgnt
@AdamSrgnt 3 ай бұрын
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.
@SeishukuS12
@SeishukuS12 3 ай бұрын
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 3 ай бұрын
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.
@shynrez340
@shynrez340 3 ай бұрын
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
@margondastudio6037
@margondastudio6037 3 ай бұрын
I'm Indonesia btw
@rubah_bukan_singa
@rubah_bukan_singa 3 ай бұрын
​@@margondastudio6037 2
@-ciii-
@-ciii- 3 ай бұрын
@@margondastudio6037 i dont usually do this but me too btw
@glowiak3430
@glowiak3430 3 ай бұрын
9:52 Vim actually has syntax hightlighting for Hare out of the box. Can your emacs do that?
@angelcaru
@angelcaru 3 ай бұрын
"no way" $ vim a.ha export fn main() *code highlights correctly* "wtf"
@sofiaknyazeva
@sofiaknyazeva 3 ай бұрын
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 3 ай бұрын
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 3 ай бұрын
Blud asked if emacs couldn’t do something 💀💀💀
@eeriemyxi
@eeriemyxi 3 ай бұрын
​@@sofiaknyazeva 1. That solution isn't available out of the box. 2. The comment was sarcasm.
@adr420
@adr420 3 ай бұрын
congrats on 100k❤🎉
@AK-vx4dy
@AK-vx4dy 3 ай бұрын
Perfixes are (for php case) for speed up parser/lexer interpreter
@kiosmallwood576
@kiosmallwood576 3 ай бұрын
1:48:02 Really good perspective on lsp that I had not considered. I think this should be it's own clip.
@alh-xj6gt
@alh-xj6gt 2 ай бұрын
44:30 "rekindle the enjoyment of programming and the believe what you are doing is important" (paraphrased for conciseness) - I changes vocation because the industry sucked the soul out of me and I didn't want to be part of that any longer. Personally I witnessed how software is used as a tool for legal extortion. There is only so much the consciousness can bear. As this is the prevalent usecase I didn't see where to fit in, so I quit. Worked in or for startups, academia, insurance and farms. Everywhere the extortion is somewhat similar and the last experience with the farmers and the state of repair was my final straw to at least not be part of the problem. A year or so ago got to HMH and with aoc to you as I needed to scratch an itch. Casey like you cutting through the BS really put things into perspective. But you are keeping it more approachable or understandable (hard to put in words). Your take on keeping it simple, not over-complicating or not over-abstracting and exploring ideas with it recreationally was what I needed to hear and see, as I couldn't put it into words myself. Any it got me back to code again without monetary incentive just as a real hobby. Thanks. Really like the explanations of why you like to do things. For example at 1:18:30 the Expr_Kind and Expr_As tagged union. Or your take and exploration with nob is just the right thing, like here to use nob for its very useful platform independent functions.
@RuslanKovtun
@RuslanKovtun 3 ай бұрын
4:59 - in ideal world people program in python because it meets particular speed requirements, not because nobody cares about performance at all.
@naoldereje2066
@naoldereje2066 3 ай бұрын
The most genuine channel I've ever seen on youtube.
@ratchet1freak
@ratchet1freak 2 ай бұрын
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.
@RicardoValero95
@RicardoValero95 3 ай бұрын
9:45 "let's actually set the highlighting to javascript" LOL
@twenty-fifth420
@twenty-fifth420 3 ай бұрын
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 3 ай бұрын
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.
@maman14141414
@maman14141414 3 ай бұрын
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 3 ай бұрын
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 3 ай бұрын
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 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
@nashiora
@nashiora 3 ай бұрын
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.
@MrPetzold123
@MrPetzold123 3 ай бұрын
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 😂.
@angelcaru
@angelcaru 3 ай бұрын
first time i've seen a tsoding vod before it got auto-generated captions
@packediceisthebestminecraf9007
@packediceisthebestminecraf9007 3 ай бұрын
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 2 ай бұрын
Do you know why Zig did it?
@109Rage
@109Rage 2 ай бұрын
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.
@mattshu
@mattshu 3 ай бұрын
how did i never notice the 'Porn Folder' in the lower status bar
@ecosta
@ecosta 2 ай бұрын
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 2 ай бұрын
@@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 2 ай бұрын
@@mfy0108 what kind of twisted mind deletes "material" after the "research"? lol
@yash1152
@yash1152 2 ай бұрын
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"
@blackhaze3856
@blackhaze3856 3 ай бұрын
QBE stands for query-by-example compiler? sounds pretty poggers.
@SimGunther
@SimGunther 3 ай бұрын
Quick Backend. It even says so on 8l's repo
@blackhaze3856
@blackhaze3856 3 ай бұрын
@@SimGunther I know. It was a kind of dadjoke 😂
@RavinderRam
@RavinderRam 3 ай бұрын
awesome brother
@oeerturk
@oeerturk 3 ай бұрын
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 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.
@albinekb
@albinekb 2 ай бұрын
Congrats to 100K!
@ivanjermakov
@ivanjermakov 3 ай бұрын
Would love to see how to compile a toy language from unusual paradigm, like purely functional or array language.
@no_hurry7000
@no_hurry7000 2 ай бұрын
You are insanely good at programming.
@henrikholst7490
@henrikholst7490 3 ай бұрын
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.
@SiddheshPardeshi-mp9cr
@SiddheshPardeshi-mp9cr 3 ай бұрын
Yoooooooooo!!!! zozin fam 100kkkk congo 🎊🎋🎉🎈✨zozin
@gamezoid1234
@gamezoid1234 3 ай бұрын
Pauog
@alexpyattaev
@alexpyattaev 3 ай бұрын
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).
@Heater-v1.0.0
@Heater-v1.0.0 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 3 ай бұрын
Working as intended.
@eeriemyxi
@eeriemyxi 3 ай бұрын
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 3 ай бұрын
@@eeriemyxi Sure, very likely a minority. Mind you ,both my software and that I was trying to use were hobby projects.
@SimGunther
@SimGunther 3 ай бұрын
31:05 It isn't. That's why Austral (and an earlier version of C++) generates C code before compilation with gcc
@iWillAvert
@iWillAvert 3 ай бұрын
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
@plazeblogl9081
@plazeblogl9081 3 ай бұрын
Great video! Which font do you use inside emacs? It looks really cool :)
@ecosta
@ecosta 2 ай бұрын
If I recall correctly, he uses VictorMono everywhere
@AndreSilva-bv7qg
@AndreSilva-bv7qg 3 ай бұрын
That is a very big folder! 58.2gb!
@hubstrangers3450
@hubstrangers3450 3 ай бұрын
Thank you....
@FDominicus
@FDominicus 3 ай бұрын
Congratulations to 100 000 subscribers. You deserve that and even much more IMHO.
@ecosta
@ecosta 2 ай бұрын
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.
@dieSpinnt
@dieSpinnt 3 ай бұрын
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!?!:)
@fleaspoon
@fleaspoon 3 ай бұрын
where I can see the source for nob.h?
@kaltwarraith5172
@kaltwarraith5172 3 ай бұрын
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.
@acquite
@acquite 24 күн бұрын
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
@berndeckenfels
@berndeckenfels 3 ай бұрын
2:37:06 hm.. stacksize-=1 hm, why can you reassign those stack slots in ssa.
@rednibcoding3412
@rednibcoding3412 2 ай бұрын
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.
@kala-telo
@kala-telo 3 ай бұрын
Is there chance to see more hare and qbe on this channel? And congratulations on 100k!
@grumble2009
@grumble2009 2 ай бұрын
Repo for the code?
@SlinkyD
@SlinkyD 3 ай бұрын
Wat up with that regex-escape codes combo. New hax with old techniques, I like.
@timwhite1783
@timwhite1783 2 ай бұрын
My only complain is there isn't support for WASM. If there was that would be genuinely awesome.
@satchelfrost6531
@satchelfrost6531 3 ай бұрын
start == (break main && run)
@ax13h
@ax13h 3 ай бұрын
A hard watch.
@StevenMartinGuitar
@StevenMartinGuitar 3 ай бұрын
Sounds good? Sounds gucci? Sounds atamagucci? Let'sa go!
@00jknight
@00jknight 2 ай бұрын
I wonder if QBE could be used to compile GDScript and massively benefit the Godot engine.
@rogo7330
@rogo7330 3 ай бұрын
The keepeer of enjoyment through programming. The saviour of fun through making computer go brrr. The code clown.
@theaugur1373
@theaugur1373 2 ай бұрын
Zig uses LLVM but they at one point said it will eventually not use LLVM.
@FicoosBangaly
@FicoosBangaly 2 ай бұрын
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 2 ай бұрын
Good point
@zenshade2000
@zenshade2000 Ай бұрын
printf is available, why would anyone ever need more than that? :^
@GillesLouisReneDeleuze
@GillesLouisReneDeleuze 3 ай бұрын
cuik tb (tilde) > qbe
@billynugget7102
@billynugget7102 3 ай бұрын
The only problem with qbe is no windows support which is its only real problem
@Kane0123
@Kane0123 3 ай бұрын
When your backend is essentially voodoo for most developers.
@fleaspoon
@fleaspoon 3 ай бұрын
this seems much more easier to use than llvm
@labsendeyshent
@labsendeyshent 3 ай бұрын
*ParserC* pronunciation strikes back 💀
@PankajDoharey
@PankajDoharey 3 ай бұрын
You should work at a promising startup with good ESOPS.
@dieSpinnt
@dieSpinnt 3 ай бұрын
"Who TF is Alexa?" **singing** hehehe
@simonfarre4907
@simonfarre4907 3 ай бұрын
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 3 ай бұрын
Why you are not supposed to. Who will stop you? The compiler police😂
@LeCockroach
@LeCockroach 3 ай бұрын
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
@diegorocha2186
@diegorocha2186 2 ай бұрын
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.
@dieSpinnt
@dieSpinnt 3 ай бұрын
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** )
@user-tw2kr6hg4r
@user-tw2kr6hg4r Ай бұрын
you gotta enable sub-pixel anti-aliasing
@litfill54
@litfill54 3 ай бұрын
the non-zero is not non-zeroing 49:42
@sinamobasheri
@sinamobasheri 3 ай бұрын
37:00
@dieSpinnt
@dieSpinnt 3 ай бұрын
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 3 ай бұрын
👍
@skaruts
@skaruts 3 ай бұрын
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.
@sinamobasheri
@sinamobasheri 3 ай бұрын
54:00
@GeorgijTovarsen
@GeorgijTovarsen 3 ай бұрын
I am a simple man, I see a yt video on QBE and I press the "thumb up"
@omgboy4939
@omgboy4939 3 ай бұрын
49:42 nice non 0 exit xd
@coinconclusive
@coinconclusive 3 ай бұрын
qbe outputs pretty bad assembly though, unfortunately
@ishanagarwal475
@ishanagarwal475 3 ай бұрын
It is simpler than llvm. It might be a good thing to play around and learn.
@paulredmond6467
@paulredmond6467 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 3 ай бұрын
@@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 3 ай бұрын
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 3 ай бұрын
@@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
@teesh3rt
@teesh3rt 3 ай бұрын
yoooo
@joshuadonahue5871
@joshuadonahue5871 2 ай бұрын
1:12:57 classic segfault face
@JakeSilva-67
@JakeSilva-67 3 ай бұрын
1:55:55
@mitchellnwafor7166
@mitchellnwafor7166 3 ай бұрын
w humor.
@quantumbacon
@quantumbacon 3 ай бұрын
@TSODING you cant make a new language that doesnt have createWindow in 2024¡
@davidrichards1302
@davidrichards1302 2 ай бұрын
MLIR+Autotune FTW
@fdwr
@fdwr 2 ай бұрын
0:15 Hare language: "fn"
@U20E0
@U20E0 2 ай бұрын
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.
@damnloveless
@damnloveless 2 ай бұрын
skill issue, dab dab dab
@llothar68
@llothar68 2 ай бұрын
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.
@apestogetherstrong341
@apestogetherstrong341 2 ай бұрын
Not a Lisp, so not the future. Next.
@williamragstad
@williamragstad 2 ай бұрын
I would love to see you build a language with QBE as backend
@devqbasic2384
@devqbasic2384 3 ай бұрын
No the best is QBasic
@dieSpinnt
@dieSpinnt 3 ай бұрын
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
@kevinnguyen6727
@kevinnguyen6727 2 ай бұрын
Please don't create any more programming languages, reading the documentation about QBE I see that it seems to be a mix of C and Assembly. The programming languages of the future are natural languages.
@explqicot3293
@explqicot3293 3 ай бұрын
Odin is making a backend for their compiler cuik called tilde that can be used for programming languages as well
@marcs9451
@marcs9451 3 ай бұрын
Odin is not *making* the backend. Cuik and Tilde already existed and odin just wants to target it besides LLVM. Which is a good move, over 90% of Odin's compile times are due to LLVM
I rewrote My Go App in Rust
2:38:22
Tsoding Daily
Рет қаралды 86 М.
I Tried JAI, Can It Replace C++?! (Programming Language)
21:05
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 38 МЛН
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 4,1 МЛН
Chips evolution !! 😔😔
00:23
Tibo InShape
Рет қаралды 21 МЛН
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 110 М.
You don't need Generics in C
1:37:38
Tsoding Daily
Рет қаралды 55 М.
I fixed Lua
2:16:48
Tsoding Daily
Рет қаралды 42 М.
Unreasonably Easy Console Apps in Rust
1:54:16
Tsoding Daily
Рет қаралды 88 М.
Jai vs Odin systems programming languages (Non-spicy takes!)
20:10
Context Free
Рет қаралды 67 М.
Every programming language explained in 15 minutes | Prime Reacts
43:42
When Zig Outshines Rust | Prime Reacts
23:31
ThePrimeTime
Рет қаралды 131 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 932 М.
Обзор Pixel 8a
19:36
Rozetked
Рет қаралды 180 М.
Apple. 10 Интересных Фактов
24:26
Dameoz
Рет қаралды 109 М.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
Приехала Большая Коробка от Anker! А Внутри...
20:09
РасПаковка ДваПаковка
Рет қаралды 71 М.
IPad Pro fix screen
1:01
Tamar DB (mt)
Рет қаралды 2,9 МЛН