karatinversion

Joined 8 years ago

Karma
1,139
Submissions
295
Member since
Apr 7
SWE for IBM Storage.
View on Hacker News

Recent submissions

Comment · 1 year ago
The people in the UK actually go to prison though
Comment · 1 year ago
There's also the fact that common methods threw exception types that were not final, and in fact overly generic. If I call a method that declares itself to throw NoSuchFileException or DirectoryNotEmptyException, I can have a pretty good idea what I might do about it. If it throws IOException without elaboration, on the other hand...
Comment · 1 year ago
I just tested it by creating a repo with two branches without a common ancestor, and I was able to move a branch pointer to either history with update-ref, so no, I don't think so
Comment · 1 year ago
You are looking for

  git update-ref <branch-name> <commit-sha>
Comment · 1 year ago
> we don't do commissions, we just pay good salaries

The semi-joke I always heard about this was that if you don't pay commissions, you'll hire a sales team who are good at selling you that they are doing a good job, rather than selling the prodct.

Comment · 1 year ago
I don't know Spanish scrabble, but I have played Finnish scrabbe - another language that relies heavily on conjugation - and it disallows all conjugated and declined forms of words, except for nominative plurals.
Comment · 2 years ago
To say of that which is, that is is, or of that which is not, that it is not
Comment · 2 years ago
Luckily, the link provides just this information:

35-44: 62% 45-54: 70% 55-64: 75% 65+: 79%

Comment · 2 years ago
To tie this back to TFA, even before we knew that the Halting problem was uncomputable, we could have defined

  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.
Comment · 2 years ago
As I understand it, the C spec defines what are valid programs, and for valid programs, either specifies what their observable side effects must be, or leaves them either unspecified or implementation defined. Importantly, programs with undefined behaviour are excluded from the class of valid programs; thus the spec imposes no requirement on the resulting behaviour. To quote,

> Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to […]

And I think this is where “can’t happen” comes in: in the case of undefined behaviour, the compiler is free to emit whatever it pleases, including pretending it cannot happen!

Comment · 2 years ago
Do you also count the first decade of your life from January 1st of the year before you were born?
Comment · 2 years ago
And also, the system is a direct descendant of regnal numbering, where zero wouldn’t have made sense even if invented (there is no zeroth year of Joe Biden’s term of office).
Comment · 2 years ago
I always thought the problem with this was that the compilers do loads of these optimisations in very mundane ways. Eg if I have a

  #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.

The countless messages about optimisations like that would swamp ones about real dangerous optimisations.

Comment · 2 years ago
Only if the interfaces the underlying implementations provide remain stable

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton