ipkn
Re:Crow – C++ Microframework for Web, inspired by Python Flask
on Tuesday July 08, 2014 @10:16AM (#8004599)
I agree that allowing implementing long polling with crow is important, just I didn't know a good way to do that. Your suggestion is big help.
I think supporting both way is better if there is a enough explanation. I don't want to drop a simpler way to do the same job.
CROW_ROUTE(app, "/about")
([](){
return "About Crow example";
});
CROW_ROUTE(app, "/about")
([](Response res){
res.send("About Crow example");
});
Re:Crow – C++ Microframework for Web, inspired by Python Flask
on Tuesday July 08, 2014 @07:14AM (#8003928)
I already considered using a template with single character constants, and I thought the technic didn't have much benefit over the macro version.
Maybe compile-time routing function genetation could be possible with it (and would faster), but requres HUGE work I think. I will try and benchmark it later.
Re:Crow – C++ Microframework for Web, inspired by Python Flask
on Tuesday July 08, 2014 @06:04AM (#8003730)
I also want to remove CROW_ROUTE, but with the current c++ standard, it cannot be avoided.
To check whether handler is valid with given URL at compile time, `url' (string literal) argument requires in compile time and in run time. const char* value is invalid for template argument and argument of non-constexpr function cannot be constexpr value. Thus I used macro to provied `url' argument twice; in template argument through constexpr function and in argument.
Re:Crow – C++ Microframework for Web, inspired by Python Flask
on Monday July 07, 2014 @11:53PM (#8002931)
the power of `constexpr'!
Re:Crow – C++ Microframework for Web, inspired by Python Flask
on Monday July 07, 2014 @10:48PM (#8002782)
I'm writer of this project and it's not completed yet. I planned to publish this after finishing basic features and documentations.
Re:FlatBuffers: a memory efficient serialization library
on Monday June 16, 2014 @10:42PM (#7902616)
If you don't want the code generation step and C++ is the only language to use, Dumpable[1] can be useful.