Omar Ashour and I are now live-streaming Monday morning around 10:00am-ish MDT. Will we always be live? Not sure, but for now we are having a good time. Come join us if you can.

Our last live-stream we started writing a C program to send a ping. Why? Because Omar Ashour wanted to learn more about low-level networking. Spoiler: we didn't complete the app but we do have a good discussion of hex, binary math, and bit shifting in-between the over two hours of fumble around C.

https://youtube.com/live/Uv3LOT9b_sg

Have a question you want answered in a future video? A challenging or interesting problem you want to see solved? Constructive feedback? Then comment, DM, or send an email to [email protected].

Thanks for watching!

#saturdaympshow #icmp #ping #networkprogramming #cprogramming #binarymath #wireshark

SaturdayMP Show #98: Custom Ping Client

YouTube

The Underhanded C Contest

2015년 Underhanded C Contest 결과가 발표되었으며, 이번 대회는 핵 검증 분야의 실제 문제를 다뤘습니다. 참가작 중 상당수가 NaN(Not a Number) 값을 악용하는 'NaN poisoning' 기법을 사용해 부정확한 결과를 유도하는 취약점을 보여주었습니다. NaN poisoning은 부동소수점 연산에서 NaN이 전파되고 비교 연산에서 false를 반환하는 특성을 악용하는 공격으로, 일부 참가작은 현실적인 조건에서 발생 가능한 공격을 설계해 주목받았습니다. 환경 변화(예: CPU 수 변경)나 데이터 조건에 따른 공격 시나리오도 제시되어, 핵심 보안 소프트웨어 개발 시 주의가 필요함을 강조합니다.

https://www.underhanded-c.org/

#cprogramming #security #nanpoisoning #softwarevulnerability #nuclearverification

The Underhanded C Contest

Stx: Interactive Vector Graphics Environment

ctx는 HTML5 Canvas 2D 컨텍스트와 호환 가능한 고성능, 저자원 2D 벡터 그래픽스 소프트웨어 래스터라이저이자 터미널/컴포지터 및 프로토콜을 포함하는 인터랙티브 벡터 그래픽 환경입니다. 마이크로컨트롤러부터 멀티코어 렌더링을 지원하는 다양한 플랫폼에서 동작하며, UI 렌더링과 이벤트 처리를 위한 효율적인 부분 리드로우 및 입력 추상화 기능을 제공합니다. 또한, SVG 경로 구문을 확장한 직렬화 모델과 압축 기법을 사용해 리소스 사용을 최소화하고, 다양한 픽셀 인코딩과 컬러 포맷을 지원합니다. 현재 일부 HTML5 Canvas 기능과 SVG 기능이 미구현 상태이며, ISC 라이선스 하에 공개되어 있습니다.

https://ctx.graphics/

#vectorgraphics #rasterizer #embedded #ui #cprogramming

ctx - interactive vector graphics environment

Building a Memory Allocator from Scratch in C

이 글은 C 언어로 메모리 할당기(malloc/free)를 직접 구현하는 방법을 상세히 설명합니다. 힙 메모리 관리, 단편화 문제, 메모리 블록 분할과 병합(coalescing) 기법 등 메모리 할당기의 핵심 개념과 구현 세부사항을 다룹니다. 운영체제에서 메모리를 요청하는 sbrk() 호출부터 자유 리스트 관리, 첫 적합(first-fit) 전략 적용까지 실전 코드를 통해 메모리 할당 과정을 깊이 있게 이해할 수 있습니다. 성능과 신뢰성이 중요한 시스템 프로그래밍 및 임베디드 개발자에게 유용한 내용입니다.

https://0xkiire.com/memory-allocators/

#memoryallocator #cprogramming #malloc #heapmanagement #systemsprogramming

Building a Memory Allocator from Scratch in C | 0xKiire

Learn how memory allocation works by implementing your own malloc() and free() functions in C. A deep dive into heap management, fragmentation, and...

0xKiire

(Un)portable defer in C

C 언어에서 자원 해제를 자동화하는 defer 기능은 여러 제안과 구현이 존재하지만 표준으로 채택되지는 않았다. GCC의 cleanup 속성과 nested function, Clang의 blocks, MSVC의 structured exception handling 등 각 컴파일러별로 다른 방식으로 구현 가능하나, 보안 문제나 호환성 한계가 있다. 간단한 for 루프나 스택 기반 구현도 있지만 조기 종료 시 동작 보장이 어렵거나 별도의 반환 매크로 사용이 필요하다. C23 표준에 defer가 포함될 가능성이 있으나, 현재는 컴파일러별 트레이드오프를 고려해 선택해야 한다.

https://antonz.org/defer-in-c/

#cprogramming #defer #gcc #clang #memorymanagement

(Un)portable defer in C

Eight ways to implement defer in C.

I think this is pretty neat, and a bit different than most c-style language implementations: any number of initial arguments can be factored out of a group of functions:

https://mocompute.codeberg.page/item/2026/2026-05-08-tess-receiver-blocks.html

#c #programming #programminglanguages #cprogramming #compiler

Tess receiver blocks: reduce visual noise in API headers

Finally finished a post with some initial motivations and reflections about a programming language project I've been working on for nearly the past year: https://mocompute.codeberg.page/item/2026/2026-04-26-practical-additions-to-c.html #c #programming #programminglanguages #cprogramming #compiler
Tess Language: A minimal set of practical additions to C

Embedded Rust or C Firmware? Lessons from an Industrial Microcontroller Use Case

https://arxiv.org/abs/2604.25679

#HackerNews #EmbeddedRust #CProgramming #Microcontrollers #FirmwareDevelopment #IndustrialTech

Embedded Rust or C Firmware? Lessons from an Industrial Microcontroller Use Case with Ariel OS

As Rust gains traction for developing safer systems software, a reality check for the microcontroller hardware segment becomes necessary. How ready is the Rust ecosystem for this segment? Can Rust compete with C in practice? This paper reports on an IoT industrial case study that contributes to answering these questions. Two teams concurrently developing the same functionality (one in C, one in Rust) are analyzed over a period of several months. A comparative analysis of their approaches, results, and iterative efforts is provided. The analysis and measurements on hardware indicate no strong reason to prefer C over Rust for microcontroller firmware on the basis of memory footprint or execution speed. Furthermore, Ariel OS is shown to provide an efficient and portable system runtime in Rust whose footprint is smaller than that of the state-of-the-art bare-metal C stack traditionally used in this context. It is concluded that Rust is a sound choice today for firmware development in this domain.

arXiv.org

Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

https://github.com/microsoft/lib0xc

#HackerNews #Lib0xc #CProgramming #SaferSystems #APIs #Microsoft

GitHub - microsoft/lib0xc: Safe(ish) C programming library

Safe(ish) C programming library. Contribute to microsoft/lib0xc development by creating an account on GitHub.

GitHub
So, you thought passing too few register parameters to a C function was a good idea? 🤔 Surprise! Now you're knee-deep in a jargon soup of Microsoft Dev Blogs trying to untangle your mess. 🥴 But hey, at least you've got a PhD in reading buzzwords now! 🎓
https://devblogs.microsoft.com/oldnewthing/20260427-00/?p=112271 #CProgramming #JargonSoup #MicrosoftDevBlogs #DeveloperHumor #CodingStruggles #PhDInBuzzwords #HackerNews #ngated
Looking at consequences of passing too few register parameters to a C function on various architectures - The Old New Thing

It's bad news no matter how you slice it, but Itanium makes it even worse.

The Old New Thing