HN user

patrickthebold

1,150 karma
Posts8
Comments356
View on HN

So, maybe we could consider a "White Hat" ransomware group that takes the money and also leaks the data, so that long term no one bothers to pay which ultimately disincentivizes ransomware attacks?

Somewhat off topic, but I've always wanted to know _who_ gets my tax dollars more than what they were spent on. For example, a middle class salary to someone building bombs in Ohio is different than a wealthy investor who owns shares in some educational company that provides standardized tests to local public schools.

GitHub Stacked PRs 3 months ago

I'm not sure I follow your workflow exactly. If PR B is merged, then I'd expect PR A to already be merged (I'd normally branch off of A to make B.)

That said, after the squash merge of A and git fetch origin, you want something like git rebase --update-refs --onto origin/main A C (or whatever the tip of the chain of branches is)

The --update-refs will make sure pr B is in the right spot. Of course, you need to (force) push the updated branches. AFAICT the gh command line tool makes this a bit smoother.

Combinators 4 months ago

It helps if you click the link of the operator(s) under TinyAPL. For example Blackbird goes to https://tinyapl.rubenverg.com/docs/primitive/atop

Which seems to be function composition and some extra rules about if there's 1 or 2 arguments, so the 2 arguments go to G and F is applied as a single argument function. Anyway if you click on a few of these an look at the red text in the upper right it's fairly clear what it's doing.

Sabotaging Bitcoin 7 months ago

This is interesting to think about: For gold I'd say the demand is coming from both industries and from people who want it as a store of value. If it was only used as an industrial chemical, then surely the price would drop because there would be less demand.

Some bitcoin advocates will talk about how useful it is as a currency, and I wonder how much bitcoin is actually used for purposes other then to hope you can sell it to someone else for more than you paid.

When 1+1+1 Equals 1 8 months ago

I'd be good to give an example of where the 'only if' doesn't apply. If only to clear up the confusion.

I think I might be missing something basic, but if you actually wanted to do a Fourier transform on the sound hitting your ear, wouldn't you need to wait your entire lifetime to compute it? It seems pretty clear that's not what is happening, since you can actually hear things as they happen.

I agree.

Ideally we could just increase the tax credits so it's large enough to cover the childcare expenses (and other necessities), and let the families decide what is best. And yes, some people are going to do a bad job taking care of their kids and spend the money on something else. But my understanding is that it generally works well to just give people money, rather than pay for specific things.

Just a thought: Make the velocity of the path constant. There should be some way to take a derivative an set it to a constant and solve for z. ( or really reparameterize the curve t' = f(t)) so the velocity is constant.

Actually, now that I think about it, choosing z = c * t is kind of both influencing how the path is parameterized as well as the path carved out on the sphere.

I happen to also have thought about this. Effects would listen to the global state and if needed do their side effect and update the state. As a type it's just State -> State, with an implicit side effect.

As an example: Say the user clicks a button to submit a form, clicking the button updates the local state to include something like `status: 'SUBMIT_REQUESTED'` then you make the request conditionally, and update the state to `status: 'IN_PROGRESS'`.

It might become a mess, but the point is to do no side effects based on any events, all effects happen conditionally based on the state. My hope is the forces you to actually track everything you should be tracking in your state object.

I've been toying with an idea of a pattern. I'm curious as to if it has a name. I'll write a blog post once I have an app using it. In the meantime, it's (roughly):

  - No Hooks.
  - Don't try to sync any state. E.g. keep a dom element as the source of truth but provide access to it globally, let's call this external state.
  - Keep all other state in one (root) immutable global object.
  - Make a tree of derived state coming from the root state and other globally available state. (These are like selectors and those computations should memoized similar to re-select)
  - Now imagine at any point in time you have another tree; the dom tree. If you try to make the state tree match to dom tree you get prop drilling. 
  - Instead, flip the dom tree upside down and the leaves get their data out of the memoized global state. 
  - Parent components never pass props to children, the rendered children are passed as props to the parent. 
You end up with a diamond with all state on the top and the root of the dom tree on the bottom.

One note, is that the tree is lazy as well as memoized, there's potentially many computations that don't actually need to be computed at all at any given time.

You need something like Rx to make an observable of the root state, some other tools to know when the external state changes. Some memoization library, and the react is left with just the dom diffing, but at that point you should swap out to a simpler alternative.

The reminds me of the pain I felt seeing how the blacktop was painted at the local elementary school:

They had a 6 x 6 grid with 26 letters, then the digits 1-9, then an extra X to fill in the space left over. :facepalm:

It depends on what you need to do. If you just need to say when something happened (e.g. some log event) then milliseconds since the epoch is fine. If want a user to schedule a reoccurring meeting at 8am on the first Thursday of every month, you can also keep a set of timestamps as milliseconds since the epoch, but you are going to need to do some work to figure out the right numbers correctly.

Not gp, but as an example of what they mean: take a photo at 70mm then at 120mm. You can crop the first photo to be have the same composition as the second, but the resolution will be lower.

(beside your point) but regarding schools: I always view the tax as paying back for _your_ education, yes it's shifted by a generation and not perfect (private schools, immigrants), but it's clear your aren't really "paying for other people's kids", as those kids will grow up and pay taxes themselves.

You never add abstractions until you can’t avoid them.

What would be a case where you would _have_ to add an abstraction? I'd say you probably never have to, but things will get start getting complex.