Archive for janvier 2009

30
jan

Mono at school : Scheme interpreter

419031515_989b354b68_o

If you remember the last capharnaüm, I was talking about working on an Scheme interpreter written in C# for a course this semester. Now that this semester is over, I felt just like it was about time to unveil it to the world.

First of all : it’s a prototype. That means it can probably kill kitties among other possibilities.

Actually, the main goal of the project was to find ways to plug things like the DLR and Irony together into a working state.

As of today I think we did it. Our interpreter is already able to do basic Scheme. For the moment, defines (both with constants and lambdas) and most basic standard functions/operators on atoms and list are there.

Following are some snippets that work perfectly fine :

(display (+ (* 2 (* 2 10)) 2))
> 42

(define foo "bar")
(define bar "foo")
(display (string-append bar foo))
> foobar

(define foo (list 1 2 3))
(display (car (reverse foo)))
> 3

(define fact
    (lambda (n)
       (if (= n 0)
          1
          (* n (fact (- n 1))))))
(display (fact 4))
> 24

The cool part is that it works very well with Mono (well it was more getting DLR and Irony to work with Mono in the first place). However, we added some specific extensions which allows to consume CLI library’s methods, making it useful for a simple glue language.

In it’s current state, it’s a simple wrapper around some reflection code which makes possible simple thing like

(display (call "System.Environment" "MachineName"))
> phoenix

But it would be simple to extend that to include instantiation of .NET object.

Ultimately this interpreter could be used in a variety of scenarios like application scripting, Silverlight/Moonlight logic code or simply for the joy of recoding the universe.

In addition, the architecture is based on a pipeline pattern where each part of the interpretation process is split among several components interacting together with event dispatch. With this approach it is super easy to customize the interpreter to your will. It also improves the testability of each part of the interpreter though the test suite is rather poor (very poor in fact) at the moment.

Code is available on the google code repository and there is a tarball for quick compile. French report is also available there (though it’s not that shiny).

Oh, before I forget the most important, we nicknamed our interpreter “Béchamel” as the French sauce. Bonus point for the one who is able to mix the sound of the word as we did in order to make “Scheme” appears.


free blog themes
28
jan

Résultats A08

PS29 → Admis (C)
MT26 → Admis (D)
LO27 → Admis (A)
TX20 → Admis (B)
LJ00 → Refusé (FX)
EI01 → Admis (D)
Troisième semestre à l’UTBM, dernière ligne droit avant la branche informatique de l’UTBM, plus ou moins les résultats auquel je m’attendait.
Une fois n’est pas coutume je vais me forcer à faire un descriptif de toute les UVs [...]


free blog themes
14
jan

February previsions

Mono

Thanks to the change of school semester at my school, I’m going to have a break in February of almost 4 weeks during which we are supposed to participate to some activities chosen among a list.

The cool thing is that I managed to make « contributing to Mono » one of those activities. Thus, I will have 4 weeks to work on Mono and integrating SoC’s ParallelFx work into the mainline tree with the blessing of my school. Yay :-) !

FOSDEM

There are also a bunch of other nice things I will be able to do this February. Going to FOSDEM is one of those (I took the train tickets this afternoon) which mean I can now wear the pretty badge too :

I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting

Unless we have trains problems on the way, we should be there for the Fosdem’s Beer Event too, so if you want to discuss Mono, ParallelFx or whatever around an (excellent) Belgian beer be sure to come by ;-) .

Prologin

Finally, I was qualified to go into the semi-finals of Prologin, the French algorithmic contest for young people, this year again. It will be a good occasion to see old faces.

For the first time there are also proposing C# as a qualification language. Hopefully, it will mean no on-the-fly C++ learning for me this time :-) .


free blog themes