hobbes icon indicating copy to clipboard operation
hobbes copied to clipboard

Non-UNIX systems port?

Open ghost opened this issue 7 years ago • 4 comments

Hello!

First of all thank you for open-sourcing hobbes, I just stumbled upon it and it looks great! I'd be interested in contributing a win32 port if you are interested. For this, I have the following thoughts:

A first coarse review of the code shows you're relying on mman and UNIX sockets, epoll & kevent respectively. For a win32 port, these should be easily replaced with VirtualAlloc, MapViewOfFile et al, winsock2 and WaitForMultipleObjects, modulo some worker threads for tasks that don't map 1:1 to the epoll semantics. But, seeing that this would not be the first cross-platform project that needs async IO, timers (and HTTP), I can't help but think of using a library like libuv to avoid having to maintain this sort of cross-platform code (with all unexpected caveats). I suppose avoiding this sort of maintenance burden would be in the interest of Morgan Stanley, too. As I'm writing this, I'm reminded that LLVM should also contain the odd cross-platform abstraction for some of these topics, if not all (after all clang's static analyzer includes an http server as well, though I haven't checked the code so far).

So... may I get my hands dirty at this?

Cheers!

ghost avatar Dec 19 '17 18:12 ghost

Glad to learn that you're interested in the project, and you're absolutely free to hack away on this project as you like -- you don't need our permission :).

I used to do a lot of win32 programming a while back, but recently have mostly been working with macOS and Linux so just ported to those platforms. A Windows port would be very useful! We would definitely love to have such a PR to merge.

If you find something in LLVM that might help, that would be pretty handy. Given our internal processes and the work to bring new programs online with this infrastructure, we do generally try to minimize the number of dependencies that we pull in (LLVM itself is a very heavy dependency).

kthielen avatar Dec 19 '17 19:12 kthielen

Thanks for your prompt response!

I just asked beforehand to make sure I don't put work into a port that will not be merged ;)

The hesitation to introduce an additional dependency is just what I'd expect and very understandable. I'll look into LLVM's abstractions and see that as much as possible can be re-used. PR will be coming!

ghost avatar Dec 20 '17 08:12 ghost

Just to leave a note here: I've transferred my cptG account to this one, so activity will happen from this account. I'll hopefully get around to hacking on hobbes next week.

herrgahr avatar Jan 14 '18 12:01 herrgahr

Please let us know if there are any questions you have that we can help with. We are pretty responsive on the mailing list [email protected] as well as here on github.

kthielen avatar Jan 15 '18 19:01 kthielen