HNHacker News
TopNewBestAskShowJobs

derf_

2,803 karma · joined July 22, 2012

submissionscomments
derf_··on DHS removes all members of cyber security advisory boards, halts investigations
> ...even if it's grouped somewhat incongruously under Department of Homeland Security.

DHS is arguably a much more appropriate home for the Coast Guard than its previous department, Transportation, given all of the facets of their actual mission (source: father and grandfather both in the Coast Guard for 30+ years).

derf_··on Is the world becoming uninsurable?
> it’s ok if insurance is expensive - let it result in the insured goods or services having a serious price adjustment.

Long term, sure. In the short term, the rapid rise of housing prices combined with the increased rates and severity of disasters means the extra monthly cost would be enough to price a number of people out of homes they purchased when rates were much lower. While it's easy to say, "They should just move," that has huge transaction costs. Aside from the obvious things, which are already substantial, consider the cost of paying off a mortgage taken out a few years ago and acquiring a new mortgage at current interest rates. That can cost you hundreds of thousands of dollars (which shows up as now only being able to afford a much worse house, probably in a much worse location, if you can continue to afford to own at all), and you are basically gifting that money to the bank by paying off your loan early.

You can understand why such people would be willing to take a chance on not having insurance rather than incur a definite loss, and why it might be tempting to try to come up with some other solution than just unleashing the unrelenting might of the free market on them.

derf_··on Sub-pixel distance transform (2023)
If you do not need to handle gray-level inputs, but still want a signed distance transform without a step from 1 to -1 across the boundaries, some years ago I wrote a clever bit of 80's style C code which is O(N), has lots of 1-letter variable names, and is very CPU cache friendly that solves this problem:

https://people.xiph.org/~tterribe/notes/edt.html

The resulting code (linked at the end of the page) is a bit more complicated than the standard distance transform, but only by a modest constant factor.

derf_··on Pat Gelsinger was wrong for Intel
> Also, how did Blackrock get so wealthy so fast? They've only been around since 1988.

It is not their money. They have roughly $11.5 trillion of assets under management, but their market cap is only $161.5b (on net income of about $6b). Compare that to xAI, which has existed for less than two years and has a valuation around $50b.

derf_··on Judge's Investigation into Patent Troll Results in Criminal Referrals
A contemporaneous blog post about this case from 2022: https://ipde.com/blog/2022/11/04/a-wild-hearing-chief-judge-...
derf_··on FDIC accidentally reveals the Silicon Valley Bank depositors it bailed out (2023)
On the contrary, the Fed came out and pretty much guaranteed that depositors in any bank will not lose money, regardless of FDIC limits [0]. It was people "assessing their banks' solvency" (all at the same time) that caused the bank run in the first place, and our government appears to want less of that. Instead, they want depositors to treat bank deposits as, well, "money in the bank".

Whether that is a good thing and ultimately healthy for the banking sector is another question, but you can certainly see how at the time they would not want to incentivize any more panic.

[0] https://www.federalreserve.gov/newsevents/pressreleases/mone...

derf_··on Buy payphones and retire
> On the other hand, if everyone had access to this capability then society and civilization would grind to a halt.

On the contrary, everyone does use this capability. It is what makes the concept of "retirement" possible.

You borrow money when you are young and do not have much of value to contribute to society (for education, for purchasing a home, maybe for starting other ventures), you earn money during your productive years to pay those loans back and accumulate wealth (in personal or government retirement accounts, in Social Security or other government plans, in a pension), and at some point you are able to invest or lend or that money to others (or have others do so for you in the case of things like pension funds) and live off of the return, hopefully before you become so infirm you are no longer able to work.

I hope we can agree that allowing people to retire before they die is a net benefit to society. Claiming anyone can do that while they are still young with no risk is where you should start to get suspicious. Why should it be easy to get rich?

derf_··on Automatic Content Recognition Tracking in Smart TVs
> Apropos of nothing, what other country besides the US has a law that specifically prohibits giving a bribe to a foreign government?

Every member of the OECD (including Japan and South Korea) and 8 more countries besides [0]? At a minimum.

[0] https://en.wikipedia.org/wiki/OECD_Anti-Bribery_Convention#M...

