Recent submissions

Comment · 8 years ago
Comment · 8 years ago
Comment · 8 years ago
Comment · 10 years ago
"You know the law: two men enter, one man leaves."
Comment · 11 years ago
While it’s definitely the case that there are more concise domain-specific examples, as you’ve pointed out, the article’s point stands: in Clojure, a Strategy is simply passing a function as an argument to another function.
Comment · 11 years ago
Obviously, those are monoliths in dire need of decomposition.
Comment · 11 years ago
3.1.x is a development branch and not intended for production use. When they release 3.2, MongoDB will support it.
Comment · 11 years ago
MongoDB doesn't track this information, unfortunately.
Comment · 11 years ago
And that 'nice' used to mean 'foolish'? http://www.etymonline.com/index.php?term=nice

And that 'fizzle' used to mean 'fart quietly'? http://www.etymonline.com/index.php?term=fizzle

And that 'wench' used to mean 'child'? http://www.etymonline.com/index.php?term=wench

And that 'meat' used to mean 'food'? http://www.etymonline.com/index.php?term=meat

Etymology is fascinating (a word which itself may be related to the Latin 'fascinum', or penis).

Comment · 11 years ago
Comment · 11 years ago
800-273-8255

National Suicide Prevention Lifeline

24 hours a day, 7 days a week

or www.suicidepreventionlifeline.org

Comment · 11 years ago
If you want your reads to ever work, then they need to be synchronized. Reading from an unfenced address during concurrent writes is undefined behavior for any CPU architecture you can think of, which means you’ll get stale reads _in a best-case scenario_. You can also get garbage reads (e.g. as your CPU interprets your read of a 64-bit pointer as two 32-bit reads), crashes, bees, etc.

The code you write is either thread-safe, used in a single-threaded context, or a pinless grenade.

Comment · 11 years ago
It’s worth noting that not only do you need to synchronize access to the singleton, you need to synchronize access to the singleton’s state as well. And even if you manage that at a fine-grained layer, you’re still setting yourself up for all the problems associated with singletons: http://c2.com/cgi/wiki?SingletonsAreEvil.

If you have a bunch of immutable state, then build unexported package variables in the package’s `init` func and export funcs which use those variables.

If you have a bunch of mutable state, then don’t use a singleton.

Comment · 11 years ago
Two things:

First, you're describing RSA signatures. "Encrypt X with your private key" means "X^D mod N" which is how RSA signatures work. In the context of RSA-based cryptosystems, it's clearer to just say "signed".

Second, the ghsign library uses the `RSA-SHA1` signer, which runs the message through SHA1 before signing it. The reason it does this is because "textbook" RSA (i.e. RSA on arbitrary messages) is vulnerable to chosen-plaintext attacks.

Comment · 11 years ago
I really really really don't recommend outsourcing your security architecture to interested passers-by if that's going to be a core feature of your project.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton