LIVE ON TWITCH: / theprimeagen Get in on Discord: / discord Get in on Twitter: / theprimeagen Got Something For Me to Read or Watch??: / theprimeagenreact
Пікірлер: 217
@tedchirvasiu Жыл бұрын
"I'm a white man, I write my own compiler"
@beamshooter Жыл бұрын
he actually said this, didn't he
@tedchirvasiu Жыл бұрын
@@beamshooter Yeah, look for "Terry Davis gets a phonecall".
@Shitopia539 Жыл бұрын
legend
@STUIPEDCHICKEN Жыл бұрын
chad
@JohnSmith-ox3gy11 ай бұрын
Neither of the statements aren't wrong tho.
@larryluck7305 Жыл бұрын
RIP Terry A Davis 🙏
@DarkerCry Жыл бұрын
Such a tragic story, the guy was truly amazing
@shojauddin2509 Жыл бұрын
@@DarkerCry he was genius but he wasn't that amazing as a person, he said lots of racist stuff in his times
@DarkerCry Жыл бұрын
@@shojauddin2509 lol
@leaveleague3491 Жыл бұрын
@@shojauddin2509 still a genius
@mr.billthrower7392 Жыл бұрын
@@shojauddin2509 You do know that the nigga had schizophrenia right...
@johanngambolputty5351 Жыл бұрын
In unholy c, you have to tip your fedora to get any memory... m'alloc
@wchen2340 Жыл бұрын
#define NULL ((void *)0x666)
@JasonMitchellofcompsci11 ай бұрын
That is the most un-temple os thing I've ever heard.
@catlolis8 ай бұрын
shut up
@soothsayerslunk18 ай бұрын
You been comprised by the glow in the darks
@shenandoahwildcat23 күн бұрын
glowie
@simonfarre4907 Жыл бұрын
2:05 - you guys say "the way its laid out now is bad". How so? I think you probably didn't think this through. A pointer to U8 is not byte sized. It is, 32 or 64 bits depending on the platform. Its kinda funny that you both say "it's categorically bad". Codefluencers do what codefluencers do 😊
@orbital1337 Жыл бұрын
They didn't see the pointer - that shitty C syntax of putting the pointer on the identifier instead of on the type is to blame. The variable declaration syntax in C is such a horribly messed up disaster.
@simonfarre4907 Жыл бұрын
@@orbital1337 it is on the type though; but I think I get what you mean. You want *u8 instead of u8*.
@orbital1337 Жыл бұрын
@@simonfarre4907 No, in C and C++ (and presumably Holy C) the * does not go on the type. For example, you can write "int *x, y, *z;" and this declares an int pointer x, an int y (!) and another int pointer z. This is a very useful feature of C if you hate your colleagues and/or want to increase your job security by making your code less readable. Like seriously, who thought that was a good idea? Anyways, in the code in the example, this style is used so the first variable is declared as "U8 *input" instead of "U8* input". With the way the text is aligned, that makes it look like the types are U8, U64, U64, U64, U8 if you're just skimming over the code.
@simonfarre4907 Жыл бұрын
@@orbital1337 Yes it does. It depends on how you read them. int a* would have been "not on the type". But following the type, means it's part of the type sequence. The rest I certainly agree with. But they did not get it until later in the video.
@nameq Жыл бұрын
not the only mistake they made
@angelcaru8 ай бұрын
The title for this is kinda confusing. When I read "Holy C Lexer" I think "the lexer for Holy C", not "some random lexer that happens to be written in HolyC"
@dn7949Ай бұрын
Programmers don't understand the concept of programming. Many such cases.
@Endelin Жыл бұрын
I'm going to name my next videogame character Malloc Numerick.
@themannyzaur Жыл бұрын
Me seeing this some time in the future and just laughing my ass off because I know where it's from 😆
@slendi9623 Жыл бұрын
I love how people got confused by U0, yes HolyC has both I0 and U0. Idk the difference really other than its different types. Also, classes can have at most 1 level of inheritance
@RotatingBuffalo Жыл бұрын
i'm fairly sure it doesn't have I0, as it would be the same as U0. also I looked it up and have not seen any evidence to the existence of an I0 type. regardless, the purpose of the type is the same as "void" in standard C, although sizeof(U0) is 0, and sizeof(void) is 1.
@yjlom Жыл бұрын
@@RotatingBuffalo sizeof (void) is implementation defined I'm pretty sure edit: actually it must be undefined since pointer arythmetics on void *is illegal outside of GNU extensions
@8ightfold Жыл бұрын
@@yjlom sizeof(void) is nonstandard, not imp defined. It's ill formed, don't use it :P
@slendi9623 Жыл бұрын
@@RotatingBuffalo Both I0 and U0 exist, execute CDoc *doc = DocNew("::/Dump.DD"); Who("m",,,doc); DocWrite(doc); then Ed("::/Dump.DD"); this dumps the hash table and you can then search for I0.
@slendi9623 Жыл бұрын
@@yjlom sizeof(U0) and sizeof(I0) are both 0, sizeof(U64) is 8.
@tomkayak9752 Жыл бұрын
Wow, Terry Davis. I did just go down that rabbit hole.
@minciNashu Жыл бұрын
Why the hate for u64 as length? It's equivalent to size_t on 64-bit targets, which is what's used for container size.
@mattymerr701 Жыл бұрын
Or uint64_t right?
@YourMom-rg5jk Жыл бұрын
people like to over-complicate things. modern software is a god damn clusterfuck
@maksymiliank5135 Жыл бұрын
@@YourMom-rg5jkSounds like something Terry Davis would say
@aichrist Жыл бұрын
Rest in Peace Terry! I've been working on a tutorial series. Hopefully more apps in HolyC soon :)
@masterchief15205 ай бұрын
I see you followed through. Good job.
@SimGunther Жыл бұрын
That case range in the switch statement is one of the MANY things that make it truly "holy" ❤
@anon-fz2bo Жыл бұрын
rust
@Jannfndnanakid Жыл бұрын
@@anon-fz2boywnbaw
@AdhiHargo11 ай бұрын
Holy Nim, then.
@ghostbusterz Жыл бұрын
2:10 - TempleOS is 64-bit, meaning addresses (pointers) are 8 bytes. Thus, the Lexer class is laid out correctly if the concern is optimal packing. 8 bytes 8 bytes 8 bytes 8 bytes 1 byte
@Endelin Жыл бұрын
As a kid I thought the word "prevent" meant "to start". So Smokey the Bear's PSA of "Only YOU can prevent forest fires" was super confusing.
@kurt7020 Жыл бұрын
Reminds me of "clang" being pronounced "C-lang". It's called "clang" (like the sound) by the project deveopers.
@aasquared8191 Жыл бұрын
dude, it's not a holeyck. its definitely holy c.
@thego-dev Жыл бұрын
@@aasquared8191 i think they're talking about the "MAlloc" situation, but okay
@astroid-ws4py Жыл бұрын
We also have flang.
@JafacaksWasTaken Жыл бұрын
its holy c like holy see, the jurisdiciton of the pope
@sqlexp Жыл бұрын
It should be pronounced as Holy Shee or Holy Chez💩
@pubwinner7867 Жыл бұрын
Pseudo intellectuals mocking holy c vibe. i cant keep watching
@TheVimeagen Жыл бұрын
i think calling me a pseudo intellectual is an insult to pseudo intellectuals
@LanceWillMakeIt Жыл бұрын
wasn't ready for that 😂@@TheVimeagen
@almighty1984 Жыл бұрын
I remember making Quake maps and not knowing what "nonsolid" meant
@anispinner Жыл бұрын
Case range in the switch statement? Holy C... Why the F C didn't have that
@JasonMitchellofcompsci11 ай бұрын
That's what Holy C is. C++ threw the kitchen sink at C. Holy C just added the obvious stuff. Also it can be repl'd.
@alkeryn1700 Жыл бұрын
actually you can use the "..." range when using clang, many compiler implement it but it isn't part of the standard !
@BanakaiGames Жыл бұрын
It's from gcc, the flag for it in clang is even gnu-case-range
@JasonMitchellofcompsci11 ай бұрын
As for the reason for the U64 instead of U32. Basically the since HolyC is newer than 64 bit processors and it's a fresh start with no historic unix code the idea is there is never a reason for 32 bit anything. The whole point of TempleOS is to come in with no standards and start new. This is one of the reasons it doesn't do networking. Then it would have to accept insert random list of RFCs. Nope. It is forbidden to code RFC or ISO anything in TempleOS. Unless you can personally invent it you shouldn't code it.
@MACAYCZ Жыл бұрын
5:50 In fact gnu extension added support for that.
@u9vata Жыл бұрын
HolyC also have other trickeries that are handy actually...
@therealsunnyk Жыл бұрын
"It looks like Go"... err... it looks like C?
@cadetsparklez330010 ай бұрын
get the word rust off my holy c
@ryantylerMachete11 ай бұрын
terry himself referred to it as "malloc" og terminology
@onioncontrol Жыл бұрын
RIP Terry. I hope I'll get to meet you when I leave this earth. God Bless everyone. If you're schizophrenic please don't let yourself degrade as bad as Terry was twords the end.
@naruinoiscanoninanalternat29477 ай бұрын
he loved God and was mentally ill, i have no doubt God had mercy on him 🥳
@deleted-test Жыл бұрын
i want to make a linux window manager in holyC. i know nothing about holyC. I barely know anything about C. i will come back to this comment once i reach my goal, be it months or years.
@leehaswell4206 Жыл бұрын
are you there yet
@deleted-test Жыл бұрын
@@leehaswell4206 bruh i commented 3 days ago and you responded yesterday :skull: no way im that quick
@paulmccartney2327 Жыл бұрын
It's been a long goal of mine to write an interrupt routine in Haskell. Wish me luck guys !!!!!!!!!!!!!!!!!!
@LanceWillMakeIt Жыл бұрын
are you there yet
@deleted-test Жыл бұрын
@@LanceWillMakeIt not yet. :>
@theAmazingJunkman6 ай бұрын
Chat blew up about U0 being used in place of void and they didn’t even notice
@zenedge7599 Жыл бұрын
R.I.P. Terry A Davis
@KadenCartwright Жыл бұрын
Is that TPope in the background 😂💀
@asdfasdf9477 Жыл бұрын
Let’s just pray that MAlloc never fails.
@YourMom-rg5jk Жыл бұрын
so don't lean over on a motorcycle
@nameq Жыл бұрын
honestly impressive how little you know for what and how youre doing
@szymoniak75 Жыл бұрын
exactly
@nameq Жыл бұрын
@@szymoniak75 peak dunning-kruger codefluencers theyre probably not too dumb but the confidence is repulsive
@AKA-077 Жыл бұрын
what do you mean
@The_Conspiracy_Analyst Жыл бұрын
Yeah this is what stood out for me as well
@moosethemucha Жыл бұрын
I've seen several of these now - whats the context ? What is this code for - is it a coding golf challenge thing ? Who's writing this code for the review ? It took me so long to work who Tom was - he'd know though as he's a genius.
@joraquest2306 Жыл бұрын
lmao I dont know why they are doing it but the codes are written by viewers
@replikvltyoutube3727 Жыл бұрын
I think it's following a book about making parser. It's a thing Primeagen wants to make programming language speed competition with in 'real-ish world' scenario.
@reo101 Жыл бұрын
kzbin.info/www/bejne/naTVf6WidpKXpck
@InvidiousIgnoramus Жыл бұрын
@@joraquest2306 I highly doubt Terry A Davis came back from the grave to send his code to these literally whos.
@osamaaj Жыл бұрын
3:33 always make sure malloc returns a valid pointer before proceeding to use it.
@TonKcedua Жыл бұрын
Actually, in Holy C we use a faith-based system. If you're not a sinner you always get a valid pointer back!
@osamaaj Жыл бұрын
@@TonKcedua my bad. Guess I need to work on my faith 🛐
@slendi9623 Жыл бұрын
templeos is so lightweight, malloc never fails, also throws 'OutMem' if fails
@poiu530212 күн бұрын
If it doesn't, you have bigger problems than a crash.
@alexanderblohme50446 ай бұрын
Doesn’t that dude on the right believe he is a “god” programmer (at least how he talks on his streams) and he didn’t even fcking know malloc was “memory allocation”?😂
@XENON20285 ай бұрын
the only god programmer is terry imo
@AndreyMakarov-i7hАй бұрын
No formal education?
@TeH.j0keR4 ай бұрын
I can imagine Lex Fridman writing his own compiler, like a machine.
@sixthsurge8 ай бұрын
everyone knows malloc is short for mallocate
@sabbaseleftheriadis56013 ай бұрын
only God can criticise Terry's code
@distant6606 Жыл бұрын
wheres go 🧐
@scrawnydaghost Жыл бұрын
I have no idea what any of this means but my faith in God has only grown watching it
@steveg1961 Жыл бұрын
I've always pronounced it "MAL-loc." That just seems the right pronunciation. Knowing, of course, it is a memory allocation.
@TheVimeagen Жыл бұрын
hands down correct
@DNA912 Жыл бұрын
have to come clean. I also didn't realise malloc was MAlloc
@MsDuketown Жыл бұрын
The monkey lexer is a module in the Elixer lib? Which distro are you running? Nice feature talkie-talk. Was it about ~100 LoC? A bit tóó bounded for Terry's multi-decade project. Looking forward to the next feature. Tokenization compared to TS-Rust-Zig-deez?
@georgecop9538 Жыл бұрын
Then why is not MemAlloc, to align with MemCpy?
@themannyzaur Жыл бұрын
To make it easier for C programmers to know which functions to use and such I guess So malloc = MAlloc and MemCpy = memcpy
@SimonBuchanNz Жыл бұрын
Because the original C only looked at the first 6 characters of the name. You could make it longer, but it would ignore anything past that silently. Another fun detail is that struct fields were unscoped, so if you had two "name" fields the compiler just picked one of the offsets and used it for any ".name" in the source. They *really* believed in "Worse is better" back in the 70s!
@aahnecroth Жыл бұрын
because god said "no!"
@RandomGeometryDashStuff Жыл бұрын
05:39 it's c gnu extension
@GerbenWijnja8 ай бұрын
TempleOS supports images inside text files. Like, you can have an animated gif in your source code file.
@m4rt_ Жыл бұрын
When are you going to review the Jai code? I might try to quickly get it done before you review it.
@livingfreely7 ай бұрын
Regarding the spread operator in the switch case: Terry Davis was explaining this and said roughly that this is the hardest question in programming to decide if things like these are either "divine intellect or n-word-licious."
@masterchief15205 ай бұрын
Terry had a way with his words 😂
@plagiator192 ай бұрын
I think these guys glow in the dark
@anon-fz2bo Жыл бұрын
suppose the func StrNewN took in a buffer of 3 characters and the size arguement was the length of this buffer. that implies that the first line in this function is an array of 4 bytes right? malloc(sz + 1) == malloc(3 + 1) which means allocate 4 bytes in this case from my understanding. then copy the contents of the input buffer into the newly created output buffer & null out the final index of that character array effectively making a c string ie a string that ends will a null byte then simply return this string. what i dont get is why alloc 4 bytes instead of 3? im assuming the extra byte is used to assign the null byte. if output now has a length that is == input and input was an array of the chars "abc" then out[sz] is actually out[3] which hes setting to be equal to '\0'. you would get an indexing error in most languages coz the compiler would say something like index out of bounds in this case but im assuming thats why he allocated 4 bytes instead of 3 for the out buffer?
@NoodleFlame Жыл бұрын
So possibly zero indexing and length variables are causing some confusion here? Following your example: If StrNewN took in a buffer of 3 characters and the size argument was the length of this buffer 3 then.... Yes that does allocate an array that can occupy 4 chars, 3 from the buffer passed in and an additonal char '\0' for the delim. The valid index range being 0..3 inclusive (4 in total). If the input was "abc" then after the MemCpy the output would look like this: out[0] = 'a' out[1] = 'b' out[2] = 'c' And then it terminates the c string at index sz which we passed in as 3 and because we have extended the array by 1, we know that the previous length is now the maximum valid index. out[3] = '\0' Hopefully that clears things up a little
@maksymiliank5135 Жыл бұрын
C represents the string with a zero byte (0x00, '\0') at the end to indicate that it is the last byte of the string (that's why it's called "zero-terminated string"). So If you want to get the length of a string, you have to count the number of bytes until you find zero byte. Usually the zero byte is not counted to the length, but you have to allocate one additional byte in a buffer and set it to 0, because a lot of functions in c expect a zero-terminated string.
@fish1r1 Жыл бұрын
tsar + coding = tsoding lol
@slendi96236 ай бұрын
I am so sad i missed the stream i wouldve flexed holyc's switches and running holyc in the preprocessor being able to streamprint into the compiler input
@systemsbyvedant Жыл бұрын
Hey is there a place where I can see all these submissions? I think they would be a really great source for referring any new language
@johnsmith1953x5 ай бұрын
*FACT: The Pope is also known as the "Holy See"*
@NikolaNevenov86 Жыл бұрын
wtf....first time I saw `malloc` I was..."Oh it's - memory allocate". Still malloc sounds better than M-Alloc. Like some people will pronounce char as "car" or "khar"... it's char, short from "character".
@illyias Жыл бұрын
Let's be real, the entirety of C's naming convention is a disaster from start to finish. There's nothing redeemable here either way.
@deusexmaximum8930 Жыл бұрын
Bro looks like Sirius Black
@edgardoarriagada9467 Жыл бұрын
There is calloc and realloc as well
@lowlevelcodingch8 ай бұрын
did he say Tsoding?
@meowrbius Жыл бұрын
Legend Terry and his legendary language
@mattiapalmese2971 Жыл бұрын
3:45 it's called "malloc" in real C (or holy) and not "mfree" because "mfree" would be calloc.
@gnuemacs11668 ай бұрын
What Git did u pull from ?
@jamespong6588Ай бұрын
Compiling directly to binary, realtime compiling, it's GOOD
@Valerius1233 ай бұрын
goto is only problematic if you write your whole application within a single function. you can't goto across functions as far as i know. that's setjmp/longjmp. if you follow good programming practices goto is a great statement for simplifying messy control flows.
@etzerdlasgaudistuben530011 ай бұрын
you are normies that didnt understand the holy c
@plato4ek Жыл бұрын
Can anyone explain me the joke about nUmeric vs numEric? Is there a different meaning for the former? (Not a native speaker.)
@justinwinch6275 Жыл бұрын
They don't mean different things, it's just that the typical pronunciation is the latter (emphasis on the "er" syllable, not "num") so it sounds weird saying the former. Since he'd only seen "numeric" written in code and not said out loud, he never learned the correct pronunciation for several years until he finally said it out loud and someone corrected him.
@illyias Жыл бұрын
@@justinwinch6275 The joke is more than that. He'd only ever seen it spelled out, so he thought it was some special programmer lingo - a "numeric". Only afterwards, he realized it's a totally normal word.
@albuquerquehotspot7835 Жыл бұрын
Terry had the … spreading operator decades before ES6 JS 😯
@deejaykabwoy44 Жыл бұрын
Classes are from the lord😂😂
@aasquared8191 Жыл бұрын
BASIC when's't
@dakata2416 Жыл бұрын
HOW DARE YOU?!
@tru2thastyle7 ай бұрын
Terry was a genius.
@mik56865 ай бұрын
straight from god himself, isnt it weird how no one uses holyc in prod?
@uindiendanslaville2Ай бұрын
Blaise Pascal mentioned 👀
@ultraderek9 ай бұрын
Holy Malloc Vim-man.
@adityathapa218711 ай бұрын
How to learn holy c
@whoopsimsorry2546 Жыл бұрын
U8 * has 8 bytes size
@sameash3153Ай бұрын
I knew terry before he was a meme
Жыл бұрын
ALL HAIL THE GREAT M'ALLOC
@WerfiyКүн бұрын
Terry Legend🙏
@rnrbishop2 ай бұрын
I mean terry was right, linux types are confused by anything not pretending to be a 70s mainframe.
@LukeNewcomb Жыл бұрын
malloc is a word.
@szymoniak75 Жыл бұрын
what did i just watch?
@HalCogan6 ай бұрын
I bet you can't even see them glow in the dark smh tbh
@mosomiliardaru Жыл бұрын
tom is a genius, his language is better than this
@julianranieri6014 Жыл бұрын
It's absolutely malloc idgaf
@marcusmeaney Жыл бұрын
Ameno/10
@rust54278 ай бұрын
these guys are so hot
@gregoryshields42585 ай бұрын
If you are this dumb about Terry Davis, then you should not be covering his language.
@bullpup1337 Жыл бұрын
why does he think holyc is from the 80s? and why does he say “they” pretty sure terrys preferred pronouns was he him lol
@fahadali13727 ай бұрын
read about islam
@ahhfdhxhdj53127 ай бұрын
why would he want to read about a demon possesed pedophile