Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huy-dna/nonvariadic-printf
An implementation of printf + A preprocessor to pass the code through before compiling
https://github.com/huy-dna/nonvariadic-printf
cpp implementation makefile printf python3 speculative
Last synced: 22 days ago
JSON representation
An implementation of printf + A preprocessor to pass the code through before compiling
- Host: GitHub
- URL: https://github.com/huy-dna/nonvariadic-printf
- Owner: Huy-DNA
- License: unlicense
- Created: 2023-04-03T09:40:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-31T06:45:01.000Z (7 months ago)
- Last Synced: 2024-04-28T06:24:36.184Z (6 months ago)
- Topics: cpp, implementation, makefile, printf, python3, speculative
- Language: C++
- Homepage: https://blogginginhell.netlify.app/posts/printf-a-speculative-implementation-part-2
- Size: 21.5 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nonvariadic-printf
An implementation of printf + A pre-preprocessor to pass the code through before compiling.Please read the blog post at https://blogginginhell.netlify.app/posts/printf-a-speculative-implementation to understand the idea.
## Requirements
- bash
- python3
- GNUMake## How to use
- Write a program `main.cpp` using `my_printf`, the syntax is just like normal `printf` with some limitations in capabilities.
- Running `make` to run the pre-preprocessor and compile the program.
- `./main` to run the program.
- Additionally, you can inspect the `main.output.cpp` file to inspect the output generated by the pre-preprocessor.## Limitations
- Only supports `%d`, `%f`, `%s` and `%p` format specifier.
- The `%f` format specifier only works with `double`.