Live data from Hacker News

Show HN: Bt – BitTorrent library in Java 8

github.com

31–40 of 89 posts

Re: Show HN: Bt – BitTorrent library in Java 8

#31
post #19
post #12

Earlier quoted context omitted.

You're conflating developer tools with a language runtime. Every popular OS ships with everything necessary to run a C, Go, or Rust binary. Python 3 and Java both require a separate runtime to be installed, but I will say that every Java CLI I've used has had terrible startup performance.

I'm not conflating them and it's still a silly way to frame the question. If you want to ask someone why they wrote something in language X, just ask them that.

You're being pedantic; natural language is contextual for better or worse. Anyway, asking "Why did you use Java", is likely to be interpreted as a slight against the language and thus be downvoted (indeed, his politely phrased question was even downvoted when I saw it!).

Re: Show HN: Bt – BitTorrent library in Java 8

#32
post #15
post #12

Earlier quoted context omitted.

You're conflating developer tools with a language runtime. Every popular OS ships with everything necessary to run a C, Go, or Rust binary. Python 3 and Java both require a separate runtime to be installed, but I will say that every Java CLI I've used has had terrible startup performance.

Some apps just include JRE into the app package (+100MB), and just use it if it's not provided by OS. But then you need to provide different app packages for different OSes.

C, Go, and Rust would require different app packages for different OSes--that's not a problem. The problem is bundling a 100MB runtime for a CLI.

Re: Show HN: Bt – BitTorrent library in Java 8

#34
post #17
post #14

Earlier quoted context omitted.

Good to know, but 1-2 seconds is still very slow compared to a native app. I have an 8MB Go CLI application that can startup and print its help in .05 seconds, and even that is probably slow compared to a C or Rust equivalent.

Well, printing stuff is easy. Just tried: $ time java HelloWorld Hello, World real 0m0.088s user 0m0.088s sys 0m0.016s

That's presumably not loading any libraries at all though - the time to being interactive (or just doing something useful) will get worse as more bytecode has to be decompressed and loaded.

Re: Show HN: Bt – BitTorrent library in Java 8

#37

Earlier quoted context omitted.

Thank you! Make sure to install http://www.oracle.com/technetwork/java/javase/downloads/jce8... to allow 160-bit cryptography and use -e flag to be completely safe! I also have a simple shell script locally, that wraps the java command, so I have to just type `btmagnet AF0D9AA01A9AE123A73802CFA58CCAF355EB19F8` to download to a pre-determined location (hardcoded in the script). I wonder if I should share it on the CLI…

> Make sure to install http://www.oracle.com/technetwork/java/javase/downloads/jce8... . to allow 160-bit cryptography Or don't use the Oracle proprietary distribution but the OpenJDK of your operating system which normally doesn't exclude proper crypto algorithms. (be aware that the JDKs downgrade silently if certain libraries are missing in your host)

That's some really useful information, thanks! Need to add this to the readme

Re: Show HN: Bt – BitTorrent library in Java 8

#39
post #16

Earlier quoted context omitted.

I'm using Lanterna, a Java library for creating text-based terminal GUIs ( https://github.com/mabe02/lanterna ), and the startup is 1-2 seconds. Can't recommend it enough

opening and quiting vim for a file of 2500 lines of C++ (so with all the plugins and stuff) takes 0.030seconds. I don't see how you can be satisfied with 2 seconds startup for a terminal application

Well the torrent download will take a lot more than 2 seconds so that time is totally amortized.

Besides this comparison looks like a total bikeshedding unless you plan on downloading torrents with vim.

By the way the project looks fantastic. I'll be giving it a try.

The alternative for just command line torrent on a *nix is aria2 [0]. Works exactly as advertised.

[0]: https://sourceforge.net/projects/aria2/

Re: Show HN: Bt – BitTorrent library in Java 8

#40

Man this looks slick, going to give it a shot. Love the ability to be able to download a magnet link from the CLI and not worry about what some fancy GUI is doing in the background cuz I am paranoid.

Sounds like deluge (deluged) would have suited you fine.
Post reply on HN