Don't throw away your epsilons.
My Pen to Mouse converter was throwing away valuable less than 1.0 values, thus causing this type of inertia from moving.
This went on unnoticed for way too long.
Source Code
My Pen to Mouse converter was throwing away valuable less than 1.0 values, thus causing this type of inertia from moving.
This went on unnoticed for way too long.
Source Code
👍2
Web++: A C++ Web Framework
Well, this is not getting any easier. Now we're at this: Clang fails more than GCC for yet unknown reasons. I have not written any compiler-specific code, so... this is gonna take a while to debug!
For anyone wondering, this was the bug. I had to add padding empty zeros at the end of the decomposition table or I could add condition to check for it in the algorithm.
I chose adding the padding since I don't want the happy path to have to double check for the minority unhappy path.
I chose adding the padding since I don't want the happy path to have to double check for the minority unhappy path.
Web++: A C++ Web Framework
Finally, +7700 lines of unit tests for Unicode are passing. This took me a lot longer than I expected.
Don't worry guys, found a segfault to keep me busy! 😬🙃
Unicode 17.0 is out
Thank God I have an
Those took me a while to write, otherwise I had to do a lot of manual labor each year when Unicode comes to release a thing.
This year, there was no need for algorithm changes.
The changes related to Web++:
- BiDi tables have changes.
- CCC have changes.
- Compositions have not.
- Decompositions have not.
- GCs have changed.
- IDNA have not.
- Joiners have changed as well.
Unicode 17.0 adds 4803 characters, for a total of 159,801 characters.
Thank God I have an
update.sh file and a whole bunch of code generators that go and fetch the new tables from Unicode's website and generate the tables.Those took me a while to write, otherwise I had to do a lot of manual labor each year when Unicode comes to release a thing.
This year, there was no need for algorithm changes.
The changes related to Web++:
- BiDi tables have changes.
- CCC have changes.
- Compositions have not.
- Decompositions have not.
- GCs have changed.
- IDNA have not.
- Joiners have changed as well.
Unicode 17.0 adds 4803 characters, for a total of 159,801 characters.
🔥1
If you ever found yourself using way too many
std::to_underlying in your code, just implement an operator+ wrapper for to_underlying and clean up your code.Can you generate code with your debugger?
Here's the story, I have a struct with 12 boolean options in it; those options are used in many `if constexpr`s in the code.
But, I have test cases that I read from a txt file, which when I see a that a test should fail in the txt file, I disable the corresponding option and run the tests.
But, there's a problem. The txt file is read at runtime, but the options are at compile time.
My first solution to bring runtime choices to compile time:
I created a table with size of`1 << 11` (2048) that contains all the possible combinations of that the function I was supposed to call with the option given to it at compile time.
Problem? compile time went up to minutes.
My second solution:
Instead of creating a table full of the combinations, I now will create one (or rather a switch-statement like the code in the picture) for only the cases that is being tests.
But how do we get those flags? I did this:
I set a Logpoint on the debugger printing the flags.
Here's the story, I have a struct with 12 boolean options in it; those options are used in many `if constexpr`s in the code.
But, I have test cases that I read from a txt file, which when I see a that a test should fail in the txt file, I disable the corresponding option and run the tests.
But, there's a problem. The txt file is read at runtime, but the options are at compile time.
My first solution to bring runtime choices to compile time:
I created a table with size of`1 << 11` (2048) that contains all the possible combinations of that the function I was supposed to call with the option given to it at compile time.
Problem? compile time went up to minutes.
My second solution:
Instead of creating a table full of the combinations, I now will create one (or rather a switch-statement like the code in the picture) for only the cases that is being tests.
But how do we get those flags? I did this:
I set a Logpoint on the debugger printing the flags.
🔥1
Web++: A C++ Web Framework
Can you generate code with your debugger? Here's the story, I have a struct with 12 boolean options in it; those options are used in many `if constexpr`s in the code. But, I have test cases that I read from a txt file, which when I see a that a test should…
I'm gonna call this Log Driven Development. 😁
I'm in process of re-writing GoogleTest library for a custom one for Web++.
I've already made GTest optional in the library, and implemented a bare minimum clone of it.
I've also added some hardware stats (from perf stats in Linux) for each unit tests, and have some minimal anomaly detection in there; which sees for example if we have too much cache misses, it'll tell us.
I'm keeping the compatibility with GTest for now because IDEs have some special features for them that it might be useful for us later on.
I'm kinda excited about this; I have some ideas, but I don't want to over-engineer it since one of the reasons I did this was to reduce compile times and remove a dependency from Web++.
I've already made GTest optional in the library, and implemented a bare minimum clone of it.
I've also added some hardware stats (from perf stats in Linux) for each unit tests, and have some minimal anomaly detection in there; which sees for example if we have too much cache misses, it'll tell us.
I'm keeping the compatibility with GTest for now because IDEs have some special features for them that it might be useful for us later on.
I'm kinda excited about this; I have some ideas, but I don't want to over-engineer it since one of the reasons I did this was to reduce compile times and remove a dependency from Web++.
❤1👍1