Hacker News new | past | comments | ask | show | jobs | submit | zmj's comments login

I implemented rsync's binary diff/patch in .NET several years ago: https://github.com/zmj/rsync-delta

It's a decent protocol, but it has shortcomings. I'd expect most future use cases for that kind of thing to reach for a content-defined chunking algorithm tuned towards their common file formats and sizes.


If you described today's AI capabilities to someone from 3 years ago, that would also sound like science fiction. Extrapolate.


Pretty similar story in .NET. Make sure your inner loops are allocation-free, then ensure allocations are short-lived, then clean up the long tail of large allocations.


.NET is far more tolerant to high allocation traffic since its GC is generational and overall more sophisticated (even if at the cost of tail latency, although that is workload-dependent).

Doing huge allocations which go to LOH is quite punishing, but even substantial inter-generational traffic won't kill it.


"the fucking article"


Everything is an opportunistic carnivore. I once came across a turtle chowing down on a dead frog.


Even trees will take nutrients from animals with a little help from fungal networks:

https://web.uvic.ca/~reimlab/salmonforest.html

https://depts.washington.edu/hortlib/pal/salmon-dna-in-trees... (note, Salmon DNA isn't in the trees, just nutrients, in case you don't read this article).


Apparently cows are happy to eat nestlings if they happen to find a bird's nest while they're grazing.

If you're an animal, there's no food better than meat.


That would only be true if you have the stomach biome to digest and extract the nutrients.

What is the point of eating something that is hard to process and digest and has no nutritional value for you

For herbivores, meat is objectively bad food .


You're wrong. Cows will eat meat, horses will eat meat, pigs will eat meat, chickens will eat meat, deer will eat meat. If they can get it in their mouth, they will eat it.


Mad cow disease didn’t just happen. Though the idea that cows would preferentially eat brain and spinal cord tissue doesn’t seem likely.


Ironically mad cow is one of the rare transmissible diseases that “can just happen” with no external causative agent!

It’s just a misfolding of a protein that starts a chain reaction of similarly misfolded proteins.


Anything can any thing , that is not what I said .

OP implied they like it if they can get it, and is the better food for them , that is not true


It is true. If you prefer grass to birds, you can just go around the birds as you find them. The grass isn't going anywhere.


> pigs will eat meat, chickens will eat meat,

pigs and chicken are omnivorous.


It's plants you need a fancy setup for. Also, the microbiome thing, surprisingly, isn't universal, a lot of animals have no stomach microbiome to speak of.

https://www.theatlantic.com/science/archive/2020/04/animals-...


The point of eating meat is that it's easy to digest. This isn't a case where two things are difficult in different ways and you want to do the thing you're specialized in. Meat is easy to digest, and plants are hard to digest, no matter what.


Most herbivores I’m aware of will at least occasionally eat meat or insects. Even grazers.

I would be kind of surprised if there’s any “true and pure” herbivorous vertebrate.

Meat is rich in nutrients that even herbivores need and is difficult to get entirely from plants.

Vegans are the anomaly.


I don't know but I once watched a deer eat a bird so they clearly have some incentive


I recall a study that identified deer as a major predator of bird nests. I don't recall if it was eggs or young that they went after.

I can't find a reference to the study at the moment.


> For herbivores, meat is objectively bad food .

We feed cattle the leftovers from processing meat. It's how we got mad cow disease.


I would guess that a digestive system that can extract adequate nutrition from grass will extract something of value from meat. On the other hand, if the meat content became a significant part of the diet, I can imagine it could become harmful, for example by messing with the digestive process or by delivering toxic levels of certain products.


>What is the point of eating something that is hard to process and digest and has no nutritional value for you

Wouldn't that make it dietary fiber then? What's functionally dietary fiber varies from species to species, but like with humans we eat things exactly like that for GI health. Birds of prey for instance eat casting (fur and feathers) which is functionally like dietary fiber for them where it would be unhealthy if you just gave them a steak without having them also eat the indigestible bits as they wouldn't be able to properly form and regurgitate pellets. Certain animals might not need something that functions like dietary fiber but for at least certain animals - like humans - eating certain indigestible things is important for good health.


Horses snacking chicks. Videos easy to be found.


Everything will eat anything if its hungry enough but to say there is no better food is a broad statement I'm not comfortable agreeing with.


"Better" is kind of a vague term. A more precise and limited statement is that meat has the highest protein quality index. There could be some other disadvantages, depending on your species.


You should try raising cows on a carnivore diet.


The cows would be happy, but that would be significantly more expensive than feeding them plants.

Note that mad cow disease came from feeding cows to cows. Giving them meat isn't exactly an innovation.


> Giving them meat isn't exactly an innovation.

True, but the results were.


It's as deluded as raising cats on a vegan diet.


Look, that rabbit's got a vicious streak a mile wide!

https://en.wikipedia.org/wiki/Rabbit_of_Caerbannog


Turtles are carnivores, no? They are bitey as hell. All of them. You catch them on cut bait, worms, minnows when fishing. Even the ones without very sharp mouths, like softshell turtles.


This is usually the case with C#'s equivalent as well. Enumerables and LINQ are nice options to concisely express logic, but you won't see them in hot paths.


Unfortunately, the baseline allocation cost is hard to avoid due to IEnumerable<T> being an interface which all LINQ methods return save for scalar values, and IEnumerable<T> itself returning an interface-typed IEnumerator<T>. Even with escape analysis, the iterator implementation selection logic is quite complex, which ends up being opaque to compiler so at most it can get rid of the IEnumerable<T> allocation but not the enumerator itself, and only when inlining allows so.

There are community libraries that implement similar API surface with structs that can be completely allocation-free and frequently dispatched statically.

Moreover, with the advent of `T where T : allows ref struct` you can finally write proper LINQ-like abstraction for Span<T>s, even if it's a bit less pretty. I have been playing with a small toy prototype[0] recently and it looks like this:

    // Efectively C's array constant
    var numbers = (ReadOnlySpan<int>)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

    var iter = numbers
        .Where((int n) => n % 2 == 0)
        .Select((int n) => n * 2);

    // Inspired by Zig :)
    using var vec = NVec<int, Global>.Collect(iter);
The argument types for lambdas need to be provided to work around C# lacking full Hindler-Milner type inference, but this iterator expression is fully statically dispatched and monomorphized save for the lambdas themselves. Luckily, JIT can profile the exact method types passed to Funcs and perform further guarded devirtualization, putting this code painfully close to the way Rust's iterators are compiled.

At the end of the day, .NET's GC implementations can sustain 4-10x allocation throughput when compared to Go one (it's not strictly better - just different tradeoffs), with further tuning options available, so one allocation here and there is not the end of the world, and not all LINQ methods allocate in the first place, and many of them allocate very little thanks to optimizations made in that area in all recent releases.

[0]: https://github.com/neon-sunset/project-anvil/blob/master/Sou...


I had to deal with the second problem in a file synchronization app. The solution was to propagate a “device id” through the request and poll/push, so the originating device could ignore changes that it originated.


Thanks Russ! Putting tooling on a first-class basis was revolutionary, and it's still Go's standout feature.


I read a lot of SFF, but the actual Hugo / Nebula winners don't really move up in my reading list compared to the other nominees.

Maybe the "winner" sticker drives some paper book sales?


To offer a counter anecdote: for a while I enjoyed reading books from the list of joint winners of the Hugo and Nebula awards[1] - and later from the list of winners for a single award (same, Hugo or Nebula).

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


Some? Not a ton.

https://humanlegion.com/hugo-award-sales-figures/ has some data for one year. "They do have an effect, but probably no more than a few thousand sales for most books, maybe over ten thousand for the luckiest, and then only in exceptional years."


So maybe a dollar a book on the outside.


No Iain M Banks or Peter F Hamilton on the Hugo winners list which says everything to me


I think Banks possibly just had the poor planning to die to early, there. Both due to the nationality thing (it has gotten a _bit_ less American-centric), and because it feels like his _style_ fits better with current winners than 90s winners (I was actually quite surprised to discover than Ancillary Justice was _not_ in some way a Culture homage).


Exactly, it says that their publishers did a bad job of marketing in North America.


Yeah, I've read a couple of more modern Hugo award winners and thought that they sucked. Maybe I just got unlucky, but it certainly didn't inspire confidence that I will enjoy reading the award recipients.


I think I've read a large proportion of recent Hugo winners, and they definitely tend to be better than average. The nominees are normally pretty good in general.


"Better than average" is a pretty low bar. I'd certainly hope that a winner of one of the more recognized SF awards would be somewhere on the upper end of the quality distribution whether or not it's a great indication for


You're expecting too much from a fan award. It's a popularity contest like the People's Choice awards.

Look at juried awards like the Clarke award if you want something that isn't just a popularity contest.



Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: