Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules #50

Open
xcthulhu opened this issue Aug 1, 2013 · 2 comments
Open

Modules #50

xcthulhu opened this issue Aug 1, 2013 · 2 comments

Comments

@xcthulhu
Copy link

xcthulhu commented Aug 1, 2013

It would be great if libcello wrapped libtool's dynamic module system:
http://www.sourceware.org/autobook/autobook/autobook_162.html
http://www.sourceware.org/autobook/autobook/autobook_163.html

Then you could get namespacing for cheap:

with (https in module('https.la')) {
    var options = new(Table, String, String);
        put(options, $(String, "key"),  $(String, "key.pem")); 
        put(options, $(String, "cert"), $(String, "cert.pem"));

    lambda(run_server, args) {
        var response_writeHead = cast(at(args, 0), Function);
        var response_write = cast(at(args, 1), Function);
        call(response_writeHead,
            $(Int,200),
            $(String,"{\"Content-Type\": \"text/plain\"}"));
        call(response_write,
            $(String,"Hello world!")); }
            /* etc */
    }

    call(https, "createServer", options, run_server);
}
@orangeduck
Copy link
Owner

Ah this is a very cool idea. I will definitely take a look into it when I get some time. I've written a dynamic module loader type thing before so should be good fun.

@orangeduck
Copy link
Owner

Started work on this in 02a55d2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants