Hacker Newsnew | past | comments | ask | show | jobs | submit | kibwen's commentslogin

> But for decades, the American market has not been free.

The grand, boneheaded naivete to fail to understand that middlemen are an emergent and intrinsic property of free markets in practice.


Antitrust legislation used to be very effective at dealing with this sort of stuff. These laws were designed to put an end to the gilded age (Standard Oil in particular), and accomplished what it set out to do.

Though Ronald Reagan dared asked what nobody else thought to ask, "what if monopolies ... good?", so now we're back with a new set of Morgans and Vanderbilts.


Sometimes the real market failure is just that a market exists at all.

Like, in some really fucked up neoliberal hellscape it might make sense to charge money for reservations separately, but that introduces all sorts of extra new inefficiencies that weren't there before. Like, now that reservations can be bought and sold, it's now legal, possibly moral, and most notably, profitable to hoard them. And since reservations are a derivative on the underlying capacity of a restaurant, you're going to have tables that are "reserved" but unused because the "owner" of that reservation happened to sell it on to a third-party vendor that's now trying to hike the price to last-minute diners.

Meanwhile, the actual restaurant trying to sell food, can't sell food in their own restaurant, because their salesfloor is full of empty tables that are worth more to the market dead than alive. They are undergoing demand destruction as they are involuntarily transformed from a food vendor into a landlord of tiny plots of real estate whose desirability has long since been detached from any surrounding circumstances.

The argument for markets is that unregulated commerce is very good at calculation. Or, more specifically, that price discovery is the process of putting bounties on better information than is currently available. The flipside of this is that everything around the market needs to be regulated or you're calculating garbage into garbage.


> I tested it was working by counting the bits and someone critizised it for not using popcount

PSA: Rust exposes the popcnt intrinsic via the `count_ones` method on integer types: https://doc.rust-lang.org/std/primitive.u32.html#method.coun...


Looks like that was added about 3 years after I wrote my test code.

I would expect a CRC to add a negligible number of lines of code. The reason that production-grade decompressors are tens of thousands of LOC is likely attributable to extreme manual optimization. For example, I wouldn't be surprised if a measurable fraction of those lines are actually inline assembly.

True. A most basic CRC implementation is about 7 lines of code: (presented in Java to avoid some C/C++ footguns)

    int crc32(byte[] data) {
        int crc = ~0;
        for (byte b : data) {
            crc ^= b & 0xFF;
            for (int i = 0; i < 8; i++)
                crc = (crc >>> 1) ^ ((crc & 1) * 0xEDB88320);
        }
        return ~crc;
    }
Or smooshed down slightly (with caveats):

    int crc32(byte[] data) {
        int crc = ~0;
        for (int i = 0; i < data.length * 8; i++) {
            crc ^= (data[i / 8] >> (i % 8)) & 1;
            crc = (crc >>> 1) ^ ((crc & 1) * 0xEDB88320);
        }
        return ~crc;
    }
But one reason that many CRC implementations are large is because they include a pre-computed table of 256× 32-bit constants so that one byte can processed at a time. For example: https://github.com/madler/zlib/blob/7cdaaa09095e9266dee21314...

With C++20 you can use consteval to compute the table(s) at compile time from template parameters.

That's java code, though... bit weird, esp. i % 8 (which is just i & 7). The compiler should be able to optimize it since 'i' is guaranteed to be non-negative, still awkward.

Java CRC32 nowadays uses intrinsics and avx128 for crc32.


Doesn't need to be inline assembly, just pre-encoded lookup tables and intrinsics-based vectorized CRC alone will add quite a lot of code. Most multi-platform CRC algorithms tend to have at least a few paths for byte/word/dword at a time, hardware CRC, and hardware GF(2) multiply. It's not really extreme optimization, just better algorithms to match better hardware capabilities.

The Huffman decoding implementation is also bigger in production implementations for both speed and error checking. Two Huffman trees need to be exactly complete except in the special case of a single code, and in most cases they are flattened to two-level tables for speed (though the latest desktop CPUs have enough L1 cache to use single-level).

Finally, the LZ copy typically has special cases added for using wider than byte copies for non-overlapping, non-wrapping runs. This is a significant decoding speed optimization.


Yes, there's subdirs with language bindings for many non-C langs, an examples folder with example C code, win32 specific C code, test code, etc.

More reasons it's an odd comparison.


The mere existence of proof-of-work cryptocurrencies means that it is impossible to ever have electricity that is "too cheap to meter". Any time electricity prices would fall below the price of mining, that creates a market opportunity that will be filled by more mining. Wasted electricity is the product.

I'm shocked there isn't more government regulation about this. You can't ban Bitcoin, but if you make it a massive pain to invest in it and make it difficult to convert between physical currency that would drive down a lot of demand.

I think that's only because electricity is the bottleneck, though. If it was no longer the bottleneck, crypto miners would expand rapidly with more hardware, mining difficulty would increase, and eventually the bottleneck is storage space for all your GPUs, if not the GPUs themselves.

The Rosenbergs weren't spies, they were entrepreneurs providing an essential service to the nuclear proliferation industry!

> I prefer prediction markets to gambling because the platform isn't the bookmaker.

Just because you prefer poker to slots, that doesn't suddenly mean that poker isn't gambling.


Slots have odds which change throughout the day and are usually (on average) pretty bad. In Poker, you play against other players, not the house. There is a rake which is very minor when compared against the average returns against other players.

