Better HN
topnewbestaskshowjobs
Log inSign up

patrickthebold

1,165 karma · joined Dec 2, 2015 (10y ago) · 370 submissions

Submissions

comment 1mo ago · link · parent

I think the way that the bits are counted is based on the pool from which the number was randomly drawn. So it's possible they had 256 bits of entropy but got really unlucky.

comment 2mo ago · link · parent

What do you mean that JSON is not "streamable"?

There are things like https://www.baeldung.com/jackson-streaming-api but maybe there's more in you definition of "streamable" that JSON doesn't satisfy.

comment 3mo ago · link · parent

Unlikely. The digital signatures bitcoin uses are regarded as secure, (there could be attacks if we get quantum computers.) The issue here was the software didn't put in enough randomness when generating the keys, and so it was straight forward to search the small space of keys the wallet would generate.

It's not so different if you encrypted a file with a weak password and someone guessed it—you don't need stronger encryption, you need to pick a better password.

The proof of work part of bitcoin is really for "consensus", so everyone agrees which transactions happened in which order, this attack didn't affect that part at all.

comment 3mo ago · link · parent

Is that a reference to https://www.kohlerhealth.com/dekoda/?

comment 4mo ago · link · parent

JSON String requires escaping of control characters. .toString() on a String is (hopefully) the identity.

comment 6mo ago · link · parent

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?

comment 7mo ago · link · parent

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.

comment 7mo ago · link · parent

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.

comment 7mo ago · link · parent

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.

comment 8mo ago · link · parent

Reminds me of this quote which I recently found and like:

> look, I'm sorry, but the rule is simple: if you made something 2x faster, you might have done something smart if you made something 100x faster, you definitely just stopped doing something stupid

https://x.com/rygorous/status/1271296834439282690

comment 8mo ago · link · parent

Yes, I really wanted to post the comment and I (wrongly) thought this post got blocked by my procrastination setting. Apologies for the noise.

comment 8mo ago · link · parent

I happen to just stumble across this article https://felixbarbalet.com/simple-made-inevitable-the-economi... extolling the virtues of Clojure. It specifically calls out Go for not being simple in the ways that matter for LLMs.

I've no idea myself, I just thought it was interesting for comparison.

comment 10mo ago · link · parent

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.

comment 1y ago · link · parent

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

comment 1y ago · link · parent

of course 9.99...(repeating) is mathematically 10, so I have a hard time being against allowing that.

comment 1y ago · link · parent

Half a quarter.

comment 1y ago · link · parent

Is gas sold as a whole penny amounts in those locations? Where I am it's always something and 9/10ths of a cent.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

One thought I had recently: Their shareholders are probably mostly the same people. So why even compete?

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

Reminds me of the Jonathan Richman classic: https://www.youtube.com/watch?v=Y6Pg9IGgQpY

comment 1y ago · link · parent

Is .git-blame-ignore-revs what you are looking for?

comment 1y ago · link · parent

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:

comment 1y ago · link · parent

Source?

comment 1y ago · link · parent

In the past, I had always had a distaste for 'stringy' data, always preferring more structure (e.g objects). Once I learned about parsers, I realized you can still have structure in a string.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

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