43 karma · joined Aug 1, 2015 (11y ago) · 21 submissions
https://github.com/MoSal
https://github.com/saldl/saldlcomment 9y ago · link · parent
That's true. But put your self in the mind of a C developer looking at Rust code for the first time:
if a || b {
println!("True");
}
Cool.Then:
thread::spawn(|| println!("Hello from a thread!"););
What? What is the logical or doing there?----
IIRC, there are also cases where you have to write `& &` instead of `&&` to not confuse the compiler. That's a design/practical issue.
Both those issues would have been avoided if literal `and`/`or` were used.
I find it interesting how the only thing that momentarily confused me, as a C developer, about Rust syntax, was caused by Rust authors not wanting to syntactically deviate too much from C.
comment 9y ago · link · parent
I only knew(and liked) C reasonably well before Rust. And nothing felt obscure when I started learning it.
I can only remember not getting what `||` meant (in the context of defining a closure without args). The positional meaning of `||` and `&&` is the only thing, I can recall right now, that can be considered obscure syntactically (for C developers at least) . They should have gone with literal `and`/`or` for the operators IMHO.
comment 10y ago · link · parent
Unfortunately, that's why ,IMHO, GNUnet didn't succeed. To build a successful product/network, you need to be practical, and you need to make useful features/services available as early as possible (without compromising security of course). Designing with pluggability and forward-compatibility in mind helps in this regard.
Academic perfectionism, however, can delay your product/network launch indefinitely. And that's what seems to have happened with GNUnet.
comment 10y ago · link · parent
Supposedly long seed intervals will not help the swarm in that case.
comment 10y ago · link · parent
A few leechers breaking "rarest-first" might not cause much harm. But if most leechers become streamers, torrents will lose their efficiency in distributing less-popular content.
Transmission implemented a "streaming" feature once, that didn't actually stream. It just stopped fetching pieces "with the same rarity" randomly. They still got too much heat for adding that not very usefull feature. And they reverted the commits soon after.
comment 10y ago · link · parent
No client can get this right, always. aria2c is not more reliable. It's just choosing to take the filename from the redirect URL. It appears to be the right thing to do in this case. But it would fail if the start URL was actually the one that had the right filename.
Hosts can use the Content-Disposition header if they want to make sure all (capable) clients get the right filename.
In saldl, I implemented `--filename-from-redirect` to handle your use-case. But It's not set by default.
20.
Show HN: Saldl – A CLI downloader optimized for speed and early preview(github.com ↗)
4 points · by MoSal · 11y ago · discuss