Slashdot Mirror


User: opadikt

opadikt's activity in the archive.

Stories
0
Comments
3
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3

  1. Re:targeting javascript? on Announcing Opa: Making Web Programming Transparent · · Score: 1
    I wanted to comment about efficiency of the code compiled to JS. In most cases, an excellent JS-hacker would not have been written a better code by hand. As an example, here's a simple function written in Opa (iterating a function on a list):

    iter(f, list) =
    match list with
    | [] -> void
    | [ hd | tl ] ->
    do f(hd)
    iter(f, tl)

    And it gets compiled to this (before renaming and minimization):

    function iter(f, list){
    var tmp;
    while (c = list.tl) {
    f(list.hd);
    list = tmp;
    }
    return js_void;
    }

    If you want to look at your generated code, launch your compiled server with -d --js-renaming no, and look at all.js somewhere in a directory opa-debug.

  2. Re:threads on Announcing Opa: Making Web Programming Transparent · · Score: 1

    There's a now popular alternative to using threads, through epoll (or kqueue, /dev/poll, etc.). It's for instance the mechanism behind node.js. It's also the one behind Opa. About compatibility, yes, it is easy to plug external libs/tools inside Opa. At the moment, iIt's particularly easy with JavaScript, OCaml and C, and the supported languages will grow bigger with time. It's also very easy to cooperate with external programs through REST (we may also implement support for communication through Unix pipe.

  3. Re:AGPL makes Opa dead on arival on Announcing Opa: Making Web Programming Transparent · · Score: 1

    I've never cared for indentation defining blocks.

    You mean like in Haskell ? Opa does not do that: you can indent as you like.