Web++: A C++ Web Framework
132 subscribers
440 photos
36 videos
20 files
177 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
It's C++, what did you expect? :)
Had a nice talk with Sean Baxter about attributes; remind me to use them in this framework when we can use them in our C++ projects in a couple of years.

https://twitter.com/the_moisrex/status/1313878622428594176
Can you believe this checks if two strings are equal or not case-insensitively?

There's actually one more optimization I could do (which is written in shape of a todo comment).
Don't waste clock cycles.
Web++: A C++ Web Framework
Don't waste clock cycles.
Implemented Accept-Encoding HTTP header parser. Implementing simple things can really get tricky sometimes.

Source is here:
https://github.com/the-moisrex/webpp/blob/dev/core/include/webpp/http/headers/accept_encoding.hpp
Now I gotta learn ZLib for gzip;
What do library you recommend for "br", "compress", and "deflate"? Is there one that supports all of them?

https://zlib.net/zlib_how.html
This whole shenanigan is to make fmt library as a fallback for not-yet-implemented std::format.
Can't we just have a "stl_fallback.h" header?
Oh look, my reply to Heb Sutter's tweet is in his talk.
https://youtu.be/6lurOCdaj0Y
After benchmarking and testing some "normalize" algorithms, I just found out that even Poco library's implementation is faulty and not compatible with the RFC.

You'll find the benchmarks in the benchmark directory of the project.

And here's a test:
https://godbolt.org/z/T4jod8

And twitter thread to follow upon this; thanks to those who contributed their time for this, but I'm not gonna put that much time into this algorithm, it's not in a performance bottleneck of the framework at this point.
https://twitter.com/the_moisrex/status/1322644648435818503?s=20

Benchmark results on quick-bench (but of course 2 of those algorithms are buggy so it's not completely fair):
https://quick-bench.com/q/sT2UaEgvd9HpRCD5AZ6vgBbFWcs
Found another GCC bug; is it a known issue or I should report this?
https://godbolt.org/z/xWadq6
float and double is still not implemented for std::to_chars in GCC's STL!

So it's not working for double. Do I have to go and implement the whole thing myself now?
Why can't we just return a "type"? wouldn't that be cooler and simplify TMP in general?
Web++: A C++ Web Framework
Why can't we just return a "type"? wouldn't that be cooler and simplify TMP in general?
One of the alternatives to that code, is to use this "lazy evaluated" alternative to std::conditional_t.