Feabhas Blog

blog.feabhas.com · Company blog · on HN since 2012

Feabhas, an embedded software training company, writes about C, C++, CMake, and tooling for embedded development.

What HN saysHN links it for practical C and C++ posts, with commenters citing it in discussions of memory protection, strings, and code structure.
18HN people shared it
3linked it in comments
40stories submitted
1.1Kstory points
2 years agolast shared
2012people per year2026

Most-shared posts

  1. 1
    CMake Part 1 – The Dark Arts
    3 people · 108 points · first shared 2021 · 69 comments on HN
  2. 2
    CMake Part 2 – Release and Debug Builds
    3 people · 6 points · first shared 2021 · discussion on HN
  3. 3
  4. 4
    C++20 Modules with GCC11
    2 people · 142 points · first shared 2021 · 108 comments on HN
  5. 5
    Custom Allocators in C++
    2 people · 2 points · first shared 2019 · discussion on HN
  6. 6
    Becoming a Rule of Zero Hero
    2 people · 2 points · first shared 2015 · discussion on HN
  7. 7
    A convenient untruth: Array notation in C is a lie
    1 people · 180 points · first shared 2016 · 172 comments on HN
  8. 8
    VSCode, Dev Containers and Docker
    1 people · 178 points · first shared 2021 · 228 comments on HN
  9. 9
  10. 10
    Demystifying C++ lambdas
    1 people · 28 points · first shared 2014 · 9 comments on HN
  11. 11
    Memory consistency made simple(ish)
    1 people · 27 points · first shared 2016 · 4 comments on HN
  12. 12
  13. 13
    Function Parameters and Arguments on 32-bit ARM
    1 people · 6 points · first shared 2016 · discussion on HN
  14. 14
    CMake Part 4 – Windows 10 Host
    1 people · 4 points · first shared 2021 · discussion on HN
  15. 15
    A brief introduction to C++ Concepts
    1 people · 4 points · first shared 2018 · discussion on HN

What HN people wrote when they linked it

twic · 2015-10-03
The "new hardware protection mechanism called MPU available on some new ARM Cortex-M microcontrollers" is a device which lets the operating system define up to eight memory regions (sixteen on the M7), optionally with holes in them. In each region, permissions can be set for read, write, and execute, and the policy for cacheing and sharing between cores can be controlled (although this is presumably not really relevant for single-core microcontrollers). http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/B… https://blog.feabhas.com/2013/02/setting-up-the-cortex-m34-armv7-m-mem… It's a bit like a normal MMU bit without virtual memory.
zackmorris · 2023-10-02
The only modern language that gets it right is Swift: Apple did a fairly good job with unicode string handling starting in Cocoa and Objective-C, by providing methods to get the number of code points and/or bytes: https://stackoverflow.com/questions/15582267/cfstring-count-of-charact… I feel that this support of both character count and buffer size in bytes is probably the way to go. But Python 3 went wrong by trying to abstract it away with encodings that have unintuitive pitfalls that broke compatibility with Python 2: https://blog.feabhas.com/2019/02/python-3-unicode-and-byte-strings/ There's also the normalization issue. Apple goofed (IMHO) when they used NFD in HFS+ filenames while everyone else went with NFC, but fixed that in APFS: https://unicode.org/faq/normalization.html https://medium.com/@sthadewald/the-utf-8-hell-of-mac-osx-feef5ea42407
sargstuff · 2022-04-06
Is't spagetti code a design pattern? One can make use of design patterns, clean code and separation of concerns and still get working spaghetti code without all the hacky stuff. Much less effort if use C. Engineered C case studies as goto solutions! https://blog.feabhas.com/2017/02/abusing-c-switch-statement-beauty-eye… https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html Just have to impliment the program as if it was an OS. aka mix/match abstraction levels! Mix/match assembler / language macros / foreign language calls to other language libraries Use C20 ability to assign case statement(s) to a thread (mixed with remote procedure calling and/or function stacks across multiple threads) Mix & match unicode/non-unicode, hex, ascii, etc. where text is code that can be run. Mix and match C# language extensions in which same thing can be implimented different ways (e.g. strings, vectors, templating)

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close