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
Why on earth tabs and newlines are just IGNORED in URLs and spaces are invalid characters?

WHO hurt you WHATWG?
resize_and_overwrite tip: these two values are not the same; I'm just saying to let you know before you spend an hour debugging off-by-one errors.
Merged upstream changes of my liburing C++ified fork.

Still some UBs remain (liburing itself heavily relies on UB).

Header-Only liburing fork
πŸ‘1
Media is too big
VIEW IN TELEGRAM
The White House: use Memory Safe languages

Youtube Link
| white house press release
Full Report
(A PATH TOWARD SECURE AND MEASURABLE SOFTWARE)
😁1
Back_to_the_building_blocks_a_path_toward_secure_and_measurable.pdf
591.5 KB
White house full technical report about memory safety in languages among other things.
WHATWG mindset:

Valid URLs:
file:
any-random-scheme:


Invalid URLs:
http:
https:
ws:
wss:
ftp:
😁2
I know it's off-by-one, I just don't know in which direction it's off by one!
Rust guys said "C++ is unsafe" so much that Google's AI now thinks it's unsafe for children and refuses to help you out if you're under 18 πŸ˜¬πŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈ
I swear, if I see one more allocator error message, ...


... I'll still spend 4 hours fixing it anyway, but I'm gonna be swearing the whole time!
😁1
If you don't know how to get it right, get it wrong a couple of times first, it narrows down the right solution, and speed things up.

Sometimes, just doing it with a few trials and errors is better than actually throwing brain cells at the problem you're trying to fix.
πŸ‘5
WHATWG tells us that http://this.is.totally.a.valid.domain.%21.
This function is a simple "to_lower".


This function's author's argument for rejecting my PRs were "using const reduces readability" among other things.

Here's a benchmark for the above code if you're curious how much performance we're actually gaining by this.
Web++: A C++ Web Framework
This function is a simple "to_lower". This function's author's argument for rejecting my PRs were "using const reduces readability" among other things. Here's a benchmark for the above code if you're curious how much performance we're actually gaining by…
By the way, this technique is called "SWAR" (SIMD Within A Register), and SIMD itself stands for "Single Instruction, Multiple Data".

It's a way of packing multiple bytes into one big 64bit or 32bit register, and perform all of your computations on that one single register instead of looping through those 8 bytes one by one.

It's the poor man's SIMD. And SIMD is poor man's GPU offloading.
πŸ‘1
Why this character exists in unicode?

U+2488 ( β’ˆ ) DIGIT ONE FULL STOP
As binary:
11100010 10010010 10001000
^^^


It requires 3 bytes, all the while a "1." requires 2 ascii bytes (00110001 00101110).
Web++: A C++ Web Framework
Why this character exists in unicode? U+2488 ( β’ˆ ) DIGIT ONE FULL STOP As binary: 11100010 10010010 10001000 ^^^ It requires 3 bytes, all the while a "1." requires 2 ascii bytes (00110001 00101110).
Answer from twitter (Link):

Historically, screen text was fixed-width and in CJK regions, each cell was square, because the language's characters are square.

Spending two screen cells for οΌ‘οΌŽor three for οΌˆοΌ‘οΌ‰at the start of every line of a list is wasteful; with β’ˆ and β‘΄ you only use one cell.


More information:

The CJK (Chinese, Japanese, Korean) languages require fixed-width encodings due to the vast number of characters in their writing systems, necessitating at least a 16-bit fixed width encoding or multi-byte variable-length encodings.

The fixed-width encodings are crucial to accommodate the extensive character repertoires required for general literacy in these languages, with over 3,000 characters for Chinese and 2,136 characters for Japanese.

Additionally, full-width characters, including numerals and the Latin alphabet, are used to align with fixed-width CJK text, ensuring visual consistency in typesetting and display.
πŸ‘1
I just realized,

I've been dodging doing my work by reading interesting tech articles, and watching conference talks that I learned quite a lot.
My actual work, you ask? Reading RFCs (yes, multiple of them) so I can implement them in web++ URL parser!

Is this cheating?
🫑3
Media is too big
VIEW IN TELEGRAM
4hrs of coding in 1min.

Was working on IDNA Mapping Table Generator script of the project.
πŸ‘1πŸ”₯1
Media is too big
VIEW IN TELEGRAM
My codes are IDE breakers :)
πŸ”₯2πŸ‘1