News for hackers. Stuff that matters.

ccccc0

Re:Why Concurrency Is Hard on Tuesday November 10, 2020 @01:37AM (#25043341)
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.

Re:My least favorite Rust type on Monday September 21, 2020 @05:19PM (#24548605)
If you ever create a BTreeSet<String>, it will use String's PartialOrd, which is directly #[derive]d from Vec<u8>.
Re:In the Turkish locale, "INFO".lower() != "info" on Sunday August 16, 2020 @05:46PM (#24181636)
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".
Re:So you want to write your own CSV code (2014) on Friday May 15, 2020 @07:05AM (#23190784)
Like the metric system?
Re:Counting in the wrong language on Friday November 22, 2019 @04:24PM (#21610234)
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"
Re:Questions to ask a company during a job interview on Monday September 09, 2019 @04:35PM (#20922186)
I think if I got this answer during an interview, as a candidate, I would be pleased that your criteria reject me as an incompetent dev.
Re:Statistics, Fast and Slow on Wednesday May 16, 2018 @07:51PM (#17087407)
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.
Re:Just A New Fractal Detail In The Big Picture (2015) on Sunday July 03, 2016 @06:32PM (#12027930)
I'd argue that Global Civilization is nothing but living!
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...
Re:Show HN: Create a perfect meal with linear programminga on Thursday February 05, 2015 @08:01AM (#9002969)
Nice job! However I don't clearly understand the Results section. I mean, I can work it out, but it should be obvious.

With your supplied example, here was my train of thought when I hit solve: I get "Egg whites: 239.05". Am I supposed to eat 239 eggs? Probably not -- that's a lot for one meal. So there must be a unit; grams? well I don't know how much an egg weighs, plus I don't know the proportion of the white within a full egg. I certainly won't open Wikipedia right now to solve it!

That said, I love the design, especially the top illustration, so my point was just: if you can make the results more human-readable, that would help.