scnlib
scanf for modern C++ (by eliaskosunen)
AdventOfCode2021
Solutions to all 25 AoC 2021 problems in Rust :crab: Less than 100 lines per day and under 1 second total execution time! :christmas_tree: (by AxlLind)
scnlib | AdventOfCode2021 | |
---|---|---|
18 | 49 | |
947 | 61 | |
- | - | |
9.3 | 2.6 | |
8 days ago | 4 months ago | |
C++ | Rust | |
Apache License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
scnlib
Posts with mentions or reviews of scnlib.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-07.
-
Why are strings and IO so complicated?
scnlib (https://github.com/eliaskosunen/scnlib) scanf
- Reddit++
- Safe and cross platform C++11 alternative to sscanf
-
CPM.cmake to make CMake's FetchContent easier
include(FetchContent) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v3.0.0-preview4 ) FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 9.1.0 ) FetchContent_Declare( scnlib GIT_REPOSITORY https://github.com/eliaskosunen/scnlib.git GIT_TAG v1.1.2 ) FetchContent_MakeAvailable(Catch2 fmt scnlib)
-
[C++20] ClearIO library (unfinished)
Yeah, but parsing format strings in runtime induces an overhead, and doing it in compile time is not trivial, and I’m not sure ClearIO is worth the trouble, since it turns out scnlib exists.
-
My AoC2021 solutions in C++
The code is rather nice (in my biased opinion) and makes heavy use of a couple of libraries like scnlib and [Eigen](eigen.tuxfamily.org/). Some things could probably be more optimized but I mainly focused on conciseness. I hope this is useful and I can explain my thought process further if you have any questions.
-
what annoys you most while using c++?
I've found https://github.com/eliaskosunen/scnlib but haven't tested it. Maybe that suits your needs for 2.
-
The Year is 2022 and the Standard is C++20; what is your preferred way to do Text I/O?
I had a user enum like enum class Color {Red, Green, Blue}; that I wanted to add serialization support for. Following the docs (https://scnlib.readthedocs.io/), after some tweaks I arrived at the following:
-
scnlib (scanf for modern C++) - version 1.0 released
Thanks for the comment, I made an issue tracking this: https://github.com/eliaskosunen/scnlib/issues/51
-
Modern C++ in Advent of Code
I am using some modern libraries: scnlib fmtlib Eigen and usually abuse lambdas :)
AdventOfCode2021
Posts with mentions or reviews of AdventOfCode2021.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-29.
- [All years, all dates] Me after finishing all Advent of Code problems this year (my first year of AoC)
-
How to organize Rust code for Advent of Code puzzles?
I found this repository which solves the problem by having a src/main.rs file which basically calls cargo run --release {day} and parses the output to extract the time each day took, but I don't find this very satisfactory. I'd prefer to have everything compiled into the same executable, without having to run external commands.
-
Advent of Code: A suggestion for more advanced learners
You can always check out the problems from previous years.
-
Can I learn python in a month?
https://adventofcode.com/2021 for practice.
- C++ knowledge
- Prawda o Pracy
- O que é o Advent Of Code?
- Knobelaufgaben für C#
-
Practice exercises in c++
Here is 2021: https://adventofcode.com/2021
- Give Me a Program to Code
What are some alternatives?
When comparing scnlib and AdventOfCode2021 you can also consider the following projects:
C++ Format - A modern formatting library
100-days-of-code - Fork this template for the 100 days journal - to keep yourself accountable (multiple languages available)
gainput - Cross-platform C++ input library supporting gamepads, keyboard, mouse, touch
adventofcode - My solutions to the Advent of Code challenges
cpp-peglib - A single file C++ header-only PEG (Parsing Expression Grammars) library
Advent-of-code - My solutions of adventofcode.com
aoc2021 - Advent of Code 2021
AoC - my personal repo for the advent of code yearly challenge
tinyformat - Minimal, type safe printf replacement library for C++
advent-of-code - Advent Of Code Solutions
libflow
aoc2021 - My solutions to Advent of Code 2021.
scnlib vs C++ Format
AdventOfCode2021 vs 100-days-of-code
scnlib vs gainput
AdventOfCode2021 vs adventofcode
scnlib vs cpp-peglib
AdventOfCode2021 vs Advent-of-code
scnlib vs aoc2021
AdventOfCode2021 vs AoC
scnlib vs tinyformat
AdventOfCode2021 vs advent-of-code
scnlib vs libflow
AdventOfCode2021 vs aoc2021