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

Great article, but slight issue. The iteration expression shifts left by 2, effectively limiting the height of the tree to 32. You probably want a rotation instead; otherwise you’ll be locked into child 0 from depth 32 down. I suppose with a good hash the manifestation would be rare.


It's not limited to 32, but afterwards search will be linear along child[0]. Using rotation would not make a difference, since you're in the collision case already, so you would effectively always branch to the same child for levels below 32.


“Afterwards search will be linear along child[0]”

Yes, I thought this was clear from my statement.

“Rotation would not make a difference”

It would. The offsets generated by the hash would repeat every 32 shifts, but the absolute addresses given in the collision cases are a random construction based on the history of the tree at that point, so despite the offsets’ repeating, the tree’s invariants along the lookup are likely to be preserved.


> Yes, I thought this was clear from my statement.

Yeah, sorry, wasn't really necessary to repeat that point. I was too focused on the "limiting the height of the tree to 32" formulation.

I have to admit that I don't quite understand what invariants along the lookup you mean. All lookups that reach a particular node on level 32 have the same hash, so regardless of how you compute the branch from the hash below level 32, they will always follow the same path starting from there (except for terminating at different levels, obviously). So nodes only ever have one child at most, and there's no loss in simply picking child 0 in all cases.

Sorry if what I'm describing is again obvious, maybe I just don't understand your point correctly.


surprised there’s no mention of kdb+ in here. iirc it’s older and more performant than most of these


kdb doesn't support effecient vector similarity searches, or efficient storage of high-dimensional vectors. It isn't really in the same class as the vector databases discussed in this post. It's more suited for time series data.


i’m not sure this is correct, but to each his own


fwiw, and surely anecdotal, but i don’t know anybody who knows the dark arts of the git cli and uses some client (magit, lazygit, etc) who prefers to use the former


i’d argue that you can’t properly define probability without notions in measure theory, which is obviously far too advanced for a high school student. i’m not an educator, but some middle ground needs to be struck. i think it’s clear to many that the quality of education in american colleges far exceeds the quality of education in the average middle or high school. that’s the issue, imo


You can do quite a lot of useful stuff with just https://en.wikipedia.org/wiki/Cumulative_distribution_functi...

You only need measure theory when working with something that is not easily replaceable by R^n, Z^n, or finite sets to meaningfully define integration, otherwise (in)finite sums and Riemann integration get you very far.

I am a bit rusty on my advanced probability theory, but IIRC the only thing that required* measures was defining conditional probabilities and expected values on zero-probability events.

Of course redoing that class without Lebesgue integration sounds excruciatingly painful.

* Not just to make proofs nicer and theorems more powerful


try org roam


are there benchmarks against kdb+ and/or shakti?


axler’s text is phenomenal, but it’s probably not what you’re looking for if you want an “applied” view into computational techniques gleaned from linear algebra. the text centers on finite dimensional vector spaces, in the standard, mathy, axiomatic way—which is far more general than the prototypical numerical usage in standard programming problems in most swe jobs


I agree here. I tried to power through the book (which to be fair is really clear, didactic and still concise) and I was stumped because I'm more practical minded, and I'd be trying to look for examples in my domain (signal processing: filtering, beamforming, mle/map, compression, etc.) and I'd be stumped quite fast.

I appreciate any textbook with interesting real world examples and slow worked-through solutions. But maybe I'm a bit too lazy to do the work myself.

I still haven't grasped really what svd does, why it is different from eigenstuff (and... well... what eigenvalues/vectors are...) and the link between those and solving linear systems, and with the characteristic polynomial, and matrix inversion, and... I have intuitions, and I can mostly implement the stuff, but no clear understanding.

So... I suck at learning linear algebra :-)


i’m not vegan, but the egg industry is probably one of the most atrocious concerning animal welfare iiuc. they do slaughter chicks in droves—just not for meat


Animal welfare should not focus on if an animal dies if the alternative is for it to never live at all. Any amount of time, even a day after hatching, is greater than zero.

Instead we should focus on quality of life and how humane the death is.


Hypothetically if slavery resulted in more children, we should never have abolished it?


There is one belief everyone must share for western society to function: humans are special.

If you disagree and equate owning a chicken to owning a human, then I have no reasoning which will satisfy you or your hypothetical.

Our entire western society is built upon humans being special and having dominion, over both plants _and_ animals.


1. Freed slaves became independent. They aren't chickens which wouldn't survive in a non domesticated environment.

2. Farming chickens and enslaving people is not even remotely on the same level.


“They aren't chickens which wouldn't survive in a non domesticated environment.”

You would be very surprised how quickly animals can adapt to a new environment. There are plenty of examples of domesticated animals being released into the wild and doing just fine.


Cows and chickens will not survive in the wild, I promise you.

Yes, dogs, horses, and others can in certain instances.


I'd think dogs are mostly able to because they're still around humans and can scavenge off our garbage. Any breed that's not damn close to a wolf, I'd expect not to be able to find/catch enough food to survive long if dropped in actual wilderness.

Chickens would become food for other animals in days, at most. It's hard enough to keep that from happening when they're kept, let alone in the wild.

Cows are like giant, extremely stupid deer, so I doubt we'd tolerate them in the wild anywhere even slightly near civilization, putting aside their ability to survive on their own (which I also doubt—first bad Winter would take care of them, I reckon).


Not that we we will be able to test it, but I would bet against your promise. I don’t see a reason why cows or chickens couldn’t survive in the wild. Not in all areas obviously but I am sure there are areas where climate, vegetation and predators allow them to thrive. We have wild turkeys, we have quail, so why not chickens? And if horses can survive, then cows can too. Horses are way more fragile than cows.


Have you dealt with chickens, turkeys, horses, or cows in real life? Because it doesn't seem like you have. Horses are in no way more fragile than cows, especially wild stallions.

I've raised turkeys, chickens, cows, and horses. The turkeys and chickens people eat are not the same as wild turkeys, they would not survive without humans.


Yes I have dealt plenty with horses, cows, goats, pigs, chickens, rabbits, ducks and others. My contention is that you would be surprised how quickly animals would adapt. The notion that we are doing them a favor by keeping them because otherwise they would not survive is nonsense in my opinion.


Agree to disagree then. Your experience raising these animals do not match mine.


It's not just the slaughter of chicks that's horrific, but:

1 - how they do it -- male chicks are often just thrown alive in to grinders

2 - the debeaking of chickens

If this was happening to humans there'd be outrage, but because it happens to animals most people don't care.


well deserved. prot is a fantastic person and his emacs packages are all stellar. can’t use any theme besides those in modus, for example


+1 for eglot. it just works. vibes well with core emacs (and therefore minimizes bloat, among other advantages)


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

Search: