Skip to content

Commit

Permalink
lychee.js 2017-Q4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Robot committed Dec 20, 2017
1 parent 2d3c616 commit 078bdbf
Show file tree
Hide file tree
Showing 419 changed files with 8,958 additions and 3,699 deletions.
41 changes: 31 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ are listed in this specific order: `changed`, `removed`, `added`
and `fixed`.


## [2017-Q4] - 2017-12-20

- **Changed**: lychee.pkg environment settings changes to `{ packages: { namespace: url }}`.
- **Changed**: lychee.Definition has `export(sandbox)` method to be independent of lychee.Environment.
- **Removed**: `lychee.pkginit()` and `lychee.envinit()`.
- **Added**: `lychee.pkg(type, id, callback)` to ease up reusage of package-defined environments.
- **Added**: `lychee.init(env, settings, callback)` to ease up initialization process.
- **Added**: Platform-specific `feature.js` to allow feature detection that lychee.js Strainer understands.
- **Added**: lychee.js Strainer supports platform-specific APIs via feature detection.
- Changed: lychee.Package supports Composite syntax.
- Added: lychee.js Strainer supports autofixes for lychee.Definition syntax.
- Added: lychee.FEATURES represents feature detection.
- Added: lychee.FILENAME represents current definition url.
- Added: lychee.PLATFORMS represents supported platforms.
- Added: lychee.Specification and lychee.Simulation to allow integration tests per-environment-sandbox.
- Added: `lychee.blobof(template, blob)` allows validation of deserializations without memory usage.
- Added: lychee.codec.DIXY supports DIXY format with JSON-compatible data types.
- Fixed: lychee.codec.BENCODE supports JSON-compatible data types.


## [2017-Q3] - 2017-09-28

- **Changed**: harvester.mod.Harvester supports proper git flow.
Expand Down Expand Up @@ -58,9 +78,9 @@ and `fixed`.
- Added: lychee.app.Main supports auto-sync of Stash and Storage instances.
- Added: Project Immune as an RTS Game demo.
- Added: lychee.app.Layer `query()` method.
- Added: `lychee.data.tree` Stack implementation.
- Added: lychee.data.tree Stack implementation.
- Fixed: `lychee.inject()` and `lychee.define()` supports proper mappings of packages.
- Fixed: `lychee.ui.entity.Upload` supports file dialog correctly (Browser-Bug).
- Fixed: lychee.ui.entity.Upload supports file dialog correctly (Browser-Bug).
- Fixed: `Font.prototype.measure()` improves cache usage and temporary usage.


Expand All @@ -70,15 +90,15 @@ and `fixed`.
- **Changed**: All helper scripts support the `LYCHEEJS_ROOT` environment variable.
- **Added**: lychee.js Helper supports `run:platform/identifier` syntax.
- **Added**: lychee.js Legacy Library as `/libraries/legacy`.
- **Fixed**: `lychee.app.Sprite` and `lychee.ui.Sprite` renders effects correctly.
- **Fixed**: lychee.app.Sprite and `lychee.ui.Sprite` renders effects correctly.
- Changed: Project Pong refactor to fit AI-relevant requirements.
- Added: `lychee.ai` Stack refactor to fit `NEAT` requirements.
- Added: `lychee.policy` Stack implements feature vectorization adapters.
- Added: lychee.ai Stack refactor to fit `NEAT` requirements.
- Added: lychee.policy Stack implements feature vectorization adapters.
- Added: Project Pong-BNN as a Backpropagated NN demo.
- Added: Project Flappy-ENN as an Evolutionary NN demo.
- Added: lychee.js Harvester synchronizes to `harvester.artificial.engineering`.
- Added: lychee.js Harvester beautifies JSON files.
- Fixed: `lychee.Stash` creates recursive directories correctly.
- Fixed: lychee.Stash creates recursive directories correctly.
- Fixed: `html` platform plays `Music` and `Sound` correctly via (new) Promise API.


