News for hackers. Stuff that matters.

MoSal

Re:The Rust Libs Blitz on Saturday May 06, 2017 @03:36PM (#14281858)
I wrote cargo-esr[1], an alternative tool for searching crates, with the purpose of narrowing down good choices.

Feedback welcome.

[1] https://github.com/rust-alt/cargo-esr

Re:The Rust module system is too confusing on Wednesday January 11, 2017 @06:41PM (#13378537)
> in practice the closure syntax and logical or do not lead to confusion (imho, ymmv).

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.

Re:The Rust module system is too confusing on Wednesday January 11, 2017 @04:43PM (#13377751)
What's syntactically obscure about Rust?

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.

Is this a problem where multiple connections wouldn't help?

I can add an option to saldl[1] to use a new connection with each chunk. But I'm not sure there are real world examples where this would help.

[1] https://github.com/saldl/saldl

Re:A new Curl logo on Friday May 27, 2016 @09:37AM (#11785901)
Interesting.

Why is this interpreted as a relative path?

     cd /etc
     curl file://resolv.conf
Re:GNU name system on Friday May 06, 2016 @07:19AM (#11643087)
Christian Grothoff is an excellent academic. In fact, he is one of the most knowledgeable in the field worldwide.

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.

Are there any plans to support archiving Web 2.0 pages?

More and more people are starting to rely on "archive.is" as it handles Web 2.0 content without issue. But I'm concerned about the survivability of that survice, and whether it can handle big growth.

Re:WebExtensions in Firefox 48 on Saturday April 30, 2016 @08:57AM (#11601493)
If all you intend to provide in that regard is "Better keyboard shortcut support". Then no, Vimperator functionality will not be supported.
Re:Stream PirateBay movies directly from CLI on Monday April 04, 2016 @11:01AM (#11422358)
It wasn't very useful because it didn't actually force streaming. The "rarest-first" rule was still respected.

It wasn't optimal for the swarm. Yet, the user didn't really get what he/she wanted.

Re:Stream PirateBay movies directly from CLI on Monday April 04, 2016 @06:34AM (#11420743)
Suppose there is only one seeder and 2-3 leechers. All leechers managed to get 50+%. Now, if the seeder disappears, the leechers should be able to finish the download from each other. If all initial leechers are streamers, that download will never finish for them or anyone else.

Supposedly long seed intervals will not help the swarm in that case.

Re:Stream PirateBay movies directly from CLI on Monday April 04, 2016 @05:53AM (#11420540)
I'm deeply concerned about popularizing torrent streaming.

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.

Re:Curl vs. Wget on Thursday March 03, 2016 @01:51PM (#11218995)
The URL does not work right now. But I tried another one from the same site.

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.

Re:Curl vs. Wget on Thursday March 03, 2016 @07:50AM (#11216504)
Stability and security comes first. So, let's ship an X years old curl release + patches ;)
Re:Curl vs. Wget on Thursday March 03, 2016 @07:18AM (#11216360)
FWIW, this page is incomplete and outdated.

For example, `--mirror-url` was implemented. So, it is now possible to download from two sources concurrently.

Re:Curl vs. Wget on Wednesday March 02, 2016 @08:13PM (#11214372)
Try saldl[1]. It depends on libcurl. So protocol support should be good and reliable.

[1] https://github.com/saldl/saldl

Re:Curl vs. Wget on Wednesday March 02, 2016 @06:37PM (#11213978)
I should probably write a "saldl vs. others" page someday.

> Wget supports the Public Suffix List for handling cookie domains, curl does not.

This is outdated info. (lib)curl can be built with libpsl support since 7.46.0.

Re:GitHub responds to Dear GitHub letter on Friday February 12, 2016 @12:12PM (#11088677)
Besides the UI, "reviewable.io" is a memory hog. It's simply unusable if you try to browse the site from a device without a lot of free memory (e.g. older tablets, ARM SoCs, etc).
Re:Dear open-source maintainers, a letter from GitLab on Monday January 18, 2016 @07:39AM (#10924043)
Somebody just spammed their Issues page[1]. The one they link to in the letter.

I think the spammer is trying to make a point! For starters, there seems to be no rate limit applied.

[1] https://gitlab.com/gitlab-org/gitlab-ce/issues

This is the greatest thing since ... tmux.

If only @resurrect-save-zsh-history was implemented.

Re:Ask HN: What's your favorite CLI or ncurses program? on Friday September 04, 2015 @11:26AM (#10171052)
nethogs: bandwidth usage by process(Does not work with UDP!)

iptraf-ng: bandwidth usage by port.

lsof: list open files(including network files).