They are fundamentally different. In slots, you bet against the house, in poker you bet against other players. So slots are gambling in the traditional sense. Poker however is no different than buying a house. There is still a house fee in both cases and in both cases you are betting against other people. And in poker, new players can enter and inject capital just like the housing market. You going to ban buying houses next? You can't eliminate risk from life.

You are basically trying out outlaw luck and randomness at this point.


I'm not trying to outlaw anything. I'm trying to make gambling addicts stop delusionally coping when it comes to "predictions markets" and just admit that they're gambling.

poker and slots are two very different variants of gambling. Sure, there is plenty of chance/variance in poker but there is an undeniable skill component that is lacking in slots.

The one that really infuriates me is blackjack where - if you apply skill by counting cards - you get kicked out of the casino.

This has always been the case for most high-stakes gambling. The problem isn't winning big, the problem is getting the counterparty to pay. Skilled gamblers (when it comes to games with any skill component) throughout history have been adept at winning subtly and then moving on before anyone figures out they have an edge.

Where did I say it wasn't gambling. I said prediction markets are preferable to sports books like DraftKings. I don't like either personally but its an important distinction

The long operating life of a solar panel compared to a barrel of oil is a selling point when it comes to self-sufficiency. With 20 years of warning, any country that pretends to be a globally-relevant power can get itself to the point of producing acceptable solar panels if its survival depends on it.

Stop wasting your life chomping at the bit to do unpaid labor for the sole benefit of megacorps.

What's their supply chain for being restocked with ammo? Is that supply chain susceptible to drone attacks along any part? Then you still lose eventually.

I don’t think so as shotgun shells are cheaper and smaller than drones.

When drones become cheaper then it’s a problem.


> Blow up 100 $ drones for the cost of a 0.50 $ shotgun shell.

Then two drones approach from opposite sides at 200 MPH. Your emplacement costs more than $200 and can only fire in one direction at a time.

Or, as we've seen in Ukraine, once your disposable low-cost drones have precisely identified a high-value, high-effectiveness static emplacement, you send in a cruise missile to clear it out, and then the drones continue sweeping forward.


Drones that can move that fast have extremely little cargo capacity for explosive charges and it's not fast enough to simply use the kinetic energy of the drone for much.

> Then two drones approach from opposite sides at 200 MPH.

A drone that can go 300 km/h is way more than 100 $, you are in the thousands of dollar range at that point. Turret wins if it blows up one.

Also, it could probably blow up more than one since at 300 km/h you would get 0.5 seconds to respond and I was arguing 0.1 seconds per target anywhere in a full 360. 0.25 seconds for anywhere on a full 360 would be enough for 2 and that is within human capability.

> you send in a cruise missile to clear it out

Cool, you sent in a hundred thousand dollar cruise missile to blow up a thousand dollar turret. Turret wins. Also you can put wheels on the turret, so it might not even be there.

Now you are probably going to argue about a drone that goes 1000 km/h at which point what you have is a cruise missile which costs tens to hundreds of thousands of dollars. At that point the entire argument about drones being too cheap to cost-effectively stop is moot.

Or you might argue that the drones just go high. 50 m is a ludicrously low flight ceiling. But then your drone can not explode on contact. You could use a drone that drops explosives, but that still requires flying over the target. High flying drones are easier to detect, and you could counter that with flying shotgun drones or turret mounted machine guns which have ranges in the hundreds to thousands of meters and would still only cost a few dollars of ammo per kill.

My main point is that bullets can easily disable a cheap drone and are much cheaper than a cheap drone. You just need a cost-effective way of deploying mass bullets against mass drones. Logical answers are ground deployments around targets or drones with bullets that cost-effectively shoot down drones without bullets.

You will then likely get into a arms race of fighter drones to protect your bomber drones. And scale up your drones until they are not easily bullet-destroyable. But then your drone costs have likely increased to the point where anti-air cannons shooting 100 $ explosive shells are cost-effective. And so on and so forth.


> Cool, you sent in a hundred thousand dollar cruise missile to blow up a thousand dollar turret. Turret wins.

Nope. The calculus is not about individual components, but about overall cost of the entire system and all of its associated support. What was the material, labor, and opportunity cost to install the turret? What was it protecting (which is now presumably destroyed by drones, or captured by the enemy)? You're also still assuming that you're facing off against guerillas fighting an asymmetrical war on a shoestring budget, but that's not the case. Whatever force you're fighting can be trivially bankrolled by a peer power who is happy to bankroll them to make you bleed to death. China will be happy to build plenty of cruise missiles, and plenty more drones.


The argument is literally that it is problematic to send 100 k$ interceptors to stop 1 k$ drones and then you turn about and argue you can end 100 k$ cruise missiles to stop 1 k$ turrets. Your argument is inconsistent with the entire premise.

You have presented no evidence as to the overall cost of this mystical unstoppable drone swarm. In contrast, we do know that shotguns, machine guns, and bullets are cheap, mass-produced, and mass-deployed by the tens of millions.

The key unknown of my proposal is the bulk cost and production of a small automated turret or fighter drone that can economically and flexibly deploy cheap bullet interceptors to asymmetrically defeat expensive drones. However, the operational requirements for such devices are simple and within the range of existing technology.

There is no clear evidence that cheap explosive drone swarms are magically cheaper than cheap fighter drone swarms or cheap ground drone swarms. It could easily go either way and without a rigorous actual analysis you and I are both unqualified to determine what is actually dominant.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: