Code Review: Holy C Lexer
69,799
Published 2023-06-18
Get in on Discord: discord.gg/ThePrimeagen
Get in on Twitter: twitter.com/ThePrimeagen
Got Something For Me to Read or Watch??:
www.reddit.com/r/ThePrimeagenReact/
All Comments (21)
-
"I'm a white man, I write my own compiler"
-
RIP Terry A Davis 🙏
-
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 😊
-
In unholy c, you have to tip your fedora to get any memory... m'alloc
-
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"
-
Wow, Terry Davis. I did just go down that rabbit hole.
-
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
-
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
-
I'm going to name my next videogame character Malloc Numerick.
-
That case range in the switch statement is one of the MANY things that make it truly "holy" ❤
-
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.
-
Reminds me of "clang" being pronounced "C-lang". It's called "clang" (like the sound) by the project deveopers.
-
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.
-
Rest in Peace Terry! I've been working on a tutorial series. Hopefully more apps in HolyC soon :)
-
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.
-
Pseudo intellectuals mocking holy c vibe. i cant keep watching
-
I remember making Quake maps and not knowing what "nonsolid" meant
-
"It looks like Go"... err... it looks like C?
-
Case range in the switch statement? Holy C... Why the F C didn't have that
-
actually you can use the "..." range when using clang, many compiler implement it but it isn't part of the standard !