Could you not have used a simple thread pool model in your case? That would be a trivial parallelization of your network requests with limiting on the resources (number of parallel connections)
Otherwise when the logic gets complex I try to model it as independent threads each having a well-defined role (e.g. exclusive write access to SQLite) communicating with channels. Although I tend to code these things in Rust, the language who taught me that philosophy is Go.
I have nothing against String having PartialOrd. I don't see why this means Vec<u8> should be PartialOrd–especially because treating a String as a Vec<u8> sounds very wrong.
Why does it sound wrong? Since strings are UTF-8, this just boils down to lexicographical ordering of code points.
Ironically though, that should be actually more objectionable than ordering arrays by lexicographical order of elements, because the underlying code point order is pretty much useless for any other purpose than having some arbitrary deterministic order. Meaningfully ordering strings is an inherently locale-dependent operation, and PartialOrd has no way to take this into account.
French here, I recall my primary school textbook where they said something along the lines of "sometimes accents are dropped, that's sort of fine as long as it doesn't change the meaning". They gave the example of a fictitious newspaper whose headline was "UN POLICIER TUE": depending on the accent (tué/tue) it means either "a policeman kills" or "a policeman killed".
american here who's lived in france and still use an azerty keyboard because it lets me type in both languages. how do you get a capital A with an accent on an azerty keyboard?
Easily ? You don't, with the most common azerty keyboard you have to use : Ctrl+Alt+7 Shift+A. That's why there is a new standard for azerty keyboard the "NF Z 71-300" that is better with accent and stuff like æ,œ,Æ,Œ,«» etc.
Damn it. That's why I couldn't figure it out for years. You can't.. Is the new keyboard standard being used anywhere? Like if I walk into a common office in france and sit down at a laptop - is it likely to be using the new keyboard layout?
What's weird is I sometimes, even 10 years ago, would get an email from people in France, and it would have an accented A. Like, how did they do that..
Not the answer to your question, but this is why I think Quebec uses accented capitals more than France. In Canadian French layout, there is a key for à. Simply using Shift+à gives you À.
Quatre-vingts, quatre-vingt-un, quatre-vingt-deux... quatre-vingt mille, quatre-vingts millions.
This doesn't affect pronounciation in general, because this s is silent... except in the context of liaisons, such that you would say "quatre-vingts (z')avions" and not "quatre-vingt (t')avions", although in colloquial speech, nobody cares. In written form, I expect many of my fellow French native speakers to do the mistake or at least be uncertain. We mostly write it "80" anyway.
Rust is young enough that you can read this as an ad for the language, not the project. "Rust is a language in which people write full-text search and indexing"
I think it's a pretty good idea actually, because with standard deviations (and means, of course) you can run statistical tests to make sure your improvements are statistically significant and not due to chance. I hope the candidate had a chance to explain themselves before he got no-hired.
The candidate is probably now happily working under a manager who doesn’t complain “why are you using your skills? Just [do the simplest thing that occurs to me], you idiot.”
I read a comment on HN a while back arguing that today's companies are essentially human-powered AIs. It made me think quite a lot -- large companies especially take a lifeform of their own. They tend to mostly care for themselves. Actions are taken "for the company" without any one person being actively aware of why. Higher-ups have some form of backdoor access to the direction the company takes; a symbiotic relationship with what is, in a way, a parasite.
I was thinking about this fascinating topic recently in the light of Brexit.
The EU has traditionally been more supportive of the rights of indivduals as opposed to those of companies and other organisations, in the belief that companies emerge from human behaviour and even though they operate in their own (ie commercial) environment, they exist to serve the population.
The US has by contrast given companies more freedom to operate, in the belief that by doing so they provide an environment for individuals to fulfil themselves. I fully believe a post-Brexit UK government will go the same way.
I think the key term here is "motivation". If the motivations of the company and individual align, all's well. If not, who's going to cover your back?
There was a talk at the 30C3 where the speaker argued that we do not need to fear AIs. A human-level AI is an information processing system (what we have already, and which is not harmful) plus a motivation system. The latter is the one that's to be worried about, but it already exists in the form of corporations (which fittingly also work against our collective interest in many ways, e.g. environmental protection).
There was an interesting TED talk a while ago about this idea applied to cities, how they 'live' and communicate and grow but how we have never really seen one die. Less about AI I suppose and more about new life.
Many larger systems are more than the sum of their parts. Enough that you could consider the grouping it's own entity. Ant hills are the canonical example because individual ants are recognizable as 'animals', but the function of an anthill clearly relies on a complex interaction between more simple ants.
Just as we are made of tiny organisms, bigger systems could be considered to be made of us.
Hofstadter wrote a nice piece on how an ant colony could be thought to be an entity in itself. My favourite quote pasted from an online source:
Anteater: "I reject holism. I challenge you to tell me, for instance, how a holistic description of an ant colony sheds any more light on it than is shed by a description of the ants inside it, and their roles, and their, interrelationships. Any holistic explanation of an ant colony will inevitably fall far short of explaining where the consciousness experienced by an ant colony arises from."
Unfortunately, this argument proves too much. Replace "and colony" with "human" and "ant" with "cell in a human body" - can you explain where the consciousness experienced by a human cell colony arises from?
(To avoid debating materialism vs idealism use another creature, say "chimp", instead of "human" - assuming that you agree that chimps have a consciousness.)
I am not fond of the holistic / emergent idea but I don't think "we can't figure out the exact place where the sum becomes larger than its parts" is a good argument against it.
Hofstadter's anteater is a character in a dialog. You shouldn't assume it presents the author's conclusions directly. Indeed the point of the anteater is that with respect to ants, it's hardly an impartial source.
A simpler type of holism might simply state that information generated by a system is distinct from the individuals that compose that system. Bits form a computer, but only in groups.
Its more complicated with businesses because we are aware of the greater system and attempt to influence it.
Holism is inescapable. An ant is a holistic thought. When you talk about the parts of an ant hill you don't talk about the atoms in the ants. You talk about the ants. In that same way when you want talk about the ecosystems that contain ant hills you don't talk about individual ants. An anteater relates to the whole ant hill. The relationships a thing has are just as significant to what it is as the things it's composed of. Reductionism can only look inside things.
well, if you follow the point of view of materialists, you have to accept that the united states of america are a living, conscious, entity, of which you (maybe) are a part.
PLEASE don't do this. A friend of mine had done it a few times and was getting confident in the process. Once I was watching him, the bottle broke into tiny pieces and went straight into his hand. He had around 30 pieces of shattered glass that managed their back several centimeters deep inside. I still remember calling emergency and waving hands when they arrived so that they saw us. My friend came back a few days after with his hand wrapped in band after a pretty awful night in hospital. Pretty stupid idea if you ask me. Don't do it. Remember one hand is one half of your text editor...
Otherwise when the logic gets complex I try to model it as independent threads each having a well-defined role (e.g. exclusive write access to SQLite) communicating with channels. Although I tend to code these things in Rust, the language who taught me that philosophy is Go.