Better HN
topnewbestaskshowjobs
Log inSign up

multun

17 karma · joined Aug 22, 2019 (7y ago) · 11 submissions

https://multun.net/ !
Submissions

comment 4y ago · link · parent

hopefully not chapter 11 (:

comment 4y ago · link · parent

This new law applies to: - smartphones - tablets - game consoles - ebooks - cameras - bluetooth speakers and helmets

Laptops have to comply from 2026, and watches were deemed too compact to accommodate an USB-C port.

3.

Europe adopts the use of USB-C for portable devices from autumn 2024 [pdf](europarl.europa.eu ↗)

1 points · by multun · 4y ago · 1 comment

comment 5y ago · link · parent

It seems like (only?) their name servers are down. I got my website back up by avoiding to use these (it's hosted on a dedicated server at OVH). They'll probably have the same kind of issues as facebook did while trying to get things back up.

comment 7y ago · link · parent

I used it to describe neural network architectures.

comment 7y ago · link · parent

I took the code sample of the article from a snippet intended to be as dirty as possible, and removed most madness out of it. But yeah you're right :D I just wanted to avoid adding one more item in that bullet list.

comment 7y ago · link · parent

I would say most interesting linker features are non standard, so outside of the scope of this article :/

comment 7y ago · link · parent

It is never obscure when you know it. And sure, it was always meant that way. It's just rarely used this way, which is why it's in this list.

Here's what the example yields once preprocessed:

  struct operator{
    int priority;
    const char *value;
  };

  struct operator operator_negate = {
      .priority = 20,
      .value = "!",
  };

  struct operator operator_different = {
      .priority = 70,
      .value = "!=",
  };

  struct operator operator_mod = {
      .priority = 30,
      .value = "%",
  };

comment 7y ago · link · parent

Come on, that might not be obscure for a C ninja master like you, but I'm pretty sure many people had no idea ;-)

Notice how the list is sorted from actually obscure to less interesting.

I even took the time to write a pseudo disclaimer above this one :D

comment 7y ago · link · parent

It can be both useful and obscure ;-) I realize it's not black magic, it's just uncommon.

I used this trick to declare and generate code for an entire parser, it's lovely.

I recently switched to the other style of C-macro though:

  #define X(A, B, C) ...
  #include <math/apply_operators.h>
  #undef X
This style is less powerful but doesn't require the annoying \ at the end of lines.

comment 7y ago · link · parent

Oops I'm wrong, I meant compile time anonymous trees. It's very obviously possible by defining other variables.