Premium Only Content
Compiler From Scratch: Phase 1 - Tokenizer Generator 007B: Code generating char/string references
Streamed on 2024-08-30 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
Interrupted stream today. My son unplugged the power to router so it took a few minutes to get the internet back up. There is a part A.
Today we generated more code to support the tokenizer we will be generating. We generated a class to handle character references (ChrRef) and another to handle string references (StrRef). The main idea is to never copy or pass strings around. These references just contain enough information to point to a location in the text buffer (TxtBuf). The only time these things will be turned into strings is when reporting errors and time doesn't matter any more.
Based on the project settings, you can generate these classes for one of three encodings: ASCII, Latin1 and UTF8. The UTF8 one will be the slowest, because if has to do quite a lot of verification for each character. The ASCII one will be pretty fast, but still has to check that each character is in [0-127]. Latin1 will be the fastest since there is no character checking.
-
LIVE
Glenn Greenwald
3 hours agoEXCLUSIVE: Succession Actress & Podcast Host Dasha Nekrasova Speaks Out About Hollywood Cancellation Over Fuentes Interview | SYSTEM UPDATE #549
7,759 watching -
LIVE
SpartakusLIVE
1 hour agoTexas FARMBOY turned WZ PRO turned REDSEC HERO turned ARC LOOT GOBLIN
123 watching -
58:40
Donald Trump Jr.
3 hours agoCan California be Golden Again? Interview with Gubernatorial Candidate Steve Hilton | TRIGGERED Ep.293
16.2K51 -
LIVE
AirCondaTv Gaming
5 hours ago $0.07 earnedBattlefield 6: Burn Baby Burn. Like a Raging Inferno
49 watching -
1:06:20
BonginoReport
2 hours agoTrump, Vance “SNUBBED” by Never-Trumper Cheneys - Nightly Scroll w/ Hayley Caronia (Ep.182)
25.1K11 -
LIVE
SlantRock
3 hours agoBATTLEFIELD REDSEC/ MAYBE ARC RAIDERS AFTER
33 watching -
LIVE
Astral Doge Plays!
1 hour agoHyrule Warriors: Age of Imprisonment ~LIVE!~ Ganondorf Is a Jerk
41 watching -
1:25:13
Kim Iversen
2 hours agoMKUltra Victims Are SUING — The CIA's Darkest Secret EXPOSED
75.5K38 -
LIVE
GritsGG
5 hours ago#1 Most Warzone Wins 4015+!
45 watching -
16:30
Stephen Gardner
3 hours ago🚨OVAL OFFICE EXPOSES TRUMP TAKEOVER – FILIBUSTER NUKED!
8.73K18