Better HN
topnewbestaskshowjobs
Log inSign up

ericvsmith

162 karma · joined May 15, 2019 (7y ago) · 63 submissions

Submissions

comment 11mo ago · link · parent

For those who don't know the story: it's ironic because Jefferson died first.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

You can (and should!) tell pip not to do this with '--only-binary=:all:'. Building from source is a lousy default.

comment 1y ago · link · parent

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).

comment 1y ago · link · parent

And for a similar idea in Python see https://peps.python.org/pep-0750/

comment 2y ago · link · parent

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)

comment 2y ago · link · parent

This is incorrect. The returned integer is a regular Python object, not some "unboxed" integer value.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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”.

comment 2y ago · link · parent

Thank you for the kind words.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

I like to think of it like mad cow: that’s what you get when you feed animals to animals. Same with AI.

comment 2y ago · link · parent

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)

comment 2y ago · link · parent

D’oh! Of course you’re correct. I skipped over “any”, and focused on “patch”. Sorry about that.

comment 2y ago · link · parent

That’s not a typo, that’s the name of the technique.

comment 2y ago · link · parent

PEP 649 “Deferred Evaluation Of Annotations Using Descriptors” should result in vastly reducing the need for TYPE_CHECKING.

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

comment 3y ago · link · parent

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!

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

It would be hard to argue that Sun has not disappeared.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

> 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.

123