#include

Eℓqlichray
2026-02-04

Visual Studio 2019 (16.11) 有一个 opinioned bug. 即使 include path 是用 /external:I 引入的,你的 directive 依然得用 <尖括号> 形式才能受 /external:Wn 影响。这个限制后来被取消了。

David Chisnall (*Now with 50% more sarcasm!*)david_chisnall@infosec.exchange
2026-02-04

Sigh, Ruby. I just wanted to write a blog post, I didn't want to have to reinstall all of the Ruby dependencies because the installed gems no longer work with my system Ruby, and then discover that the new ones don't compile.

EDIT: It looks as if no gems that have native things can build with the latest Ruby in Homebrew for macOS because it ships a complete nonsense header that tries to include a non-existent system header, but which has the same name as the header that it includes (but included with #include not #include_next). You can comment out that line and make it work but I have no idea how that made it past code review or testing.

Ivaylo Ivanoviv_ivaylo
2026-02-04

Include both parameters (w, b), and the cost becomes a surface.
A bowl.

Learning is no longer abstract math —
it’s moving downhill toward the lowest point.

diffie :3 (bindiff)jwo@mastodonczech.cz
2026-02-03

@airtower

#include <stdio.h>
#include <sys/resource.h>
#include <unistd.h>

static const struct rlimit lim = { -1, -1 };

int main(int argc, char **argv)
{
if (!argv[1]) {
fprintf(stderr,
"%1$s -- Enable coredumps and execute.\n"
"\n"
"Usage:\n"
"\t%1$s COMMAND [ARGS...]\n",
argv[0]);
return 1;
}
if (setrlimit(RLIMIT_CORE, &lim)) {
perror("rlimit");
return 1;
}
execvp(argv[1], argv + 1);
perror("exec");
return 1;
}

2026-02-03

What does it print?

#include <string>
#include <cstdio>
int main() {
std::string x;
x.resize(1000);
x.resize(10);
fprintf(stderr, "%d\n",
x.capacity());
return 0;
}

幹禮良InnoFury
2026-02-03

"aether_extreme_lib.h"

/**
* @brief 極端環境下的冷啟動序列
*/
Boot_Status_t Aether_Extreme_Init(void) {
// 1. 啟動熱泵/加熱電路,直到內部溫度達到 -40°C
while (Hardware_Get_Internal_Temp() < -40.0f) {
Heating_Element_On(POWER_SAFE_MODE);
Watchdog_Refresh(); // 防止初始化超時
}

// 2. 啟動 Helium ECC 記憶體清洗 (防止射線導致的指令錯誤)
// 掃描 ITCM 區塊並校正所有位元翻轉
for (uint32_t addr = ITCM_BASE; addr < ITCM_END; addr += 16) {
helium_scrub_memory_v(addr);
}

NetBSD Source Changesnetbsdsrc@mstdn.social
2026-02-03
幹禮良InnoFury
2026-02-03

// VLC PWM 驅動模板 (針對 Cortex-M85)
"arm_cm85.h"

VLC_FREQ_HZ 4000
BIT_0 0.25f // 25% 佔空比代表邏輯 0
BIT_1 0.75f // 75% 佔空比代表邏輯 1

void vlc_transmit_bit(uint8_t bit) {
// 曼徹斯特編碼:0 -> 低到高跳變 (BIT_0 後接 BIT_1)
// 1 -> 高到低跳變 (BIT_1 後接 BIT_0)
if (bit == 0) {
PWM_Update_Queue(BIT_0);
PWM_Update_Queue(BIT_1);
} else {
PWM_Update_Queue(BIT_1);
PWM_Update_Queue(BIT_0);
}
// 啟動 DMA 傳輸到 PWM 比較暫存器
DMA_Trigger_Transfer();
}

Theo :autism: :rainbow_flag:tehrealgh5tbusters@woof.tech
2026-02-03

@burritosec @malwaretech

#include <stdio.h>

int main(void)
{
printf("I am alive.\n");

return 0;
}

幹禮良InnoFury
2026-02-03

<arm_helium_intrinsics.h>

// 計算 4 個空間點與機器人中心的距離平方,用於快速避障篩選
void helium_quick_obstacle_check(const float32_t *points_x,
const float32_t *points_y,
float32_t *results_dist_sq) {
// 1. 載入 X, Y 座標向量 (各 4 個點)
float32x4_t vec_x = vld1q_f32(points_x);
float32x4_t vec_y = vld1q_f32(points_y);

幹禮良InnoFury
2026-02-03

<arm_helium_intrinsics.h>

/**
* @brief 使用 Helium 優化的 4x4 矩陣與向量相乘 (座標轉換)
* @param m 4x4 轉換矩陣 (儲存為 row-major)
* @param v 輸入的 4 維向量 (x, y, z, 1)
* @param res 輸出的 4 維結果向量
*/
void helium_transform_point(const float32_t *m, const float32_t *v, float32_t *res) {
// 1. 載入輸入向量到向量暫存器 (q0)
float32x4_t v_vec = vld1q_f32(v);

// 2. 初始化結果向量為 0
float32x4_t acc = vdupq_n_f32(0.0f);

幹禮良InnoFury
2026-02-03

"arm_cm85.h"

// 將處理函數放置於 ITCM 區塊以達極速響應
__attribute__((section(".itcm_text")))
void IRQ_Handler_Motion_Control(void) {
// 1. 硬體自動儲存寄存器 (Stacking) 發生在此之前

// 2. 讀取感測器數據 (使用預取指令)
__pld(&Sensor_Data_Register);
uint32_t feedback = Sensor_Data_Register;

FElon&Felon47🇺🇦🇨🇦🇩🇰🇹🇼RustedComputing@discuss.systems
2026-02-02

@bcantrill I was considering subscribing to Ed Zitron and [UPDATE: as you probably know because he probably shot you a DM on your #include ] *boom* his latest entry is completely targetting my (and your) tiny (should be larger) demographic. wheresyoured.at/haters-guide-o

Dani (:cxx: Antifascista)DanielaKEngert@hachyderm.io
2026-01-31

@JSAMcFarlane
Not at all.

You had a direct or indirect dependency on 'cstdint.h', which in turn is allowed to #include "stdint.h", thereby declaring 'uint8_t' in the global namespace.

2026-01-31

I `import std` and don't `#include <stdint.h>` and then:

> 'uint8_t' must be declared before it is used

Could it be... after all these years... that the compiler finally gets it right?🥹

Dominic Wardslauswardslaus
2026-01-31

Tokenizing a string denotes splitting a string with respect to some delimiter(s). There are many ways to tokenize a string. In this article four of them are explained: Using stringstream A stringstream associates a string object with a stream allowing you to read from the string as if it were a stream. Below is the C++ implementation :  C++ // Tokenizing a string using stringstream   using namespace std;   int main() {  ...
neveropen.tech/tokenizing-a-st

NULLはゼロだし整数として代入できちゃうよねえって最近のgccは気づいてくれるのすごいな!!

$ cat x.c
#include <stddef.h>
long x = NULL;
$ gcc -c x.c
x.c:2:10: warning: initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
2 | long x = NULL;
| ^~~~

The Last Psion | Alexthelastpsion@oldbytes.space
2026-01-30

#MAME 0.285 compiles on #HaikuOS after adding a small upstream patch (a missing #include).

If you're struggling to compile the latest version of MAME (I bet #FreeBSD and #NetBSD probably have the same issue), give this a go: github.com/mamedev/mame/commit

Anyway, there's a PR on HaikuPorts for the update, so it should be with you lovely people in the next few days.

MAME 0.285 launcher, running on Haiku R1B5, viewed via a VNC connection on a Linux box. In the background is a tmux session, also running on the Haiku box, viewed via SSH on the Linux box.
Dominic Wardslauswardslaus
2026-01-30

Given the value of length, print the X pattern in a box using # and ” “ Examples:  Input : 10 Output : ########## ## ## # # # # # # # # # ## # # ## # # # # # # # # # ## ## ########## Input : 7 Output : ####### ## ## # # # # # # # # # # # ## ## ####### Below is the implementation to print X in a rectangular box pattern: C++ // CPP code to print the above // specified pattern using namespace […]
neveropen.tech/pattern-to-prin

2026-01-30

TIL gcc does not care about newlines when parsing statements, so

```c
// main.c
<stdio.h>

int test =
"test.c"

int main() {
printf("%d", test);
}

// test.c
0;
```

just works.

Client Info

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