Sunday, August 06, 2006

How is it so ?

How is it so that when digg puts up a recommendation service online, it becomes one of the biggest success of the web, while 7 years before, some computer scientists, paid by public money, designed a very similar or even better system which ended nowhere, except for two papers in a administrative report, and presentation at the 9th meeting of INRIA with the Industry Also we are not talking of a small lab with small means, but the reference lab in france for computer science, with some 5000 phd's and a 160 MEUR budget. So if, on a domain where you have a strong need, with a strong solution, computer science laboratories can not make it a success story, it raises questions :
  • What are they good for ultimately, if upon finding solutions they are not deployed ?
  • If you consider that innovation in computer science is driven by usage, how such a disregard for use can not hurt the academic production of such labs ?
  • On what ground will people be excited about doing computer research, when knowing that even if everything goes well, there work won't make a difference ?

As a counter example you can take (at least some) american universities, whose research projects are integrated in a more general project pipeline designed to foster innovation. As innovation gets mature, it raises new questions which will themselves create open problems to be solved. An illustration of this, based upon the very abstract subject of semantic web, is SIMILE at the MIT. Their website is definitely public-oriented, and more importantly, the work done is integrated in a pipeline where if potential is detected, it will be exploited, even if this potential has a minor chance of revolutionizing the n'th order langage compiler theory. No disregard for practical applications here, as having broad adoption is an integral part of surfacing finer issues which can be analysed, so that practice and theory are just one.

Saturday, August 05, 2006

Some interesting aspects of programming : Multi-stage programming

The basic need for "multi-stage programming" arises of the following situation. Say you need to write a program whose result won't be a single number, but rather a computation, for instance a function that double its input f : R --> R , x --> 2*x, or anything that might be represented in some langage of your choice called L. The question is : given L, how do we construct a langage L* which can output some L in a consistent way. One can thinks of generics in dotnet2.0 or Java 1.5 as a particular case of multi-stage programming. Generics are L* functions verifying L syntax, with an extra variable representing a type, and they eventually produce code in L for that type. L* naturally inherits a typesytem fostered by L typesystem. For instance some L* function producing a function outputing a real number cannot be composed with another L* function having strings as an input. Thus an expression that produces code for treating integers can be typed as being such. L* is a first-order langage with respect to L, and its types are expressed using first-order logic to create first-order data types of L. A very nice introduction to a multistage C# or java can be found here. As everyone gets more accustomed to computers, there has been a huge push to get more than just static data, but also exchange programmatic-like structures, like dynamic web pages. There programmers need to have multistaged programming capacities. This explains a lot of the popularity for javascript, along with its universal runtime platform, as its L* can accept almost everything, being a very weakly typed system.

Some interesting aspects of programming : Continuations



If you think about what a program performs, we start with an input and events to deal with.
Based on a certain combination of those we will
    -> perform computation
    -> feed the results to other functions who will themselves do the same
So that in concept, we deal with a graph of control flow, and programming is finding a way to transcript that control flow correctly.

Good programming is about to do it in a way that maximise the signal to noise ratio, maximizing expressivenes, and minimizing the plumbering.

The usual programming langage are "stack based", aka they implicitly gives back computed results to the caller. This implicit and uncontrollable link leads to problems when you want to spread a result in different places, as your graph requires, or decide to deliver the results based on a particular event, like what happens with GUI and generally asynchronous programming (exemple)

That's why continuations, by separating computations from the control flow, are sometimes useful.
  


Technorati Tags: , ,