teh_matt
Re:Storing Data in Pointers
on Sunday November 26, 2023 @07:39PM (#38426762)
You should be very careful when doing that. It may be rare in practice, but it's surprisingly easy to trigger ABA issues with only a 16-bit sequence number.
Re:Graphical Python Profiler
on Wednesday July 05, 2023 @05:05PM (#36607105)
Yeah, it tends to be low single digit percents, but you can get some pessimal behavior if you have enough tiny functions because the overhead of what Cpython exposes starts becoming large. Our "benchmark" where the 10% comes from is tensorflow, which is overwhelmingly tiny functions and no sustained io/individual functions.
Re:Graphical Python Profiler
on Wednesday July 05, 2023 @04:03PM (#36606257)
Most of the work is done via a C extension, which I suspect would be incompatible with MicroPython. The same techniques are presumably applicable, depending on how many interesting hooks MicroPython exposes.
Re:Graphical Python Profiler
on Wednesday July 05, 2023 @04:00PM (#36606234)
I'm not sure why the Gitlab UI shows Apache 2.0, but PPL3.0 is the correct license (and is in LICENSE.md).
Re:Adventures in Advent of Code
on Saturday December 03, 2022 @07:40PM (#33849176)
I have a writeup of my 2021 solutions at https://programsareproofs.com/articles/aoc_2021.html. I got day 23 down to 31ms using Rust.
Re:Which programming paradigm had the most impact on you as an enginee...
on Thursday October 27, 2022 @04:25AM (#33354764)
Working at a company that cared deeply about correctness and reading code over writing it was critical to my current coding style and beliefs. I've written about some of this at https://programsareproofs.com/articles/singleuse_functions.h..., but I developed an aversion to single-use functions, premature abstractions, and "self documenting" code. The code I write these days is drastically more understandable and modifiable than back when I targeted terseness, minimizing duplicated code, and future proofing.
As far as languages go, learning SML and functional programming was probably the biggest change for me.
Re:Microsoft buys Xandr, AT&T’s advanced advertising business
on Wednesday December 29, 2021 @02:06PM (#29728618)
As someone who doesn't own a Windows machine and only uses Macs for work, this feels like an outdated perspective. It's been many years since using desktop Linux has required magical terminal incantations (for me at least).
If it says Nvidia, don't touch it. Otherwise, everything seems to just work, and things at least don't get broken arbitrarily by companies whose goals don't match mine. Even all the games I've tried have run solidly with Steam's Proton support.
Maybe I've become numb to them, but I just don't see these painful interactions that get referenced, and don't see why their bogeyman would be worth giving up your freedom to use your machine.
Re:Ask HN: What tiny purchases have disproportionately improved your l...
on Monday August 09, 2021 @06:14PM (#28122986)
I'd recommend a Zebralight one (I like the H600Fc), as they're small, light, and much brighter than most headlamps you'll find. I've also had good luck with Armytek (Wizard Pro Nichia), though people say their reliability is lower.
Re:Programming in Z3 by learning to think like a compiler
on Monday May 03, 2021 @09:04PM (#27032925)
I used it to do some tax optimization around ISOs at a newly public company (https://gitlab.com/mbryant/taxoptimizer/-/blob/master/amt.py). It gets pretty slow when you try to look more than a few years out, so I'm guessing writing some optimization logic by hand would've made more sense. Using Z3 here definitely beat me trying to do this on paper like I've seen other people do!
Re:The compiler will optimize that away
on Sunday May 02, 2021 @05:14AM (#27013605)
I hacked up something similar (https://gitlab.com/mbryant/functiontrace/-/blob/master/src/p...) a while ago. Your variant looks much more useful!
Solving a Puzzlehunt with Satisfiability Modulo Theories
Re:Show HN: Austin-Tui – Spy inside a running Python program at no per...
on Tuesday October 27, 2020 @03:15PM (#24910762)
Note that tracing profilers don't need to be high overhead - Python is slow enough that efficient tracing can be mostly hidden. For example, https://functiontrace.com tends to have <10% overhead when tracing.