I was looking into Sphinx, ReadTheDocs, Pandoc, and even man pages to see which ones are the best for me.
Now I'm thinking, instead of writing the the whole thing in a different formats and weird syntax and even let other websites access my github repos... I just don't want all of these. I want something simple, that everybody can afford.
So maybe I thought why not my own website and I use my own webpp framework to make it, and then I thought, well, I don't want to pay for that just yet (I probably will though).
So now I'm thinking why not add a feature to the webpp that instead of CGI, and Boost, I make something that generates all the website.
Implementation Choice:
There are numerous ways I can make this happen:
1. Making a new Protocol in webpp
2. Adding it to the SDK that goes and runs all the routes and generates the html files.
3. Convert the back-end website into a front-end webassembly website.
A new Protocol
Writing C++ code just to produce html static files seems way too complicated.
In the SDK
The second one seems like it's already implemented by wget and other tools that recursively traverse the website and save and change the links.
Maybe I could do that in a much better way?
As a webassembly website
Since I haven't yet started adding features for front-end, I'm not really sure how hard it is to implement such a thing. But it's an amazing idea actually.
See the disscusion on GitHub.
Now I'm thinking, instead of writing the the whole thing in a different formats and weird syntax and even let other websites access my github repos... I just don't want all of these. I want something simple, that everybody can afford.
So maybe I thought why not my own website and I use my own webpp framework to make it, and then I thought, well, I don't want to pay for that just yet (I probably will though).
So now I'm thinking why not add a feature to the webpp that instead of CGI, and Boost, I make something that generates all the website.
Implementation Choice:
There are numerous ways I can make this happen:
1. Making a new Protocol in webpp
2. Adding it to the SDK that goes and runs all the routes and generates the html files.
3. Convert the back-end website into a front-end webassembly website.
A new Protocol
Writing C++ code just to produce html static files seems way too complicated.
In the SDK
The second one seems like it's already implemented by wget and other tools that recursively traverse the website and save and change the links.
Maybe I could do that in a much better way?
As a webassembly website
Since I haven't yet started adding features for front-end, I'm not really sure how hard it is to implement such a thing. But it's an amazing idea actually.
See the disscusion on GitHub.
GitHub
Static website generator ยท Issue #102 ยท the-moisrex/webpp
I was looking into Sphinx, ReadTheDocs, Pandoc, and even man pages to see which ones are the best for me. Now I'm thinking, instead of writing the the whole thing in a different formats and...
With this, you can check the constraints of a function call arguments inside a C++20 requires clause.
I've been looking for such a thing for a long time until I saw this tweet; I then updated it to what you see in the picture and I also added it to my web framework.
Example Usage:
Source on GitHub
My updated version on Godbolt
Initial idea on Godbolt
I've been looking for such a thing for a long time until I saw this tweet; I then updated it to what you see in the picture and I also added it to my web framework.
Example Usage:
template <typename T>
concept fooable =
requires(T t) {
t.foo(
requires_arg(std::integral),
requires_arg(std::same_as<short>)
);
};
Source on GitHub
My updated version on Godbolt
Initial idea on Godbolt
With this, you can pass concepts as a template parameter easily.
Source code on Github
Example on Godbolt
Source code on Github
Example on Godbolt
Web++: A C++ Web Framework
I changed the license to MIT.
Should I change the license to BSL? What do you think?
This media is not supported in your browser
VIEW IN TELEGRAM
Here's a couple of days of me working on this project using Termux on Android. I've got 3 months of these now.
I've been recording them using asciinema and what you see above is merely a replay of them.
I've been recording them using asciinema and what you see above is merely a replay of them.
๐1
alloc_deleter in boost smart_ptr is not move assignable,
thus std::unique_ptr<T, alloc_deleter> is not,
thus variant<..., unique_ptr<..., alloc_deleter>> is not,
thus vector<variant>::emplace(iter, ...) can't move stuff around!
Should alloc_deleter be move-assignable?
The tweet
thus std::unique_ptr<T, alloc_deleter> is not,
thus variant<..., unique_ptr<..., alloc_deleter>> is not,
thus vector<variant>::emplace(iter, ...) can't move stuff around!
Should alloc_deleter be move-assignable?
The tweet
Web++: A C++ Web Framework
alloc_deleter in boost smart_ptr is not move assignable, thus std::unique_ptr<T, alloc_deleter> is not, thus variant<..., unique_ptr<..., alloc_deleter>> is not, thus vector<variant>::emplace(iter, ...) can't move stuff around! Should alloc_deleter be moveโฆ
The story went on to the point that I made a template new type called "dynamic" which is an allocator-aware type.
The problem that I got with it right now is that where I tend to use that type is where the 1th template parameter will be an incomplete type.
That led me to adding checks to see if a type is_complete. But now I don't think that's the right solution here.
I found a compiler bug along the way too.
The problem that I got with it right now is that where I tend to use that type is where the 1th template parameter will be an incomplete type.
That led me to adding checks to see if a type is_complete. But now I don't think that's the right solution here.
I found a compiler bug along the way too.
Implemented my own std::function alternative (which is allocator-aware) called istl::function and it's beating std::function's performance with the default std::allocator.
Read more about its performance here
Read more about its performance here
โ๏ธ SQL Query Builder tests are passing
โ๏ธ istl::function tests are passing
1. Next steps are to write more tests for SQL Query Builder and then solve them of course so we can have a more stable SQL Database support system inside this.
2. After that, I might start working on a new, dynamic router. The current router is static and it's good but you probably can't use it inside a source file and thus that would mean your whole application essentially will have to be a big header-only executable. So a dynamic router is necessary.
I probably will use the recently made
โ๏ธ istl::function tests are passing
1. Next steps are to write more tests for SQL Query Builder and then solve them of course so we can have a more stable SQL Database support system inside this.
2. After that, I might start working on a new, dynamic router. The current router is static and it's good but you probably can't use it inside a source file and thus that would mean your whole application essentially will have to be a big header-only executable. So a dynamic router is necessary.
I probably will use the recently made
istl::function in there too.
Web++: A C++ Web Framework
Implemented my own std::function alternative (which is allocator-aware) called istl::function and it's beating std::function's performance with the default std::allocator. Read more about its performance here
Some of istl::function properties so far:
- allocator-aware
- Small stack size (alloc size + void*)
- no internal SOO, you can use stack_allocator instead
- beats std::function at benchmarks, and gets beaten by it at the same time
- allocator-aware
- Small stack size (alloc size + void*)
- no internal SOO, you can use stack_allocator instead
- beats std::function at benchmarks, and gets beaten by it at the same time