Recent submissions

Comment · 2 years ago
Comment · 2 years ago
IIRC the main reason to use FreeBSD instead of Linux was BSD being a lot simpler and have a lot more room to optimize their specific use case.
Comment · 4 years ago
Can you elaborate on that, couldn't find the proposal, I want to learn more about it.
Comment · 4 years ago
I was expecting some form of benchmark to see if claims about better performance is true.
Comment · 5 years ago
even echo has it $ echo -e "hel\x70"
Comment · 5 years ago
Just out of curiosity, how much time you have before taking the shot? (seconds or minutes)
Comment · 5 years ago
I believe it is their new rule. But it shows up only if you are using twitter for a while as logged out. Clear data from browser and it goes away, but will eventually show up again.
Comment · 5 years ago
Isn't that the other way around? I thought clang was trying to support all gcc extensions to be able to build Linux kernel.

I would rather see both of these compilers to stay competitive to push themselves higher.

Comment · 5 years ago
Comment · 5 years ago
I do use 1000^n, but I agree that most people tend to use 1024^n. 1000^n kind of makes more sense since "kilo, mega" etc. are the actual SI prefixes for multiples of 1000s. I don't know who or what caused this chaos but 1000^n is definitely more human friendly.
Comment · 5 years ago
You are right. In 5G, data packets goes through less tunneling than it was before. Although there is less tunneling, 1ms latency for "end to end" or from user device to the Internet doesn't sound realistic. I have no real life measurements but if I would have to guess, it should be around 5~10 ms.
Comment · 5 years ago
I didn't want to whine about the changes. But why did they move "Restore Previous Session" button into History in the menu. That was by far the most used button in the menu for me. Now I have to click 2 buttons.
Comment · 5 years ago
Suppose I have the following struct and functions.

  struct my_struct{int a; char private[10];}
  void * get_struct_field_nonconst(struct my_struct *ptr)
  { return &(ptr->private[0]); }
With these elements you are only allowed to give non-const pointers to read or write inside private field. In order to truly apply this to const pointers (no casting etc.) you will need another get_struct_field() function but defined as this.

  const void * get_struct_field_const(const struct my_struct *ptr)
  { return &(ptr->private[0]); }
This will work but it is ugly. Here _Generic keyword allows you to write these functions but use them with a common name. Such as get_struct_field(). And that would be something like this:

  #define get_struct_field(ptr) \
  _Generic((ptr), \
  const struct my_struct * : get_struct_field_const, \
   struct my_struct * : get_struct_field_nonconst) \
  (ptr)
Hope this would help!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton