GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    ThePhD (thephd@pony.social)'s status on Friday, 21-Mar-2025 17:13:50 JST ThePhD ThePhD

    Writing a paper about my adventures with pthreads is gonna be great.

    Surprisingly, it's not the Windows thread API that's awful, it's just pthreads.

    pthreads is garbage.

    Everyone has so, SO many pthread_foo_np -- where the np at the end stands for "nonportable" -- things to do bogstandard basic shit that it's infuriating, and even if you're working with "just" pthreads, in practice it's actually more fucked than just working with the win32 thread API or TlsAlloc.

    POSIX just keeps churning out bad API after bad API.

    In conversation about 2 months ago from pony.social permalink
    • Embed this notice
      Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Friday, 21-Mar-2025 17:13:46 JST Ryan Castellucci :nonbinary_flag: Ryan Castellucci :nonbinary_flag:
      in reply to

      @thephd is this PHP?

      In conversation about 2 months ago permalink
    • Embed this notice
      ThePhD (thephd@pony.social)'s status on Friday, 21-Mar-2025 17:13:48 JST ThePhD ThePhD
      in reply to

      It only gets worse, too. There's not just 1 way to spell "set name of thread" in pthreads.

      There's fucking five.

      • pthread_setname_np(pthread_t thrd, const char* name);
      • pthread_set_name_np(pthread_t thrd, const char* format, const char* name); // ??? HUH
      • pthread_set_name_np(pthread_t thrd, const char* name);
      • pthread_setname_np(const char* name); // Apple doesn't let you pick the thread, because Of Course They Don't
      • pthread_attr_setname_np(pthread_attr_t* attrs, const char* name); // This is the correct way, but only available on specific IBM platforms

      I also haven't included ANY of the return values (because for some of them, it's different for some fucking reason).

      These people couldn't design a good API if it spit on their face.

      In conversation about 2 months ago permalink
    • Embed this notice
      Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Friday, 21-Mar-2025 17:14:49 JST Ryan Castellucci :nonbinary_flag: Ryan Castellucci :nonbinary_flag:
      in reply to

      @thephd pthread_setname_real

      In conversation about 2 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.