#embed

Peter SommerladPeterSommerlad
2026-03-05

@DocBohn

nitpicking: is not a macro but should be a preprocessor directive.

thanks to
@thephd

2026-03-05

If you don't want to depend on the name of the original file, replace the #embed line with
```
#embed __FILE__
```

2026-03-05

Thanks to the #c23 #embed macro, I may have written the world's shortest #quine.
```c
#include<stdio.h>
int main(){puts((char[]){
#embed"q.c"
,0});}
```
(I doubt that I'm the first to do this)
We just need to politely ignore the extra `\n` injected by `puts`. Otherwise, replace `puts` with `printf`.

2026-03-02

@fasterthanlime ICYMI, if you can require a modern enough compiler, you can use #embed thephd.dev/finally-embed-in-c23

2026-02-22

<stdio.h>
<stdlib.h>

int
main (void)
{
const unsigned char t[]
= {
__FILE__ limit (128) /* C23 */
, 0, 0, 0, 0, 0, 0, 0
};
size_t s = 0, i = 0;
while (i != sizeof (t) / 8)
{
s += (size_t) t[8 * i + 0] + (size_t) t[8 * i + 1]
+ (size_t) t[8 * i + 2] + (size_t) t[8 * i + 3]
+ (size_t) t[8 * i + 4] + (size_t) t[8 * i + 5]
+ (size_t) t[8 * i + 6] + (size_t) t[8 * i + 7];
++i;
}
printf ("%#zx\n", s);
return 0;
}

Intechfyintechfy
2026-02-17

Learn what embedded software is, how it works, key characteristics, types, benefits, and real examples in modern devices and IoT systems today.

intechfy.com/embedded-software

Paul Couvert (@itsPaulAi)

대시보드에서 몇 분 만에 설정 가능하다는 안내: 계정 생성, Cohere 모델 선택, 확장 한도 설정으로 완료. 최신 Cohere 모델(Command, Embed, Rerank)을 지원하며 North와의 통합을 제공한다고 명시되어 개발·배포 편의성 강조.

x.com/itsPaulAi/status/2016513

#cohere #command #embed #rerank #north

Hey, wanna try out Zorn on your website, but don't use Astro? No worries, you'll now be able to embed Zorn on your non-Astro website using the all new Zorn Embed Generator. Please note that it's in beta, Zorn alone is not even stable but usable in most environments.

zorn.embed.sudovanilla.org/cre

The compatibility list of features and browsers has been updated for the Zorn documentation.

zorn.docs.sudovanilla.org/get-

#development #opensource #embed astro #compatibility

2026-01-04

Okay, hear me out.

The game hardcodes all of its game data into .c files, but it still has an in-game editor: when the edits are saved, the game serializes the updated data out into C code -- or alternatively some data file that is #embed'd into the source -- effectively overwriting the existing hardcoded data.

This is stupid as hell, right?

(I'm gonna do it anyway.)

return -ECLAIR;laumann@mastodon.xyz
2026-01-03

@thephd Yes please!

I've really enjoyed your writing on the different C proposals (#embed and defer come to mind) so you'll have at least one reader :)

Björkus "No time_t to Die" Dorkusthephd@pony.social
2026-01-02

Very fun reading comments like "Björkus is just trying to C++-ify C" and the evidence presented is a bunch of C-exclusive things I'm doing that C++ doesn't have.

Fun to see accusations of not tamping down on undefined behavior when there's an entire "Slay Earthly Demons" series. I am even writing papers to do things like stop relying on implementation-defined/undefined behavior of the builtins for bit intrinsics (all accepted into C23 and C2y now), I am only person who's trying to stop spreading the array-style undefined behavior to more places (we recently accepted a proposal to add that undefined behavior into _Generic match now and I have to retroactively fix it) and I stood my ground against several vendors when they wanted Undefined Behavior in #embed if it didn't get used inside of an array initializer to prevent more UB from showing up during preprocessing.

At some point I just have to realize that the attitude of C is detached from the actual work we're doing in C. Maybe I can write an article to correct those perceptions but it's a lot of work and damn I've got a lot of stuff to do, constantly trying to just say "no that's wrong, man, are you even paying attention?" is kind of annoying.

2026-01-01

I just sat down to implement yet another "png2h" utility when I remembered that I'm using clang and C23 and that I can just use #embed and holy hell that's nice.

Happy New Year, specifically to @thephd !

Andrea (Drea) Tamar Pinskipinskia@hachyderm.io
2025-12-28

@dotstdy @oblomov There is an interesting point here that I think is missing (which has a connection to IE in the Microsoft way). MSVC was originally not complaint even closely to C++98 but after many years of competition from clang and GCC (and ICC/EDG), MSVC is now inline with C++17 and even gaining support for c++20 and C++23/26 support.
Having a standard forced finally MSVC to follow the rest as developers started to have something else to use.

Now on the C side of things, things are slightly different. This is more due to Microsoft view that less Windows developers care about C and its features that is just specific to C. E.g. VLA support is not going to be ever implemented for MSVC (unless added to C++). #embed is being added because it is needed for C++ support.
Basically if a feature is added to the C++ standard from C, then it will be done for MSVC.
I am not sure if _BitInt support will ever be added to C++; though clang already implements it but GCC does not. I don't think there is a C++ proposal adding it yet; I have not seen one.

2025-12-28

Разбираем net/http на практике: пишем веб-сервис DeadDrop для безопасного обмена сообщениями

Первая часть цикла «Разбираем net/http на практике»: создаём с нуля сервис DeadDrop — аналог Privnote для безопасной передачи самоуничтожающихся сообщений и файлов. На чистой стандартной библиотеке net/http разбираем основы: • запуск HTTP-сервера • маршрутизация в ServeMux • написание middleware (логирование и recovery от panic) • работа с HTML-шаблонами и layout’ами • подключение статики через http.FileServer и embed.FS В итоге получаем работающий сервер с красивой главной страницей, формой создания «ячейки» и базовой архитектурой проекта — всё без внешних зависимостей. Идеально для начинающих и тех, кто хочет глубоко понять внутренности популярных фреймворков вроде Gin и Echo. Пишем код вместе!

habr.com/ru/articles/981356/

#golang #go #httpсервер #вебразработка #туториал #middleware #template #embed #petпроект #backend

2025-12-26

𝗙𝗶𝗿𝗲𝗽𝗿𝗼𝗼𝗳:

#Database #Embed #Fireproof

thewhale.cc/posts/fireproof

Fireproof is an embedded database designed to bring live data anywhere. Quickly add live data to any app or page with our embedded database, reducing risk, cost, and complexity with provable secure synchronization using any backend.

Fireproof is an embedded database designed to bring live data anywhere. Quickly add live data to any app or page with our embedded database, reducing risk, cost, and complexity with provable secure synchronization using any backend.
Claudio Piresclaudiocamposp
2025-12-17

How To Embed Google Maps Location in WordPress Blocks Editor in 2026? 🗺 youtube.com/watch?v=UJDNV0UD5ws 🎬📌

2025-12-15
@wyatt but that argument ends up in "well no one should use anything past c99 then", things using c11 thread_local would cause the same issue, or c23 #embed, and so on

i'm sorry but c can't stay stuck in time because unmaintained c99 compilers exist

either a compiler backend for such platforms needs to be made, or for things like defer which are exclusively frontend features meant to reduce the likelyhood of programmer mistakes -- there are people working on c2y -> c89 transpilers, thus the source code can make use of the new convenient, safer, wanted features, and still be build-able on older toolchains by means of an extra step
2025-12-03

@Gaelan @mcc ooo yes I like this one, something produced entirely by the preprocessor and #embed statements

josefjk
2025-11-27

@halcy its just occurred to me maybe you could embed files on a virtual filesystem. like instead of suffix(, 0) why not just add another "/dev/zero" limit(1)

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst