About 10 years later you would find this stuff everywhere in boost but for the time this was spectacularly elegant for C++
140 karma · joined February 28, 2012
About 10 years later you would find this stuff everywhere in boost but for the time this was spectacularly elegant for C++
Nice work I look forward to delving deeper
Either way it's rare for Rich not to describe to problem a little more before throwing a solution to it. Hopefully more will come to light in time.
The brief take away I see from this as a non AWS deployment based user is the ability to go beyond the current limitations of only having access to core library functions in the context of datomic. (I see that deployment of applications also plays a part in this but not sure what that solves exactly)
They do share some commonalities such as:
- history/transaction subscriptions and queries
- Providing a Django ORM/Model like data access system via Datomic's 'Entity API' (although this is Django)
But Datomic isn't just 'event sourcing' (although it's a way to think about solving a problem).
It provides Prolog style queries, functions on the database, a GraphQL like API, Caching (Memcache) and robust Peer library (which also makes it hard for NON JVM languages to use Datomic as it uses a closed protocol... (although very likely uses Artimes/Hornet MQ's internal protocol))
I am talking from a Clojure/Datomic background (so my Django experience is old & limited) But I'm sure you could cobble together something to satisfy all these things for your stack, Datomic just does a beautiful job for Clojure (And I find Cognitect's strangle hold on the technology not great but I think they've loosened the licencing enough to make it acceptable for small businesses & startups which strikes a good balance).
I miss well tested and 'best practice' pattern derived systems...
Also want to append https://projectreactor.io/ which uses most if not all of the aforementioned technologies too.
A js implementation! This is something I can't wait to play with! Thanks!
I love the simplicity and independent direction this micro-framework provides. It's very 'non-magical' which I think makes it far more appealing.
If you end up solving the HATEOAS/ember-data sideloading/'embedded foreign key data loading' problem I think this will be my goto library (though this probably falls out of the microframework requirements also ;)
function validateCC(ccNumber) {
var ccNumber = ccNumber.replace(/ /g, '');
console.log(
/^3[4|7]\d{13}/.test(ccNumber) ? 'AMEX' :
/^6011\d{12}/.test(ccNumber) ? 'Discover' :
/^5[1-5]\d{14}/.test(ccNumber) ? 'MasterCard' :
/^4[\d{12}|\d{15}]/.test(ccNumber) ? 'Visa' : 'Unknown',
ccNumber,
ccNumber.split('').reverse()
.map(function (v, i) { return v * (1 + i % 2) })
.reduce(function (agg, v) { return agg + v; }, '').split('')
.reduce(function (agg, v) { return agg + +v; }, 0) % 10 === 0 ? '(valid)' : '(invalid)');
}
btw to markup simply append 2 spaces to the front of the newline function(req, res, next) {
console.log('before');
next(); // go to the next middleware handler
console.log('after the middleware stack has been traversed');
}I would also like to point some of the commenters to (fluxus) http://www.pawfal.org/fluxus/. It is a very nice example of this concept of the same thing, only using racket/plt scheme.
Live coding/reactive code are fantastic little ideas which I wish had been exposed to me earlier in my career.