It's been a few releases in the last 168 days when I announced PicoTorrent on HN and I'd like to get some input on both the progress as well as the new WebSocket API.
It's very unusual, but at least it tells a reader what it's an else of.
In code-reviews I still occasionally have to complain about the
if (condition){
// 100 lines of code
}else{
// 20 lines of code
}
pattern.
As we're dealing with a language that has a proper subroutines and a return statement, this can just be refactored away.
But CMake might not have either of those (I don't know - I have only ever written a single trivial CMakeLists.txt), so it might just force this pattern and then it's helpful to also enforce the else to restate the condition.
That makes sense, though the way this seems to be required to write in CMakeLists isn't maintainable. I can only guess they have diagnostics that would warn if you typo'd that easy to mistype string.
I hear qt is excellent, but would encourage you to do distinct ui code for each platform, in that platform's native ui libs. You'll look like a fish out of water otherwise.
You might want to start with a web UI then (like SyncThing). This provides you with a simple way to display your data and you get Mac / Linux / etc support for "Free" while also allowing your Windows users to have simple network access.
27 comments
[ 0.21 ms ] story [ 75.7 ms ] threadYou can find the relevant API documentation at
- http://docs.picotorrent.org/en/latest/websocket-api/index.ht...
I'm no CMake expert, but this looks odd:
https://github.com/picotorrent/picotorrent/blob/develop/CMak...
EDIT: this is just CMake's very odd syntax and it's actually a single condition.What is odd about it?
In code-reviews I still occasionally have to complain about the
pattern.As we're dealing with a language that has a proper subroutines and a return statement, this can just be refactored away.
But CMake might not have either of those (I don't know - I have only ever written a single trivial CMakeLists.txt), so it might just force this pattern and then it's helpful to also enforce the else to restate the condition.
EDIT: the parent post was edited, and this comment was written for the original post.
The linux directory contains build scripts to build on Linux, which is used for the TravisCI builds.
No extra dependencies, no UI toolkits!
Basically I was suggesting to more prominently mention it's Windows-only and not just in the list of features.