rjmill

Joined 10 years ago

Karma
837
Submissions
94
Member since
Apr 11
github.com/rjmill
View on Hacker News

Recent submissions

Comment · 3 months ago
That's part of the problem. Some projects, when they move to diataxis, will create a top level section called "reference" and have a single item under it called "API" (or similar.)

Depending on the docs theme, it can require clicking through to get to it.

It is a minor annoyance.

edit: Also gonna tack onto this that my original comment reads way more acerbic than I actually feel. I was sleepy and didn't proofread for tone like I normally do.

Comment · 3 months ago
Please do not make me click on "reference" to get to "API docs". I love diataxis, but dear lord, do not make me click an extra time to get to the thing I actually need 95% of the time.

Overall, the movement is good, except for how it tends to turn 1-click docs into 2-click docs (or more for folks who don't know that API docs probably live under reference.)

You are allowed to have a top level tab/link to API docs. Please do not hide those from me while you "improve" your docs.

Comment · 6 months ago
Very nice! Independently of this thread, I was delighted to discover the cross references between pages. It makes a big difference.
Comment · 6 months ago
They've always resonated with me, maybe because I often work on legacy code. All this ancient technology that no one understands. Crazy rituals/incantations to get things done. People being afraid to skip steps, even if it probably isn't needed. The aversion to unconsecrated (non IT-supported) technology.

The machine spirits were the only part that felt "too magical" to me, but now we're well on our way. The Omnissiah's blessings be upon us.

(Let's just skip servitors. Those give me the heebie-jeebies.)

Comment · 6 months ago
Someone please explain the grapple leapfrog example and why that "exploit" is interesting. If my players tried that, I'd happily let them use their full turns to do some crazy trapeze act across the battlefield.

And then I'd remind them that they could have just dashed normally.

Moreover, how do the new rules close the "exploit"? You can still move 30ft while carrying someone. (60/2 - 30 vs 60 - 30*2) How is that difference meaningful in this case?

(Also, wouldn't you need something like rogue's dash-as-a-bonus -action to grapple and dash on the same turn?)

The article is pretty interesting overall but this example mystifies me. Am I missing something obvious?

Comment · 10 months ago
Odd, I don't see any mention of subprocess.run, the workhorse of python scripting.

Quick rundown for the unfamiliar:

Give it a command as a list of strings (e.g., subprocess.run(["echo", "foo"]).)

It takes a bunch of flags, but the most useful (but not immediately obvious) ones are:

  check=True: Raise an error if the command fails
  capture_output=True: Captures stdout/stderr on the CompletedProcess
  text=True: Automatically convert the stdout/stderr bytes to strings
By default, subprocess.run will print the stdout/stderr to the script's output (like bash, basically), so I only bother with capture_output if I need information in the output for a later step.
Comment · 11 months ago
> But isn't it true for JavaScript too?

I don't think so. It's been a while since I've bled on tricky async problems in either language, but I'm pretty sure in JS it would be

  [...]
  parent_before
  parent_after
  child_before
  [...]
In JS, there are microtasks and macrotasks. setTimeout creates macrotasks. `.then` (and therefore `await`) creates microtasks.

Microtasks get executed BEFORE macrotasks, but they still get executed AFTER the current call stack is completed.

From OP (and better illustrated by GP's example) Python's surprise is that it's just putting the awaited coroutine into the current call stack. So `await` doesn't guarantee anything is going into a task queue (micro or macro) in python.

Comment · 11 months ago
Not to dimish the achievement, but TFA is pretty clear about the limitations of the piece:

> I was able to get it working consistently, although it did lose 2-3 balls an hour and could only run for a few hours without the motor overheating.

IMO that's more impressive to hear than if he hadn't mentioned it at all. (I would have assumed more marbles getting lost.)

Comment · 1 year ago
Indeed. Inheriting from 'collections.UserDict' instead of 'dict' will make TFA's code work as intended for most of those edge cases.

UserDict will route '.get', '.setdefault', and even iteration via '.items()' through the '__getitem__' method.

edited to remove "(maybe all?) edge cases". As soon as I posted, I thought of several less common/obvious edge cases.

Comment · 1 year ago
Can you give an example? I've never noticed that (except for certain specific dialects and slang) but I may be blind to it.
Comment · 1 year ago
Goodness, yes. The last time I put (genuinely constructive) criticism in a peer evaluation, it turned out to be the only non-positive thing that was said about that coworker. So it became a focus of his yearly review.

He later told me about how his review went (casually at a conference; he had no idea I was the source), and I fessed up and clarified what I actually meant. The HR process had twisted it to a much more extreme version of what I was getting at, completely undermining the utility of the feedback.

Nowadays, I'm just gonna give perfect scores and if I have feedback that needs to be given, I'll just tell the coworker directly. (And if I'm not comfortable doing that, then the feedback probably isn't important enough.)

Comment · 1 year ago
How do you know that interviewees aren't spending more time on it?

Because you can't guarantee all candidates are spending the same amount of time, it becomes a game theory problem where the candidates will typically lose in some form. In many cases, the right answer is to spend extra time making a really polished (but not too polished!) solution and pretend like you stayed in the time limit. And every candidate is either a) doing that, or at least b) worried that their competition is doing that.

Even if we ignore that dynamic, 3 hours is a long ass time for a candidate to spend when they're not even sure they'll get to talk to another human about it.

In a 1-hour interview, you can run a candidate through a programming exercise and be guaranteed they're not wasting extra time on it. And if they happen to prefer doing take home assessments, you can always let them send you an updated answer later. (But often by the time a candidate asks me if they can do that, I've already developed a favorable view of their skills and can tell them, "go for it if you want, but you've already 'passed' my test.")

By keeping the candidate-interviewer time investment the same, you guarantee that you're respecting the candidate's time as you would your own (because you're sitting there with them.) I can help them skip over the parts I'm not interested in (e.g., by feeding them info they'd be able to find via search or telling them not to worry about certain details.)

If a hiring manager doesn't respect their candidates' time, how likely are they to respect their employees' time?

Comment · 1 year ago
Great advice, but my case is different because our framework is REALLY hurting us.

/s

It's wild how easy it is to fall into this trap. IMO, if you're considering switching frameworks (especially for perf reasons), your time would be better served by getting parts of your app off framework completely (assuming there's truly no way to get the results you want in your current framework.)

Comment · 1 year ago
I wonder if Bacardi might be a better analogue for what TSMC gets from this deal.

Bacardi started a distillery in Puerto Rico (iirc, to sell in the US without tariffs) well before the Cuban Revolution. When the Cuban government seized Bacardi's assets, they were able to move everything to their other sites in Puerto Rico and Mexico.

As you point out, I highly doubt this deal moves the needle on whether or not US provides military aid to Taiwan. But it does help give them more options if the situation in Taiwan becomes untenable.

Comment · 1 year ago
I love it. I want a python-esque version that's whitespace sensitive. But only for trailing whitespace.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton