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
    anna (navi@social.vlhl.dev)'s status on Tuesday, 08-Apr-2025 08:13:17 JST anna anna
    in reply to
    • Red Rozenglass
    @rozenglass #embed is not only portable, but also not tied to vim (yes, the vim package ships xxd, don't ask me why they didn't make it a separate tool), and if you're embedding anything remotely big (like say, model or texture data like it's helpful to do with graphics programming), then a properly implemented embed will speed up your compile times a *ton*
    In conversation about 2 months ago from social.vlhl.dev permalink
    • Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Red Rozenglass (rozenglass@fedi.dreamscape.link)'s status on Tuesday, 08-Apr-2025 08:13:19 JST Red Rozenglass Red Rozenglass
      In other news, why did no one tell me about xxd -i before:

      -i | -include
      Output in C include file style. A complete static array defini‐
      tion is written (named after the input file), unless xxd reads
      from stdin.
      For example, you can add this to your build pipeline, to turn a string to an embedded array of characters. Just #include printf-template.html.h in your code. If printf-template.html contains printf control sequences, like %s, they do work if you pass them to printf(). You can have an HTML file parametrized with printf() for example.

      xxd -i printf-template.html > printf-template.html.h

      I assume you can embed anything this way; strings, images, 3D models, etc. This seems cross-platform enough. I'm starting to wonder if the new #embed C standard proposal is really needed, or just bloat now. (Even parameterized #embed sounds like something replaceable with some UNIX piping before you pass the data to xxd -i).

      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.