Filmed a screencast exploring some neat mmap behavior — read bits are not enforced for memory mappings. This is because the underlying x86 page table entries have a single bit to toggle between “Read” and “Read/Write”.
Author Archives: Mark
macOS has a native memory leak checker
How to set up an ARM64 playground on Ubuntu 18.04
With the recent announcement of Apple Silicon (Apple laptops shifting to the 64 bit ARM architecture), it’s a great time to finally learn ARM64!
Continue reading3 Life Skills I Learned From Indie Hackers
(Originally appeared on my Indie Hackers blog)
Even though I’ve only achieved modest success as an indie hacker, I’ve learned many valuable skills that will make me more successful in other areas of my life, no matter how I proceed.
Continue readingAdvice for finding mentorship
(Originally appeared on Indie Hackers)
Here’s a few of my insights from the past few months of personally finding mentorship and listening to hours and hours of the Indie Hackers podcast 🙂
Continue readingPeople hate surveys, but like being interviewed
(Originally appeared on my Indie Hackers blog)
Instead of posting a link to a survey in a Facebook group with potential customers, post that you’re doing a research project and would love to interview some people that do [whatever your target market does].
Here’s my theory: People don’t like filling out surveys because it feels cold, and impersonal. On the other hand, answering questions being asked by a human interviewer, even if they are the same questions, makes them feel important because of the personal touch. Someone else is taking time from their day to ask the questions, so it’s more reciprocal.
Continue readingTaking responsibility for lost sales
(Originally appeared on Indie Hackers)
For a long time I didn’t appreciate how important copy (that is “Sales Copy“) is. I considered that secondary to the core tech that powers a product.
What made it click for me is realizing that sales can be lost purely due to copy and design.
Continue readingI landed code in LLDB!
I landed some code in lldb! Did some tweeting about it here:
Reproducing a GCC 8.1 ABI compatibility bug
I was reading about GCC and noticed this very suspicious warning line about an accidental compatibility break: https://gcc.gnu.org/gcc-8/changes.html

I thought it would be interesting to reproduce this. I reproduced this specific scenario they outline and compiled two translations units, one with GCC 8.1, one with an earlier version (GCC 7) and observed the segfault that happens when two incompatible calling conventions interact with each other.
Being pedantic about C++ compilation
Takeaways:
- Don’t assume it’s safe to use pre-built dependencies when compiling C++ programs. You might want to build from source, especially if you can’t determine how a pre-built object was compiled, or if you want to use a different C++ standard than was used to compile it.
- Ubuntu has public build logs which can help you determine if you can use a pre-built object, or if you should compile from source.
pkg-config
is useful for generating the flags needed to compile a complex third-party dependency. CMake’sPkgConfig
module can make it easy to integrate a dep into your build system.- Use CMake
IMPORTED
targets (e.g.BZip2::Bzip2
) versus legacy variables (e.g.BZIP2_INCLUDE_DIRS
andBZIP2_LIBRARIES
).