Echo JS 0.11.0

<~>

tracker1 comments

tracker1 1971 days ago. link 1 point
The blacklist isn't really much worse than the whitelist depending on the database... though if you're using a distributed/redundant db, such as Cassandra/Scylla, BigTable, Dynamo or Storage Tables, then a whitelist can be opportunistic.

If you're using a structured (SQL) database, either white or blacklist should work roughly equally.
tracker1 1972 days ago. link 1 point
While this does show how you *could* use linked lists in JavaScript, in practice, don't do this... just use JS Arrays with plain objects.  The overhead for the article's methods will generally take a lot more memory and not really perform better than Array.prototype methods already available.
tracker1 1979 days ago. link 2 points
Should followup with generators (iterable by default), async generators (for-await syntax).
tracker1 1982 days ago. link 2 points
This is probably more appropriate of a question for stackoverflow.com
tracker1 1983 days ago. link 1 point
I believe Promise.all and Promise.race have been around since ES6/ES2015 or ES2016.
tracker1 1985 days ago. link 2 points
Decent primer on iterables.  As I was reading, was getting ready to make a comment about generators and async generators, but it's noted in the last paragraph.  Look forwar to the next/related article.
tracker1 1987 days ago. link 1 point
Arrays and Objects in JS are not quite 1:1 as the memory structures for lower-level languages.  Arrays are more like enhanced objects, with more indexes.  Objects are also a bit more than just a hash table, it's just he easiest way to think about it.
tracker1 1987 days ago. link 1 point
Yet another state management engine for react... I think there's more state management systems for react than there were new ui frameworks popping out 5-6 years ago.
tracker1 1991 days ago. link 1 point
Okay... while this is kind of correct, I would empatically NOT follow this advice.

First, sha512 is *not* sufficient alone for a hash, there are specific algorithms that will use sha256/512 as an underlying hash with thousands of iterations in order to create an appropriate hash.

Second, the "rounds" for a salt is a total abuse of the term.  The "rounds" in a password hash has to do with the number of cycles to perform on a passphrase hash.

Third, you don't need to convert to a hex string when passing the salt to the hashing algorithm, it can stay an ArrayBuffer/Buffer.

Fourth, the length of the hash should match the bit length of the underlying hashing algorithm. Going longer doesn't strengthen for a passphrase hash, and going shorter weakens the result.

Here's a better example to work from:

https://gist.github.com/tracker1/87bbebbf235e697588fc9d9b8ca4f0a2

Though, you may want to use something other than pbkdf2, the example above was using it because of legal requirements and that the algorithm is supported by node in the box.

----

Edit, corrected #4 - was thinking of something else.
[more]