promise-cpp icon indicating copy to clipboard operation
promise-cpp copied to clipboard

How to contact with you?

Open ksanderon opened this issue 7 years ago • 5 comments

Hello, I'm owner of rili project. It also implements promise/defered pattern for c++. Maybe you would like to contribute it? I suppose together we can create something really good ;)

ksanderon avatar Mar 20 '17 12:03 ksanderon

@ksanderon FYI, https://github.com/grantila/q is another promise implementation

grantila avatar May 04 '18 12:05 grantila

Yep. It's very nice to see, that great minds think the same way - eg. "q" seems to be very "promising" ;)

I currently host my stuff on gitlab if you want check it out: https://gitlab.com/rilis/rili (promise submodule of rili project have ~ scope of "q").

I'v started with only promises but latter imagined that there is lot of stuff, which make using promises useful for end user (mostly IO related), which usually are not needed by all projects but at least some parts (exclusive for each project) are "must have" - for instance "https stuff" or "event streams" working out of box - maybe some work on randombit/botan to make tls easier/more integrated (main maintainer of botan - Jack LLoyd seems to be very open for such contributions at least after some discussions with him).

From my experience promises are nothing without surrounding ecosystem for most of potential users(and to by honest also from my perspective), so I want to create it.

I wanted to have nice granularity of these packets(not that huge monolith like boost or poco[even if they say these libraries are modular... ROTFL ]), so for example prototype of "hell" was needed (it is git and cmake oriented packet manager which currently I know is way more popular than promise library - used > 1000 times / day + in industry production fo private projects), just because other packet managers for C++ like hunter, vcpkg or conan just not meet basic(at least mine) functional requirements.

Maybe it could be useful to merge our ideas and create "great plan to conquer the world", to not duplicate further work - for now we have some implementations of promise like stuff - maybe we should make next step and add real blocks from which people can easier create better apps.

For me it's also super important to have this stuff very clean as I also found that using close to all of c++ or c libs is huge pain in the ass if you are on embedded devices or even cellphones or xbox/nintendo/ps4 or something just little bit different than big 3(mac, windows, linux)

ksanderon avatar May 04 '18 21:05 ksanderon

  1. For what in promise-cpp ucontext.h and fibers?
  2. We know, in javascript land(nodejs) a promisified function can directly used with await or yield pattern in async/generator function. I'm wondering if I could apply any coroutine to promise-cpp promisified function?
  3. And you guys, @ksanderon , @grantila , what are you thinking about it? P.S. looking for a boost-free lib implementing coroutines or promises. I'm on ubuntu 14 and no wish migrate higher versions only to check c++17. Also no wish to download 3 Gb of Boost library.

Globik avatar Jun 28 '18 16:06 Globik

1- Suppose to have cooperative multitasking?

3- I suggest to look at Duff's device and read about fibers if you would like to implement coroutines. If you just want something which work somehow: https://github.com/tonbit/coroutine should be easy to understand and use(0.5kloc single header file) if you do not need nothing more sophisticated.

ksanderon avatar Jun 30 '18 10:06 ksanderon

  1. ucontext.h or fibers were removed. Promise-cpp would be a pure library that supports to implement promisified tasks, that means, it has no fiber or event loop, but can be integrated with other asynchronized libraries, such as boost asio or libuv.

  2. await is definitely possible if we import something like boost::coroutine and use boost::asio as io service. In this case, we must bind "promise-cpp" tightly to the special coroutine library and will need more dependencies. Currently, "promise-cpp" is designed without boost required. Anyway, await is important features and will be considered.

xhawk18 avatar Jul 22 '18 11:07 xhawk18