That's just the problem, I've written an RPC library, domob has written 2 (one in C++ and one in PHP) it's not *hard* per-se. NMControl is just an RPC library + python convenience calls for Namecoind, but it's own for programmers working in Python. If we want more developers, we need high quality libraries that have full test coverage and documentation. At the moment, the documentation for each function is scattered all over. It makes development unpleasant, I mean, here is what it took for me to create wrangle name_filter():
Code: Select all
/**
* Arguments for filter().
* @typedef {Object} filter-args
* @property {string} regex,
* @property {?number} age,
* @property {?number} start,
* @property {?number} max,
* @property {?boolean} stat
* */
/**
* Returns all values whose name matches Regex.
* @param {( string | {filter-args} )} args String regex or query parameters.
* @returns {Array.<Object>}
* TODO: turn namespace (d/) into parameter
*/
this.filter = function(args) {
args = args || '^d/';
if (typeof args === 'string') {
args = {'regex': args};
}
args.age = args.age || 36000;
args.start = args.start || 0;
args.max = args.max || 0;
args.stat = args.stat || false;
var query = [args.regex, args.age, args.start, args.max];
//NOTE falsy check @ init, 'true' input COULD be 'stat' or 'hamburger'
//check for (not false) and enter in 'stat'!
if (args.stat !== false) {
query.push('stat');
}
return new Promise(function(resolve, reject) {
//Note that jsonrpc was modified and it looks for this specific
//query, you cannot replace with generic jsonrpc w/out that mod.
n.client.name_filter(query, function(err, value) {
if (err) {
console.log(err);
reject(err);
} else {
resolve(value);
}
}
);
});
};
return this;
}
Fifty lines of code for one function call. Fifty. I shouldn't need to build an entire RPC library AND convenience libs just to communicate smoothly with Namecoin. My convenience functions for dealing with 5 Namecoin weigh in at ~200 lines. All just for *read only* functions! Multiply that across NMControl, NamecoinToBind, nameID, NMChain, MeowBit, Speech.js, Convergence ... 7 * 200 = 1,400 lines of code and most of it lacks test coverage and documentation.
I also tried doing the bare minimum of effort at first but it made writing the rest of my code a real pain. Debugging RPC libraries sucks because the debugger cannot trace it to the real problem. Sometimes it's your code throwing something your string construction didn't expect, sometimes it's Namecoin taking to long to respond and the debugger just gives up, and don't get me started on cross-platform development and config parsing. I spent a day trying to fix a single function before I gave up and just make a weird hack inside the RPC library to get working.
This is a good bounty project because a new developer can cut their teeth on it and the maintenance will be relatively low-effort.
DNS is much more than a key->value datastore.