Hacker Timesnew | past | comments | ask | show | jobs | submit | cranej's commentslogin

For me the Rust code is easy to read. Personally I don't think it's reasonable to ask programming languages 'easy to read for people not familiar with them' / 'read like English' / or something similar.


Why is that? The number one reason I do not like Rust is the use of ', & and so on to represent something that would be trivial to implement with plain English.

Example:

    struct HReq<'a> {
 
    }

    struct HReq<a: LifeTime> {
      
    }
Isn't that better?


That doesn’t show the difference when you have more than one, and you also didn’t show how much more verbose the usage gets inside the struct.

It’s not a language level constraint to name lifetimes with a single letter. But folks tend to not use longer names for good reason.


I just have a hard time deciphering what the intention was with these single character things. Are you suggesting to use 'a_lifetime? What is that good reason? I usually use longer names to help the next person reading my code.


Rust was originally implemented in OCaml, and takes a lot of inspiration from it. The ‘a syntax is used by OCaml for generic type parameters.

Rust is in a weird spot because we have two different kinds of generic parameters: types and lifetimes. They need to be distinguished from one another somehow. Nobody loves the lifetime syntax, but nobody has ever proposed something that would end up significantly better.

I’m not proposing you should use ‘a_lifetime, I’m saying you could. In the end, it ends up obscuring more than helping.


That would mislead people into thinking it's a type variable satisfying a trait called LifeTime instead of a lifetime variable. It would be confusing.


And I guess it won't return unless all pages are fetched? even worse...


There are timeouts involved, that is, you'll get error responses. Feel free to try the example scripts.


> ...while baking in support for concurrent requests...

Timeout does not help here - if the api is for concurrent requests, it's bad that caller cannot do anything before `(the slowest request finished || timeout exceeded)`.


"docker-only expert" makes me LOL :)


Coinhive case IS harmful and they are not that innocent - if "posting Coinhive on their web sites" means "mining use visitors' browsers".


I'd say ads are harmful as well, don't see people fighting those this much.


“People does not fight harmful ads for now“ does not mean coinhive should be added to web sites without users’ consensus.

And It’s more harmful than ads as users know explicitly whether there are ads on web sites and have a choice to not visit them anymore. But silently mining without warning users of that is worse.


But ads are okay to add without users' consensus? Not really.

I wouldn't say mining was explicitly without warning, computer fans usually spun up.


You're confusing morality with legality. The morality regarding coinhive is a controversial topic, but its legality should still be defined under the rule of law. The Japanese police is acting on dubious legal grounds in arresting coinhive users given the lack of legal precedence and the vague wording of the law. Regardless of our opinions on coinhive, it is still worrying to see the police make arrests for seemingly arbitrary reasons.


That really depends; if it's communicated to the user that, by having the website open, they are mining cryptocurrency for the website owner as a sort of "payment" for being able to use the site, then that's totally ok. If they weren't informed, then it's still just a minor issue, at least compared to large-scale tracking of users that many other sites do.


The police started acting long after the website owner removed Coinhive from his website.


CN2 stands for ”ChinaNet Next Carrying Network“


Yeah IMO the only "good" passwords are those hard to remember even by yourself.

Personally most non-trivial passwords of mine were generated by 'pass'.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: