May starts 2

Posted by jbevain Mon, 02 May 2005 12:04:41 GMT


ildasm

I’ve spent two days refactoring the old code i’ve wrote for ildasm. After that, i realized i was wrong in the way i should have made it. I’m currently using the top level of Cecil, manipulating ITypeDefinition, ICustomAttribute, etc. This is plain wrong for a disassembler, that need more low level access. So i have to rewrite it using the middle level, manipulating metadata tables, signatures, byte arrays, etc. I have to go this way because there is a loss of data when you go a level up of abstraction, for instance, i miss all the metadata tokens, that Msft’s ildasm prints in comments. I also want to implement natively the /adv switch of Msft’s ildasm, that has been proved to be very usefull when you write compilers, or other assembly manipulating tools. Two days lost. It will learn me to think better before starting writing code i guess. As soon as i have something usable, you’ll find it in the cecil module of Mono’s SVN.

Academic days

I’ve spent three days last week near the Eiffel tower, at Microsoft’s academic days. Some very good sessions, one about the Phoenix project, guys, they are working on what i have in my mind for years. It’s very impressive, maybe my school could apply to the academic program associated. I’ve met Serge Lidin, that is the author of Microsoft’s ildasm, ilasm, peverify, and so on. He talked about the future of the MSIL language, there is not a lot of work to provide to be .net 2 compatible in those tools. Patrice have a pic of me, talking to both Serge Lidin and Mark Lewin, from the SSCLI project, (i’m in the middle) :

It seems that my talk about AOP and AspectDNG was not so bad, some people contratulate me after, and I had a lot of good questions. Anyway, people like researchers love AOP. You can download my slides : “Meet Alice” (yeah, AspectDNG is wonderful…, sorry, it is written in french). So it was three real good days (eating very good food for free, in an hotel the room was bigger than my apartment during three days was cool too).

A funny anecdote, there was a little talk about Mono, it was quite good, the guy used my slides from the DotNetGuru’s Symposium, and at the end, he claims that he wanted to show the PetShopDNG running on the top of XSP, but that it does not works. He tried, but XSP was reporting an exception. Fortunately, i’ve made running the PetShopDNG on Mono, and i’ve even presented it at the DotNetGuru’s Symposium, and i saw the exception. In fact, the PetShopDNG was simply misconfigured. I told it to the guy, that invited me to make this thing work. After two little changes in the Web.config, the PetShopDNG was running on the top of XSP, without any modification. Really cool. As it was the end of the talk, i’ve asked for questions about Mono, and for 15 minutes, i’ve answered to them. It’s good too see that people are really interested in Mono.

Levenshtein Distance

Following Nat’s links, i’ve discovered the Levenshtein Distance algorithm, so i decided to write it in C#. Thanks to others examples, it was really easy, and i still don’t know why i did that. You’ll find the whole stuff, including simples tests here : http://evain.net/public/Levenshtein.zip.

The Module, a new Design Pattern ? 5

Posted by jbevain Mon, 25 Apr 2005 13:31:04 GMT


I’m partially enthusiast about the partial classes. Here is a sample of code that a French Microsoftee presented to us :

<!- code formatted by http://manoli.net/csharpformat/ ->
<span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> Person
{
    <span class="kwrd">public</span> <span class="kwrd">string</span> firstname;
    <span class="kwrd">public</span> <span class="kwrd">string</span> lastname;

    <span class="kwrd">public</span> Person (<span class="kwrd">string</span> firstname, <span class="kwrd">string</span> lastname)
    {
        <span class="kwrd">this</span>.firstname = firstname;
        <span class="kwrd">this</span>.lastname = lastname;
    }

    <span class="kwrd">public</span> <span class="kwrd">void</span> Format ()
    {
        <span class="rem">// ...</span>
    }
}

<span class="kwrd">public</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> Person
{
    <span class="kwrd">public</span> <span class="kwrd">static</span> Person FromDataRow (DataRow r)
    {
        <span class="rem">// ...</span>
    }

    <span class="kwrd">public</span> <span class="kwrd">static</span> Person FromAnotherDataSource (DS s)
    {
        <span class="rem">// ..</span>
    }
}

Isn’t it a neat design ? Grrrr, I know this is only a sample, to explain the partial keyword, but i know that lots of people will use it this way. Please, use only the partial keyword where it is meant to be.

April come she will

Posted by jbevain Sun, 24 Apr 2005 12:44:47 GMT


Tech’Ed

Microsoft invited me to the Tech’Ed Europe, some sessions seems very promising. The good point is that I have not yet visited Amsterdam, this is the occasion. I hope to see people there, feel free to mail.

AspectDNG

Thomas Gil have started using Cecil to produce ILML inside AspectDNG, sounds like he is waiting for me to end my job, so that he can use Cecil to convert an ILML file to a valid assembly.

OPath

Sebastien Ros offered me for Christmas his OPath parser library. Two options, I can write a clone of its Eon library that uses it, so that we could query objects graphs, just like Sebastien does. If I go this way, the Evaluate method should be a generic one, so that we could return strongly typed collections or items. The second option is to integrate natively into Cecil the ability to query the assembly, but it is too much Cecil centric, I’m sure other people wants to play with OPath !

Microsoft Research

I’m finishing my slides for Tuesday, again, the agenda is very promising, the thematic this year is Software Engineering, Architectural Design and High Performance Computing. Hope they’ll enjoy AOP AspectDNG’s way. I’ll be hosted there, (even if I live at 15 minutes from there). Every details here.

XScale

I’ve look toward installing Linux on my Dell Axim X30 (I don’t really know what to do with it), but it looks like it will be a very time consuming task, the Linux port is not really ready. However, I’ve added a new entry in my TODO list: trying to port Mini, Mono’s JIT, to this architecture, so that I can learn from inside the Mono runtime. I’ll need help, but Massi said one time that he was working on this on his spare time, and there is some interesting threads in the devel list to read fist. Sounds like it is a good holiday work, but I have to finish Cecil first!

There and back again 1

Posted by jbevain Wed, 20 Apr 2005 20:55:04 GMT


I’m back !

I’ve spent a lot of time in the east of France, in Strasbourg. It’s a nice city, with lots of students. Sadly, I left my camera in Paris. Teaching XML, and making XML Schema writing (by hand) attractive for students is definitively not an easy thing. I’ve also visited friends from Evaluant in Mulhouse.

I’ve started working on Cecil again, I’m implementing the writing part of the API. You’ll be able to use both Mono.Cecil and System.Reflection object model, for instance, you can add custom attributes using those two factory methods defined in the ICustomAttributeProvider interface :

ICustomAttribute DefineCustomAttribute (IMethodReference ctor);
ICustomAttribute DefineCustomAttribute (ConstructorInfo ctor);

And Cecil will automatically add needed references to assemblies and types. Fun to do, hope it will be fun to use. Sebastien is using Cecil to make some drawing, read part 1 and part 2 of his work.

I’ve bought the Dragon Book !

The Dragon Book

Nice to read, but it was expansive… I’ve just found on amazon that they are writing a third version of the book, another best seller to come, take a look there. I’ve bought AspectJ Cookbook too, I had to, there is a monkey on the cover ! A good book, I now have few ideas for an AspectDNG in action…

Older posts: 1 ... 27 28 29 30 31 ... 33