derf_··on Senate Vote Tomorrow Could Give Helping Hand to Patent Trolls
> (As I understand it, every reputable Ph.D.-granting institution requires the candidate to do a literature search to demonstrate novelty.)

It is also worse than that, because for most dissertations, your committee is generally going to be more widely-read than the candidate, and have discussed the topic with them for years. Although the candidate may have more specific knowledge by the time they are finished writing the dissertation, the committee is going to have much broader knowledge of the field in general, and is pretty likely to be aware of the relevant prior art anyway.

A closer analogy would be saying the Ph.D candidate must be issued the degree unless a randomly chosen undergraduate can show the research wasn't sufficiently novel.

derf_··on Compression Dictionary Transport
> I wonder what percentage of http traffic is redundant compression dictionaries. How much could this actually help in theory?

A lot of times you will send a (possibly large) blob of text repeatedly with a few minor changes.

One example I've used in practice is session descriptions (SDP) for WebRTC. Any time you add/remove/change a stream, you have to renegotiate the session, and this is done by passing an SDP blob that describes all of the streams in a session in and out of the Javascript Session Establishment Protocol (JSEP) API on both sides of the connection. A video conference with dozens of participants each with separate audio and video streams joining one at a time might require exchanging hundreds or even thousands of SDP messages, and in large sessions these can grow to be hundreds of kB each, even though only a tiny portion of the SDP changes each time.

Now, you could do a lot of work to parse the SDP locally, figure out exactly what changed, send just that difference to the other side, and have it be smart enough to patch its local idea of the current SDP with that difference to feed into JSEP, test it on every possible browser, make it robust to future changes in the SDP the browser will generate, etc.

OR

You could just send each SDP message compressed using the last SDP you sent as the initial dictionary. It will compress really well. Even using gzip with the first ~31 kB of the previous SDP will get you in the neighborhood of 200:1 compression[0]. Now your several-hundred kB SDP fits in a single MTU.

I'm sure WebRTC is not the only place you will encounter this kind of pattern.

[0] Not that either gzip or using part of a document as a dictionary are supported by this draft.

derf_··on Nasir Ahmed's digital-compression breakthrough helped make JPEGs/MPEGs possible
Probably every video coding standard published after c. 2012 has some version of it in its toolbox (including VP9).
derf_··on Nasir Ahmed's digital-compression breakthrough helped make JPEGs/MPEGs possible
Technically, AV1 also uses Hadamard in the lossless modes.
derf_··on Nasir Ahmed's digital-compression breakthrough helped make JPEGs/MPEGs possible
A DST is optimal when the variance of the signal you are compressing grows linearly (as opposed to the DCT, which is optimal for uniform variance). That happens, for example, when you have a prediction on one side (e.g., intra prediction in image compression) and you are coding the prediction residual. The farther you get from the source of your prediction, the less accurate it is likely to be. Block-based motion compensation prediction residuals in video coding are also not uniform: the prediction error is higher at block edges than the block center, so a DST sometimes works better (e.g., when using a transform size smaller than the motion compensation block size).

So still useful for compression, just in more specialized circumstances.

derf_··on 'Kafkaesque': bank blocks cash transfer, saying it could be an AI scam
This is a great reason to not put all of your financial eggs in one basket. You hear stories around here all of the time about people's businesses being ruined by Google's automated abuse systems and lack of customer support. There might only be one Google, but there are a lot of banks. They might all have similar policies, but at least it is less likely they will all try to screw you over at the same time.

If you have rainy-day savings for at least six months of expenses (as everyone is advised to do), there is no reason you cannot split those up.

derf_··on How I Program in 2024
> Well obviously, you just write tests for the tests. :3

I had a friend whose first job out of school (many years ago) was part of a team at Intel assigned to write tests for their testing tools. When it matters enough economically, it will happen. As you can see from recent news, that is still not enough to guarantee a good result.

derf_··on Parasites are everywhere. Why do so few researchers study them?
At the Meguro Parasitological Museum [1], they have an 8 meter long tapeworm [2] extracted from a human. Yes, that is an extreme example and still less mass than a person, but they can get large.

[1] https://www.kiseichu.org/e-top

[2] Visible in the tall blue case here: https://static.wixstatic.com/media/079dcd_843c7597ef244423aa...

