Hacker News new | past | comments | ask | show | jobs | submit login

Looks like a learning project for someone relatively new to C++.

I suggest using git tags instead of putting a version number in every commit message.

Have you looked into epoll or kqueue or even poll? Or for your windows backend, WSAEventSelect/WaitForMultipleObjects or IOCP... Trying to get all these disparate ways of doing async sockets to use a consistent wrapper interface is an interesting challenge.




Hi,

I do use git tags but I also include version numbers in my commit messages so that I can easily determine in which version a given commit was published. I find it pretty useful. I know some people prefer to create a dev branch, then squash merge, but sometimes you got multiple features and I feel it is more convenient to separate them into multiple commits that will belongs to the same release. Do you have some other suggestions, I would be interested :)

Concerning epoll/poll, the networking part was first based on it. However, the poll implementation on windows is buggy and thus it is more advised to use select on windows apparently... So to keep consistency between unix and windows versions, I decided to switch back to select for both platform for now. I'm planning to switch back to poll for unix and look at WSAEventSelect.

I also looked at IOCP and it is really interesting. However, it is pretty hard to implement a portable library that uses select/poll under unix but IOCP on windows as the implementation is pretty different. There are some ways, but the way I designed the networking part does not make it possible without changing completely the design on one platform


> I do use git tags but I also include version numbers in my commit messages so that I can easily determine in which version a given commit was published.

If we look at a commit on github, I'll see all tags that contain that commit:

https://i.imgur.com/KTkz2K1.png

So I know this commit was created before the 3.3.0 tag (and all later tags).

You can do the same thing at the command line with:

    git tag --contains 009bdeedbc
which would display the same information.


Running `git describe` will give you the nearest tag. gitk will also show you the tag in a manner similar to how it displays a branch head.


Btw: gitg is a slightly more modern looking gitk alternative :)

(it also shows tags similar to branch heads)


On the other hand, gitk is light, simple, cross-platform, and works.


You're right, gitg doesn't work on macOS. But since I'm only using Windows and Linux it works for me :)


awesome, thanks for the tips!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: