wotb is a Node.js addon written in C++ making Web-of-Trust computations for Duniter project.
git clone https://github.com/duniter/wotb.git
cd wotb
npm install
npm test
See test.js
C++ Web of Trust computations for Node.js
License: GNU General Public License v3.0
wotb is a Node.js addon written in C++ making Web-of-Trust computations for Duniter project.
git clone https://github.com/duniter/wotb.git
cd wotb
npm install
npm test
See test.js
I am not a C++ developer, so I've made what I could to quickly reach my goal.
However the code could really get its readability improved by refactoring code to Object Oriented code.
Currently the functional code is making treatments to read/write the data structure from a file.
A better approach would be to make this code only deal with in-memory, and let the wrapping code eventually handle to persistance mode: MEMORY or FILE.
This would allow uCoin code to work in-memory when needed (like in unit tests).
Sometimes we use C style, for example:
FILE *pFile;
pFile = fopen((char *) f.c_str(), "a+b");
We better use ofstream
C++ class instead.
I was looking through the wotb code on my local clone of the repository, and I couldn't find the definition of showLinks
anywhere within the wotb codebase.
Is this intentional (e.g. it is defined in an imported header)?
Here is a link to the function definition: wotb/wotc/wot.cpp Line:52.
Ive added a pull request to fix the issue: #4 .
I read the wotb code to find a way there to analyze the state of tension of the WoT.
I came there has the conclusion that the best way is of used the value DistanceResult.nbSuccess for all pending identities.
Yet, I calculate already indirectly this value by checking the distance in willMembers. But the isOutdistanced() function only return DistanceResult.isOutdistanced boolean...
So, i need to get DistanceResult.nbSuccess when i check distance of an idty !
The simplest way to obtain this value seems to me to be to create a new function isOutdistancedWithDetails() almost indentical to isOutdistanced() function with this difference that it return a array of integer (isOutdistanced, nbSuccess, and optionally nbSentries But it isn't a necessity).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.