Amazing work, how long did it take to build? Where you working on it full-time or part-time?
Thank you! Calendar year, in the evenings and on weekends, with sprints of several weeks and a month or two of rest/AFK after each sprint to keep sanity (I have a full-time job, a wife and a 3 year old kid). Happy that I had the persistence to keep working on the project
Show HN: Bt – BitTorrent library in Java 8
81–89 of 89 posts
Re: Show HN: Bt – BitTorrent library in Java 8
#82Hello, thank you for writing the library. On my context it is useful for downloading large files without depending on a single point of failure or fixed location. Have a question in regards to the example syntax: client.startAsync(state -> { if (state.getPiecesRemaining() == 0) { client.stop(); } }, 1000).join(); This is a feature from newer Java syntax that I'm not yet familiar enough with lambdas to understand in f…
Just read the Java 8 docs.
I can only thank those who wrote such obfuscated code in previous years, that eventually forced everyone else afterwards to write code as simple and clear as reasonably possible. That's the reason why I've asked for the simplified code, Might as well save the time for other developers on similar situation.
Re: Show HN: Bt – BitTorrent library in Java 8
#83Earlier quoted context omitted.
Just read the Java 8 docs.
Some developers work on large code bases where adding lambdas or fresh new syntax features isn't really seen as an advantage for the rest of the teams, most often explicitly restricted. I can only thank those who wrote such obfuscated code in previous years, that eventually forced everyone else afterwards to write code as simple and clear as reasonably possible. That's the reason why I've asked for the simplified cod…
Of course you can choose to shoot yourself in the foot and just stick with Java 6, but don't try to force others to make the same mistake.
Re: Show HN: Bt – BitTorrent library in Java 8
#84Earlier quoted context omitted.
Some developers work on large code bases where adding lambdas or fresh new syntax features isn't really seen as an advantage for the rest of the teams, most often explicitly restricted. I can only thank those who wrote such obfuscated code in previous years, that eventually forced everyone else afterwards to write code as simple and clear as reasonably possible. That's the reason why I've asked for the simplified cod…
No, the simplified code is the Java 8 code. You are just clinging to the archaic syntax that you are used to. Of course you can choose to shoot yourself in the foot and just stick with Java 6, but don't try to force others to make the same mistake.
Seems you prefer to put everyone on the same bag and speak for them too.
Re: Show HN: Bt – BitTorrent library in Java 8
#85Hello, thank you for writing the library. On my context it is useful for downloading large files without depending on a single point of failure or fixed location. Have a question in regards to the example syntax: client.startAsync(state -> { if (state.getPiecesRemaining() == 0) { client.stop(); } }, 1000).join(); This is a feature from newer Java syntax that I'm not yet familiar enough with lambdas to understand in f…
In the older syntax, something like this: client.startAsync(new Consumer { void accept(TorrentSessionState state) { if (state.getPiecesRemaining() == 0) { client.stop(); } } }, 1000).join();
Re: Show HN: Bt – BitTorrent library in Java 8
#86Earlier quoted context omitted.
From what I've seen Java/JVM AOT won't produce binary executables but shared libraries that will be loaded on startup by the JVM. When I first read about Java AOT-compilation I expected it to produce real executables that's why I think this is important to mention. But please correct me if I am wrong. So if this is true even with AOT compilation you still need the JVM as dependency (although I think you can get a min…
Correct, but that is no different than having to ship glibc.so or MSVCRT.dll alongside your application, specially if you want to be certain which version gets used. This is only relevant to Oracle's implementation though. Other JDKs do support static linking, as long as you restrain yourself from features that could require dynamic compilation. There was a talk at JVM Languages Summit about the current state of AOT…
Re: Show HN: Bt – BitTorrent library in Java 8
#87Earlier quoted context omitted.
Good point, but I wonder what size will the final binaries have, given that bytecode inflates significantly when translated to the machine code (there was a good discussion on HN recently about app sizes)
In any case smaller than Electron apps.
Re: Show HN: Bt – BitTorrent library in Java 8
#88Earlier quoted context omitted.
Correct, but that is no different than having to ship glibc.so or MSVCRT.dll alongside your application, specially if you want to be certain which version gets used. This is only relevant to Oracle's implementation though. Other JDKs do support static linking, as long as you restrain yourself from features that could require dynamic compilation. There was a talk at JVM Languages Summit about the current state of AOT…
I would rather ship glibc (8MB) or musl (.5MB) than the JVM (100s of MBs?), but it's not necessary given that nearly every target already has a libc. Also, Go programs don't depend on libc, and C and Rust can probably statically link against some libc in a pinch.