Reputation
17,760
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
1 47 70
Newest
 Nice Answer
Impact
~287k people reached

Dec
12
awarded  Good Answer
Dec
10
awarded  Nice Answer
Dec
6
revised What is ASM.js and what does it mean for everyone?
edited body
Dec
6
revised Why is behavorial subtyping undecidable?
deleted 43 characters in body
Dec
5
awarded  Nice Answer
Dec
5
answered Why is behavorial subtyping undecidable?
Nov
25
comment How harmful is using switch(true) as a way to handle multiple conditional statements?
Why why why would you do this? How is it better than if (iAmAmazing()) { ... } else if (isVariable) { ... } else if (areYouShourt()) { ... } else if ...?
Nov
21
comment Low cost exceptions implementation using metaprogramming
@ddriver About the cost of checking after every function call: While a branch is usually faster than a cache miss, it's still non-trivial, especially if mispredicted. As the branch predictor has only limited capacity, in big programs these checks will take away prediction resources that could instead be used to predict the check the actual program makes. Also, it's more code (especially if you duplicate all functions) which takes more icache space which also hurts performance.
Nov
15
comment Why aren't data structures like BSTs part of the core libraries of more languages?
JavaScript has a famously minimal "standard library", and for a long time wasn't really used for nontrivial algorithmic stuff. Therefore it's not a very instructive example. Java for examples has various trees in its standard library. C++ has std::map and std::set.
Nov
4
awarded  Yearling
Oct
19
comment Is `isNaN`' a bad design or a has-to-be design with tradeoffs?
Nitpick: Division by 0 generally results in +/- infinity. Operations that produce NaN include 0/0 and sqrt(negativeNumber).
Oct
17
comment Gödel's Incompleteness Theorem and Algorithms
@Giorgio There is a relationship but it is very subtle. Too subtle to do it justice in one comment, and I'm not going to write a whole answer that's off-topic and probably wastes on the OP who doesn't seem to have a good grasp of either computability or logic.
Oct
17
comment Gödel's Incompleteness Theorem and Algorithms
In an fixed NP problem, the time to check the solution is bounded above by some fixed polynomial T. Therefore the size of any solution to an instance of this NP problem is also bounded above by a fixed polynomial S. Therefore, for any given input of size n, the space of possible solutions is always finite (roughly 2^S(n) solutions) and can be searched exhaustively. All NP problems are decidable.
Oct
4
comment Is there a specific reason for the poor readability of regular expression syntax design?
@ChrisBordeman That is not what I meant. Groups allow you to name matches, what would be needed for making complex regexes readable would be naming parts of the regex, so that e.g. you could define e-mail address regex as (made up syntax) ${name}@${domain}.
Sep
30
awarded  Good Answer
Sep
29
awarded  Nice Answer
Sep
29
comment How to protect source code from being copied or leaked by employes
The thing you are worrying about. Employees stealing and publishing the source code.
Sep
29
comment How to protect source code from being copied or leaked by employes
Do you really think this is a thing that would actually happen?
Sep
29
revised Is there a specific reason for the poor readability of regular expression syntax design?
typo which completely changed the meaning of a sentence
Sep
29
comment Is there a specific reason for the poor readability of regular expression syntax design?
@biziclop I wouldn't overestimate this variable. Yacc, which apparently had enough predecessors to be called "yet another compiler compiler", was created in the early 70s, and was included in Unix a version before grep was (Version 3 vs Version 4). It appears the first major use of regex was in 1968.