You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently ilang is far behind other programming languages out there in terms of features and ease at which a task can be accomplished. Currently, if someone wants to preform some io task, say reading email over imap, they will have to custom write a module in C++, which means that they are going to have to find and integrate a C++ imap module. The alternate that I am proposing that another scripting language is embedded into ilang, so that it can be used to handle all of the i/o interfaces. This would mean that someone could possibly use a python or node module to preform the imap manipulation, or write a small (~25 lines ideally) wrapper around already existing libraries to make them capable.
Feature
Nodejs
Python
Speed
v8 with Jit
Bytecode
IO model
Event loop
Threads
Library
more "pure" js libraries & thus interfaces are often reimplemented on top of TCP with various quality
Tend to wrap C libraries that complete a given task
Conflicting library deps
node_modules dir is used to allow multiple versions of a dep to be loaded at one time
does not support more then one version of a library out of the box
Language features
Prototype based system, weak typing
class based, kwargs support on functions
Embedding api
Would require minial changes to internals, but mostly v8
Supports an embedding api
The text was updated successfully, but these errors were encountered:
var requests = require('requests');
var ilang = require('ilang');
exports.request = function(args) {
var ret = ilang.promise();
requests(args, function(err, resp) {
if(err)
ret.reject(err); // idk if want to use reject? as then the error handling
else
ret.resolve(resp);
});
return ret; // ilang will automatically recognize an ilang promise
};
Sample using ilang:
from i import node
from i import promise
_http_request = node.require('requests');
request = {|Object args|
ret = promise.promise.new(); // should ilang importing classes specifically
_http_request(args, {|NotNull err| ret.reject(err); } + {|err, resp| ret.resolve(resp) });
return ret.wait(); // blocks until the promise is resolved
};
Currently ilang is far behind other programming languages out there in terms of features and ease at which a task can be accomplished. Currently, if someone wants to preform some io task, say reading email over imap, they will have to custom write a module in C++, which means that they are going to have to find and integrate a C++ imap module. The alternate that I am proposing that another scripting language is embedded into ilang, so that it can be used to handle all of the i/o interfaces. This would mean that someone could possibly use a python or node module to preform the imap manipulation, or write a small (~25 lines ideally) wrapper around already existing libraries to make them capable.
The text was updated successfully, but these errors were encountered: