Post A8Ww8m3PoMmeesYPLs by rfox@mastodon.technology
 (DIR) More posts by rfox@mastodon.technology
 (DIR) Post #A8Wpp1GMxK2yJMoHsu by SuricrasiaOnline@cybre.space
       2021-06-22T01:19:42Z
       
       1 likes, 0 repeats
       
       my philosophy about programming is everything is a big stack of layered abstractions, and each abstraction has a bunch of holes like swiss cheese
       
 (DIR) Post #A8Wpp3Alr6l0EaCqR6 by SuricrasiaOnline@cybre.space
       2021-06-22T01:20:34Z
       
       0 likes, 0 repeats
       
       when you walk around on the surface of an abstraction, be it c programming or python programming, your food might get caught in one of those holes. if you're unlucky, you might fall into a hole that's a couple layers deep
       
 (DIR) Post #A8Wpp51ywkunzu6r0y by SuricrasiaOnline@cybre.space
       2021-06-22T01:20:57Z
       
       0 likes, 0 repeats
       
       when that happens, if you don't know what's happening in the layers below the abstraction you've chosen to work at, you're going to have a really bad time
       
 (DIR) Post #A8Wpp6qiBd5XdWqsj2 by SuricrasiaOnline@cybre.space
       2021-06-22T01:22:12Z
       
       0 likes, 0 repeats
       
       this is inspired partially by the swiss cheese model of accident causation: https://en.wikipedia.org/wiki/Swiss_cheese_model
       
 (DIR) Post #A8Wpp8VW1PK0mMwyxs by SuricrasiaOnline@cybre.space
       2021-06-22T01:25:08Z
       
       0 likes, 1 repeats
       
       I think that most "bugs from hell" stories are situations like this, where a programmer is working at a high level of abstraction and suddenly finds themselves thigh-deep in a hole that goes all the way down to the layer that are concerned with things like semiconductor gate width
       
 (DIR) Post #A8WppAIpLYMQLb1sSu by SuricrasiaOnline@cybre.space
       2021-06-22T01:25:35Z
       
       0 likes, 1 repeats
       
       see: the crash bandicoot quantum save file corruption bug https://www.gamasutra.com/blogs/DaveBaggett/20131031/203788/My_Hardest_Bug_Ever.php
       
 (DIR) Post #A8WrbqE8sLtSEBc1qa by penny@cute.science
       2021-06-22T01:51:02.321715Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline I've been programming in an object oriented language and abstractions are easier, but every change still requires going up the stack 80% of the time
       
 (DIR) Post #A8WuRtWe3bCDQNDQZM by x44203@cuties.social
       2021-06-22T01:46:38Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline Though aren't most modern computer problems caused by quantum mechanics, as that is what makes CPUs possible?
       
 (DIR) Post #A8WuRu3c51ZF4cdkxM by SuricrasiaOnline@cybre.space
       2021-06-22T01:47:15Z
       
       0 likes, 0 repeats
       
       @x44203 thankfully it's still mostly off-by-one errors and concurrency issues
       
 (DIR) Post #A8WuRuVGQDgYSNZq3U by x44203@cuties.social
       2021-06-22T01:48:16Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline I think what I'd actually call quantum mechanics would be a case where for example the leakage current noise of a transistor causes an error every once in a trillion operations or so heh
       
 (DIR) Post #A8WuRuygepDlvdLKuu by x44203@cuties.social
       2021-06-22T01:51:11Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline I think actually what he experienced was a deterministic bug, pretty sure there has to be some kind of pattern... I suspect the time between timer interrupt and start of memory write (and maybe power supply noise etc.)
       
 (DIR) Post #A8WuRvUwit1dXgR6CO by SuricrasiaOnline@cybre.space
       2021-06-22T01:53:46Z
       
       1 likes, 1 repeats
       
       @x44203 if you're interested in the idea of hardware level faults, check this out: https://web.archive.org/web/20180713212603/http://media.blackhat.com/bh-us-11/Dinaburg/BH_US_11_Dinaburg_Bitsquatting_WP.pdfTLDR: if you register api.facebomk.com (1 bit difference between "o" and "m") then you'll get tons of requests from failing mobile devices
       
 (DIR) Post #A8Wulhbk4ovgFn2q0G by SuricrasiaOnline@cybre.space
       2021-06-22T01:28:49Z
       
       1 likes, 0 repeats
       
       so far the most successful bug hunting strategy I've found has been "systematically determine every assumption I have and test to see if they actually hold" and often these assumptions include things that are usually "guaranteed" but the programming environment
       
 (DIR) Post #A8WuljMvWsGbiQ82Bk by SuricrasiaOnline@cybre.space
       2021-06-22T01:33:17Z
       
       0 likes, 0 repeats
       
       your c++ build system will get all the header file dependencies for a source file (except when it doesn't)your python interpreter will import your module, it doesn't matter what it's called (except when it does)your 10-year-old threading library is thread safe (except when it isn't)
       
 (DIR) Post #A8Wull5z6pu34SDX3g by SuricrasiaOnline@cybre.space
       2021-06-22T01:37:15Z
       
       0 likes, 0 repeats
       
       a text editor will show you every character in a text file (except when it doesn't)
       
 (DIR) Post #A8Wulmogi7FuPO8kNM by SuricrasiaOnline@cybre.space
       2021-06-22T01:37:31Z
       
       0 likes, 0 repeats
       
       (unicode BOM is quite the killer)
       
 (DIR) Post #A8Wusaw3HbtJaQpaRU by rfox@mastodon.technology
       2021-06-22T01:32:27Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline this is why I think it’s important to understand a layer or two under where you’re working. I was doing some stuff where we were configuring some prebuilt software, and in our case it was really slow. Turns out the setup was to process thousands of tiny files at a time (instead of a few dozen larger ones), and opening/closing files has an overhead. Changing to fewer, larger files solved the problem.
       
 (DIR) Post #A8WusbNhco0cyBlfXc by rfox@mastodon.technology
       2021-06-22T01:33:19Z
       
       1 likes, 0 repeats
       
       @SuricrasiaOnline that being said, falling through the “hardware is consistent” abstraction is probably going to be pretty disorientating no matter which level you started from
       
 (DIR) Post #A8Wv3pCmZIpD1s0m9I by lanodan@queer.hacktivis.me
       2021-06-22T02:29:37.420406Z
       
       0 likes, 0 repeats
       
       @SuricrasiaOnline @rfox Well, apparently meltdown/spectre things could be triggered within a browser JS sandbox. (I patched my stuff too quickly to test it, lol)
       
 (DIR) Post #A8Ww7Se6U9PMAv5Y9Y by lanodan@queer.hacktivis.me
       2021-06-22T02:41:33.751127Z
       
       1 likes, 0 repeats
       
       @SuricrasiaOnline Well the definition of a character is very vage, text editors should show all bytes well enough, some of them (specially graphical ones in my experience) don’t.Reminds me of one of the current things I’m quite annoyed about, git-diff(1) + most(1) and ANSI escape codes, it just doesn’t seems to filter them.So instead of something like echo "^[[0m" I get echo "" with diff coloring being reset between the quotes.I didn’t try fancier escape codes / bytes or other pagers yet (less(1) is banned on my machines, it tries to handle binary files and got at least one nice CVE for that).
       
 (DIR) Post #A8Ww8li95RlnaubQCO by SuricrasiaOnline@cybre.space
       2021-06-22T01:34:52Z
       
       0 likes, 1 repeats
       
       @rfox I'm almost certain that somewhere in the world someone has encountered a bug in their ruby on rails app that is due to a microcode level bug in how speculative execution is managed.whoever it is, they have my deepest sympathies. godspeed
       
 (DIR) Post #A8Ww8m3PoMmeesYPLs by rfox@mastodon.technology
       2021-06-22T01:41:18Z
       
       2 likes, 0 repeats
       
       @SuricrasiaOnline at that level, I’d probably blame cosmic rays and try to move on with my life. Or just hack it till it “works”, shifting the layers of cheese so they don’t line up any more
       
 (DIR) Post #A8WwLXeeevZPlR3oiO by meeper@outerheaven.club
       2021-06-22T02:44:06.890615Z
       
       0 likes, 0 repeats
       
       @lanodan @SuricrasiaOnline I find less annoying because it tries to generate log files, which is easy to do by misstyping and leads to files with wrong escape sequence characters....I just need a pager not something like .less_history  lol
       
 (DIR) Post #A8X1xaLzZXVQuTI72e by lanodan@queer.hacktivis.me
       2021-06-22T03:46:59.820522Z
       
       1 likes, 0 repeats
       
       @meeper @SuricrasiaOnline Well most is pretty nice but it's also quite too large.I actually ended up using ed as a pager on some occasions.
       
 (DIR) Post #A8X2EPBmKs4JCpXBQW by meeper@outerheaven.club
       2021-06-22T03:50:03.915054Z
       
       0 likes, 0 repeats
       
       @lanodan @SuricrasiaOnline I'd be using busybox's less but I need it to handle escape symbols