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
    nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 16:23:55 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
    Now I'm just tempted to write this entire thing in C instead. :chiggerniggaseverementaldistress:
    In conversation about 7 months ago from lab.nyanide.com permalink
    • pistolero likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 16:33:44 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      Reasons why I *really* shouldn't do this:
      - Letting me write C is like letting a kid play with a knife. I will cut off my entire hand.
      - Tons of manual labor in C that I wanted to avoid, which is why I chose Go to begin with.
      - I need to learn more fucking Go.
      In conversation about 7 months ago permalink
      pistolero likes this.
    • Embed this notice
      Protoss (cyrillic@lab.nyanide.com)'s status on Sunday, 25-May-2025 16:34:58 JST Protoss Protoss
      in reply to
      @nyanide C++?
      In conversation about 7 months ago permalink
      Phantasm, pistolero and nyanide :nyancat_rainbow::nyancat_body::nyancat_face: like this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 16:35:46 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • Protoss
      @Cyrillic I don't know any and if I really cared for the extra features C++ offers I would be writing this project in TypeScript.
      In conversation about 7 months ago permalink
      pistolero likes this.
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:00:26 JST gentoobro gentoobro
      in reply to
      • Protoss

      C++ is just C except harder to read and with more useless boilerplate.

      In conversation about 7 months ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:00:30 JST gentoobro gentoobro
      in reply to

      Macros 😀

      In conversation about 7 months ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 17:01:50 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      @gentoobro Yeah duh. I'm like talking about the more mundane stuff like having to allocate appropriate buffer sizes for sprintf and what not. It's mind numbing and distracting and I just wanna get back to writing actual program logic.
      In conversation about 7 months ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:06:04 JST gentoobro gentoobro
      in reply to
      // allocates a new buffer and calls sprintf with it char* sprintfdup(char* fmt, ...) { va_list va; va_start(va, fmt); size_t n = vsnprintf(NULL, 0, fmt, va); char* buf = malloc(n + 1); va_end(va); va_start(va, fmt); vsnprintf(buf, n + 1, fmt, va); va_end(va); return buf; }

      Um... trivially abstract the boilerplate away?

      In conversation about 7 months ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 17:06:57 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      @gentoobro Yeah. You can do that. But I end up having to do that a lot when I write C.
      In conversation about 7 months ago permalink
    • Embed this notice
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: (nyanide@lab.nyanide.com)'s status on Sunday, 25-May-2025 17:07:31 JST nyanide :nyancat_rainbow::nyancat_body::nyancat_face: nyanide :nyancat_rainbow::nyancat_body::nyancat_face:
      in reply to
      • gentoobro
      @gentoobro Not a bug isn't even loading here.
      In conversation about 7 months ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:07:32 JST gentoobro gentoobro
      in reply to
      • gentoobro

      https://notabug.org/yzziizzy/sti

      Here's my general utility library in C. It includes a bunch of typesafe data structures, as well as a bunch of useful functions like the one above. Public Domain.

      In conversation about 7 months ago permalink

      Attachments


    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:09:03 JST gentoobro gentoobro
      in reply to

      Which is why I put all of those functions I wrote in a lib and now I just

      #include "sti/sti.h"

      and add sti.c to the build script.

      In conversation about 7 months ago permalink
      nyanide :nyancat_rainbow::nyancat_body::nyancat_face: likes this.
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Sunday, 25-May-2025 17:09:23 JST gentoobro gentoobro
      in reply to

      https://github.com/yzziizzy/sti

      In conversation about 7 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        GitHub - yzziizzy/sti: General extension library for C. No dependencies beyond common POSIX platform headers. "[st]andard library, [i]zzy", in the same vein as stb.
        General extension library for C. No dependencies beyond common POSIX platform headers. "[st]andard library, [i]zzy", in the same vein as stb. - yzziizzy/sti
    • Embed this notice
      meeper (meeper@shitposter.world)'s status on Sunday, 25-May-2025 17:28:42 JST meeper meeper
      in reply to
      @nyanide C is like a blunt knife that doesn't cut well unless you know the specific sharp bit and has a high risk of cutting you.
      In conversation about 7 months ago permalink
    • Embed this notice
      Protoss (cyrillic@lab.nyanide.com)'s status on Sunday, 25-May-2025 18:12:31 JST Protoss Protoss
      in reply to
      • gentoobro
      @gentoobro @nyanide having objects and templates is very useful
      In conversation about 7 months ago permalink
      Phantasm likes this.
    • Embed this notice
      Phantasm (phnt@fluffytail.org)'s status on Sunday, 25-May-2025 18:15:40 JST Phantasm Phantasm
      in reply to
      • Protoss
      • gentoobro
      @Cyrillic @nyanide @gentoobro Yeah, it is useful if you are writing something complicated and know how to actually use it. Like 80% of people writing C++ don't.
      In conversation about 7 months ago permalink
    • Embed this notice
      Phantasm (phnt@fluffytail.org)'s status on Thursday, 05-Jun-2025 20:58:54 JST Phantasm Phantasm
      in reply to
      • Protoss
      • gentoobro
      @gentoobro @Cyrillic @nyanide Writing C++ like C with a few C++ features sprinkled in exactly how you write C++ if you don't understand it. It's the lazy route if you aren't competent enough with C++. If C with a few C++ features solves your problem, literally write in C since your project isn't complex enough to take advantage of C++.

      TL;DR mostly a skill issue.
      In conversation about 7 months ago permalink
    • Embed this notice
      gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 05-Jun-2025 20:58:55 JST gentoobro gentoobro
      in reply to
      • Phantasm
      • Protoss

      The problem is much worse than that. Responsible use of C++ is like how Casey Muratori does it, which it not much more than C with function overloading and a slight convenience in making math libraries. Anything more rapidly increases the depth of analysis necessary to understand any given line of code, which becomes a serious problem in large projects.

      In conversation about 7 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.