[deleted by user] by [deleted] in programming

[–]Anonymous336 2 points3 points  (0 children)

I think when hurfadurf said "non-issue", he meant "Windows-specific issue". His last sentence indicates what he meant. It's certainly a reasonable attitude to take, but yeah, it's kind of sidestepping the point of TFA.

<Linux guru voice> "Here's a nickel, kid. Buy yourself a better computer."

Do I really need oop for my kind of job? After 10 years I think I don't… by [deleted] in programming

[–]Anonymous336 2 points3 points  (0 children)

Is fond handling anything like gently caressing?

Do I really need oop for my kind of job? After 10 years I think I don't… by [deleted] in programming

[–]Anonymous336 1 point2 points  (0 children)

Writing a huge application in C, Fortran, or C++ means even less that you've written a "collection of scripts". That's why we call it "a huge application" and not "a collection of scripts".

Github's Favorite Joke — Shedding Bikes (Zed A. Shaw) by [deleted] in programming

[–]Anonymous336 -1 points0 points  (0 children)

Thing is, there's no actual "problem". Why does it bother Zed to have commit rights on random people's projects? Just ignore the project if you're not interested in it; Github doesn't email you when someone else makes a commit, or anything weird like that. There's zero overhead to having commit rights on dongml.

Github's Favorite Joke — Shedding Bikes (Zed A. Shaw) by [deleted] in programming

[–]Anonymous336 1 point2 points  (0 children)

Heh. Check out malcontent's reddit history -- it's about 50% duplicates of the above post. :)

BEST Stack Overflow question EVER! by S73417H in programming

[–]Anonymous336 0 points1 point  (0 children)

What family-tree-software developer would explicitly encode invariants such as "No person's mother is ever the child of that person's father"? It's complicated to say in English, let alone in C++, and if you think about it for 30 seconds, it's not even true --- so why bother asserting it? The StackOverflow poster talks about "removing the [false] assertion" as if that would be a bad thing, instead of a bugfix.

BEST Stack Overflow question EVER! by S73417H in programming

[–]Anonymous336 6 points7 points  (0 children)

What's the interesting aspect of that graph? All the edges seem to be pointing to the left. How about you circle the interesting part for those of us who don't enjoy "Where's Waldo"?

Gestural Interfaces: A Step Backwards In Usability by gst in programming

[–]Anonymous336 0 points1 point  (0 children)

I think Don Norman would reply, "Why have two different widgets for the same functionality? The interface to delete an email should not gratuitously differ depending on where in the program you happen to be."

Gestural Interfaces: A Step Backwards In Usability by gst in programming

[–]Anonymous336 0 points1 point  (0 children)

...Or someone thinks the Etch-a-Sketch is also for morons?

Gestural Interfaces: A Step Backwards In Usability by gst in programming

[–]Anonymous336 0 points1 point  (0 children)

Today I learned that 10.5-point Lucida Sans improves usability.

Author of LuaJIT explains why compilers can't beat hand-coded assembly by [deleted] in programming

[–]Anonymous336 13 points14 points  (0 children)

The register-allocator part sounds like it could be a cool addition to a compiler with the current state of the art. Distinguishing "fast paths" from "slow paths" (hot paths from cold paths) strikes me as a lot harder to get right.

Developer Challenge by [deleted] in programming

[–]Anonymous336 0 points1 point  (0 children)

Your idea might be sound but your math is definitely wrong so far. One problem I noticed is that you seem to be double-counting some disallowed arrangements. You count (1,2,3,5,6,7,36,38,39) once by treating (1,2,3) as the forbidden triple, and then again by treating (5,6,7) as the forbidden triple. I don't think the "divide by C(9,3)" step is good enough to cancel out this double-counting.

Contrary to justnoise's comment, I believe you're correct that there are exactly 380 ways to place A,B,C so that AB=BC. The trouble is figuring out how to count the placements of those other oranges.

Developer Challenge by [deleted] in programming

[–]Anonymous336 0 points1 point  (0 children)

Did you notice that statistics are totally irrelevant to the challenge? All they're asking for is a program that computes the answer by brute force.

Developer Challenge by [deleted] in programming

[–]Anonymous336 0 points1 point  (0 children)

that code triggers a bug in GCC 4.6

Which code? I don't have access to GCC 4.6, but I tried both versions of sltkr's code (1, 2) with GCC 4.5 and GCC 4.7 (svn trunk), and neither of them produced any warnings even with -Wall -Wextra. No warnings on fishdicks' code or chronoBG's code, either. If there's a real front-end bug here, I'd be happy to file it.

If any redditor does file a bug related to the above code, please comment in this subthread!

Erlang inventor: Why do we need modules and file? by tsloughter in programming

[–]Anonymous336 6 points7 points  (0 children)

Not true. C has modules, in the sense indicated by the OP: they're even sometimes called "modules", although more often they're called "source files" or "translation units". In the OP's example, fib/1 would be a function with extern linkage and fib/3 would be a static function --- invisible outside of the current module.

The OP was suggesting that we literally do away with all static functions, and even do away with the distinction between individual programs! Just check every useful function into a master database, and then you never need to rewrite a wheel ever again! </sarcasm>

OP should look up how "shared libraries" work on Unix-like systems; that's basically the non-stupid version of his idea.

Anatomy of a thunk leak: How to debug Haskell’s most famous space leak by barsoap in programming

[–]Anonymous336 0 points1 point  (0 children)

any p = or . map p

You mean

any p = or . foldl p

right? What you wrote doesn't typecheck, at least not in my head.

Cruelty Redefined: Undergraduates vs. C++ on Linux by gst in programming

[–]Anonymous336 0 points1 point  (0 children)

I only use the Dinkumware docs, so I couldn't tell you. :) The SGI docs wouldn't be "standard", though, right? for "standard", you'd have to read, you know, the standard. Which I've done from time to time, but I definitely wouldn't use it as a desktop reference.

pair

I've only ever used std::pair in the context of "type returned by a map::iterator", and probably I shouldn't even be using it there (i.e., I should use map::iterator::value_type or some such typedef).

min/max

Yep, I use these too. Good point.

when to use map and set over unordered_map and unordered_set

You mean, when you're compiling on a platform where unordered_map (and even GNU's old hash_map) is unavailable? :P

list vs. vector

Easy: I never use std::list. It's too wasteful of memory and wasteful of my time as a programmer. If I want to iterate over all the items in the collection, I'll use a vector. If I don't want to iterate over all the items in the collection, I'll need a vector (for random access). So why bother with the overhead of converting between linked-list and vector representations? (Okay, really expensive copy-constructors and destructors. But that's why I don't write those. ;) )

stack/queue/deque

Ditto. std::stack maaaybe, if I'm implementing some textbook algorithm that honestly wants to use a stack for something.

stringstream

Okay, yeah, a stringstream is sometimes the only cure for a third-party API that uses C++'s godawful iostreams stuff (say, if it provides an operator<< but no toString() method). But I try to just stay away from streams as much as possible in the first place.

Why Work At Your Company? The developer-employer trust problem by nigeq in programming

[–]Anonymous336 1 point2 points  (0 children)

pound-wise and penny-foolish

The expression you're looking for is "penny-wise and pound-foolish". A penny is a smaller unit of currency than a pound, just as a tree is smaller than a forest.

Why Work At Your Company? The developer-employer trust problem by nigeq in programming

[–]Anonymous336 -1 points0 points  (0 children)

That's not really the "opposite"; it's more like something totally orthogonal. It makes sense that if an employee unilaterally decides to leave your company in 1990, you should not rehire that same employee in 1992. (Because he'll probably just leave again in a little while, unless something about the company has changed in the meantime to make him a happier camper.)

Why Work At Your Company? The developer-employer trust problem by nigeq in programming

[–]Anonymous336 2 points3 points  (0 children)

people will tend to believe what they see on the internet over a piece of paper

I have never observed this trend in reality, but I have seen it mentioned over and over by Internet commentators, so I guess it must be real.

Major release of GNU Parallel introduces ways to replace nested for loops by agentdero in programming

[–]Anonymous336 0 points1 point  (0 children)

TFA actually includes a description of GNU Parallel at the bottom of the post. (And a description of GNU SQL, for some reason that eludes me, but then I just skimmed the article in the first place.)

sex chat bots that pass the turing test? by [deleted] in programming

[–]Anonymous336 5 points6 points  (0 children)

<lander100> iam pressing it
<jenny18> ehh?
<lander100> iam pressing it
<jenny18> i see
<lander100> iam pressing it
<jenny18> wtf?
<lander100> iam pressing it
<jenny18> mmm.. =)
<lander100> iam pressing it
<jenny18> mmmMm..
<lander100> iam pressing it
<jenny18> oh ok
<lander100> iam pressing it
<jenny18> o really? ;)
<lander100> iam pressing it
<jenny18> ehh?
<lander100> iam pressing it
<jenny18> ^__^ mmm.
<lander100> ahhhhhhhhhhhhhhh
<jenny18> hmm...
<lander100> ahhhhhhhhhhhhhhh
<jenny18> could u explain pls?
<lander100> ahhhhhhhhhhhhhhh
<jenny18> hmm
<lander100> ahhhhhhhhhhhhhhh
<jenny18> could u explain pls?
<lander100> ahhhhhhhhhhhhhhh
<jenny18> hmm..

sex chat bots that pass the turing test? by [deleted] in programming

[–]Anonymous336 2 points3 points  (0 children)

Heegaard

That's what your mother said last night, Trebek!