Expand All @@ -91,8 +111,8 @@ and `fixed`.
- Added: lychee.js Strainer supports ESLint and automated code-refactoring features.
- Added: lychee.js Strainer understands `Callback`, `Composite` or `Module` API.
- Added: lychee.js Harvester uses a Watcher and faster bootup cycle.
- Added: `lychee.ai.enn` Stack implements a feed-forward NN architecture.
- Added: `lychee.ai.bnn` Stack implements a backpropagated NN architecture.
- Added: lychee.ai.enn Stack implements a feed-forward NN architecture.
- Added: lychee.ai.bnn Stack implements a backpropagated NN architecture.
- Fixed: lychee.js Fertilizer supports `html` Application Cache manifests.
- Fixed: lychee.app.Main `changeState()` handles invalid states correctly.
- Fixed: `html-nwjs` platform has correct peer-to-peer Networking.
Expand Down Expand Up @@ -133,7 +153,7 @@ and `fixed`.
- **Changed**: Migrated all Libraries to `/libraries` folder.
- **Changed**: Migrated all Projects to `/projects` folder.
- **Changed**: lychee.game renamed to lychee.app Stack.
- Changed: Renamed `sorbet` Project to lychee.js Harvester`.
- Changed: Renamed `sorbet` Project to lychee.js Harvester.
- Changed: Project Lethalmaze as multiplayer tank game.
- Changed: Project Boilerplate is compatible with AI.
- Added: lychee.js Harvester is a reusable library and project.
Expand All @@ -152,7 +172,8 @@ and `fixed`.

# GIT CHANGELOG

- [Unreleased](https://github.com/Artificial-Engineering/lycheejs/compare/2017-Q3...HEAD)
- [Unreleased](https://github.com/Artificial-Engineering/lycheejs/compare/2017-Q4...HEAD)
- [2017-Q4](https://github.com/Artificial-Engineering/lycheejs/compare/2017-Q3...2017-Q4)
- [2017-Q3](https://github.com/Artificial-Engineering/lycheejs/compare/2017-Q2...2017-Q3)
- [2017-Q2](https://github.com/Artificial-Engineering/lycheejs/compare/2017-Q1...2017-Q2)
- [2017-Q1](https://github.com/Artificial-Engineering/lycheejs/compare/2016-Q4...2017-Q1)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# lychee.js (2017-Q3)
# lychee.js (2017-Q4)

<img src="./guides/asset/qr-codes.png" align="right" width="500px">

Expand All @@ -12,8 +12,9 @@ Support our libre Bot Cloud via BTC [1CamMuvrFU1QAMebPoDsL3JrioVDoxezY2](bitcoin

These are the things that we are currently working on:

- lychee.ai.neat (ES/HyperNEAT AI) is being refactored and unstable (`feature/neat` branch).
- lychee.net.protocol.MQTT is being implemented to support SCADA systems (`feature/mqtt` branch).
- lychee.ai.neat (ES/HyperNEAT AI) is being refactored and unstable (`feature/neat` branch).
- lychee.Simulation is being integrated with the AI stack and unstable.
- lychee.js Guide is subject to change (to integrate new AI stack).


Expand Down
116 changes: 103 additions & 13 deletions bin/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,13 @@
return files.map(function(value) {
return value.substr(1);
}).filter(function(value) {
return value.substr(0, 4) !== 'core' && value.substr(0, 8) !== 'platform';
return value.startsWith('core') === false;
}).filter(function(value) {
return value.startsWith('platform') === false;
}).map(function(value) {
return 'lychee.' + value.split('.')[0].split('/').join('.');
}).filter(function(value) {
return value.indexOf('__') === -1;
return value.includes('__') === false;
});

};
Expand Down Expand Up @@ -349,12 +351,15 @@

require(_path.resolve(_ROOT, './libraries/lychee/source/core/lychee.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Asset.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Package.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Definition.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Environment.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Package.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Specification.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/core/Simulation.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/platform/node/features.js'));
require(_path.resolve(_ROOT, './libraries/lychee/source/platform/node/bootstrap.js'));

lychee.envinit(null);
lychee.init(null);

} catch (err) {

Expand Down Expand Up @@ -434,24 +439,22 @@
let code = (function () {/*
lychee.define('lychee.DIST').requires([{{requires}}]).exports(function(lychee, global, attachments) {
let Composite = function() {};
Composite.prototype = {
const Module = {
// deserialize: function(blob) {},
serialize: function() {
return {
'constructor': 'lychee.DIST',
'reference': 'lychee.DIST',
'arguments': []
};
}
};
return Composite;
return Module;
});
Expand Down Expand Up @@ -542,7 +545,89 @@


/*
* 2: PLATFORM GENERATION (ASYNC)
* 3. PLATFORM DETECTION (SYNC)
*/

(function() {

let errors = 0;

console.log('Injecting lychee.js Fertilizer Platforms');


let platforms = Object.keys(_PACKAGE.source.tags.platform);
if (platforms.length > 0) {

_CORE += '\n';
_CORE += JSON.stringify(platforms) + '.forEach(function(platform) {\n';
_CORE += '\tif (lychee.PLATFORMS.includes(platform) === false) {\n';
_CORE += '\t\tlychee.PLATFORMS.push(platform);\n';
_CORE += '\t}\n';
_CORE += '});\n';
_CORE += '\n';

}

if (errors === 0) {
console.info('SUCCESS');
} else {
console.error('FAILURE');
_process.exit(1);
}

})();



/*
* 3: FEATURE DETECTION (SYNC)
*/

(function() {

let errors = 0;


console.log('Injecting lychee.js Fertilizer Features');


let platforms = Object.keys(_PACKAGE.source.tags.platform);
if (platforms.length > 0) {

platforms.forEach(function(platform) {

let code = null;
let path = _path.resolve(_ROOT, './libraries/lychee/source/platform/' + platform + '/features.js');

try {
code = _fs.readFileSync(path, 'utf8');
} catch (err) {
code = null;
errors++;
}

if (code !== null) {
_CORE += code;
}

});

}


if (errors === 0) {
console.info('SUCCESS');
} else {
console.error('FAILURE');
_process.exit(1);
}

})();



/*
* 4: PLATFORM GENERATION (ASYNC)
*/

(function() {
Expand All @@ -552,15 +637,20 @@
return value.substr(0, 8) === 'platform' && value.substr(-3) !== '.js';
});
let bootstrap = {};
let files = _package_files(_PACKAGE).filter(function(value) {
return value.substr(0, 8) === 'platform' && value.indexOf('bootstrap.js') !== -1;

// XXX: This makes sure bootstrap.js comes first, always
let files = _package_files(_PACKAGE).filter(function(value) {
return value.startsWith('platform') && value.endsWith('bootstrap.js');
}).concat(_package_files(_PACKAGE).filter(function(value) {
return value.substr(0, 8) === 'platform' && value.indexOf('bootstrap.js') === -1;
return value.startsWith('platform') && value.endsWith('bootstrap.js') === false;
}).filter(function(value) {
return value.startsWith('platform') && value.endsWith('features.js') === false;
}).sort(function(a, b) {
if (a > b) return 1;
if (a < b) return -1;
return 0;
}));

let platforms = Object.keys(_PACKAGE.source.tags.platform).filter(function(platform) {
return _PLATFORM !== null ? platform === _PLATFORM : true;
});
Expand Down
4 changes: 2 additions & 2 deletions guides/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ The `lycheejs-strainer-fixer` command will show errors
every time it could not understand your code, its meanings
or its relations to other definitions.

The output format of the `lycheejs-strainer-fixer` command
is the following, where each line represents separate error:
The output format of the `lycheejs-strainer-fixer` command is
the following, where each line represents a separate error:

```bash
/path/to/file.js:line:column: Error Message. [error-rule-id]
Expand Down
100 changes: 100 additions & 0 deletions libraries/breeder/asset/api/Main.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"header": {
"identifier": "app.Main",
"attaches": {},
"tags": {},
"requires": [
"app.net.Client",
"app.net.Server",
"app.state.Welcome"
],
"includes": [
"lychee.app.Main"
],
"supports": {},
"type": "Composite"
},
"memory": {
"_app": {
"chunk": "lychee.import('app')",
"type": "lychee.Namespace",
"value": {
"reference": "app",
"arguments": []
}
},
"_Main": {
"chunk": "lychee.import('lychee.app.Main')",
"type": "lychee.Definition",
"value": {
"reference": "lychee.app.Main",
"arguments": []
}
}
},
"errors": [],
"result": {
"constructor": {
"body": "function(data) {\n\n\t\tlet settings = Object.assign({\n\n\t\t\tinput: {\n\t\t\t\tdelay: 0,\n\t\t\t\tkey: true,\n\t\t\t\tkeymodifier: false,\n\t\t\t\tscroll: true,\n\t\t\t\ttouch: true,\n\t\t\t\tswipe: true\n\t\t\t},\n\n\t\t\tjukebox: {\n\t\t\t\tmusic: true,\n\t\t\t\tsound: true\n\t\t\t},\n\n\t\t\trenderer: {\n\t\t\t\tid: 'app',\n\t\t\t\twidth: null,\n\t\t\t\theight: null\n\t\t\t},\n\n\t\t\tviewport: {\n\t\t\t\tfullscreen: false\n\t\t\t}\n\n\t\t}, data);\n\n\n\t\t_Main.call(this, settings);\n\n\t\tsettings = null;\n\n\n\n\t\t/*\n\t\t * INITIALIZATION\n\t\t */\n\n\t\tthis.bind('load', function(oncomplete) {\n\n\t\t\tthis.settings.appclient = this.settings.client;\n\t\t\tthis.settings.client = null;\n\n\t\t\tthis.settings.appserver = this.settings.server;\n\t\t\tthis.settings.server = null;\n\n\t\t\toncomplete(true);\n\n\t\t}, this, true);\n\n\t\tthis.bind('init', function() {\n\n\t\t\tlet appclient = this.settings.appclient || null;\n\t\t\tif (appclient !== null) {\n\t\t\t\tthis.client = new _app.net.Client(appclient);\n\t\t\t}\n\n\t\t\tlet appserver = this.settings.appserver || null;\n\t\t\tif (appserver !== null) {\n\t\t\t\tthis.server = new _app.net.Server(appserver);\n\t\t\t}\n\n\n\t\t\tthis.setState('welcome', new _app.state.Welcome(this));\n\n\n\t\t\tthis.changeState('welcome', 'welcome');\n\n\t\t}, this, true);\n\n\t}",
"hash": "cf91ab37",
"parameters": [
{
"chunk": null,
"name": "data",
"type": "Object"
}
]
},
"settings": {},
"properties": {
"client": {
"chunk": "this.client = new _app.net.Client(appclient);",
"value": {
"chunk": "new _app.net.Client(appclient)",
"type": "_app.net.Client"
}
},
"server": {
"chunk": "this.server = new _app.net.Server(appserver);",
"value": {
"chunk": "new _app.net.Server(appserver)",
"type": "_app.net.Server"
}
}
},
"enums": {},
"events": {},
"methods": {
"deserialize": {
"body": "function(blob) {}",
"chunk": "function(blob) {",
"hash": "cf6d9c5f",
"parameters": [
{
"name": "blob",
"type": "SerializationBlob",
"value": {}
}
],
"values": [
{
"type": "undefined"
}
]
},
"serialize": {
"body": "function() {\n\n\t\t\tlet data = _Main.prototype.serialize.call(this);\n\t\t\tdata['constructor'] = 'app.Main';\n\n\n\t\t\tlet settings = data['arguments'][0] || {};\n\t\t\tlet blob = data['blob'] || {};\n\n\n\t\t\tif (this.settings.appclient !== null) settings.client = this.defaults.client;\n\t\t\tif (this.settings.appserver !== null) settings.server = this.defaults.server;\n\n\n\t\t\tdata['arguments'][0] = settings;\n\t\t\tdata['blob'] = Object.keys(blob).length > 0 ? blob : null;\n\n\n\t\t\treturn data;\n\n\t\t}",
"chunk": "\t\tserialize: function() {",
"hash": "556bf572",
"parameters": [],
"values": [
{
"chunk": "{ 'constructor': 'lychee.event.Emitter',\n\t\t\t\t'arguments': [],\n\t\t\t\t'blob': Object.keys(blob).length > 0 ? blob : null\n\t\t\t}",
"type": "Object",
"value": {}
}
]
}
}
}
}
Loading

0 comments on commit 078bdbf

Please sign in to comment.