Skip to content

Commit

Permalink
cleaned up README
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshd30 committed Oct 26, 2024
1 parent 080055b commit e6a4ef7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ It works primarily by ~~ab~~using the C preprocessor to a scale hitherto undream

It uses macros with arguments to generate the appropriate structs and functions at the preprocessing stage, leading to no runtime overhead. However, this approach has definite drawbacks, which are clarified further.

It uses CMake as the build system, Valgrind for checking memory safety and GitHub Ations for checking cross-platform compatibility.
It uses CMake as the build system, Valgrind for checking memory safety (which needs to be migrated to AddressSanitizer as Valgrind is too slow) and GitHub Actions for checking cross-platform compatibility.

### Features
- [x] Header-only, generic, type-safe data structures and algorithms.
- [x] Build tested on multiple platforms and compilers using CMake and GitHub actions.
- [x] Unit tested using CTest.
- [x] Memory profiled using Valgrind and CTest memcheck.
- [x] Memory profiled using Valgrind.
- [x] Supports primitive data structures as well as pointer-to-structs.

### Currently Tested Platforms
Expand All @@ -28,17 +28,16 @@ It uses CMake as the build system, Valgrind for checking memory safety and GitHu
- cl (MSVC)

### To Do
- [x] Look into GitHub actions based testing
- [x] Valgrind testing?
- [x] How can I integrate CMake, CTest, GitHub actions and Valgrind?
- [ ] AddressSanitizer too? (GitHub actions cannot fin ASan or LSan)
- [ ] Write primitive as well as pointer-to-structs examples
- [ ] [Technical Debt] Use constant pointers, pointers to constants and constant pointers to constant wherever applicable.
- [x] Use GitHub Actions for testing
- [x] Use Valgrind for testing
- [x] Setup CMake, CTest and GitHub actions
- [ ] Migrate memory profiler to AddressSanitizer from Valgrind
- [ ] Write primitive as well as pointer-to-structs examples for each data structure and algorithm

### Checklist
- Each function, with pointer params, should check for NULL for each pointer param.
- Each function, with pointer parameters, should check for NULL for each pointer parameter.
- Have a thorough deletion mechanism for each data structure.
- Library functions in snake_case_##ANY_SUFFIX()..
- Library functions in snake_case_##DATA_STRUCTURE()..
- All reallocs need to be first assigned to temp variables, so as to not lose access to data.

### To build and test locally
Expand All @@ -62,7 +61,7 @@ $ ctest -T memcheck -C Debug --test-dir ../build # Valgrind memcheck and test
- [x] Stack using Linked List
- [x] Queue using Vector
- [x] Queue using Linked List
- [x] Deque (Double Ended Queue) using Vector (using existing vector interface)
- [x] Deque (Double Ended Queue) using Vector
- [x] Deque (Double Ended Queue) using Doubly Linked List
- [x] Singly Linked List
- [ ] Set
Expand Down Expand Up @@ -99,7 +98,7 @@ $ ctest -T memcheck -C Debug --test-dir ../build # Valgrind memcheck and test

1. This method is optimised for ease of use (probably for beginners/learners because it primarily works with pointers to structs), however, defining multiple data structures in the same file may (read WILL) lead to **slower compilation times** due to large compilation units because of the coupling of interfaces (headers & prototypes) and the actual functionality (function definitions) itself.
2. **Poor support** (slow) for Intellisense and similar code intelligence and autocompletion tools.
3. As all the functions are defined in the macro, with everything being in C, there is no way to apply **access modifiers** to helper functions for a cleaner interface.
3. As all the functions are defined in the macro, with everything being in C, there is no way to apply **access modifiers** to helper functions for a cleaner interface and hacks like using double underscores seem inelegant.

> This project is a side-effect of trying to develop a command-line tool for easier use of generic data structures for C, which splits the interface and the function definitions, leading to better compilation times.
Expand Down

0 comments on commit e6a4ef7

Please sign in to comment.