8,023 reputation
11536
bio website
location
age
visits member for 3 years, 5 months
seen 9 mins ago

1d
comment Is there a clever way to calculate a mode of an online series without storing the series?
Hash maps also work better if the set of values is sparse.
Aug
28
comment Why don't compilers inline everything?
@OtávioDécio: Oops. Meant to direct that at Prog for the comment below yours.
Aug
28
comment Why don't compilers inline everything?
@OtávioDécio: Recursion can't be inlined (or unrolled as it were) because you don't know how many times you'll recurse. (E.g., a factorial function doesn't know ahead of time whether it's calculating 3! or 6!, so the compiler wouldn't know how many bits of code to inline.)
Aug
21
comment Checking negative of a condition
Sometimes this is done because people prefer to put the more-usual case up top and the less-usual case in the else. There's not really a penalty for this; any compiler with a decent optimizer will sort it out.
Aug
19
comment Nicest way to map rgb colors from html to led
The other issue is that the LED won't have the same gamut as the display.
Aug
18
comment Where did the notion of 'calling' a function come from?
@Caleb: CALL wasn't a part of the first version of FORTRAN. See page 1 of the IBM Fortran II Reference Manual.
Aug
18
comment Where did the notion of 'calling' a function come from?
David Wheeler's 1952 ACM paper The use of sub-routines in programmes describes the concept, and I'd bet the use of the term "call" evolved between then and the appearance of CALL and RETURN in FORTRAN II in 1958, if it wasn't used in the paper itself. (I'm too cheap to pay the ACM $15 to find out.)
Aug
18
comment In the days of modern computing, in 'typical business apps' - why does performance matter?
...And to be fair, the database, which is what's doing most of the grunt work, was written and optimized to go fast.
Aug
14
comment Erlang return value conventions
@AssortedTrailmix: The performance point wasn't actually intended to be up top; in editing it fell out that way. But it is something to consider if you're writing an API that may see very heavy use in the future.
Aug
14
answered Erlang return value conventions
Aug
13
revised How do you guard against hidden overflows
added 35 characters in body
Aug
13
comment How do you guard against hidden overflows
@nwp: Arbitrary precision falls under the heading of using larger types.
Aug
13
answered How do you guard against hidden overflows
Aug
12
comment Better support for controlling printing options like headers and footers from Javascript
That doesn't change the fact that HTML is a markup language, not a page description language. The browser still has final say over the layout.
Aug
12
comment Better support for controlling printing options like headers and footers from Javascript
Word was built from square one to work within a particular page configuration. Forcing a document into that is beyond the scope of what HTML was designed to do.
Aug
5
comment boolean operations in C using bitfields
Are you wedded to bitfields or are you open to other implementations?
Aug
4
comment Why do VMs not execute the assembly directly?
The M in VM stands for machine, which means they do have the limitations you describe. Anything else would just be an interpreter.
Jul
26
comment What should I do and know before I start writing C?
You should know that C will not protect you from your mistakes.
Jul
24
comment Should temporary code be put under version control and how?
@Vorac: That was more a philosophical comment than anything else.
Jul
23
comment Omitting “destructors” in C is taking YAGNI too far?
@glampert nails it; I'd add that you should make the expected-infinite lifetime clean in the create function's documentation.