skysight-inc/HackerNews huggingface dataset:
Ask HN: Merkle Trees / Rolling Hashes for XML or JSON
Hi,

I want to build a merkle-tree for a binary JSON document store. A merkle-tree however is built bottom up, such that a hash of inner nodes is always built concatenating all children hashes.

However, this is costly as always all children of the ancestor nodes have to be read when we do simple update operations. That is deleting, updating or inserting a node, potentially involving a lot of I/O to read the children for each ancestor node.

As I want to use the hashes for speeding up comparisons of revisions of the binary XML or JSON tree structures, I instead could also use random UUIDs, which are assigned. However, with the merkle-tree we can also check integerity, which is nice.

When the hashes don't have to be secure, we can also use a rolling hash using a 64Bit integer (long in Java), but I guess in a 64Bit storage system there are a lot of collisions and I couldn't rely on them when doing hash comparisons for skipping whole subtrees from the traversal. Maybe it would be better with a BigInteger using 128 Bits.

Would you instead store UUIDs for each node? Or can I apply a secure rolling hash somehow (at most I want to store 16 bytes / 128 bits on disk I guess)?

kind regards
Johannes
It's not causing cousumer price inflation, but it definitely is causing price inflation in other parts of the economy (equities, real estate, startup valuations etc.).
Don't fit the job
ResEdit was an interesting idea. It suffered from a major problem - terrible data integrity. The original version had to work on floppies, with very slow seeks and writes. So it didn't reach an consistent state until you were all done and closed the resource fork of the file.

Attempts were made to use it as a database, but stuff was always getting corrupted.

The original MacOS suffered badly from being a cram job into 128KB with no hard drive or MMU. No CPU dispatcher, no memory protection, brittle ResEdit and TextEdit. The trouble was, that architecture persisted for 17 years, long after the hardware improved.
This small snippet from Wikipedia claims that DNA/RNA is not always "expressed in the same way" and that bacteria en eukaryotes have a different (albeit related) amino acid for AUG (Methionine vs. N-formylmethionine). So those claims here and in the article (even the title) are not completely true.

_Encoding_

Methionine is one of only two amino acids encoded by a single codon (AUG) in the standard genetic code (tryptophan, encoded by UGG, is the other). In reflection to the evolutionary origin of its codon, the other AUN codons encode isoleucine, which is also a hydrophobic amino acid. In the mitochondrial genome of several organisms, including metazoa and yeast, the codon AUA also encodes for methionine. In the standard genetic code AUA codes for isoleucine and the respective tRNA (ileX in Escherichia coli) uses the unusual base lysidine (bacteria) or agmatine (archaea) to discriminate against AUG.[15][16]

The methionine codon AUG is also the most common start codon. A "Start" codon is message for a ribosome that signals the initiation of protein translation from mRNA when the AUG codon is in a Kozak consensus sequence. As a consequence, methionine is often incorporated into the N-terminal position of proteins in eukaryotes and archaea during translation, although it can be removed by post-translational modification. In bacteria, the derivative N-formylmethionine is used as the initial amino acid. [0]

[0] https://en.wikipedia.org/wiki/Methionine
Profiles of Users with Disabilities
Perhaps there's a first mover advantage such that any new gene system just can't compete with established life.
The sad truth is, the 'modern' web is rotting. AMP is just a symptom of a growing problem.
> it sounds unlikely that a) there really was that single origin cell, and not a few that popped up around the same time (on a geological scale)

Why?

Life happens rarely enough; even in the 'optimal' conditions of the primordial soup, it's still a pretty miraculous occurrence for a cell to spontaneously form. Then consider this:

- The first cell was probably not 'good' at surviving, even in those conditions. It probably sucked at it, and was just barely good enough at doing it to reproduce a little and evolve a little.

- So, a cell which is actually good at surviving is pretty much guaranteed not to form spontaneously. Meanwhile, the lineage of the first (shitty) one has evolved to be pretty damn good at it.

- If a new cell tries to form, even if it's better at surviving than the Original cell, it'll probably get instantly outcompeted by its progeny.

Voila, single ancestor cell.

> b) no organism has drifted in the millions of years of evolution.

Why should they? There's no pressure to.
I often read that when in doubt, use a vector. It has its disadvantages, but for performance it's usually okay. Simplicity can be a good choice.
I think it could, it just required a little more imagination.
NewtonOS was released in 1993 so around the same timeframe, lower memory requirements than 1mb and could do this stuff:

http://preserve.mactech.com/articles/mactech/Vol.09/09.11/Ne...
Both of those processors insist on you ceding full system control to the vendor in perpetuity, with a literal "skeleton key" that let's the vendor in and keeps you out (the centrally signed, unremovable ME/PSP). If this doesn't concern you, then why are you looking at a local machine at all when a cloud system may very well be less expensive to lease than to purchase and keep current, not to mention run, local hardware? Unless you're loading the local machine 24/7, you're leaving a resource sitting idle for parts of the day without any real increase in security or control, meaning the cloud vendor can give you a cheaper experience overall by keeping hardware utilization over time high.

And no, ME cleaner does NOT (and cannot) fully remove a modern ME. The PSP "disable" toggle in the UEFI configuration does NOT disable the PSP from running during startup.
Check how you can utilise Android Devices better
> That's not the usage I set out above at all. Not even ballpark.

I replied to to your later generalization related to the devices' "managed" status, the one turning your original point into an "inflexibility" and "employee privacy" issue. BYOD is/should not be 100% your regular private device. Moreover it's there to allow you more flexibility not less, so you don't have to use a company device and work from the office. You can't give perfect flexibility/privacy to your employees while ensuring even a modicum of security. And someone will always complain about something.

The problem isn't that companies manage BYOD devices, it's that they still use legacy sites that only work with IE. So coming back to your original point, the solution as I already said is to provide you with something like Citrix or equivalent (device is no longer relevant), or for the company to fix its websites. Not for MS to implement the magic button that makes your company's legacy sites work for another 20 years. But if you have a security team at all your BYOD will still remain a (partially) managed device regardless.

MS is on one hand intentionally restricting the compatibility mode to force lazy companies with bad practices to upgrade their aging sites without straight up cutting them off. On the other hand I'm not sure if MS could even implement a true "IE mode" since nobody wants that legacy code in any modern browser.
This is very similar to the 'rainbow' colour map already available in many places, including matplotlib [1]. For people who are looking for maps with increased dynamic range, diverging colour maps already exist. There are even ones that are made up of _two_ linear colour maps, such as twilight.

This is some ok work by the folks at google, but screams of re-inventing the wheel 'because we're a silicon valley company and we innovate'.

[1] https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html
By the way the legend of the picture in the middle of “Four Commanders of the Allied Forces in Berlin” says that the 4th general is de Gaulle but it is clearly not. I think it is de Lattre.
I think that the mobile trend was blown way out of proportion. I very often find myself clicking on the 'Browse desktop version' button when browsing a so-called 'mobile-friendly' version of a site. Is the look of the website really more important than the content and functionality? For me, it's not. This is just another example of a big tech monopoly imposing their highly opinionated ideas on billions of people.

Also, I hate it when a mobile site keeps reminding me to install the app. This is extremely mobile-unfriendly. Google ought to punish those sites.
Many people see many doctors, and find no cure and no improvement.

After seeing doctors and not getting better, it is useful to get an idea of what worked for other people because it might lead one on the right path.

Personally, I consider advice - both from doctors and on Internet forums - as advice, not gospel. I do research what doctors recommend, because they too are wrong or implicitly optimize for different criteria than you do (cost of treatment or their own liability vs your well being)
Just thinking that... I find medium worse than amp... at least amp doesn't show pop ups to join or subscribe...
Later Zhukov was on his track to become a dictator in 1957, flaunting his personal command over Soviet military on multiple occasions. It took a combined pushback of (otherwise feuding) Soviet elites to bring him in check.
Google intentionally gimps Firefox on Android, by serving an old-school page. Using an addon (which you can on mobile Fx, and not on Chrome), fixes this by editing the UA string when visiting Google.

Getting the "nice experience", however, gives me amp links. And when I click on them, I'm unable to scroll?! It doesn't matter if it loads fast, when I cannot read beyond the fold.

It also breaks the "open in app" I normally have. If the link is a reddit link, for instance, I can press an icon in Firefox to have it open in "Reddit is fun".
Tandem had a real database OS. They didn't have files. Just blobs in the database. Their distributed, redundant database system had proper ACID properties. It owned the disks; there was no file level below the database.

This made a lot of sense for a system intended for high reliability transaction servers and nothing else. Banks loved Tandems.
What is the AMP update this article was speaking of?
do you not consider the scenario described in your comment's parent to be worse than any terrorist scenario?
File systems are databases in a small way. They use b-trees and such, but they don't enforce a rigorous global type system, don't enforce a table structure because everything has to have a schema, don't have the overhead of a query language to interpret every file access command, didn't ensure that all file accesses be ACID compliant, etc.

WinFS imposed all of those things and the associated overheads and much, much more every time you accessed anything.
What you can do with a trusted CPU domain is use FDE. FDE is standard practice for anyone even remotely concerned about security in the first place.

So the firmware that matters -- the firmware that can subvert the system due to privilege level, etc. -- is open. No other vendor aside from some lower end ARM toy SoCs can say that.
I was an active Z-80 user in those days and I respectfully disagree with that assessment. There was nothing logical about going from Z-80 to 8088/86 (and 8080 didn't matter nearly as much).

Seeing the number of design wins m68k racked up, it would have been the logical choice (and ISTR that IBM actually liked it better, but it and its peripherals were more expensive). Disclaimer: not a fan of any of these architectures.

EDIT: typo
turbo is nice, but visualizing depth maps using a 1D color palette is always a bad idea. Much better to add some simple shading (lambertian or ambient occlusion). Then you can still use the color palette to provide absolute depth cues, but the shading is much easier to interpret visually.
Web's Oldest Webcam to Be Shut Off After 25 Years
Fortnite. In your bathroom.
If you do it right. I think there is no book or study that says you can just improve from random activities. You need to study, focus on a topic, experiment, repeat the good stuff until you got it, find a new detailed area where you can improve.
John Von Neumann https://math.stackexchange.com/questions/11267/what-are-some...

Does the followong seem right to you?

Intuition often comes from relating a new thing to something known. So maths, as an abstraction of reality, initially has many sources of intuition.

Later maths never has exactly the same patterns as earlier maths (it's already abstracted; so same patterns would be the same thing, though it cam build-on). Eventually, it doesn't relate to anything known, and you have to create that familiarity from scratch.

That's hard... but if some stuff became known in the first place, why not this too? (One counter is that the other stuff was instinctively known, e.g. 3D space, or at least our minds are pre-shaped to know it, e.g. language).

Assuming math is open-ended, there'll always be new stuff that doesn't relate.
What about a variant of shadowbanning?

You can't see your real scores, but everyone else can.
its turtles all the way down.
You are right - the tool downloads all images from the page that you're currently on. I should make that clearer in the future.
When all the advertisers and investors care about is clicks...
AI travel assistant with voice understanding on Telegram – Eddy Travels
Pick? hello.. are you back from the dead?
All tablets were placebos.

Isn't this basically measuring placebo effect?
"My Reveal" by Satoshi Nakamoto
My karate instructor always said “perfect practice makes perfect”. Your teacher helps you define what “perfect” is, and it’s up to you to slow down or break up what you’re practicing in order to achieve that standard.
My first job involved doing some basic system administration on a Pick system. It was a really interesting architecture.
Without going asyncio you can always use greenlets and get the same benefits. Using uwsgi with gevent makes it easy.
Anyone who knows anything about violins or violinists, know that the difference between the "best" and the merely "very good" is rather arbitrary, subjective and down to fashion (or even nonmusical factors). It's thus not surprising practice makes little difference - all those violinists are as good at the technical aspects as you can sensibly get.
I assume you mean aligned on boundaries ? I picked up that from https://en.cppreference.com/w/cpp/language/copy_assignment and it does also say that memmove has a fallback to std::memcp when there is no overlap between source and destination.
Haven't limits effectively been removed by permitting super PACs that aren't directly tied to the candidate?

In practice, I don't see real limits on campaign contributions, only limits on the amounts a candidate can control him/herself. Maybe that's enough, I don't know.
The history might be written by the Victors, but is always read by the survivors
Avast Premier 2019 Crack Free Activation Code Till 2050 (Working)
It's a problem that only gets worse at scale, too. At least with decentralisation, the problem is distributed among multiple instances and moderation teams.
The low air pressure of the high altitude could also play a role.
The deliberate part is so often overlooked since most people only know training with a teacher, where they give the responsibility for the deliberate part to the teacher without even knowing.

If you start learning by yourself from every 10 hours of practice maybe only 1-2 might count as deliberate. If that efficiency is tracked as well, one could argue that even a motivated learner might take up to 20k hours to get to his 10k hours of deliberate practice.
I'm talking about the solution to a company stealing tips, not tipping in general.

This is an action you can actually take to improve a person's life right now (if you use these services and would have tipped anyway).
Are all those "best practices" valid for modern C++ ? I mean one statement says "Pass and return containers by reference instead of value.". This is in contradiction to modern C++ where you return containers by value and rely on copy-elison/RVO.
https://stackoverflow.com/questions/15704565/efficient-way-t...
First enumerate all of the constraints and guarantees your database provides. All the basic minimum services it provides for every access. Look at the memory it takes to provide those, and the processor utilisation overhead to perform all those checks, and services such as to guarantee ACID compliance, guarantee referential integrity, enforce a global type system, etc, etc.

Every single access of every single piece of data, for anything, will incur all of those overheads every time. There is no way to opt out or choose a different balance of guarantees or trade-offs without implementing them on top of the OS provided ones.
I don't know about polarization, but I'd bet it would make everything a little less addicting in a very healthy way. When I left facebook, part of the reason was that whenever I posted, it came from a weird emotional place. Instead of casual "i'm gonna share the thing" it was "think really hard about how to make it super cool." Here too, but to a lesser degree since it's more anonymous and I don't know you all.
OK, but the judge here is unlikely some expert in Scandinavian mythology. And it's pretty clear that they understand troll as someone who guards something valuable, and demands payment from those who want it.

And then there's online trolling: https://gizmodo.com/the-first-internet-troll-1652485292
Right, and that's not rational, is it? He's probably mentally ill and should be treated professionally.
Backdoor code found in 11 Ruby libraries
Practical Tips on Progressive Web App Development
So google chrome hides www and m in the domain, will Google replace AMP domains as well?
As a cloud services consumer, what guarantee (financial, legal, indemnification) will you grant me that your systems will not leak or otherwise tamper with my data, given that you use machines that I know for a fact you have no control over and have not audited prior to the handoff from UEFI to the hypervisor/OS? For that matter how have you mitigated the persistent x86 rogue DMA problem?

POWER9 still has two advantages -- security and speed. Yes, speed -- the core is quite weak on some tasks and very strong on others. If you're buying this to primarily run an AVX intensive type workload, don't (unless you need the security aspects). Those massively wide, vector dependent workloads aren't exactly common in multitenant cloud though, unless you're using GPU offload where POWER again beats even the newest AMD chips for pure GPU offload performance.

So much for the good...the ugly is that POWER9 was fundamentally late and not at performance levels we wanted, but that's a transient state. Every CPU vendor puts a chip like that out from time to time, and IBM is acutely aware of the problems here. I see no reason to go to an even more problematic architectures (x86 duopoly with master vendor keys, RISC-V with fragmentation and weak cores / immature toolchains) when we now have a better option available.
An accusation is absolutely enough to be jailed. Due process and rule of law are fictions in our current society.
Shock Horror Do you know how much time you spend on your phone?
Startups from Y Combinator’s S19 Demo Day 2
>As we know, there was no invasion of the Japanese home islands—not by the Soviets, nor the Americans, nor the British. Fearing massive loss of life both among Allied forces and the Japanese civilian population, President Truman ordered nuclear bombs dropped on the cities of Hiroshima and Nagasaki. These bombings quickly brought the war to a close.

According to other narratives by historians, the main cause of the Japanese surrender was the Russians entering the Pacific war.

https://www.history.co.uk/shows/x-company/articles/why-did-j...

https://apjjf.org/-tsuyoshi-hasegawa/2501/article.html

Is worth remembering that not everyone buys into the idea that nukes are ultimate weapons that definitively ended the second world war. There are actually a variety of views on the subject, which from a game theory perspective creates dangerous instabilities within the doctrine of Mutually Assured Destruction.
Official Invitation from Kocis, Korea
> Science gets done but the rewards seem to filter preferentially to those who are able to game the system, and the system exists out of a need to make one's self look as productive as possible

This is largely due to the current model of science funding, and not just in the US. Here in Germany, many involved in public (i.e. at an university, not inhouse r&d at a company) science only get 1-year-limited chain contracts with no real security and low pay, as many grants and funds are also available only in the same time frame which means it's a constant hustle for funding, especially at third parties.

IMO there is only one way to solve this problem: politics have to irrevocably allocate fixed chunks of money for public scientifical investment for long terms (think 10 or 20 years) to give the scientists and universities actual security in their planning and staffing. This would also solve the problem that e.g. NASA has with each President reversing course. No wonder that the last Moon visit was decades ago when the priorities get completely turned over every 4-8 years.
Actually, it seems very logical.

I would do 3 days at 10 hr per day, and 2 days on other stuff. Personally, I would prefer full days slots rather than a few hours free per day
> While this doesn't mean his accusations are fake

It is my understanding that Markopolos was paid to evaluate the company, and not to deliver a particular result.

His money is in providing the results of his investigation, thus being paid when he delivers them.

There is no need to come up with convoluted conspiracy theories. Occam's razor and all, and also the fact that GE is more than capable of hiring lawyers to defend their bookkeeping.
> If you ONLY have Java Applets IE Mode does nothing for you

Well that's the whole point. MS is forcing your company's hand into doing something about that site that's very important for you but somehow was ignored for years. Everyone knows most companies won't move a finger without external pressure. MS is providing that pressure.

The only alternative would be to build support for Java applets into a modern browser. Which is exactly what everyone tried to get rid of. So expecting IE mode to fix that issue for you makes no sense. I don't understand how this could even be a complaint.
Double win!

Less bureaucracy AND lower taxes!
Is there a 'git verify' or something that will report such tampering?
There is a bug report [1] that tracks Google serving a second tier search experience for Firefox for Android.

Google has been dragging their feet for years on this one, and it perfectly fits their "oopsies" pattern of behavior [2], which ends up hurting their competition.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=975444

[2] https://www.computerworld.com/article/3389882/former-mozilla...
I feel like this is probably an inside job...
Isn't that the sort of problem you solve once, though? If you want a "this is just a stream of characters I can do POSIXy things to" interface, that's a library with fread(3) et al in the front, and a query for a single field in the database at the back.
I was also fascinated by their pitch, so I would be really interested to know if it actually works, and what are the potential health risks (e.g. increased chance of cancer)
That's a interesting combination, especially to the benefits. Is that because you are only entitled to received benefits from only one salaried position?
Do you have anything to back up your claim it was caused by the stress? That seems like a pretty big claim to make.
Kowloon Walled City Infographic
Yes, and the article even fails to mention that it might be more important how someone practices than how much the person practices.
Not a trend, they rank AMP sites higher