Tuesday, November 30, 2004

INETA minus Karachi

Well, the trip to attend a wedding on Dec 5 and 6 at Sialkot, a training course at Islamabad on Dec 13 and 14. Did that maths and came up with a plan to showcase INETA, share some information about .NET or anything else anyone needs in Lahore and Islamabad. Sat down, drilled down, sent emails to anyone I could find in the academic circles to schedule seminars.
Heard back from UMT, where I'll be speaking on Introduction to the .Net framework on Dec 7, 2004 between 2 pm and 3:30 pm.
Also heard from IMS, Lahore, and the Associate Dean has forwarded my request to the Head of Computer Science.
FAST NUCES Lahore would like a knowledge sharing session with the faculty which is great. I'd like to share the DVD that I have about teaching using .NET.

Saturday, November 20, 2004

Web services and Apache

This is not specifically concerned with .NET but I checked and located that http://ws.apache.org/ has links to several web services projects. I'll explore them later. Meanwhile, I havent had time to spend on dgee as yet.

Thursday, November 18, 2004

Progress on DotGNU

OK, to run Web Services, I obviously need a web server. FreeBSD beign a rather secure OS out of the box it didnt install Apache, or maybe I hadnt installed it for some reason. Anyway, once again, I downloaded the source code for it. I downloaded Apache 1.3.3 since I was home and dial up was not good so the latest version was too big.
I configured it, compiled it and ran gmake for dgee, but it gave me an error that there was no DSO support in my Apache. I fired up vi and looked for where the error was and it was trying to lauch something called apxs, which is part of apache. I tried the command from the shell prompt and got the same response. I tried ./configure --help on Apache and notice --with-so and tried it, make isntall 'ed it and tried gmake on dgee again and it worked.
I need to configure dgee and Apache to test the sample web services applications. I'll post more when I succeed (or fail)

Wednesday, November 17, 2004

.Net on Unix

