Archive for the School Category

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
07
nov

Capharnaüm #6

What’s happening since last time.

Programming

pdc2008brain

Appetizing isn’t it ?

PDC is over. Lot of exciting stuff coming down the pipe for .NET and parallel programming. However, no C#4 announcement for parallelism support (Anders mentioned it in the intro of his keynote but no showcasing).

In other news, ParallelFx is now available directly in .NET 4 CTP (sucks that it’s only available in this virtual machine format thing). This new release brings a number of change which will be implemented in Mono when I have more free time (and a somehow formal API documentation). So far I haven’t see any breaking modifications except some API renaming, additional state exposure or adapting some of the stuff I had already coded in advance ;-).

An interesting discovery with the DSS and CCR framework (next SoC maybe ? -) ). Enjoyed Miguel keynote too.

Life

richard_stallman_2005_chrys

by chrys

I’m organizing with others a free software conference with Richard Stallman at school. Lot of stuff to work on. Btw it’s open to everybody (though mostly interesting for people located east of France), check out this page[fr] for more for informations.

Also doing some server management and setup for a school event. Things got hard when we tried to get LTSP to work with exotic thin clients (IBM NetVista boxes) but now it’s all ready.

It’s also school project time with a C BigInteger manipulation library and a C# Scheme interpreter (nicknamed Béchamel) to code.

Finally, exams are near the corner. Not too much of them this time but I better not screw them -P.


free blog themes
06
sept

Busy

Life is pretty hectic these days with the start of a new school semester and the assorted things like seeing back friends, integrating the new students and resuming work in student clubs.

As a result the ParallelFx SVN log has been pretty silent (which worried some people). In fact code for MCas and STM is coming along nicely, though not ready for their prime, which is why I keep it in my local branches for the moment. Free hacking time should gradually returns as life settles back to normal.

Also, I’m going to update soon the test packages with the latest bits as part of providing code samples to Google.


free blog themes
01
juil

Résultat deuxième semestre

LE03 – Admis(A)
LO11 - Admis (A)
MT12 - Admis (D)
PH01 - Admis (C)
PS11 - Admis (E)
ST10 - Admis (D)
TN21 - Refusé (F)
Petit commentaire:

LE03 : UV d’anglais de niveau 3, le niveau minimum à avoir dans une des 3 langues principales de l’UTBM pour être admissible au diplôme. TP et TD intéressants (séance de préparation au TOEIC ennuyeuse par contre). Il devait [...]


free blog themes
20
mai

CoverFlow finalized

Maybe some folks remember the CoverFlow GTK# widget I talked about a while ago. I had left it in an undetermined state but today I managed to clean it and make it the work the way I intended.
For the little background, I want to use that widget as part of a presentation I will make [...]


free blog themes
06
mar

No special title

Time pass by so fast that I forgot to update my blog with all the recent events. In order to not break the cycle of General&Life subjects here is my report of the past week. Feel free to skip if you find that sort of stuff boring, I hope hacking posts to be back in [...]


free blog themes
30
jan

Premiers résultats à l'UTBM

En direct du oueb :

CM11 – ADMIS (E )
LO10 – ADMIS (A )
MG00 – ADMIS (E )
MT11 – ADMIS (B )
PM11 – ADMIS (C )
PS12 – ADMIS (A )
Quelques impressions :

J’ai apparement majoré en LO10 (final expédié en 1h, c’est bien le seul d’ailleurs ) et en PS12 (!). Maintenant je peux [...]


free blog themes
26
jan

Pour les résultats des finaux

Juste un petit script Python à mettre en anacron :
[code lang="python"]#!/usr/bin/python
from urllib import *
from os import *
from os.path import *
import filecmp
import dbus, gobject, dbus.glib
url = "http://services.utbm.fr/ACTU/resuv/index.php"
name = "nom"
ine = "numéro d'ine"
save_directory = "/tmp/"
save_name = "exam.html"
save = join(save_directory, save_name)
posts = { "nom" : name, "motdepasse" : ine }
post_request = urlencode(posts)
f = urlretrieve(url, data=post_request)
if not exists(save):
rename (f[0], [...]


free blog themes