MS Releases .NET Source, Sort Of
cam_macleod writes "A friend at Microsoft (he's a nice guy, really!) pointed me to their release of the Common Language Infrastructure (CLI) source, which builds successfully on Windows, FreeBSD, and MacOS X 10.2 -- he says Linux too, but their website strangely doesn't mention it!"
This is not new. Microsoft released this long ago in an effort to show that .NET really *is* cross platform. Here are the changes (as listed on the website):
Support for Mac OS X 10.2.
Additional code clean-up and bug fixes.
Debugger improvements.
Class reference documentation (separate archive) and additional samples.
Build system improvements and additional test cases and tool improvements.
No. Timothy is a moron, and doesn't really understand what the download is. You can't download the source to the .NET framework. You can download the source to a Common Language Infrastructure implementation.
.NET Framework includes an optomized implementation of the Common Language Infrastructure. But, the .NET Framework also includes a huge .NET class library, including the Windows Forms classes, the ASP.NET classes, the ADO.NET classes, WebService classes, and a host of others. Most "useful" .NET programs are going to use some of the .NET classes.
.NET framework includes more than this, but the classes are the important part for portability.
.NET class libraries for free, either.
The Microsoft
The
Basically, think of CLI as essentially just a compiler and a small standard library. To build a complete application, you're still probably going to use a lot of additional libraries. Microsoft hasn't gone insane, and they still understand that their Operating System is valuable. They haven't started distributing kernel32.dll for free yet, and they aren't going to be distributing the
I should point out, though, that C# and the CLI are pretty damned cool all by themselves. They're rocking sweet technology, and there's no reason a good portable class library couldn't be put on top of them, like Sun has done with their Java implementation.
However, I sort of wonder if MicroSoft hasn't pissed off too many of the big players in the world -- I don't expect Oracle or IBM or Netscape to pick up the CLI and run with it, incorporating it in all of their new products, like they did with Sun's JVM. Ooops, did I say Netscape? Nevermind.
Slashdot is jumping the shark. I'm just driving the boat.
it's not so much an attack on the GPL, it's just saying tht you can't relicense derivatives under something like the GPL. In much the same way as you can't relicense derivatives of GPL work under any other license.
It only works under 10.2. strtok_r was added in Jaguar.
What is the Microsoft Shared Source CLI?" The Microsoft® Shared Source CLI is a working implementation of the ECMA-334 and ECMA-335 standards (known to us mortals as the Common Language Infrastructure and the C# programming language). The source code in this distribution builds on FreeBSD, Mac OS X, and Microsoft® Windows. (There are instructions on how to do this, as well as hardware requirements, below.) Besides the CLI and the C# compiler, this distribution contains a JScript compiler written entirely in C#, as well as a wide variety of tools, utilities, managed classes, and samples. It is intended to be an appealing new platform alternative for people who want to learn, to teach, to tinker, or to experiment more formally with computer languages and computer language infrastructure.
This copy of the Shared Source CLI is being distributed as source code under a Shared Source license. It is important for you to read through the brief license that is included with your copy of this distribution now, because once you examine the code or use it in any way, you will be bound by the terms of this license. For more information about the Shared Source program at Microsoft, take a look at the Microsoft Shared Source Initiative Web page at www.microsoft.com/licensing/sharedsource or search www.microsoft.com for "Shared Source".
This is the third release of the Shared Source CLI, and it is for non-commercial, experimental use only. Microsoft will be updating this distribution periodically. The distribution is completely unsupported, although the development team will be checking in on the microsoft.public.shared_source.cli newsgroup.
By default, the build scripts in this distribution produce an optimized debug build of the tools and runtime. This is because we believe that most of you are programmers, and that you will want to be spelunking around in the debugger but you still want reasonable execution performance. If you want maximum source debugging support you should choose a checked build which will turn off optimizations and allow better source-level debugging. If you want to get more performance, you can build a free build, which will execute code considerably faster. For instructions, see the detailed build instructions in building_sscli.html.
Colloquially, we refer to this project as Rotor. Why? Well, you'll find the following definitions for the word:
An altocumulus cloud found in the lee of large mountain barriers, that circulates around its horizontal axis. An important part of a cryptographic encoding or decoding device. A quantity having magnitude, direction, and position. The rotating part of a dynamo, turbine, distributor, compressor, centrifuge, blower, or motor. A device that propels a ship forward in a cross-wind, exploiting the Magnus effect. The rotating airfoil assembly on rotary-wing aircraft. It's obvious! Rotor is all of these and more...
Getting Started OK, having taken care of that, Rotor has been built and tested on Windows, FreeBSD, and Mac OS X. If you want to build and run the source code, you'll need some additional software depending upon your OS. The Rotor build process uses Perl in several ways, both to run the test harness and as a way to autogenerate some utility code. On Windows you will need Microsoft Visual Studio® .NET as well as Perl. (The Rotor development team currently uses ActivePerl 5.6.1.630, from ActiveState, but perl.org is always a good bet as well.) On FreeBSD, the only thing that you will need in addition to a FreeBSD developer distribution is Perl. (We are currently using 5.005_03). There are several samples that uses the Tk 8.4.0 widget set; if you choose to build this, Tk is available from www.scriptics.com.
As far as hardware goes, we really recommend having 512M of memory in your computer. While we've heard of success in building on machines with less, it can be mighty slow (and the swap thrashing can be horrific) Truth be told, using the Windows compilers, 256M seems to work pretty well, but gcc seems to use more resources and you'll see more performance degradation on FreeBSD and Mac OS X because of this. As far as disk space goes, 100 megabytes should be sufficient if all you will be doing is viewing the source, but if you are doing active development (especially running the test suites) you will need at least a gigabyte of free disk space.
Please note that the Rotor distribution was only tested on operating systems using English locales. There are known problems with attempting to build and execute Rotor on other locales. If you avoid using locale-specific characters in the path to the source code, you may be able to use Rotor on operating systems using other locales.
Summary of System Requirements
Windows We've tested the distribution on Windows XP and Windows 2000. We recommend Windows XP. Microsoft Visual Studio .NET installed. You must, at a minimum, install the Microsoft Visual C++ .NET product.
Perl installed and in the path.
Tk installed if you want to run all the samples.
256 MB of memory (suggested minimum).
100 MB of free disk space to expand the archive.
One gigabyte of free disk space to build the distribution.
FreeBSD We have tested the distribution on FreeBSD 4.5, 4.6, and 4.7. We recommend FreeBSD 4.7. Developer distribution (which will include the gcc compiler and other build tools) Tk package installed if you want to run all the samples. 512 MB of memory. If you do choose to use less memory then make sure your swap space is at least four times your memory size. 100 MB of free disk space to expand the archive. One gigabyte of free disk space to build the distribution.
Mac OS X Mac OS X 10.2. Apple Developer Tools. Tk package installed if you want to run all the samples. 256 MB of memory: 512 MB recommended. Ensure the BSD subsystem is installed. (This is the default installation.) Stuffit(TM) Expander 7.0 will unpack the archive. Otherwise use gnutar and not the default tar. One gigabyte of free disk space to build the distribution.
For more information you might want to peruse the documentation index for more links into the documentation set. We recommend that you also have either Visual Studio NET or the .NET Frameworks SDK as secondary documentation to the ECMA specifications.
Building and Running Code We've included a detailed document about building Rotor, but if you are impatient, here are very brief instructions to get you up and running quickly.
On FreeBSD: Once you have extracted the contents of the tarball (tar xvfz will work), you should source the contents of either env.sh or of env.csh in the root of the distribution, depending upon which shell you are using. For example, in csh you might type the following command: source env.csh Once this script has run, type ./buildall in the same instance of the shell, which will initiate the build process.
On Mac OS X: Once you have extracted the contents of the tarball (StuffIt 7.0 or gnutar), in a console window you should source the contents of either env.sh or of env.csh in the root of the distribution, depending upon which shell you are using. For example, in csh you might type the following command: source env.csh Once this script has run, type ./buildall in the same instance of the shell, which will initiate the build process.
On Windows: Once you have extracted the contents of the tarball using your favorite archiving utility, open a command window and run the env.bat script from the sscli (root) directory of the distribution. You need to run the script from this directory because it uses the current directory to set up subsequent environment variables. After this, in the same window, type buildall, which will initiate the build process. In order to be useful on both systems based on UNIX systems and Windows, text files in the archive are linefeed terminated. If you are running Windows, you'll want to view these files in an editor that handles this case automatically (many do, including WordPad and the Visual Studio editor), or else use a utility program to remove the convert the linefeeds to Windows-style carriage-return/linefeed termination.
Once the build has successfully finished, you should be able to compile and execute the simple "hello world" test program by changing to the samples\hello directory (samples/hello on UNIX systems based platforms), and then typing:
csc hello.cs clix hello.exe This will churn for a while (loading takes less time on the free build), and then print out "Hello World!" The program clix is a program loader for managed executables. The first line uses the C# compiler to produce hello.exe from hello.cs, a tiny program that prints "Hello World!" to the system console.
Assuming that hello.exe works, you are now able to compile C# sources using csc (the C# compiler), and JScript sources using the jsc compiler. Remember to always run Rotor programs in a shell that has been set up using the env scripts as described above. Also remember that managed executables need to be launched using clix in order to run under Rotor. For example, the JScript compiler must be run in this way.
You are almost certain to find that the map of the source code to very useful in navigating around the distribution. The document on building rotor will also be very helpful if you are modifying code; its scenario-based descriptions can be time-saving.
MICROSOFT SHARED SOURCE CLI, C#, AND JSCRIPT LICENSE
This License governs use of the accompanying Software, and your use of
the Software constitutes acceptance of this license.
You may use this Software for any non-commercial purpose, subject to
the restrictions in this license. Some purposes which can be
non-commercial are teaching, academic research, and personal
experimentation. You may also distribute this Software with books or
other teaching materials, or publish the Software on websites, that
are intended to teach the use of the Software.
You may not use or distribute this Software or any derivative works in
any form for commercial purposes. Examples of commercial purposes
would be running business operations, licensing, leasing, or selling
the Software, or distributing the Software for use with commercial
products.
You may modify this Software and distribute the modified Software for
non-commercial purposes, however, you may not grant rights to the
Software or derivative works that are broader than those provided by
this License. For example, you may not distribute modifications of
the Software under terms that would permit commercial use, or under
terms that purport to require the Software or derivative works to be
sublicensed to others.
You may use any information in intangible form that you remember after
accessing the Software. However, this right does not grant you a
license to any of Microsoft's copyrights or patents for anything you
might create using such information.
In return, we simply require that you agree:
1. Not to remove any copyright or other notices from the Software.
2. That if you distribute the Software in source or object form,
you will include a verbatim copy of this license.
3. That if you distribute derivative works of the Software in
source code form you do so only under a license that
includes all of the provisions of this License, and if you
distribute derivative works of the Software solely in object
form you do so only under a license that complies with this
License.
4. That if you have modified the Software or created derivative
works, and distribute such modifications or derivative
works, you will cause the modified files to carry prominent
notices so that recipients know that they are not receiving
the original Software. Such notices must state: (i) that
you have changed the Software; and (ii) the date of any
changes.
5. THAT THE SOFTWARE COMES "AS IS", WITH NO WARRANTIES. THIS
MEANS NO EXPRESS, IMPLIED OR STATUTORY WARRANTY, INCLUDING
WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE OR ANY WARRANTY OF TITLE OR
NON-INFRINGEMENT. ALSO, YOU MUST PASS THIS DISCLAIMER ON
WHENEVER YOU DISTRIBUTE THE SOFTWARE OR DERIVATIVE WORKS.
6. THAT MICROSOFT WILL NOT BE LIABLE FOR ANY DAMAGES RELATED TO
THE SOFTWARE OR THIS LICENSE, INCLUDING DIRECT, INDIRECT,
SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES, TO THE MAXIMUM
EXTENT THE LAW PERMITS, NO MATTER WHAT LEGAL THEORY IT IS
BASED ON. ALSO, YOU MUST PASS THIS LIMITATION OF LIABILITY
ON WHENEVER YOU DISTRIBUTE THE SOFTWARE OR DERIVATIVE
WORKS.
7. That if you sue anyone over patents that you think may apply
to the Software or anyone's use of the Software, your
license to the Software ends automatically.
8. That your rights under the License end automatically if you
breach it in any way.
9. Microsoft reserves all rights not expressly granted to you in
this license.
I like being an ass... so I'll tell you how the command-line JIT really works. The compiled class is JIT'd every single time you run it. You're mistaking the way the command-line JIT works (like Java) with the way ASP.NET works (like JSP). ASP.NET compiles and JITs the source every time the source is changed, but doesn't require subsequent recompiles, as long as the source stays the same and the server stays up.
<Amanda`> I just went out to the parking lot in my bathrobe to exchange warez CDs.
FYI, the FreeBSD port was done by some folks at Corel.
----- rL
I hope mono is able to port it eventually.
--Me