Recent submissions

Comment · 1 year ago
Isn't the entire point of an optimizer to convert "bad code" into "good code"?

Your proposed solution is to have the user manually implement a hash table, but if you have a good optimizer, users can focus on writing clear code without bugs or logic errors and let the machine turn that into efficient code.

Comment · 6 years ago
Interesting idea, but this implementation has UB:

    typedef void* var;

    struct Header {
      var type;
    };

    // ...

    #define alloc_stack(T) header_init( \
      (char[sizeof(struct Header) + sizeof(struct T)]){0}, T)

    var header_init(var head, var type) {
      struct Header* self = head;
      self->type = type;
      return ((char*)self) + sizeof(struct Header);
    }
The section "struct Header* self = head" is UB. The alignement requirement of the local char array is 1 but the alignment requirement of struct Header is that of void* which is probably 8.
Comment · 6 years ago
It's not an ad-hoc turing complete language, it is just a programming language. Makefiles are just programs. There are some strange implicits, but that isn't unique to the Make programming language.
Comment · 7 years ago
I think they meant that the bytecode itself reads like a forth. The data stack works just like it does in forth within a single Python function.
Comment · 7 years ago
> The argument comes down to when the undefined behavior occurs: is it at the deference to create the reference, or is it on the first memory access using the reference? The language pedants will say the former, but in practice, it's the latter.

The undefined behavior is always when the null reference is created. The issue will _usually_ manifest when you try to dereference the pointer, but the undefined behavior was creating the null reference in the first place.

Comment · 7 years ago
> And regardless of that, if my employer is willing to pay our CEO over 20x what they pay their average employee, they are not in a position to niggle over the kinds of systemic inefficiencies they would suffer under a union.

Do you not believe that a CEO could have at least 20 times the impact on the value of a company than the average employee, and if so, should they not be compensated accordingly?

Comment · 7 years ago
Comment · 7 years ago
So, like some sort of shared library that my programs dynamically communicate with? How is this functionally different from a shared object?
Comment · 8 years ago
I've been to chiles, not surprised to see that on the top of the list.
Comment · 8 years ago
You need to know how the character is written regardless because the stroke order is part of the character. There are some basic rules like working left to right and top to bottom. Also, each component has the same order when written out.
Comment · 8 years ago
What about a 9 hour flight? Bring 2 sets of pilots?
Comment · 8 years ago
Comment · 8 years ago
Great write up. I am a maintainer of a project you opened a PR on, but the diff is large and seems to include unrelated changes. Maybe you based of a fork and the opened the PR to upstream? If the bot had worked as intended I would have thought it was cool, but given that it opened a large PR with an incorrect description I found it harmful. I guess the problem with these bots is that it is easy for you to make a mistake which takes a lot longer for people to deal with than it took for you to make, so github needs to ban these to prevent this.
Comment · 8 years ago
> elipsoid earth theory

Do you actually know this is true? Have you tested this?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton