Mark M Profile picture
trying hard. streaming OS development. writing about life, creativity & systems programming. non-expert. small bets, ii. work: @ableton
Apr 4, 2023 10 tweets 3 min read
linux virtual memory fun fact of the day:

after a fork+exec to run a subshell, a parent process will page fault on every first write to every single writable page in its address space it's common knowledge that after a fork(), a child has unwritable page table entries to facilitate Copy-On-Write (COW)

but in addition, the parent must also have its virtual memory completely write protected. otherwise, writes would be visible in the child
Jan 12, 2021 7 tweets 2 min read
If you don't have anything insightful to say, it's not because you're not an "insightful person". It's because:

📖 You don't read enough
🔍 You don't reflect on your experiences
📝 You don't record ideas diligently
🌱 You don't have practice developing ideas

Thread👇 📖 You don't read enough

If you want to be an idea generation machine, you need fuel. The fuel is constructive content:

🥇 Podcasts, Books
🥈 Articles
🥉 Twitter Threads 😉

Your brain needs food to chew on.
Sep 16, 2020 4 tweets 2 min read
This tweet is ignorant, linking what make me realize this below 👇 Didn't realize that Linux is the largest, fastest moving software project, ever. Also TIL "Github scaling wall"

Jul 22, 2020 4 tweets 2 min read
Fun fact: you can use /proc/self/mem to bypass write protections for memory pages 📝 Why does this work? Isn't the kernel subject to memory permissions? Answer: sometimes 🛡
Jul 1, 2020 4 tweets 1 min read
🤔🧐 Image 😂 Image
Jun 16, 2020 8 tweets 3 min read
I love the tone of this paper. It has the wistfulness of someone whose been on a long, long journey and has immense experience to share.
cacm.acm.org/careers/245589… constexpr took 16 YEARS for standardization :O Image
Apr 29, 2020 5 tweets 2 min read
building and growing timestamps.fm has, surprisingly, been a ton of fun. i’ve never been the entrepreneurial type, but it’s been really fun to learn about new areas for me, like product/marketing/sales it's also been super cool to learn more from my users about the DJ community, and all the quirks of the industry. tracklists in general can be a controversial topic. different genre communities also have different cultures for mixes and tracklisting.
Apr 18, 2020 5 tweets 3 min read
infuriated at @googlecloud. burned through $300 of credit in 2 weeks due to a subtle auto scaling misconfiguration, while all reporting gave the impression of being within free quota

was on track to receive a $700 bill for timestamps.fm this month😠😠😠 ImageImageImageImage to avoid cold starts, i set min_instances=1, which had the side effect of keeping old versions of the service silently running in the background (costing $$) as i shipped new code. i think the correct conf is `min_idle_instances`, but behavior has been inconsistent with docs
Apr 12, 2020 4 tweets 2 min read
Just asked my first question on Quora!

"What are some examples of great foresight in software design and architecture (e.g. in protocols, formats, interfaces)?"

I find this fascinating, and would love to hear from people more experienced than I :)

quora.com/unanswered/Wha… When designing a protocol, etc, thinking just a bit further beyond present requirements and use cases *now* can save a lot of future effort and pain. But it is really hard to be so forward thinking! That's why I find it so impressive when this is done and executed well.
Mar 20, 2020 10 tweets 5 min read
I'm really excited to share my latest project: timestamps.fm!

It's a website that makes it super easy for DJs to generate timestamps for their mixes, if they use Ableton Live, FL Studio, or rekordbox. Check out how it works 👇 (+thread) Ableton Live and FL Studio already have features for annotating the timeline with text, however there's no way to export. So timestamps.fm "simply" extracts the annotations, and convert them into timestamps :) (more on this later) ImageImageImage
Dec 21, 2019 4 tweets 2 min read
i landed some code in lldb!🥳 i submitted a patch to mitigate this cool bug i found; potentially silent memory corruption in the debugged process caused by the `finish` command💀🐛
reviews.llvm.org/D71372 ImageImageImageImage tldr: `finish` in a func w/ nonstandard stack layout may cause memory corruption bc the return addr is not validated before a breakpoint is written.

I made a stream-style vlog which explains everything in detail! (+light osx internals, debuginfo/unwind)
Dec 9, 2019 4 tweets 2 min read
TIL @radareorg has an option to show cycle counts in disassembly😯 i don't expect many perf/cpp ppl to know about r2, but i think might actually like it. i would call it "the vim of command line disassemblers" ImageImageImage i unironically am a big fan, and use it multiple times a day to quickly disas small binaries that i don't have in compiler explorer. ppl give it a lot of flak for the esoteric UI, but a lot of those same ppl are vim users 🤷‍♂️
Dec 3, 2019 4 tweets 3 min read
i wanted to see what an ABI bug looks like i so repro'd this gcc 8.1 bug 👀 (mixing gcc versions but keeping std the same "should" be fine?) ImageImageImage gcc 8.1 accidentally changed the calling conv for this kind of class -- deleted copy ctor, defaulted trivial move ctor -- and made it pass via ptr vs register. this makes it blow up when linked against a caller from another version (even w/ same std) ImageImage
Nov 26, 2019 4 tweets 2 min read
playing w/ std::cout and intentionally unsync'd threads. it seems like interleaved output tends to mostly occur at the start, and then serializes-ish at some point later (not completely, just less much interleaving). curious why this is🤔 ImageImage ah! maybe because the thread's body is so short and it executes so quickly, compared to how fast the loop that is making threads executes. the couts aren't *really* running in parallel. if i add a 1sec sleep, the output gets wayyy more garbled. ImageImage