rss

Could C++ have at least a good point ?

4

Category : C#

(I’m taking risks with such a title :P )

During yesterday computer science practical session (just think of the most hellish thing you have ever done), I was wandering lazily in the program list of the computer where I was supposed to do Excel stuff (actually I had pretty most finished and I wasn’t really in the mood to do extra work), when I found an antique DevC++ installation in one of the menu. Launching the thing I started to do a calculator (yes, after VBA almost anything else to program sounds interesting) when I remembered the use of the const keyword applied to functions and methods which (C++ purists correct me if I’m wrong) compiler-check that the code inside the function/method doesn’t modify both the parameters or the internal class state.

After thinking about it I thought : “Hey actually that’s a nice idea” and indeed it somehow lessens what the functional enthusiasts may call one of the ‘imperative nightmare’, namely, the imperative’s side-effects :

“Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the imperative programming style that emphasizes changes in state.“.
Wikipédia, Functional programming

This feature is particularly important in the today context where search for performance leads to parallel programming, a field where functional language excels by using this feature that imply that every function calls are independent from the execution context of the program.

IMHO this could proves to be a good feature in C# : a compiler-enforced mean to behave in a (mimicked) functional way with readonly access to fields and parameters and, thus, both no pollution of the others class’ methods call and the absence of locks which would allow, for example, auto-parallelism by the runtime. Especially when C# tends to get more and more functional concepts integrated both in the core language and in the class library.

Want to try AutoCorrection in MonoDevelop ?

Category : C#, Monodevelop

EDIT: Everything is now in SVN thanks to Lluis (Yay \o/), so you just have to do a little ‘svn up‘ or wait for the next release (0.16 ?) which should be available soon.

Then just follow these instructions :

  • Do a fresh checkout of MonoDevelop to get the core modifications that Lluis has already commited from my patch
  • Open up a terminal and go to $basedir/monodevelop/Extras/MonoDevelop.SourceEditor
  • To apply the patch, execute this command : ‘wget http://netherilshade.free.fr/mono/SourceEditor.patch ; cat SourceEditor.patch | patch -p0
  • After that go back to the root directory of Monodevelop (‘cd $basedir/monodevelop‘).
  • Then, depending if you had already compiled Monodevelop previously, just type ‘make‘ or the classical ‘./autogen.sh ; make
  • Finally you can either install Monodevelop to your system by using ‘make install‘ (under root) or simply by using ‘make run‘ which will run Monodevelop ‘in-place’ without breaking your already installed version.

If you want do disable AutoCorrection you can do it in the Preferences dialog in the Editor|General section.

Follow up on yesterday post

1

Category : C#, Mono, Monodevelop

A mass of pictures is worth a thousand word :

(EDIT: new screencast with better scaling and fixes)

http://netherilshade.free.fr/md-screencast.ogg

It may look better it you watch it fullscreen.

(sorry for the bad quality and size but I’m not really a screencast expert :P )

Today's hacking session

1

Category : C#, Mono, Monodevelop

Since my lab sessions and directed work at school start only next week I had two days almost completely free :) (exception of an administrative headache yesterday). So what could I do with these two days (and after yet another intégration party) ?

Well, without really understanding how, I ended up coding a missing feature in MonoDevelop (in fact it’s for both compiler errors and on-the-fly parser errors). It’s not totally finished (I need to change the tooltip to show the error messages and do some polishing on the editor code) but it’s already usable :

md-underlined.png

I know that the underline isn’t really at the right place in the screenshot but, well, it’s the fault of NRefactory’s parser ;) . Nonetheless I have to thanks Michael and Luis for their excellent comments and directions on #monodevelop, so, thanks a lot :) .

UTBM day 0 report

Category : General, School

Today has been my first day at my new school (UTBM for those who doesn’t remember :P ). It has been mostly presentation-filled moment with at one side the different professors & manager presentations (boring like these kind of stuff have to be) and at the other side the student’s presentations (about the student life at UTBM) which were, rather, refreshing after two hours spent sitting :D .

UTBM’s intégration (don’t know how I can call that in Englist : it’s what you do when you first enter in an University to better meld with older students) promises to be really exciting (it lasts almost 3 weeks of uninterrupted parties :P ) and in the meantime the rhythm for the first year’s lessons doesn’t seem too hard on the nerve (like traditional preparatory schools are) being basically almost the same organization than high school (but with more interesting subjects !).

The bad side of this is that I already know I will have to continue some boring mechanics courses (but I managed to skip the initiation one ;) ) and that the computer science first programming language will be VBA which is (sorry for all the VBA fans out of there) an insult to the world.

Tomorrow I’m confirming my definitive inscription with all the administrative stuff and I will join both the student association (which is in charge of the clubs) and the sportive association.

Two big news today

Category : Linux, Mono, Ubuntu

The first one is about the cooperation between Novell and Microsoft on Mono’s Moonlight (Silverlight implementation on top of Mono). The “announcement” can be read on Miguel’s blog : http://tirania.org/blog/archive/2007/Sep-05.html . Miguel had already given some hints about a big announcement on #mono yesterday but refused to tell more so here it is ;) . On a personal note (and since I don’t use Silverlight) I have mixed feelings about that announcement.

It seems to me that, like OOXML, Microsoft is trying to make partners in order to spread his patented technology with low efforts. I already though that Moonlight was a waste of effort (if Microsoft really wants to make their Silverlight a good and credible product they have to make it portable themselves) and, as I already said there, it proves again the dependency link that Mono is slowly acquiring on Microsoft technologies and, IMHO, it’s a pity. Moreover everybody knows that Novell isn’t really high regarded since the Microsoft-Novell patent deal and I’m pretty sure that this announcement won’t make Novell looks any better for most people who will think it’s yet another betrayal.

————————————————–

The other big news is about the upcoming, completely revamped, ATI Linux Driver ! Indeed, after boring their users with the “One Bug A Day Keeps AIGLX Away”-type releases, the announced rework of the driver internals is finally included in the main development branch.

To have complete information and coverage on what this driver 8.41 (and the releases after it) brings to Linux (*big* performances improvements, R600 support, AIGLX …) I advise you to read the Phoronix in-depth preview : http://www.phoronix.com/scan.php?page=article&item=821&num=1 and their benchmarks.

EDIT : AMD even announced that they will release specifications and code skeleton to allow the development of completly free drivers starting from the R500 chipset (which is the chipset that Avivo mostly targets). Really big kudos to AMD for these achievements ! link : http://lwn.net/Articles/248227/