First, let me introduce you to my machine:
A dual processor capable machine based on the L440GX+ motherboard. Right now it is only ornamented with one Intel Pentium III 500 MHz processor. I have a Seagate Baracuda 40 GB hard disk drive and 360 MB of RAM. Windows 2000 Professional is installed in the 32 GB primary partition and FreeBSD 4.7 is installed on the Secondary partition which is 8 GB. I had installed FreeBSD 5.1 earlier.
The main reason for installing FreeBSD was that I wanted to work with NCTUns http://nsl.csie.nctu.edu.tw/nctuns.html. I wanted to get familiar with network simulations on it. Earlier I had used NS-2 and ran mobile IP and mobile ad hoc network simulations on it. It was very difficult to use. It bases its simulations on TCL scripts and its output is a huge trace file (the size depending upon the duration of the simulated test amongst other factors) which contains very raw data, and then you have to make sense of it based on your objectives using some sort of programming. Someone tells me tha Perl would be best, but I havent had any experience with it, so my friend used gawk, C++, sed, shell scripting and what not to extract the end to end delay in a simulation. More on that in some other post. Anyway, NCTUns does not compile on FreeBSD 5.1. I had been needing FreeBSD 4.7 for a long time, talked to many people and then finally stuck my office PC to the campus intranet and left it running overnight to download 2.42 GB of FreeBSD 4.7 ISOs, and here I am with it and NCTUns running.Down to .NET on FreeBSD. There are four .net projects in the open source arena that I am aware of:
1- Mono: http://www.go-mono.org/
2- OCL - Open CLI Library from Intel : http://ocl.sourceforge.net/
3- Rotor SSCLI - Shared Source Common Language Infrastructure - from Microsoft: http://msdn.microsoft.com/net/sscli/
4- DotGNU: http://www.dotgnu.org/
The DotGNU project consists of various components, some of them optional. The required build is:
treecc - an aspect oriented tool that assists in creating the pnet's compiler cscc
pnet - Portable .NET consists of a runtime engine, a C# compiler, and several useful development tools coded in C
pnetlib - Implementation of the C# System libraries such as mscorlib.dll, System.dll, System.Xml.dll, System.Drawing.dll, System.Windows.Forms.dll etc.
These must be built in the same order as specified above. Optional components include:
PNetMark - a benchmarking tool for the CLR
pnetcurses - a wrapper around ncurses library. Also includes a game called curse of frogger. Coded in C#
cscctest - a regression test tool for the C# compiler
pnetC - cscc has had the ability to compile C code since version 0.4.4 of DotGNU. pnetC is the companion implementation of the C library. There is some early stage compiler plugins for Java and Visual Basic.NET available
ml-pnet - these are some of the upper level libraries of mono distributed in a form that they can be used with the CLI implementation of DotGNU. Also includes ADO.NET with some useful SQL providers such as NPgsql
The DGEE project runs web services. It has the potential to host ASP.NET, but presently does not. You should have Apache installed on your machine as the make script includes a call to a component of Apache. It requires goldwater, a distributed message-based middleware. Obviously, gotldwater must be built first before dgee can be built.One other tar ball that I had downloaded is phlib. I couldnt figure out what it is for.
The build process is the standard ./configure followed by gmake (not make). I had trouble when I ran make, and when I did searches online, I found why I was getting the trouble. We must use gmake. My FreeBSD machine for some reason wasnt having ld load libraries to link from the /usr/local/lib and most of the libraries the compile process wanted were there. I tried the environment variable LD_LIBRARY_PATH but I couldnt get it working. My shell skills are weak and I always get confused with the difference in syntax between the different shells and stuff. So, what I did was either try ./configure --help, which showed me that there was a command line option --libdir=DIR, so I could say ./configure --libdir=/usr/local/lib --includedir=/usr/local/include or I could open the configure script and modify the variable CPPFLAGS to include -L/usr/local/lib -I/usr/local/include. With that, except for some missing dependencies, which will certainly vary from one compilation to another, and took me a lot of time and effort to figure out, everything went well. One tip is, if configure does not succeed, look at the config.log file. It contains traces of command lines that are invoked. I located missing -L directives to the gcc at more times than I care to count, so I opened configure in vi and included the -L in the CPPFLAGS variable as I mentioned before. Also, the stdout does not show you why a program compile test failed in configure, but configure.log contains the output of the gcc program, which will let you know whether gcc can not locate a library or an included header file and then you can go from there. One of the major source of problems to me, especially because it was the first bump for me, was missing glib-2.0. I downloaded the source from ftp.gnu.org and compiled it and faced the problems I outlined above, and finally got it working. So, you might want to make sure you have it on your machine before you start compiling.
Compiling C# programs: I'm mostly interested in C# as the programming language in the .NET arena, even though one of the corner stones of .NET are language interop and independence. Anyway, you can compile C# and C programs using cscc. The usual syntax is:
cscc -o helloworld.exe helloworld.cs
Once you've compiled the program, you can run it by typing
ilrun helloworld.exe
On Linux ILRun can be registered so that you wouldnt have to type ilrun before every managed program, but not on FreeBSD. If you're trying it out on Linux, please read the DotGNU docs. Of course, you can also assemble IL directly using the ilasm tool. Needless to mention, ildasm is also available.
ilasm -o helloworld.exe helloworld.il
ildasm helloworld.exe > hello.il
Other tools that I would like to look at later are:
Qt# - http://qtcsharp.sourceforge.net/
Gtk# - http://gtk-sharp.sourceforge.net/
wx.NET - http://wxnet.sourceforge.net/
CsGL - http://csgl.sourceforge.net/
C#-SDL - http://cs-sdl.sourceforge.net/

Monday, November 15, 2004

The many faces of .Net framework

I made a very long post this afternoon and just when I submitted it, the darned line dropped, and even if I hit the back button, I didnt get the post back. I'd actually spent a long time on that post.
Anyway, I've been trying out SSCLI Rotor (http://msdn.microsoft.com/net/sscli/), mono (www.go-mono.com), and Dotgnu (http://www.dotgnu.org). I spent today and yesterday on it. SSCLI compiled easily, but the other two gave a lot of problems. I got dotgnu done and tested out some stuff. I have got mono to compile but the make install stage is stuck at a certain point. I'll try to figure it out like I figured out the rest of it hopefully. I'll post more on my experiences with these three tomorrow or some other time later. I wouldnt make another long post.