SakurajimaShida
  • Joined on 2025-07-17
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-18 17:00:32 -07:00
8665f996e5 At long, panful last, a functional version of exercise 1-17. The code has contracted considerably since the intiially architected version, with replicate() and its functionality having been eliminated as unnecessary, saving numerous cycles and ~64kB of memory, advance() has been eliminated due to creating needless complexity, hindering readability, and decreasing efficiency, and recall has been eliminated because it depended on replicate, and was also unnecessary as enumerate() now contains three lines of code that completely eliminate the need for replicate() or enumerate().
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-17 13:54:23 -07:00
848898ff11 WIP overbuilt solution to exercise 1-17.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-16 11:54:12 -07:00
2084b2ae84 WIP version of ex1-17-2.c that crashes during a memory safety check in store() for some reason. If I comment out the check, it spins and segfaults. Cause unknown.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-05 11:52:42 -07:00
df60eb6528 Reverted a change that erroneously removed ex1_17.c.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-05 11:49:55 -07:00
841097a626 Formatting adjustments and created initial file for exercise 1-17.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-02 14:03:01 -07:00
481f76699e storage.txt is now created at runtime rather than being assumed to be present and empty. recall() now removes storage.txt at completion. main() now includes a check to see whether storage.txt already exists, sends an error message, and exits with code 1 if storage.txt is already present.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-02 13:35:23 -07:00
5ec722b2ca recall() now properly closes storage.txt on completion.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-09-02 13:33:43 -07:00
e57d4717d7 WIP solution to exercise 1-16 using a file on disk as a storage buffer for stdin so that we can step through the input repeatedly.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-28 16:32:19 -07:00
87e93e98ca Stub of an improved version of ex1_16 to allocate array sizes on the fly and support arbitrarily long input.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-28 14:25:28 -07:00
c47e378a4f Skeleton of exercise 1-16; functionally a verbatim copy of the example text on page 30 of KNR C, though in reality, I have made it more readable and fixed a couple of bugs related to expanded functionality of modern C.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-26 17:13:24 -07:00
4ddc868da3 An implementation of exercise 1-15 that I spent far too long banging my head against over an issue that turned out to be me having flipped 5 and 9 in my math.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-26 11:05:10 -07:00
73d3fe21ac Fixed a potential bug that would cause a hang on unrecognized input. Added a 39th position to both charCount and printTable for storing, enumerating, and displaying untracked characters that do not fit to a defined position in charCount.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-26 10:42:54 -07:00
22694dfae0 Added support for numbers. Removed refTable[], changed enumeration loop to check via sequential if-else statements if a character is within a given range. This was done in favor of a lookup array to improve performance.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-23 12:49:55 -07:00
cff9570b57 KNR C exercise 1-14 implementation with some really cool optimization and tricks.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-22 11:32:24 -07:00
207fe60c5b Per suggestions and feedback from Affine, removed a loop that initialized the charCount array, since modern C allows us better ways to do this. Saved 5 instructions in the binary :3
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-22 11:24:42 -07:00
136abce9bf Cleaned up formatting. Removed an unused comparison in the for loop responsible for printing the histogram.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-21 11:49:37 -07:00
14730549f1 Push final version of ex1_13 to repo, as only the skeleton was included in the initial commit by mistake.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-19 17:45:24 -07:00
296d1157a0 Completed exercise 1-13, with a bonus version that trades an extra 4 bytes in memory for an equally miniscule perfomance gain at execution.
4b03274352 Skeleton prototype for exercise 1-13.
Compare 2 commits »
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-15 19:14:57 -07:00
dbf602e13d Implemented KNR C Exercise 1-12, reusing mostly modified code from my previous (optional) implementaiton of KNR C's example wordcounting program.
SakurajimaShida pushed to master at SakurajimaShida/Project-Scylla 2025-08-15 19:08:03 -07:00
2523043172 Nearly direct copy of a word count program from KNR C, mimicked here only so that I could compare the size of the resulting binary once compiled to my own solution, archived as ex1_10-5.c (ex1-10.5). The resulting binary, as compiled with GCC, was 136 lines long, 2 lines shorter than my own. Challenge failed :sigh:. Good exercise, though; I'll come back to this and study why later.