HNHacker News
TopNewBestAskShowJobs

ddavis

723 karma · joined August 22, 2015

submissionscomments
ddavis··on Opaque Types in Python
I agreed with this 100% for a long time. Then I started working on a library at $WORK with dozens of downstream users abusing the hell out of my idiomatic underscore usage, especially in the context of lazy tests with folks writing endless mocks. When I’d “break” their test suite (blocking some time sensitive release) I’d get all kinds of shit. But _they_ were breaking the contract. Unfortunately I had little (if any) control on the path of application code making it to production (yeah yeah not great engineering org, but it’s the world I lived in). Strategies like this post would be helpful for said situations.
ddavis··on Python developers are embracing type hints
When you hit types like that type aliases come to the rescue; a type alias combined with a good docstring where the alias is used goes a long way
ddavis··on Amazon to end commingling after years of complaints from brands and sellers
Literally dealing with this right now. My wife got what appears to be a (very expensive) counterfeit item that is technically non-returnable (not laying down without a fight). Kind of cathartic to see this pop up.
ddavis··on America's Largest Homebuilders Shift the Cost of Shoddy Construction to Buyers
I don’t think the person quoted is implying that it should be that way, merely pointing out a discovery that builders have made: they _can_ get a symbolic bonus. One can skip building to code… do a quick and bad job and move on to the next job, saving cost and moving onto the next paying job more quickly. That “bonus” doesn’t exist if you build to code (and of course it shouldn’t exist, but neither should the bonus that does exist, your stick should prevent it).
ddavis··on 996
I have a similar experience. I was a devoted PhD student working long hours taking on a lot of responsibility. It burned me out, hurting my productivity. I have mixed feelings about it; I love the friends I made and the things I learned, but I don’t think I should have had to suffer what I suffered. Simultaneously I’m somewhat glad I experienced it then, because now I work in tech and I’ll _never_ work outside of business hours (I’ll hack on personal projects I consider fun if I feel like it). And I’m more productive than my colleagues that do. There’s something mysterious about the contemporary PhD, not all good and not all bad.
ddavis··on The Little Book of Linear Algebra
The organization and formatting of the single .tex file is such that one could almost read the source alone. Really nice. Also, I had no idea that GitHub did such a good job rendering the LaTeX math in markdown, it's imperfect but definitely good.
ddavis··on PYX: The next step in Python packaging
Been waiting to see what Astral would do first (with regards to product). Seems like a mix of artifactory and conda? artifactory providing a package server and conda trying to fix the difficulty that comes from Python packages with compiled components or dependencies, mostly solved by wheels, but of course PyTorch wheels requiring specific CUDA can still be a mess that conda fixes
ddavis··on Berkeley Mono Typeface (v2)
I really like Berkeley Mono and I don’t regret my old purchase, but my Emacs and Terminal configs have been rocking Pragmata Pro for a while now. Looking at the version 2 release notes it appears that Berkeley Mono has some new condensed widths (something I think keeps me using Pragmata Pro). Will have to take it for a spin.
ddavis··on OpenMP 6.0
OpenMP is great. I’ve done something similar to your second case (thread local objects that are filled in parallel and later combined). In the case of “OpenMP off” (pragmas ignored), is it possible to avoid the overhead of the thread local object essentially getting copied into the final object (since no OpenMP means only a single thread local object)? I avoided this by implementing a separate code path, but I’m just wondering if there are any tricks I missed that would allow still a single code path
ddavis··on Codestral: Mistral's Code Model
Nope, I don't know how to do it at all- that's why I have to ask AI!
ddavis··on Codestral: Mistral's Code Model
It's something I know how to do after figuring it out myself and discovering the potential sharp edges, so I've made it into a fun game to test the models. I'd argue that it's a great prompt (to keep using consistently over time) to see the evolution of this wildly accelerating field.
ddavis··on Codestral: Mistral's Code Model
My favorite thing to ask the models designed for programming is: "Using Python write a pure ASGI middleware that intercepts the request body, response headers, and response body, stores that information in a dict, and then JSON encodes it to be sent to an external program using a function called transmit." None of them ever get it right :)
ddavis··on OpenBSD is a cozy operating system
The back door relied on a couple of Linux package management systems (if I’m recalling correctly, it had .deb and .rpm checks, see https://marc.info/?l=openbsd-misc&m=171227941117852&w=2)
ddavis··on Every Dunder Method in Python
Yea there's some nuance here. But one of the beautiful things about Python is the existence of PEPs. One would have to write a PEP to get a new dunder method added to CPython. During the review/discussion of the PEP it would come up that one of the most popular ecosystems in all of Python would be impacted by adding a builtin __array__ dunder method, for example. It just wouldn't happen. It makes sense to me that the biggest packages associated with a language can have some impact on the way the language moves forward, even if they are not part of the core implementation. For example, the impact of PEP 563 on Pydantic (another wildly popular package outside of core) caused it to be rolled back.
ddavis··on Every Dunder Method in Python
> Keep in mind that you're not meant to invent your own dunder methods. Sometimes you'll see third-party libraries that do invent their own dunder method, but this isn't encouraged and it can be quite confusing for users who run across such methods and assume they're "real" dunder methods.

I don't think this is good advice. Example: the dunder methods implemented and used by the Scientific Python/PyData community (__array__, __array_ufunc__, __array_func__, etc.) are so, so, so important to that ecosystem.

ddavis··on My MacBook Setup (the 2024 version)
Really only usable on a personal machine. Having to disable SIP is a non starter for work computers
ddavis··on Grap – Kernighan and Bentley's language for typesetting graphs (1984) [pdf]
reminds me a bit of gnuplot.
ddavis··on Texas employment tops 14M as state job growth tops U.S.
5ish+ years ago Austin had more of the lower level tech jobs, but definitely not anymore (consistent spectrum now).
ddavis··on Texas A&M suspended professor accused of criticizing Lt. Gov. Patrick in lecture
Dan Patrick is a terrible human being. Totally unsurprising behavior from him.
ddavis··on 916 Days of Emacs
I’ve never used one. I’ve declared init.el bankruptcy a few times in those 12 years but I always build from vanilla Emacs- lots of use-package use though.
ddavis··on 916 Days of Emacs
Cool post! I really don't want to know how much time I've spent configuring Emacs over the last 12 years :P The explosion of great Emacs Lisp packages over the last few years has absolutely made it difficult to avoid forever playing around with Emacs.
ddavis··on Investors bought a record share of U.S. homes in 2021
Also on the housing hunt and have had the same experience. It's really disheartening to tell someone I'm going to give you exactly what you are asking for and have that transaction, that seems so easy without any kind of counter-offer back and forth, fall apart... multiple times. An article like this definitely brings out a little anger.
ddavis··on FalsiScan: Make it look like a PDF has been hand signed and scanned
Signature_example.pdf in that repository is NSFW.
ddavis··on Polars: Fast DataFrame library for Rust and Python
There is an effort for this: https://github.com/data-apis/dataframe-api
ddavis··on EmacsConf 2021 Call for Proposals
Emacs is really thriving right now. There are a lot of creative developers contributing to a really nice ecosystem of packages right now, with some things getting pushed upstream.
ddavis··on Ohio Republicans close to imposing near-total ban on municipal broadband
> the private sector solves this by having competition.

And the ISPs fight like hell to simultaneously avoid competition and go in all together on lawsuits like https://arstechnica.com/tech-policy/2021/04/isps-sue-new-yor...

The idea that private competition will solve broadband internet problems in the US has been garbage for many, many years

ddavis··on Emacs 27.2
While a set-in-stone release schedule doesn't exist, there is _a lot_ of development activity (emacs-devel is a very busy mailing list). 99.9% of the time it's safe to use the bleeding edge head of the repository if you want to use the latest stuff.
ddavis··on YouTube-dl has received a DMCA takedown from RIAA
This is really dumb. By the logic of the letter all that needs to be done is change the README file.
ddavis··on Room-Temperature Superconductivity Achieved for the First Time
In the 50s a few megabyte hard drive was the size and weight of a refrigerator-- and came with a huge price tag, impractical price and impractical size. It'll be interesting to see what we can do in a few decades!
ddavis··on Python 3.9
The PEP abstract says this: "Static typing as defined by PEPs 484, 526, 544, 560, and 563 was built incrementally on top of the existing Python runtime and constrained by existing syntax and runtime behavior"
Page 1 of 6Next →