News for hackers. Stuff that matters.

jeorgun

Re:C++ Programming Questions to Ask on Interview (2017) on Friday October 19, 2018 @01:53AM (#18254472)
These questions seem pretty good!

In the max heap question, I'd argue that add should take a parameter by value, rather than a const reference, since this prevents having to needlessly copy temporaries (and is less verbose than overloading for T&&).

List of iterator categories is missing input iterators.

Re:Thefuck – Corrects your previous console command on Thursday October 18, 2018 @03:56PM (#18251589)
To that end, I highly recommend the command line utility 'sl', which runs an unskippable ASCII animation of a steam locomotive. Makes for great fun explaining it to the flummoxed coworker borrowing your computer!
Notably, the "al" in algebra and algorithm really is the Arabic 'al-'— algebra and algorithm are latinized forms of al-jabr and al-Khwarizmi respectively.
That seems pretty harsh. From context, 'been there, done that' sounds to me like sympathizing with the article's author, not dismissing them.
Re:Dropbox May Not Be LeBron James, but Is Still in the Game on Wednesday February 03, 2016 @02:08PM (#11028803)
If it's more than 10-20% of Dropbox users, that says pretty bad things about their market share.
Re:A difference between Haskell and Common Lisp on Monday December 21, 2015 @01:07PM (#10772391)
Calling Scheme a "new language with a strong Lisp influence" is a bit rich. It's certainly not new, and in many respects it's more representative of Lisps-of-Old than Common Lisp.
Re:Java's Cover (2001) on Friday December 18, 2015 @06:31PM (#10761713)
"Historically, languages designed for other people to use have been bad: Cobol, PL/I, Pascal, Ada, C++."

In what sense was C++ designed for other people? IIRC Stroustrup came up with it to use on his own research projects.

Mehmed II? In any case a lot of the territory Suleiman conquered did remain part of the Ottoman Empire into the 20th century.
Re:Why Homejoy Failed on Monday October 26, 2015 @04:58PM (#10454425)
I think the intention is less "the tipping model makes more sense", and more "given that the tipping model is in effect, you shouldn't unfairly punish the housekeepers by not tipping them".
Re:Google’s look, evolved on Tuesday September 01, 2015 @12:14PM (#10153449)
Uncharitably, I'd say the old logo looked much more professional, and so didn't jive with Google's corporate ethos of "seem as much like a preschool as humanly possible". The new one definitely fits better in that respect.
Re:The Town without Wi-Fi on Sunday August 30, 2015 @03:39PM (#10144265)
I wouldn't object to somebody creating, from whole cloth, an electric-stuff-free place, but I do object to people co-opting an existing community that they're not part of and insisting that it become such a place for them. That seems to be what's going on here.
Re:OCamlers' critiques of Haskell on Thursday August 27, 2015 @02:46PM (#10131248)
I think it's undeniable that a substantial portion of the interest in XMonad came about because it's written in Haskell, but that's very different from saying that all of the interest in it comes from a concerted propaganda campaign on the part of the Haskell community.
Ditto in English, for that matter, although for various reasons we spell "i" with two "e"s.
If I'm understanding right, grandparent isn't saying "effectiveness(minor, frequent) == effectiveness(major, infrequent)"; they're saying "effectiveness(minor) == effectiveness(major) && effectiveness(frequent) > effectiveness(infrequent)".
Re:Emacs X Window Manager on Wednesday August 05, 2015 @02:07AM (#10008240)
I'm going to assume from context that they're talking about xmonad.
My first language was some awful proprietary BASIC dialect. It hasn't harmed me any, so far as I can tell. Learning one language, proprietary or not, gets you about 99% of the way to learning a second (potentially more open) language. And in any case, isn't the language due to be open-sourced pretty soon?
Without looking too closely at it, the infographic looks suspiciously similar to this one: http://slatestarcodex.com/2013/04/04/lies-damned-lies-and-fa... . Does that same rebuttal apply, or are these numbers more accurate?
Re:Ross Ulbricht Sentenced to Life in Prison on Saturday May 30, 2015 @12:01AM (#9628885)
I agree with your overall point, but you're forgetting a third effect: preventing non-current-drug users scared of more conventional venues, but not by Silk Road (which, as you point out, is comparatively convenient and safe), from buying drugs from there (and then possibly developing an addiction). I don't know how large a segment of the population that might be, but addictions have to start somewhere.
Re:Improve your touch typing on Thursday May 21, 2015 @01:31AM (#9581110)
Would it be possible to edit this comment and stick that in a code box or something? It's breaking the page width.
Re:“Profession” (1957) on Tuesday May 19, 2015 @07:24AM (#9569209)
I've always loved this story. Reading it now, though, it's funny that it was written by the guy most famous for his robot stories. They seem like a pretty glaring omission. If you could program the job skills and knowledge onto a human brain, why not a positronic one? All the non-creative jobs would just end up being automated.

Which is basically the situation we're heading towards now in any case. Pretty prescient, I suppose.

Interesting; I was recently binge-reading some old blog posts and came across this[1] not dissimilar claim from 2012. Maybe it wasn't so crazy after all.

[1] http://squid314.livejournal.com/320770.html?thread=2386178

Re:Ask HN: How to talk smart? on Monday May 11, 2015 @01:31AM (#9522878)
To add to that last point, the most important thing to keep in mind when expanding your vocabulary is knowing when and when not to show it off. Few things come across more poorly than using a "smart" word when a simple one will do just as well.
Re:Why Lisp? on Thursday May 07, 2015 @11:29PM (#9509826)
That does something similar, sure, but what it in fact is is a macro. As snikeris was saying, you couldn't write anything quite like that #define in a macroless language like Java.
Re:Fractal Lab on Monday May 04, 2015 @06:41PM (#9489728)
Also, it seems to break swipe-left/right-to-nagivate-back/forward in Chrome and Safari. I was sure my touchpad was broken or something.
Re:The Traveling Salesperson Problem on Sunday May 03, 2015 @04:47PM (#9482968)
I think they mean it in the "real programmers use FORTRAN" [1], not the literal, sense.

[1] http://www.catb.org/jargon/html/R/Real-Programmer.html

Re:Where Rust really shines on Saturday May 02, 2015 @10:17PM (#9479509)
Maybe I'm missing something, but why is it crucial that you hold on to a reference to the contents of the vector, and not the vector itself? Because, to me, the obvious "C++ way" to do it would be something like

    struct FieldInfo {
      //
      const std::vector<ast::Attribute>& attrs;
    }
My father tried quite hard to teach me and my brother Turkish when we were young. It's lucky Turkish isn't in any sense an endangered language, because today between us we know exactly zero words of Turkish. It's not exactly a foolproof process.
Re:An alternative to shared libraries on Sunday April 26, 2015 @05:13PM (#9443295)
"If you think about it, if your code is small and clean, you wouldn’t feel the need for shared libraries."

Yes you would, for any sane definition of "small and clean". Code can't be made arbitrarily small; some problem spaces are fundamentally complex.

For what it's worth I have played around some with dynamic libraries and with FUSE, and I found the former incomparably easier to work with. Maybe that speaks more to FUSE in particular than to the idea in general (or maybe it's just me being bad at FUSE), but that's been my experience.

I can't help but be reminded Mark Libermans's assessment of the app (http://languagelog.ldc.upenn.edu/nll/?p=10416).

Older »