derf_··on Majority of sites and apps use dark patterns in the marketing of subscriptions
I have a very simple approach to evaluating if a subscription is worth it: I multiply the price by 20 times the annual cost [1]. If it is monthly, that is 240 times. If that is too hard for quick mental arithmetic, 250 is pretty close (divide by 4, multiply by a thousand). $12/month? That is almost $3000. It may seem extreme, but it's not. That is the real cost to your wealth over time.

[1] Net present value [2] of all future payments with a 5% discount rate. 5% is not scientific or anything. This is just a rule of thumb.

[2] https://en.wikipedia.org/wiki/Net_present_value

derf_··on ID verification service for TikTok, Uber, X exposed driver licenses
> PayPal used two small (less than $1) transactions and the verification that I own the bank account was verified by correctly identifying the two transaction values.

Based on my experience with (non-PayPal) financial institutions in the past year, this is going away. For now, it appears you can still force them to fall back to this when providing your login credentials does not work, but who knows how much longer.

derf_··on Show HN: High-frequency trading and market-making backtesting tool with examples
> All of this is publicly visible and opens a lot of opportunities to harvest slippage etc. (lookup MEV-bots)

Basically, people can front-run your trades, and this is built into the market by design. Also, instead of the winner being the fastest like in tradfi, there is a competitive auction where participants pay for priority. See, e.g., https://archive.ph/W0nvi or pages 7...9 of https://assets.ey.com/content/dam/ey-sites/ey-com/en_us/topi... for examples. Even if you are not the one doing the front-running, you have to be aware that someone else will be.

To make it more exciting there are also implementation bugs: https://archive.ph/9w32t

derf_··on Almost half of Dell's full-time US workforce has rejected the company's RTO push
Management is usually heavily compensated via the stock of the company they are managing, precisely to align incentives and overcome conflicts of interest like that.
derf_··on The Rate of Return on Everything, 1870–2015 (2019)
The continental US is 8.08 million km^2 [0], while Europe is 10.18 million km^2 [1], almost 26% larger. Even adding the non-contiguous regions does not make the US bigger (still just 9.83 million km^2) [2].

[0] https://en.wikipedia.org/wiki/Contiguous_United_States

[1] https://en.wikipedia.org/wiki/Europe

[2] https://en.wikipedia.org/wiki/United_States

derf_··on What makes gambling wrong but insurance right? (2017)
> It's true that the buyer has negative expected value money wise and the seller positive one...

This is obviously the insurer's goal, but in practice competition and relaxing underwriting standards to win business means that many insurance companies do not turn an underwriting profit (the buyer winds up with a positive expected value). But premiums are paid up front and payouts to policy holders do not occur until later, and the insurer can invest the "float" in the meantime, so they still make money.

Obviously the customer could have taken the premiums and invested them themselves, but that also takes time and effort, and may come with risk itself. It is not obvious that insurance is a bad deal even ignoring arguments about the concave nature of the utility of money.

derf_··on Michelle's List: A free, anonymous landlord review site
It is less about any of the terms being individually outrageous, the point is more that there are sixty-three pages of them.

They were clearly boilerplate forms, from several sources (hence the overlap and contradictions), "If any terms of this Addendum conflict with the Lease, the terms of this Addendum shall be controlling," etc., 6 documents and 20 pages after some other terms on the same subject. I claim to have read it, but I make no claims about having understood it.

There is an asymmetry of resources here that gives a large property management company a lot of ability to make your life unpleasant (and rent control gives them a good reason to want to). By the time you end up in court you have already lost.

derf_··on Michelle's List: A free, anonymous landlord review site
My last lease in California consisted of 24 documents and addendums totaling 63 pages of dense legalese. Some of those were disclosures required by California law, but most were putting obligations on me (sometimes overlapping and contradictory). I might have been the only tenant there to actually read them every year (they changed every time). If a landlord can find any breach of those terms they can give you just 3 days to fix it before they give you a notice to vacate (giving you just another 3 days to move out). For a professional with a full-time job, some problems just cannot be fixed in 3 days.

Sure, it's not "at-will" and you can fight it, but it sure does feel lopsided if you can be told at any moment to find another place to live in one week for any one of a host of reasons you "agreed" to that change constantly.

