Older blog entries for cortezcarlos (starting at number 19)

7 Nov 2003 (updated 10 Nov 2003 at 10:44 UTC) »

It has been a loooong night. I've been working so long in learning som techniques and routines avalaible in the Mono platform.

Iy you are wondering why I'm so sad -I don't really think you were doing that -, it's because I could not compete in the ACM Regional Eliminatory. The cause? the guys at my university said "we have no money" and almost said "that's an extra activity and we don't care". It is a really really bad thing, based in the fact that it is a private school and ... it is very expensive (and has a bad system, as almost every private school).

But well, not everything is going to a only-rich people school and have to support them; of course not (thanks to God!). During my reading I discovered a great and strange class that is a collection and can be accesed using a Key or a Index.

So you have your SortedClass and add a pair of values (a key and a value), and then you can get the value or even the key using an int indexer. Also it orders the values based in their keys (the must be comparable).

Well, I think I'll keep myself awake and try to read some about compilers ... yeah, right.

Finally tome-off !

Finally I got some time. The school is so boring but needs to be attended. I'm back with a small article that explains the use of the P/Invoke routine for the Mono Environment. In fact, it's only the introduction (I'll try to write a second and a third articles about other features and properties of the routine).

Also I got the "Introduction to Algorithms" book from Thomas Cormen; I really think it's a good book.

BTW: You can check the article (which I sent for the Linux Gazette yesterday and hope to be publicated) at http://dev.cu.buap.mx/carlos/reminder/pinvoke.html

BTW2: Somw weeks ago I began to wrote an small toy in gtk# that takes some files that include phrases and print one of them randomly ... also it receives a file and writes how much days left for that date. You can check it at http://dev.cu.buap.mx/carlos/reminder ... don't expect a big application, I wrote it in 8 about hours ;)

Today I continued reading the mcs compiler code. Sometimes is hard for me, specially the driver structure. Meanwhile, I'll try to follow reading it, and try to discover the function of the classes and structs designed in the mcs implementation.

Note that a weird thing I read, was that it is possible to create a static element of the class A inside the definition of the same class! It sound strange, but works.

Yeah, I have finally finished the Class definition section in the Mono Tutorial, and just want to review it all in these days. Maybe I'll be working on the Controls structs section, I think.

In the next weeks I'll continue reading the Compilers and techniques book ( I don't remember the author ). I really want to be part of the C# development team. It would be great.

Meanwhile I'll be preparing myself for the Acm regional contest.

During this week I've been reading some pieces of code of the Mono C# Compiler. I still don't understand some parts, and I begin to think that it is a good idea to read a good compilers book.

Meanwhile, I'm going to fix the error in the C# chapter inside the Mono Handbook, because some parts are inaccessible to the browsers. After that, I'll continue working on the tutorial.

I still don't know if I should try to finish my article about P/Invoke for the next Linux Gazette, because I want to include some parsing tools ... let's see ...

I've uploaded some more docs for the C# tutorial inside the Mono Handbook, and have almost finished the Class section. The remaining parts are the static members and the string indexers.

I don't know what part must be started then. Maybe I will be writing the "Event and Delegates" section, or maybe the "Inheritance", I still don't know ...

Tomorrow I have a GULP meet, and will try to give a course about the Mono Proyect. By the way, I should be writing some homework code ... and should be reading the Mono C# Compiler ...

Well, I begin to hate some people who believes that tha hard work will give them more intelligence. I don't think so, because is like thninkg that doing some task commando to command is so good like doing that in a script. I hate this kind of people, because they trend to be stupid enough ( they feel they are so good and talk too much about their 'good' work ).

Well, I've been writing some docs for the Mono tutorial. Let me say it is hard to think how to explain it the clearest way. I don't mean a GOOD way but a OPTIMAl way ( plase don't say ' In fact, it is not so hard' bacuse I have enough with people like you - if only you were capable of demostrate you can do it OPTIMAL :D )

In the afternoon I was writing some docs for the Mono tutorial, trying to explain the what a class is. You know, it can be difficult to think in the BEST and OPTIMAL way to design a tutorial, so the user can really learn. No dynamic programation, no complicated algorithms. Only experience and intelligence. That's all-

But wait, if my docs are not very clear, I'll have to re- write them ( nobody learns with bas documentation ), but I think they are perfect.

Today I begin with my new courses, and I hope to ahve time to practice for the next Acm regional chapter contest and for contributing to the Mono project ...

During this day I was in Cuautla ( here in México ) talking about Mono project, and it went perfect. First of all, I began to show some students how looks like the c# sintaxis and how to compile/execute with this project.

The people were polite and they were listening everything about the features of the project. By the way: I knew that some of them have a team for the acm regional contest, so, it makes me feel happier. I think it's time to train and train an train ...

Tomorow I must finish the translation of a security administration article. I hope it will be finished. Since next friday I have a last test, I must study so long ... I'll begin int his moment ...

Sorry for the personal problems' log. Well, being back to the interesant problems, I'm working on a P/Invoke article for the Linux Gazette, which let the developers extend their code in C and Perl languages ( at this moment ) and expose it to the Mono world ( Mono languages ).

It is very useful, because, for example, it made possible to bind the Gtk+ api to the Mono platform, so, we now have Gtk#, a great help for the future Gtk+ development.

But I'm having some problems with the datatype, cause sometimes the environment tries the float types as int, and it is not so good. Also, I got some problem while trying to work with C pointers. I've read a moment ago, there are apointers in C#, but they are unsafe ( I would really like to avoid use them but ... ).

I hope to finish my article the next monday or tuesday. By the way, here is a example, which shows the way P/Invoke works: we use DllImport attribute ( attributes are a way of asociate data with the data inside the application ), and loading a function from the math library ( libm.so ) :

[DllImport("libc.so")]
static extern double sqrt ( double n );

It is neccesary the use of the extern and static modifiers to the function signature.

10 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!