Web++: A C++ Web Framework
146 subscribers
410 photos
36 videos
20 files
169 links
Web++ Framework (A C++ web framework to ease the pain of web development)

Using modern C++20/23.
GitHub: https://github.com/the-moisrex/webpp

I've been working on this project since 2019...
Download Telegram
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
👍2
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!
1
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.
Qwen CLI has been trying to read a file of mine with 7590 lines for more than 30 mins.

I'm just saying!
🤯1
Finally, +7700 lines of unit tests for Unicode are passing.

This took me a lot longer than I expected.
🔥1🤪1
You're gonna have a very hard day debugging your algorithms if you force the callers of this function to cast their UTF-32 code point into UTF-16.

I'm just saying...!
👍1
Unicode 17.0 is out

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.
I don't know why, but I really enjoy using bit flags in C++.
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.
🔥1
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++.
1👍1
I made it a bit more useful and pretty when tests fail, with a bit more colors.

First we demangle the type name, then we replace common patterns (for example std::__cxx11::basic_string<char, char_traits<char>, allocator<char> > becomes string.

Do you think it's too colorful?
Well it took me a while to get another compiler to crash; I was getting worried I'm not using new stuff anymore.