4 ms·
Show HN: PicoTorrent 0.10 released – WebSocket API included
- viktorelofsson 10y agoIt'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. You can find the relevant API documentation at - http://docs.picotorrent.org/en/latest/websocket-api/index.html http://docs.picotorrent.org/en/latest/websocket-api/index.ht...
- newman314 10y agoI took a quick look to see if I could find this but does picotorrent have RSS support?
- viktorelofsson 10y agoNo, it does not, sorry. I've been asked this before and perhaps it's something I should prioritize :)
- newman314 10y ago3 essential features: encryption, filter.dat support and RSS =)
- cm3 10y agoIs the 64bit check in CMakeLists correct? I'm no CMake expert, but this looks odd: https://github.com/picotorrent/picotorrent/blob/develop/CMakeLists.txt#L24-L29 https://github.com/picotorrent/picotorrent/blob/develop/CMak... # Get current architecture if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(PICO_ARCH "x64" ) else(CMAKE_SIZEOF_VOID_P EQUAL 8) set(PICO_ARCH "x86") endif(CMAKE_SIZEOF_VOID_P EQUAL 8) EDIT: this is just CMake's very odd syntax and it's actually a single condition.
- viktorelofsson 10y agoIt should be correct - or at least, it works for what I use it for :) What is odd about it?
- cm3 10y agoI don't know much about CMake, but to me the two conditions look the same, but maybe this is just how CMake magically works.
- cm3 10y agoI get the syntax now. This is a single condition, but it has to be repeated three times. Odd syntax.
- pilif 10y agoIt'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.
- cm3 10y agoThat 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.
- viktorelofsson 10y agoOh, yeah, it seems as it is CMake standard to put the if-expression inside the else-parenthesis as well. It is not an elseif.
- cm3 10y agoIs this Windows-only? If not, what's the UI outside Windows?
- viktorelofsson 10y agoYes, that's a good suggestion. The readme is due for a rewrite so I'll make sure to mention that somewhere up top! EDIT: the parent post was edited, and this comment was written for the original post.
- cm3 10y agoThere's a linux directory, what's that for?
- viktorelofsson 10y agoI've split the project in two parts, PicoTorrent and PicoTorrentCore. PicoTorrentCore is cross-platform and builds on GCC4.8. The linux directory contains build scripts to build on Linux, which is used for the TravisCI builds.
- cm3 10y agoAnd there's no UI yet, right? If you plan to write one, I'd suggest Qt, since you use C++ extensively already.
- serbrech 10y agoWhy not using electron on top of the api? it's not overly complicated UI anyway, and it will build on an api that other can use.
- tgpc 10y agoI 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.
- tejinderss 10y agoNever knew this existed. This could possibly replace qbittorrent for me on windows 10. Thanks for great work.