Thread: [Cppcms-users] Next CppCMS Feature Poll
Brought to you by:
artyom-beilis
From: Artyom B. <art...@gm...> - 2020-08-10 19:02:24
|
Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis |
From: Nazim C. B. <nz...@pr...> - 2020-08-10 19:21:19
|
Hello, I would like to cast my vote for 4th item: clean-up the code for C++11, implement (and use) move semantics. In my opinion, today's web app. stacks are not monolithic/uniform. But instead, collaborative pieces running together and not always but mostly there is a web server (like nginx) greeting visitors. HTTP/1.1, HTTP/2 and SSL already available and it shouldn't be the most priority item (of course it could be nice to have them). And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) Kind regards, Nazim Can. -------- Original Message -------- On 10 Aug 2020, 22:01, Artyom Beilis wrote: > Hello All, > > Following the discussion I want to make a commitment to implement a > new feature required by the community. Here my options: > > 1. HTTP/1.1 support - it would allow keep alive support and better > performance overall for multiple requests. It would allow future > implementation of web sockets. > 2. Multiple-Event-Loop support - today there is only 1 event loop for > the service and it can be a bottleneck for small requests on systems > with high core count > 3. SSL support - for embedded systems that need proper web server > 4. C++11 cleanup - replace all booster primitives that exist in C++11 > with standard (shared_ptr, thread, mutex, etc) provide move > constructors for many objects, replace auto_ptr by unique_ptr. > > Feel free to suggest other ideas that you can think of that would be beneficial > > Artyom Beilis > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Martin B. <mar...@gm...> - 2020-08-10 19:27:47
|
Hello Artyom, I vote for option 4, because I think there will be great immediate benefit from reducing compiler messages about deprecation and enabling many helpful C++11 features. One of these features would be range-based for loops. This would greatly improve the `<% foreach %>` directive. I once opened an issue about this but quickly came to realize that my approach was flawed. I since could not get this working the way I'd like it to. With C++11 this problem would disappear. About the other options: 1. HTTP/1.1 and 3. SSL support - I agree with Pierre Couderc (and at time of writing also Nazim Can Bedir) that most often web applications are behind a reverse proxy. Therefore SSL termination and "virtual hosting" is already handled. 2. Multiple Event Loops - I have no opinion on this, but I haven't encountered a situation that would necessitate this yet. And since Nazim Can Bedir wrote about splitting work, I too would appreciate it if the project management would be done with GitHub. I think this would enable more participation. I at least would want to contribute, but cannot invest much time. So I think task management over GitHub would be beneficial and would help me to pick small tasks that I could work on. Sincerely, Martin Bürgmann Am Mo., 10. Aug. 2020 um 21:02 Uhr schrieb Artyom Beilis < art...@gm...>: > Hello All, > > Following the discussion I want to make a commitment to implement a > new feature required by the community. Here my options: > > 1. HTTP/1.1 support - it would allow keep alive support and better > performance overall for multiple requests. It would allow future > implementation of web sockets. > 2. Multiple-Event-Loop support - today there is only 1 event loop for > the service and it can be a bottleneck for small requests on systems > with high core count > 3. SSL support - for embedded systems that need proper web server > 4. C++11 cleanup - replace all booster primitives that exist in C++11 > with standard (shared_ptr, thread, mutex, etc) provide move > constructors for many objects, replace auto_ptr by unique_ptr. > > Feel free to suggest other ideas that you can think of that would be > beneficial > > Artyom Beilis > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Fernando F. <die...@gm...> - 2020-08-10 20:25:53
|
I vote for option 1. I have started to have many clients that require the use of websockets, unless I am missing something and can be used by reverse proxy. And on many occasions, websockets is the only option. Option 2, I have not needed it. Option 3, SSL can be implemented by reverse proxy so it doesn't seem a priority to me. Option 4, I have not had any problem with this, and compile my code in recent versions of C ++, and cppcms leave it in an older version without problems. Diego Fernando Rodríguez Fuentes *Desarrollador C++ Senior* Aranda Software Celular: +57 310 758 7242 Correo: die...@gm... El lun., 10 ago. 2020 a las 14:28, Martin Bürgmann (< mar...@gm...>) escribió: > Hello Artyom, > > I vote for option 4, because I think there will be great immediate benefit > from reducing compiler messages about deprecation and enabling many helpful > C++11 features. > One of these features would be range-based for loops. This would greatly > improve the `<% foreach %>` directive. > I once opened an issue about this but quickly came to realize that my > approach was flawed. I since could not get this working the way I'd like it > to. > With C++11 this problem would disappear. > > About the other options: > 1. HTTP/1.1 and 3. SSL support - I agree with Pierre Couderc (and at time > of writing also Nazim Can Bedir) that most often web applications are > behind a reverse proxy. Therefore SSL termination and "virtual hosting" is > already handled. > 2. Multiple Event Loops - I have no opinion on this, but I haven't > encountered a situation that would necessitate this yet. > > And since Nazim Can Bedir wrote about splitting work, I too would > appreciate it if the project management would be done with GitHub. > I think this would enable more participation. I at least would want to > contribute, but cannot invest much time. > So I think task management over GitHub would be beneficial and would help > me to pick small tasks that I could work on. > > Sincerely, > Martin Bürgmann > > Am Mo., 10. Aug. 2020 um 21:02 Uhr schrieb Artyom Beilis < > art...@gm...>: > >> Hello All, >> >> Following the discussion I want to make a commitment to implement a >> new feature required by the community. Here my options: >> >> 1. HTTP/1.1 support - it would allow keep alive support and better >> performance overall for multiple requests. It would allow future >> implementation of web sockets. >> 2. Multiple-Event-Loop support - today there is only 1 event loop for >> the service and it can be a bottleneck for small requests on systems >> with high core count >> 3. SSL support - for embedded systems that need proper web server >> 4. C++11 cleanup - replace all booster primitives that exist in C++11 >> with standard (shared_ptr, thread, mutex, etc) provide move >> constructors for many objects, replace auto_ptr by unique_ptr. >> >> Feel free to suggest other ideas that you can think of that would be >> beneficial >> >> Artyom Beilis >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ma...@al...> - 2020-08-10 20:48:45
|
<div dir='auto'><div>Hello Artyom, </div><div dir="auto">I'd Vote also for Option 4. It would be great if cppcms would use cpp11 standards. </div><div dir="auto">Thank you very much!</div><div dir="auto">Best regards,</div><div dir="auto">Alex Mack<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Am 10.08.2020 21:01 schrieb Artyom Beilis <art...@gm...>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hello All, <br> <br> Following the discussion I want to make a commitment to implement a <br> new feature required by the community. Here my options: <br> <br> 1. HTTP/1.1 support - it would allow keep alive support and better <br> performance overall for multiple requests. It would allow future <br> implementation of web sockets. <br> 2. Multiple-Event-Loop support - today there is only 1 event loop for <br> the service and it can be a bottleneck for small requests on systems <br> with high core count <br> 3. SSL support - for embedded systems that need proper web server <br> 4. C++11 cleanup - replace all booster primitives that exist in C++11 <br> with standard (shared_ptr, thread, mutex, etc) provide move <br> constructors for many objects, replace auto_ptr by unique_ptr. <br> <br> Feel free to suggest other ideas that you can think of that would be beneficial <br> <br> Artyom Beilis <br> <br> <br> _______________________________________________ <br> Cppcms-users mailing list <br> Cpp...@li... <br> https://lists.sourceforge.net/lists/listinfo/cppcms-users <br> </p> </blockquote></div><br></div></div></div> |
From: Artyom B. <art...@ya...> - 2020-08-13 08:05:20
|
Ok... So with majority of votes I took the C++11 support by default: it goes to this branch: https://github.com/artyom-beilis/cppcms/tree/cpp11 Note this is not 100% backward compatible change. So slight adjustments may be required. Most important one probably replacing auto_ptr with unique_ptr So far: 1. Switched booster shared_ptr, weak_ptr, enable_shared_from_this, auto_ptr to std versions of them + replacement of auto_ptr by unique_ptr2. Replaced booster::function by std::function3. Moving to use of std::system_error/std::error_code and so instead of booster::system Note all aliases are put into booster namespace so if you use booster::shared_ptr - it would continue to work as expected but it will be std::shared_ptr Next planned things 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. 2. Partial replacement of booster threading functionality with std::thread (note not all is possible due to lack of primitives and some other issues)3. Updating booster::callback/callable to use variadic templates (unlike std::function its content is reference counted and has internal callable block that can be detached) 4. Updating cppcms::url_mapper/url_dispatched to variadic (this need to be checked carefully if we can keep the ABI stability and such a template)5. Adding optional std::regex to mapping functionality (to be checked if needed) note booster::regex uses PCRE that supports UTF-8 unlike std::regex - so it can't be replaced entirely6. Adding move constructors to any class that may benefit from it like json, cookie and so on.7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life8. Moving to python3 (or if possible support both) in unit-tests due to python2 EOL. More points I missed? Next Task will be HTTP/1.1 + WebSockets. Artyom Beilis On Monday, August 10, 2020, 10:02:47 PM GMT+3, Artyom Beilis <art...@gm...> wrote: Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2020-08-13 09:11:40
|
> > And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) This is very generous of you! Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler)And let me know, I'll be glad Artyom -------- Original Message -------- On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Nazim C. B. <nz...@pr...> - 2020-08-13 10:26:51
|
Hello, Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: > 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. > 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. Thanks. Regards, Nazim Can. On 13/08/2020 12:11, Artyom Beilis wrote: >> >> And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) > > This is very generous of you! > > Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) > And let me know, > > I'll be glad > > Artyom > > -------- Original Message -------- > On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: > >> Hello All, >> >> Following the discussion I want to make a commitment to implement a >> new feature required by the community. Here my options: >> >> 1. HTTP/1.1 support - it would allow keep alive support and better >> performance overall for multiple requests. It would allow future >> implementation of web sockets. >> 2. Multiple-Event-Loop support - today there is only 1 event loop for >> the service and it can be a bottleneck for small requests on systems >> with high core count >> 3. SSL support - for embedded systems that need proper web server >> 4. C++11 cleanup - replace all booster primitives that exist in C++11 >> with standard (shared_ptr, thread, mutex, etc) provide move >> constructors for many objects, replace auto_ptr by unique_ptr. >> >> Feel free to suggest other ideas that you can think of that would be beneficial >> >> Artyom Beilis >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2020-08-13 13:18:14
|
Great! Thanks a lot!Make sure you work on cpp11 branch! Artyom Beilis On Thursday, August 13, 2020, 1:27:23 PM GMT+3, Nazim Can Bedir via Cppcms-users <cpp...@li...> wrote: Hello, Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. Thanks. Regards, Nazim Can. On 13/08/2020 12:11, Artyom Beilis wrote: > > And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) This is very generous of you! Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) And let me know, I'll be glad Artyom -------- Original Message -------- On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Martin B. <mar...@gm...> - 2020-08-13 14:27:26
|
Hi Nazim Can, since you picked tasks 1 and 7 I thought I talk to you about my ideas regarding the template compiler. My two primary thoughts are: 1. Make the <% foreach item in iterable %> loop render as for (auto& item : iterable) 2. Redo the whole template compiler with something like python-ply Especially with pt 2 I think the template compiler's code will get much simpler.What do you think? Cheers,Martin Am Donnerstag, den 13.08.2020, 10:26 +0000 schrieb Nazim Can Bedir via Cppcms-users: > Hello, > > Then, I would like to get assigned for 1st and 7th items in the > "Next Planned Things" list: > > > > 1. Updating templates compiler to use std::begin/std::end in > > foreach loop + use of auto by default. > > > > 7. Supporting both python2 and python3 for templates > > compiler > > due to python2 reaching its end of life. > > > > > > > > I will start working on above items tomorrow, and will create > pull request on GitHub for review of proposed changes. > > Thanks. > > Regards, > > Nazim Can. > > > > On 13/08/2020 12:11, Artyom Beilis > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > And I would like to > > propose here that, if you need help I can provide 3 > > hours per workday (15 hours per week) of > > development > > support. You can create milestone on GitHub, and > > split > > work as issues, and whoever would like to help may > > request to be assignee of any issue, write the code > > and > > create pull request. Well, please thing about it ;) > > > > > > > > This is very generous of you! > > > > > > > > Take a look on my > > previous mail - pick anything you want to start > > doing > > (for example variadic templates or templates > > compiler) > > And let me know, > > > > > > > > I'll be glad > > > > > > > > Artyom > > > > > > > > > > > > > > > > > > > > > > -------- Original Message -------- > > > > On 10 Aug 2020, 22:01, Artyom Beilis < > > art...@gm...> wrote: > > > > > Hello All, > > > Following the discussion I want to make > > > a commitment to implement a > > > > > > new feature required by the community. Here > > > my > > > options: > > > 1. HTTP/1.1 support - it would allow > > > keep alive support and better > > > > > > performance overall for multiple requests. > > > It > > > would allow future > > > > > > implementation of web sockets. > > > > > > 2. Multiple-Event-Loop support - today > > > there is > > > only 1 event loop for > > > > > > the service and it can be a bottleneck for > > > small > > > requests on systems > > > > > > with high core count > > > > > > 3. SSL support - for embedded systems that > > > need > > > proper web server > > > > > > 4. C++11 cleanup - replace all booster > > > primitives > > > that exist in C++11 > > > > > > with standard (shared_ptr, thread, mutex, > > > etc) > > > provide move > > > > > > constructors for many objects, replace > > > auto_ptr by > > > unique_ptr. > > > Feel free to suggest other ideas that > > > you can think of that would be beneficial > > > Artyom Beilis > > > > > > > > > _____________________________________________ > > > __ > > > > > > Cppcms-users mailing list > > > > > > Cpp...@li... > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Cppcms-users mailing list > > > > Cpp...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > > > > > > > > _______________________________________________Cppcms-users mailing > lis...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Nazim C. B. <nz...@pr...> - 2020-08-13 15:01:49
|
Hello Martin, 1. Sure. Since we are transitioning to C++11, using range-based for loops is the most logical way. But there are some edge-cases where 1-to-1 translation may not be possible. For instance, when range expression returns a temporary, its lifetime is extended until the end of the loop, but the lifetime of any temporary within range expression is not extended. Example; for (auto& x : foo().items()) { /* .. */ } // undefined behavior if foo() returns by value (For above paragraph, please see https://en.cppreference.com/w/cpp/language/range-for, "Temporary range expression") So, I am planning to find a way to detect such cases (without introducing template code bloat) and either write the code as "for (auto & item: iterable)" or, if there could be undefined behaviour, write the code as "for (auto e = std::begin(iterable) ; e != std::end(iterable) ; ++e)"; all depending on what is written as iterable 2. Yes, we can do that too. And while rewriting, I will try to make it pluggable as much as possible. This way, if anyone would like to extend template compiler in their own project, they may not have to fight with template compiler code. Thank you for sharing ideas. Kind regards, Nazim Can. On 13/08/2020 17:27, Martin Bürgmann wrote: > Hi Nazim Can, > > since you picked tasks 1 and 7 I thought I talk to you about my ideas regarding the template compiler. > > My two primary thoughts are: > > - Make the <% foreach item in iterable %> loop render as for (auto& item : iterable) > - Redo the whole template compiler with something like python-ply > > Especially with pt 2 I think the template compiler's code will get much simpler. > What do you think? > > Cheers, > Martin > > Am Donnerstag, den 13.08.2020, 10:26 +0000 schrieb Nazim Can Bedir via Cppcms-users: > >> Hello, >> >> Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: >> >>> 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. >>> 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. >> >> I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. >> >> Thanks. >> >> Regards, >> Nazim Can. >> >> On 13/08/2020 12:11, Artyom Beilis wrote: >> >>>> >>>> And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) >>> >>> This is very generous of you! >>> >>> Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) >>> And let me know, >>> >>> I'll be glad >>> >>> Artyom >>> >>> -------- Original Message -------- >>> On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: >>> >>>> Hello All, >>>> >>>> Following the discussion I want to make a commitment to implement a >>>> new feature required by the community. Here my options: >>>> >>>> 1. HTTP/1.1 support - it would allow keep alive support and better >>>> performance overall for multiple requests. It would allow future >>>> implementation of web sockets. >>>> 2. Multiple-Event-Loop support - today there is only 1 event loop for >>>> the service and it can be a bottleneck for small requests on systems >>>> with high core count >>>> 3. SSL support - for embedded systems that need proper web server >>>> 4. C++11 cleanup - replace all booster primitives that exist in C++11 >>>> with standard (shared_ptr, thread, mutex, etc) provide move >>>> constructors for many objects, replace auto_ptr by unique_ptr. >>>> >>>> Feel free to suggest other ideas that you can think of that would be beneficial >>>> >>>> Artyom Beilis >>>> >>>> _______________________________________________ >>>> Cppcms-users mailing list >>>> Cpp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> _______________________________________________ >>> Cppcms-users mailing list >>> Cpp...@li... >>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> _______________________________________________ >> >> Cppcms-users mailing list >> >> Cpp...@li... >> >> https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Pierre C. <pi...@co...> - 2020-08-13 15:55:19
|
On 8/13/20 4:27 PM, Martin Bürgmann wrote: > Redo the whole template compiler with something like python-ply > > Especially with pt 2 I think the template compiler's code will get > much simpler. > Is there 1 good reason except simplicty to redo instead of improve...? PC |
From: Nazim C. B. <nz...@pr...> - 2020-08-13 16:04:02
|
Hello, Yes there is. With current design, 1. It's not possible to introduce new tags with the same prefix with existing tags (for example; I couldn't succeed to create 'foreach' tag since there is 'for' tag). 2. All tags must be line-oriented, i.e., it's not possible to introduce new tag with optional newlines inside it. If I remember correct, each tag must start and end within the same line. Regards, Nazim Can. On 13/08/2020 18:54, Pierre Couderc wrote: > ag > > On 8/13/20 4:27 PM, Martin Bürgmann wrote: >> Redo the whole template compiler with something like python-ply >> >> Especially with pt 2 I think the template compiler's code will get >> much simpler. >> > Is there 1 good reason except simplicty to redo instead of improve...? > > PC > > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li...art > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2020-08-13 17:48:13
|
> 1. Sure. Since we are transitioning to C++11, using range-based for loops is the most logical way. But there are some edge-cases where 1-to-1 translation may not be possible. > For instance, when range expression returns a temporary, its lifetime is extended until the end of the loop, but the lifetime of any temporary within range expression is not extended. > Example; > for (auto& x : foo().items()) { /* .. */ } // undefined behavior if foo() returns by value > So, I am planning to find a way to detect such cases (without introducing template code bloat) and either write the code as "for (auto & item: iterable)" or,> if there could be undefined behaviour, write the code as "for >(auto e = std::begin(iterable) ; e != std::end(iterable) ; ++e)"; all depending on what is written as iterable There is another important reason empty block: http://cppcms.com/wikipp/en/page/cppcms_1x_templates_flow#Foreach.block So you can write <% foreach %> .... <% empty %> ... <% end %>Another thing is counter - rowid that allows having a iterm counter. So range loop as is does not fit the bill there > Redo the whole template compiler with something like python-ply I would really prefer to keep changes small and focused in implementing fixing an issue. For example std::begin() std::end would allow to iterate over bare arrays like float vec3d[3]; that isn't possible with current design. Another critical issue is that Python2 (unfortunately) is going to die soon. Since software needs to survive the python3 and python2 support essential. Rewriting entire templates compiler is something I thought of for a looooong time - but finally it would require quite a big effort that can take multiple working weeks with virtually 0 benefit for the end user.Sometimes rewriting is critical (like was the case of moving from CppCMS 0.0.x to CppCMS 1.0.0 that was absolutely dramatic change) that brought lots of benefits and huge amount of work. Artyom Am Donnerstag, den 13.08.2020, 10:26 +0000 schrieb Nazim Can Bedir via Cppcms-users: Hello, Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. Thanks. Regards, Nazim Can. On 13/08/2020 12:11, Artyom Beilis wrote: > > And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) This is very generous of you! Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) And let me know, I'll be glad Artyom -------- Original Message -------- On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Nazim C. B. <nz...@pr...> - 2020-08-13 20:29:45
|
Hello Artyom, On 13/08/2020 20:47, Artyom Beilis wrote: >> 1. Sure. Since we are transitioning to C++11, using range-based for loops is the most logical way. But there are some edge-cases where 1-to-1 translation may not be possible. > >> For instance, when range expression returns a temporary, its lifetime is extended until the end of the loop, but the lifetime of any temporary within range expression is not extended. >> Example; >> for (auto& x : foo().items()) { /* .. */ } // undefined behavior if foo() returns by value > >> So, I am planning to find a way to detect such cases (without introducing template code bloat) and either write the code as "for (auto & item: iterable)" or, >> if there could be undefined behaviour, write the code as "for >(auto e = std::begin(iterable) ; e != std::end(iterable) ; ++e)"; all depending on what is written as iterable > > There is another important reason empty block: http://cppcms.com/wikipp/en/page/cppcms_1x_templates_flow#Foreach.block > > So you can write <% foreach %> .... <% empty %> ... <% end %> > Another thing is counter - rowid that allows having a iterm counter. > > So range loop as is does not fit the bill there Noted and will be respected in the work. >> Redo the whole template compiler with something like python-ply > > I would really prefer to keep changes small and focused in implementing fixing an issue. > > For example std::begin() std::end would allow to iterate over bare arrays like float vec3d[3]; that isn't possible with current design. > > Another critical issue is that Python2 (unfortunately) is going to die soon. Since software needs to survive the python3 and python2 support essential. > > Rewriting entire templates compiler is something I thought of for a looooong time - but finally it would require quite a big effort that can take multiple working weeks with virtually 0 benefit for the end user. > Sometimes rewriting is critical (like was the case of moving from CppCMS 0.0.x to CppCMS 1.0.0 that was absolutely dramatic change) that brought lots of benefits and huge amount of work. Ok. So, first let's proceed with the to-do list. When we finish the items on the list, I can donate my own time and create separate pull request for rewritten template compiler. Then, we can share our opinions on the topic that time? > Artyom Kind regards, Nazim Can. > Am Donnerstag, den 13.08.2020, 10:26 +0000 schrieb Nazim Can Bedir via Cppcms-users: > >> Hello, >> >> Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: >> >>> 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. >>> 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. >> >> I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. >> >> Thanks. >> >> Regards, >> Nazim Can. >> >> On 13/08/2020 12:11, Artyom Beilis wrote: >> >>> > >> >> And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) > > This is very generous of you! > > Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) > And let me know, > > I'll be glad > > Artyom > > -------- Original Message -------- > On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: > >> Hello All, >> >> Following the discussion I want to make a commitment to implement a >> new feature required by the community. Here my options: >> >> 1. HTTP/1.1 support - it would allow keep alive support and better >> performance overall for multiple requests. It would allow future >> implementation of web sockets. >> 2. Multiple-Event-Loop support - today there is only 1 event loop for >> the service and it can be a bottleneck for small requests on systems >> with high core count >> 3. SSL support - for embedded systems that need proper web server >> 4. C++11 cleanup - replace all booster primitives that exist in C++11 >> with standard (shared_ptr, thread, mutex, etc) provide move >> constructors for many objects, replace auto_ptr by unique_ptr. >> >> Feel free to suggest other ideas that you can think of that would be beneficial >> >> Artyom Beilis >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2020-08-13 21:04:39
|
> Ok. So, first let's proceed with the to-do list. When we finish the items on the list, I can donate my own time and create separate pull request for rewritten template compiler. Then, we can share our opinions on the topic that time? Of course :-) any time Artyom Am Donnerstag, den 13.08.2020, 10:26 +0000 schrieb Nazim Can Bedir via Cppcms-users: Hello, Then, I would like to get assigned for 1st and 7th items in the "Next Planned Things" list: 1. Updating templates compiler to use std::begin/std::end in foreach loop + use of auto by default. 7. Supporting both python2 and python3 for templates compiler due to python2 reaching its end of life. I will start working on above items tomorrow, and will create pull request on GitHub for review of proposed changes. Thanks. Regards, Nazim Can. On 13/08/2020 12:11, Artyom Beilis wrote: > > And I would like to propose here that, if you need help I can provide 3 hours per workday (15 hours per week) of development support. You can create milestone on GitHub, and split work as issues, and whoever would like to help may request to be assignee of any issue, write the code and create pull request. Well, please thing about it ;) This is very generous of you! Take a look on my previous mail - pick anything you want to start doing (for example variadic templates or templates compiler) And let me know, I'll be glad Artyom -------- Original Message -------- On 10 Aug 2020, 22:01, Artyom Beilis < art...@gm...> wrote: Hello All, Following the discussion I want to make a commitment to implement a new feature required by the community. Here my options: 1. HTTP/1.1 support - it would allow keep alive support and better performance overall for multiple requests. It would allow future implementation of web sockets. 2. Multiple-Event-Loop support - today there is only 1 event loop for the service and it can be a bottleneck for small requests on systems with high core count 3. SSL support - for embedded systems that need proper web server 4. C++11 cleanup - replace all booster primitives that exist in C++11 with standard (shared_ptr, thread, mutex, etc) provide move constructors for many objects, replace auto_ptr by unique_ptr. Feel free to suggest other ideas that you can think of that would be beneficial Artyom Beilis _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |