1,027 karma · joined Jun 13, 2008 (18y ago) · 143 submissions
comment 16y ago · link · parent
The actual cutting edge of event-driven server architecture[1] looks something like this:
server = do {
sys_call_1;
fork client;
server;
}
client = do {
sys_call_2;
}
(And even then it has marginal benefits in terms of throughput and latency compared to threaded implementations.)[1] Li and Zdancewic. Combining events and threads for scalable network services. Proc. 2007 PLDI (2007).
comment 16y ago · link · parent
In the meantime, I benchmarked Yoink's PeristentHashMap against 2.8.0.RC2's immutable.HashMap by a) creating a map of 100,000 sequential keys and then removing them all, and b) creating a map of 100,000 random keys and then removing 100,000 random keys. In the first case, Yoink was 20.7041% (±1.83693%) faster. In the second case, Yoink was 24.7834% (±4.17055%) faster. (Student's t distribution, 95% confidence interval, source is in src/test on the GitHub project and I used ministat for the statistical analysis [a cross-platform port of which is also available on my GitHub page].)
So to summarize, I have a provably faster hash array mapped trie at almost zero cost right now because I spent a few hours with a "good learning experience."
comment 16y ago · link · parent
In contrast, Clojure's PersistentHashMap dates back to 2007 and was in both the 1.0 and 1.1.0 releases.
comment 16y ago · link · parent
The you that lifts your arm and the you which feels like it decided to lift your arm are on different schedules.
comment 16y ago · link · parent
Here's a real prediction, with actual confirming evidence: giving someone with a high MADRS score an SSRI will reduce their score.
That's beyond seeing and naming depression, it's beyond recording patients' reactions to SSRIs, it's beyond spotting patterns in their reactions, it's even beyond making falsifiable theories about its mechanism of action. It's making predictions which are confirmed on a statistically significant basis.
Does this mean you think psychiatry has the same epistemological standing as physics?
comment 16y ago · link · parent
Agriculture dates back to at least ~10,000 BC (the "Neolithic revolution"). Effective farming (i.e., not dying of starvation) requires planning for changing weather conditions. If you think Neolithic farmers didn't have a vested interest in detecting patterns in weather cycles, you're sadly mistaken.
Hell, the term "meteorology" was coined by Aristotle... in a book he wrote... called Meteorology... in 350 BC.
comment 16y ago · link · parent
If you're confused, I'd highly recommend Practical Cryptography by Niels Furguson and Bruce Schneier: http://www.schneier.com/book-practical.html
It will give you much better advice than the internet will.
comment 16y ago · link · parent
A system which uses an adaptive hash function like bcrypt is ~6 orders of magnitude less effed in the event of a compromised database than a system which uses a standard hash algorithm and a salt, ceteris paribus.
I would hope you agree that those ~6 orders of magnitude could well be the difference between "not noticeably effed" and "profoundly effed."
comment 16y ago · link · parent
As far as CPU exhaustion, there are some huge sites which use bcrypt (like, in the top 10)[1]. It is not a problem, provided you choose your work factor carefully.
As far as complex passwords, use them. Try to get your users to use them. But it's an orthogonal concern: your attacker will still be able to work their way through the gigantic keyspace of your monster passwords at 1,000,000x the rate of what they could do if you'd have used bcrypt.
[1] Just looked this up. Not the top 10, but the top 15 for sure.
comment 16y ago · link · parent
NIST expects SHA–3 to have a security strength that is at least as good as the hash algorithms currently specified in FIPS 180–2, and that this security strength will be achieved with significantly improved efficiency.
http://csrc.nist.gov/groups/ST/hash/documents/FR_Notice_Nov0...
comment 16y ago · link · parent
[1] http://www.imperva.com/docs/WP_Consumer_Password_Worst_Pract...
comment 16y ago · link · parent
I'd love to recommend its use over bcrypt, as memory constraints are much more expensive than computational constraints, but recommending something most developers don't have access to would result in more weak hashing schemes in production.
comment 16y ago · link · parent
In general, a password algorithm, whatever its cost, should execute with near optimal efficiency in any setting in which it sees legitimate use, while offering little opportunity for speedup in other contexts.
PBKDF1 and PBKDF2 both rely upon general-purpose hash functions, which are much faster in dedicated computing environments such as FPGA or GPU clusters. The Eksblowfish algorithm at the heart of bcrypt is extremely resistent to optimization.
This is crucial for password storage, since if a CUDA implementation is 3-4 orders of magnitude faster than the implementation your application uses, you've just chipped off a huge chunk of the advantage offered by your hash function.