Ask HN: Modern Introduction to ML?
1 pointsby karatinversion0 comments
git update-ref <branch-name> <commit-sha> f(n) = { 1 if there is a Turing machine with at most n states that solves the Halting problem;
0 otherwise }
and we can easily show that f(n) is computable without proving that the Halting problem is undecideable. Viz., f is either constant 0; or equal to a function of the form g_k(n) = { 1 if n >= k;
0 if n < k },
and both the constant 0 function, and all the g_k functions, are computable; thus f is computable. #define FOO 17
void bar(int x, int y) {
if (x + y >= FOO) {
//do stuff
}
}
void baz(int x) {
bar(x, FOO);
}
the compiler can inline the call to bar in baz, and then optimise the condition to (x>=0)… because signed integer overflow is undefined, so can’t happen, so the two conditions are equivalent. new StringReader("Example").read()
doesn't throw an SSLException.