Premium Only Content
Compiler From Scratch: Phase 1 - Tokenizer Generator 015: Finishing Lazy Token Evaluation
Streamed on 2024-10-25 (https://www.twitch.tv/thediscouragerofhesitancy)
Zero Dependencies Programming!
Last week we started with the Lazy evaluation build option, but didn't have time to finish it. So today we finished it.
As I dug in, it became clear that I needed a way to track execution of the regex DFA states to see what was happening and when. So I started coding that in. However, that introduced a bug that caused things to crash so hard that there was no debug information. After a log to printf debugging, I narrowed it down to a single snippet of text that was being written out to a file. For some reason, copying a single word out by offset using snprintf was exploding if the source text had a "%" anywhere in it . The "%" was not in the offset/count region that was actually being copied from at all. I replaced the call to snprintf with strncpy and everything worked again. It just makes me sad how much time it took to find the reason and the solution.
Once we were back up and running there was a bit of fiddling to finish off Lazy token evaluation. There are a few differences in the way the process flows when batch processing vs lazy processing, but I found them one at a time (greatly aided by the trace log of the tokenizing process). A bit of testing with other performance flags, an update to the macros in the resulting file, and lazy processing is reasonably working for all of the build options we tested.
Next week we need to write a script to test the different combinations more automatically and efficiently. There are a lot of build configuration options now.
-
1:59:42
Game On!
17 hours ago $14.67 earnedNFL Week 9 Wise Guy Roundtable BEST BETS!
77.7K6 -
2:18:53
Badlands Media
19 hours agoDevolution Power Hour Ep. 403: Brennan Exposed & The Intel War w/ Thomas Speciale
444K113 -
4:34
Legal Money Moves
5 days agoThe AI Panic: Are You Next?
26.7K10 -
25:41
Robbi On The Record
2 days ago $42.47 earnedThe Billion-Dollar Lie Behind OnlyFans “Empowerment” (Her Testimony Will Shock You) | part II
60.9K67 -
1:06:09
Man in America
21 hours agoExposing HAARP's Diabolical Mind Control Tech w/ Leigh Dundas
88.7K95 -
1:47:16
Tundra Tactical
16 hours ago $115.93 earnedGlock Interview From Beyond The Grave//Whats the Future of Home Training??
69.9K12 -
2:16:35
BlackDiamondGunsandGear
15 hours agoEBT Apocalypse? / Snap Down SHTF / After Hours Armory
41K14 -
14:05
Sideserf Cake Studio
1 day ago $20.34 earnedHYPERREALISTIC HAND CAKE GLOW-UP (Old vs. New) 💅
78.4K15 -
28:37
marcushouse
1 day ago $15.22 earnedSpaceX Just Dropped the Biggest Starship Lander Update in Years! 🤯
49.5K20 -
14:54
The Kevin Trudeau Show Limitless
4 days agoThe Hidden Force Running Your Life
133K28