derf_··on Cancer vaccines are having a renaissance
Yes. "Cancer" is over 100 different diseases, all with different pathologies: https://en.wikipedia.org/wiki/Cancer#Research
derf_··on Google Earning Q1 2024 [pdf]
According to https://www.sec.gov/ix?doc=/Archives/edgar/data/0001652044/0... their stock-based compensation expense was $15.539b in 2023 (and actual repurchases were $2.324b).
derf_··on Microsoft is a national security threat: ex-White House cyber policy director
From my time working in defense contracting, quite a lot of the software was open source, built on open source components (just like everything else) or even hosted on official military GitHub repos. Code written by the (federal) government itself cannot even be copyrighted (in the US). Obviously you are not going to find the classified stuff on GitHub, but even there it was very common for the government to take all of the source code from one contractor and hand it to another one to work on. You also design your systems so that as much as possible can be unclassified, because unclassified development is much, much easier.
derf_··on 10 > 64, in QR Codes
A slightly more common way to express "field of view" is "module pitch", measured in pixels between adjacent module centers. I went back and tried to express the numbers from Figured 6 as a module pitch, and I think it works out to around 1.6 pixels / module. IIRC, the QR code standard recommends a module pitch of at least 4 pixels. So it is nice that ZBar is able to do around 2.5x better before running into issues (a margin that is a lot bigger than the gains from higher EC levels).

In theory there could still be room for improvement. Right now ZBar estimates finder and alignment pattern locations to quarter-pel precision, but rounds each module location to the nearest pixel so it can sample a binarized version of the image to decide the value of that module. At the extreme limits of small module pitch this effectively turns the resampling filter in whatever you are using to resize your QR code image into a nearest neighbor filter. You can see why that would start to cause issues. Imagine a version 7 code (45x45 modules) sized to be 80x80 pixels. Most of your columns will be 2 pixels wide, but with binarization, somewhere in there you have to have 10 columns that are only 1 pixel wide. Good luck lining up your grid to hit all of them perfectly (without looking at the timing pattern, which would likely only help in the perfectly axis-aligned case). Some kind of sub-pixel integration of the original image before thresholding to decide each module value could probably do better. That would make decoding a lot more computationally expensive, though.

derf_··on 10 > 64, in QR Codes
That was a nice read.

> I also tested only one background image, so the behaviour may differ greatly with QR codes contained in different surrounds.

This likely does not matter much. It could theoretically affect binarization near the edges of the code (near module boundaries, depending on how you did the resizing), but in practice as long as the code itself is high-contrast, this is unlikely. The more usual issue is that real images often do not have a proper quiet zone around the code, but that is mostly going to be irrelevant for what you are trying to test here.

> The QR codes are generated to be perfectly rectangular and aligned to the image pixel grid, which is unlikely to happen in the real world.

This is a much bigger deal. A large source of decoding errors for larger versions (for a fixed "field of view") is due to alignment / sampling issues. A lot of work goes into trying to find where the code is in the image and identify the grid pattern, and that is just inherently less reliable for larger versions, particularly if there is projective distortion (so the module size is not constant). The periodic alignment patterns try to keep the number of parameters that can be used to fit this grid roughly constant relative to the number of modules in the grid, but locating those patterns is itself error-prone and subject to false positives (they are not nearly as unique-looking as finder patterns), and the initial global transform estimate has to get pretty close for them to work. I am actually happy that damaging these was not causing you more trouble. This is definitely somewhere that ZBar can be improved. It currently does not use the timing patterns at all, for example. I'm not actually aware of an open-source QR decoder that does.

(I'm the original author of ZBar's QR decoder)

derf_··on Why Ireland's housing bubble burst
One of my friends started a website called "The Mortgage Lender Implode-O-Meter" to track all of the mortgage lenders going bust... in 2006. It is worth remembering that cheap credit with adjustable rates is what fueled that bubble and what made it unsustainable. A lot of the world (including Ireland) floats rates after the first 5 years of a mortgage.

Whereas in the US, anyone with a pre-2022 30-year fixed-rate mortgage now has a massive paper profit due to interest rates going up that can only be realized by slowly making their required payments. That gets vaporized instantly if they sell and pay off the mortgage.

← PreviousPage 5 of 17Next →