Better HN
topnewbestaskshowjobs
Log inSign up

thinkharderdev

1,874 karma · joined Jun 12, 2019 (7y ago) · 701 submissions

https://www.thinkharder.dev

[ my public key: https://keybase.io/thinkharder; my proof: https://keybase.io/thinkharder/sigs/Ibpz0COsvz2qYl2K8YfzrhucHf2rcZIxityh5WvYC_k ]

Submissions

comment 2y ago · link · parent

> First of all, there have been several languages that regions in their type system and are still backed by GC, so this is a strawman

Is it? He's not claiming that GC somehow makes it impossible to have strong local reasoning. He's just saying that, for whatever reason, the designers of most languages have made choices contrary to that goal. Which seems obviously true to me. Counter-examples exist of course but looking at the mainstream GC'd general purpose programming languages (Java, C#, Python, etc) it is true.

> Third, the whole point of static types is to slice apart the heap into independently non-aliasing parts using this technology called "classes" and "fields"

The whole point according to who? "Object-oriented" design means many things to many people and from what I understand the original idea was gesturing at something that we would now call the "actor model" which legitimately does try and carve up the heap into non-aliased, owned data structures which can only be mutated through message passing, but OO as it is actually implemented in the real world seldom even approaches those original goals. And languages like Java do nothing to prevent you from storing mutable references to the same object in multiple different objects. This is drawn out more eloquently than I am capable of doing in this post https://without.boats/blog/references-are-like-jumps/

comment 2y ago · link · parent

> ‘Secondhand smoke’ is not actually a thing which has an effect. It’s a propaganda term which ought to be avoided. Old folks today — i.e., the ones who look so much younger than old folks a generation ago — spent their childhoods and adulthoods absolutely surrounded by cigarette smoke, and smoking bans came in far too late to have an effect this recently. Compare never-smoking Boomer children of heavy smokers today to never-smoking Boomer children of non-smokers: there’s no appreciable difference.

Color me skeptical for a few reasons:

1. From what I understand the negative effects of air pollution more generally are pretty well documented at this point. Cigarette smoke is just one more source of particulate matter in the air which has those ill effects. Just one that was perpetually present at (more or less) all times everywhere.

2. Complete smoking bans are relatively new (although in some places going on 30 years old at this point) but restrictions on where you could smoke happened more gradually. Also the amount of smoke being inhaled by non-smokers is a function of how many smokers there are as well of rules about where you can smoke. The percentage of adults who smoke peeked in the early 1960s and started declining more rapidly in the early 1970s.

comment 2y ago · link · parent

It is not required that your connection has been MITM'd. The service you are authenticating can accidentally log the plaintext password, they can store it with an insufficiently secure hash function or not salt it. A malicious browser extension can scrape it directly from the input form. Etc, etc, etc.

Passwords are reasonably secure since we've been using them for a long time but there is in fact a huge chain of trust required to keep them secure and links in that chain frequently break.

comment 2y ago · link · parent

Gruelingly hard and unhealthy lives. Until relatively recently there was a very high likelihood that you were either a heavy smoker or lived most of your life inhaling a lot of secondhand smoke. There was also a boom in alcohol consumption in the post WW2 western world that lasted into the 1990s.

comment 2y ago · link · parent

In the United States at least both scenarios you mentioned are illegal. Market makers are not just sitting in the middle of orders. They buy without a seller lined up and then fill orders from their own inventory (or route orders to an exchange in the case where they can't fill a buy order from their own inventory). In cases where they route to an exchange they are required by law to fill the order at the lowest price available. Typically they fill orders at better prices than what you can get on an exchange. So you, as a retail investor, are actually getting better prices than you would if your broker just filled orders on an exchange.

How the price improvement gets allocated is complicated. Some of the price improvement goes to the broker (in the form a payment-for-order-flow) and some goes to the actual investor (you). But in either case the retail investors are strictly better off.

comment 2y ago · link · parent

> S3 is not even files, and definitely not a filesystem.

I agree. To me the correct analog for S3 is a block storage device (a very weird one where blocks can be any size and can have a key associated with them) and not a filesystem. A filesystem is an abstraction that sits on top of a block storage device and so an "S3 filesystem" would have to be an abstraction that sits on top of S3 as the underlying block storage.

comment 2y ago · link · parent

> And don't optimize without measuring

This is of course excellent advice

> Make it work, make it pretty, make it fast

While I agree somewhat with the sentiment, I dislike the implication that "fast" is somehow not relevant to whether something "works"

comment 2y ago · link · parent

Not sure, but I recently came across xorsat filters (https://eecs.ceas.uc.edu/~weaversa/XORSATFilters.pdf). It's not a great replacement for bloom filters in many use cases because they are not modifiable but have some other interesting properties:

1. They are very close to the information theoretic minimum needed to encode the information so are more space-efficient than bloom filters or cuckoo filters.

2. They have a natural way to store metadata (at the cost of additional space of course) so you can associate a few bits of metadata with each set bit at pretty reasonable space cost.

comment 2y ago · link · parent

Off the top of my head

* The Haber-Bosch process (for creating synthetic fertilizers)

* Fracking (strictly in terms of the promise to unlock previously un-usable petroleum reserves, whether or not that's a good thing depends on how climate change affects humanity in the longer run)

* Solar cells

* Penicillin (and antibiotics more generally)

* Vaccines in general

* mRNA vaccines in particular (maybe too early to tell, we'll see if the COVID vaccines were a one-hit wonder)

* Semaglutide (again, maybe too early to tell)

comment 2y ago · link · parent

> So it's good to keep the purpose of type-systems in mind while thinking about their benefits. We declare types only so that we and others can better understand what our programs are doing.

I don't agree with this. Part of the benefit of static types is to make it easier for programmers to reason about programs. But part is also to make it easier for compilers to reason about programs. By encoding more invariants in the type system it is possible to turn a larger class of bugs into compiler errors.

comment 2y ago · link · parent

My (uninformed) guess would be that approximately 0 of these layoffs we because of AI. If anything the recovery in tech stocks partly due to AI hype prevented a lot more layoffs at big tech companies.

comment 2y ago · link · parent

Sure, I agree that they should have been more explicit when they discontinued the service and said that they would delete data over the new limit at some point. But I don't think you have to be an HN reader to understand that if you stop paying for a service eventually the service provider will stop providing it. Like did this guy really think that the data would just stay in "read-only" mode forever?

comment 2y ago · link · parent

> That shouldn't exempt them from holding up their agreements from when they were still competing for market space.

What agreement? They offered a service with no guarantees that it would be provided in perpetuity. If they offered "free unlimited storage for life" and then backed out of that based on some legalese on page 75 of their EULA then I agree that would be slimy. But that is not what happened here.

> they are able to momentarily drive their prices down, eat the losses long enough to run their competition out of business

This can happen and when it does it is anti-competitive. But that is not what happened in this case. Do you really think that Google thought they could drive AWS and Microsoft out of business with below cost storage on Google Drive? Seems unlikely. And even if they somehow managed to do that, they would immediately have competitors undercutting them on price again as soon as they raised prices enough.

What seems much more likely to me is they offered unlimited storage as a competitive feature of Google Workspace thinking it would still be profitable even with some customers using much more storage. But because we can't have nice things a bunch of people realized they could essentially use the unlimited plan as an ultra-cheap object storage service and were storing 100s of TB of data. Rather than raise everyone's prices to subsidize bad actors, it seems much more reasonable to just discontinue unlimited storage.

comment 2y ago · link · parent

> raised prices when those competitors folded

This part only works if you don't have other large competitors. But this obviously not the case for cloud storage. It is an extremely competitive commodity product.

> bad for consumers

How exactly is it bad for consumers to get products below cost?

comment 2y ago · link · parent

It's not abuse to store the data in an unlimited plan to begin with. But once the unlimited plan is discontinued, continuing to store the data there without paying for it does seem like abuse to me.

comment 2y ago · link · parent

What is bad about the situation exactly? You get a service for below cost for some amount of time at which point you have to start paying what it actually costs. I can understand if the company manages to corner the market by selling below cost and then jacks up the price way above cost, but cloud storage is still an extremely competitive market and generally quite a bit cheaper than the cost of storing an equivalent amount of data on your own hardware (with the same availability)

comment 2y ago · link · parent

I don't understand why people are stuck on the term unlimited here. It wasn't like he still had an unlimited plan but Google said "you are using too much data so we're going to delete it". They discontinued the plan so as of now he does not have an unlimited storage plan. I don't understand why this is complicated. Seems like he can either pay whatever it costs to store 237TB in Google Drive (probably a lot) or he can migrate to another storage provider. If he wasn't willing to pay whatever the cost for Google Drive is he should have started migrating his data when they discontinued the service.

comment 2y ago · link · parent

Unlimited did mean unlimited though. There was probably some sort of limit but this guy never in fact hit it. But Google stopped offering unlimited storage (probably because of people like this who would store 100s of TB). They notified him of this months before discontinuing the service and he apparently made no effort to find a different storage solution, maybe because it would be really expensive to store that much data in the cloud anywhere else. Did he think they would just continue to store the data indefinitely? That doesn't strike me as a reasonable assumption to make.

comment 2y ago · link · parent

To take a very simple example (which won't work on modern OS with ASLR):

1. You have a service that takes some user input

2. The service allocates a buffer on the stack for 20 bytes (the max input allowed)

3. Service doesn't actually validate that the user input is < 20 bytes

4. It writes the input into the buffer, but keeps writing past the end of the buffer.

5. It eventually overwrites the return pointer so now the user input can control where the execution jumps to on return

6. In the user input, the malicious user includes some shell code to do any arbitrary thing they want.

7. The overwrite the return pointer to jump back into the shell code and now they are executing arbitrary code in the server process.

This sort of thing was embarrassingly easy to do on old linux kernels before ASLR was implemented. Now it is dramatically harder because there are all sorts of countermeasures in place to prevent it (ASLR, stack canaries, executable vs non-executable memory, etc).

To get a sense of what a more modern real world exploit looks like, give https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i... a read.

comment 3y ago · link · parent

I have no idea, but I assume that if they get hacked they are liable for that. If the ETF is run by Bob's Bitcoin ETF incorporated in the Virgin Islands then that's not worth anything because there are no other assets to cover losses. But if it's BlackRock (or some other large US money manager) then they have plenty of other assets to pay out.

comment 3y ago · link · parent

To be honest, I wish the authors hadn't framed their idea on property taxes because there are a lot of obvious practical and political issues with doing it. And I don't personally think this would be a good way to do property taxes on owner-occupied housing. I only brought it up originally because I think a lot of issues with it are irrelevant when applied in the domain of intangible economic assets like patents. In that particular domain I think the overriding principle of intellectual property law should be to maximize economic efficiency.

comment 3y ago · link · parent

The comments here have been very focused on the case of implementing some system like this for housing (which to be fair was the example the book used), but as I said in the original comment, I actually don't think this is a workable or desirable system for property taxes on owner-occupied housing for roughly the reasons that you dislike it. Someone's home is not just some financial asset and economic efficiency is not the only important consideration in society.

I brought it up specifically in this context (and article about patent litigation) because I think it is potentially a good idea in some domains (like patent law) where the overriding consideration should legitimately be economic efficiency. I think it is entirely reasonable to design our intellectual property rights around the idea that the person or firm that can derive the most economic value from any piece of IP is the most desirable owner of that IP.

comment 3y ago · link · parent

> Why wouldn't I just declare it to be $1

You can but them someone will immediately offer to buy it and you would have to raise the declared value until they stopped trying to buy it (ie to the actual market value). Presumably you would also not be allowed to just immediately lower the declared value again after. Or maybe buyers can make "standing" offers that are valid for 1 year so you can't change the declared value while there is an outstanding offer for more than that.

> The whole point of the idea is that you're required to sell it for the listed price

I would phrase it differently. The point is create conditions such that the equilibrium declared value is aligned with the market value. And more generally, to try and ensure assets are allocated to their highest value uses.

However, I actually don't think this is a workable system for owner-occupied housing for all sorts of practical and political reasons. I brought it up in the context of patents because I think it does make sense for intangible, yet hard to value corporate assets like patents. Ideally you want patents and other IP to be owned by whoever can get the most value out of them.

comment 3y ago · link · parent

I think we agree. It would be interesting to see a system like this applied to specific domains like IP and patents.

comment 3y ago · link · parent

That is nuts. I wish the assessors in my state were that incompetent :)

comment 3y ago · link · parent

> You have to live under constant threat of a whale, e.g. Blackrock, swooping in and offering marginally above (market + e), forcing you to sell

They can't force you to sell, you have the option of just updating the declared value to the new market price.

But I brought this up initially in the context of patents because I don't think this would actually be a practical or politically palatable way to handle property taxes on owner-occupied housing. But when we're talking about intangible corporate assets like patents most of these problems go away (IMO).

comment 3y ago · link · parent

> Then it's vulnerable to malicious buyers putting in fake bids

TBH that seems like the easiest issue to solve. For instance, to make an unsolicited bid you have to escrow %20 of the price. If the owner chooses to updated the declared value, you get that back. But if they choose to sell and you walk away (or don't actually have the other %80 to complete the sale) then you forfeit that to the owner. Or you can even disincentivize "malicious" offers more by saying that if the owner chooses to update the declared value then you still forfeit the escrowed cash but it goes to offsetting the increased tax bill for the current owner.

comment 3y ago · link · parent

Maybe practical is the wrong word, but I think it would be politically untenable if applied to houses. And the only way to make it politically tenable would be to add so many exceptions and loopholes that it wouldn't substantially change anything. Like if you just excepted owner-occupied housing you would already have exempted most of the housing stock in the United States. And if you didn't except all the owner-occupied housing, what is the political message exactly? "We want to kick you out of your house or raise your property taxes so property developers can make more money!" Like I get intellectually why that may be desirable but it strikes me as a tough sell to the voting public.

comment 3y ago · link · parent

The original thought experiment is not really about extracting maximum tax revenue (the overall level of taxation is pretty orthogonal to how you assess and collect taxes) but more in the spirit of how to promote more efficient allocation of resources in economic terms. Think of it as a Pigouvian tax on inefficiency.

comment 3y ago · link · parent

But for that to work you have to actually be willing to buy at $100. So you can come along and try and buy my house for 2x the market rate, but then I can just sell it to you and you're screwed.

Of course in the real world there would need to be some way to prevent "predatory" offers (where the "buyer" can't or won't actually close the deal if you accept the offer) but that seems solvable to me. You may have to put down a non-refundable deposit or escrow the sale price, etc.

1
456
24