HNHacker News
TopNewBestAskShowJobs

ericvsmith

162 karma · joined May 15, 2019

submissionscomments
ericvsmith··on Computer animator and Amiga fanatic Dick van Dyke turns 100
For those who don't know the story: it's ironic because Jefferson died first.
ericvsmith··on Seine reopens to Paris swimmers after century-long ban
In DC, they're storing the combined runoff+sewage until it can be treated: https://dcist.com/story/23/09/18/new-anacostia-river-tunnel-...

As expensive as this project is, separating the storm drains from the sewage lines (https://en.wikipedia.org/wiki/Combined_sewer) in an existing system is much more costly.

ericvsmith··on The Fed says this is a cube of $1M. They're off by half a million
That’s actually the Bureau of Engraving and Printing, on 14th St. SW, which is indeed worth visiting. They print the paper bills (among other things). The U.S. Mint produces the coins. I think only the Philadelphia Mint still mints coins, but it’s also worth visiting.
ericvsmith··on Switching Pip to Uv in a Dockerized Flask / Django App
While I agree, pip has very strong backward compatibility requirements. I'm not sure why, maybe because people tend to upgrade it without considering the consequences.
ericvsmith··on Switching Pip to Uv in a Dockerized Flask / Django App
You can (and should!) tell pip not to do this with '--only-binary=:all:'. Building from source is a lousy default.
ericvsmith··on Design Pressure: The Invisible Hand That Shapes Your Code
For what it’s worth, I was in the “loved it” camp.

(I’m the author of dataclasses, and I owe an immeasurable debt to Hynek).

ericvsmith··on You probably don't need query builders
And for a similar idea in Python see https://peps.python.org/pep-0750/
ericvsmith··on Don't return named tuples in new APIs
I think you're saying that it takes fewer characters to define a namedtuple. If you're interested in less typing, There's also dataclasses.make_dataclass:

   >>> Point = dataclasses.make_dataclass("Point", ["x", "y", "z"])
   >>> Point(1, 2, 3)
   Point(x=1, y=2, z=3)
ericvsmith··on Don't return named tuples in new APIs
This is incorrect. The returned integer is a regular Python object, not some "unboxed" integer value.
ericvsmith··on Don't return named tuples in new APIs
What you're seeing here is an optimization about integers, not about pass by value. CPython only does this for small integers:

  $ python -c "print(int('3') is int('3'))"
  True
  $ python -c "print(int('300') is int('300'))"
  False
Other implementations make different choices.
ericvsmith··on MQTT turns 25
I’ve worked at places where subverting firewall rules like this would get you fired. I now refer to such situations where I’m forced to twiddle my thumbs while no work gets done as “letting the process work”.
ericvsmith··on __init__.py files are optional. Here's why you should still use them
Thank you for the kind words.
ericvsmith··on __init__.py files are optional. Here's why you should still use them
This is spelled out in the PEP (I’m the author). There isn’t one “portion” (a term defined in the PEP) to own that file. And it’s also not a requirement that all portions be installed in the same directory. I’m sorry you feel this was lazy, it was a lot of work spanning multiple attempts over multiple years.
ericvsmith··on We need more zero config tools
I have not used chezmoi, thanks for the pointer. From the comparison chart it looks similar to yadm. It looks like go vs. bash is the biggest difference. It’s occasionally handy to debug yadm’s bash script, although it’s been years since I had to do so. I’ll take a deeper look.
ericvsmith··on We need more zero config tools
For managing config files I use yadm https://yadm.io/, which I learned of on HN.

Among other great features, it lets me tailor settings per OS (Windows, Mac, Linux) and per client. And my settings are all in git, so they’re easy to save and copy around, and they’re all in one place, not dependent on each tool to know how to save their settings on some server.

ericvsmith··on Lesser known parts of Python standard library
See my comment and the linked email at https://github.com/ericvsmith/dataclasses?tab=readme-ov-file... for dataclasses and 3.6. I think it's still true.
ericvsmith··on More Itertools
That’s not actually true. While dataclasses to most of its inspiration from attrs, there are many features of attrs that were deliberately not implemented in dataclasses, just so it could “fit” in the stdlib.

Or maybe you mean the backport of dataclasses to 3.6 that is available on PyPI? That actually came after dataclasses was added to 3.7.

Source: I wrote dataclasses.

ericvsmith··on Things I don't know about AI
I like to think of it like mad cow: that’s what you get when you feed animals to animals. Same with AI.
ericvsmith··on The Emacsen family, the design of an Emacs and the importance of Lisp (2023)
BRIEF by UnderWare! I loved that editor. I particularly liked the “go to this line number, but use the line number before unsaved edits”. This let you compile a file, get the error log, then start making edits; but the line numbers in the error log were still useful.

https://en.wikipedia.org/wiki/Brief_(text_editor)

ericvsmith··on Python 3.13 Gets a JIT
D’oh! Of course you’re correct. I skipped over “any”, and focused on “patch”. Sorry about that.
ericvsmith··on Python 3.13 Gets a JIT
That’s not a typo, that’s the name of the technique.
ericvsmith··on Why if TYPE_CHECKING?
PEP 649 “Deferred Evaluation Of Annotations Using Descriptors” should result in vastly reducing the need for TYPE_CHECKING.

https://peps.python.org/pep-0649/

ericvsmith··on Why are there no startups in the real estate construction sector?
This is a common misconception. US homes are not two phase, they are single phase 240 volts, called split phase because the single transformer leg is tapped in the middle to form two 120 volt lines, each 180 degrees out of phase with the other.

https://en.wikipedia.org/wiki/Split-phase_electric_power

Three phase circuits are 120 degrees out of phase.

But completely agreed that three phase 400V seems crazy!

ericvsmith··on Atomic Tourism
I can highly recommend the Delta-01 Minuteman launch control facility in South Dakota, near Badlands National Park. Only 6 visitors at a time, so tickets are hard to come by. But it's an eerily awesome facility. Also the nearby visitor's center and missile silo are cool. But the launch control facility is the star of the show.

Also Trinity is worth visiting, although both a pain to get to and only open 2 days a year.

ericvsmith··on Mapping hidden corridors and chambers in the Great Pyramid of Giza
I don't think that picture is about the new chamber they're referencing in the article. Note the caption "showing an empty corridor" (emphasis mine).

I was hoping to see a picture, too.

ericvsmith··on Sun: The Network Is the Computer
It would be hard to argue that Sun has not disappeared.
ericvsmith··on Best and worst decisions I’ve made
Getting a 30y and paying off in 15 is a smart move. For our most recent house, that's we did set out to do, until the last refi (maybe 5 years in to the 30y) when we got a 15y and paid it off in 10 more years.
ericvsmith··on Best and worst decisions I’ve made
Back in the 80s and 90s ARMs were very popular in the US because interest rates were high, and the expectation was that they wouldn't stay that way forever. The rate increases had a lifetime cap, so there was a knowable upper bound.

Edit to add: also, if you knew you were going to sell (and confident you could actually sell) within a few years, the lower initial rate of an ARM made sense.

ericvsmith··on Dotfiles Management
I can't say enough good things about yadm. I found a yadm bug under Cygwin years ago, and the author had a patch for me within a day. I'll grant that Cygwin is an odd platform.

I use yadm to manage dotfiles across Windows (via Cygwin), macOS, and Linux.

ericvsmith··on Winter & Cold Weather EV Range Loss in 7,000 Cars
> almost zero regen-braking

Are you sure this is related to the cold, and not just that the batteries were fully charged so that regen had nowhere to put the energy?

[Edited to add]: I say this because I see this in all types of weather: I live on the top of a hill, and if the car is fully charge there will be no regenerative braking when heading down the hill.

Page 1 of 3Next →