Slashdot Mirror


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!"

18 of 87 comments (clear)

  1. Security by Trusty+Penfold · · Score: 5, Funny

    Remember "many eyes".

    If there are any security problems with .NET it all your fault.

    (I'm blind, don't blame me!)

  2. Nothing new. by cd_Csc · · Score: 4, Informative

    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.

  3. CLI by m0rph3us0 · · Score: 3, Interesting

    I'm not that familiar with the .NET infrastructure, but does this mean that I can take a .NET application that works on my Windows box and uses the Win32 GUI and have it work on my Linux Box? Just wondering if this thing actually "works" or if its just part of the whole picture.

    1. Re:CLI by bellings · · Score: 5, Informative

      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.

      The Microsoft .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.

      The .NET framework includes more than this, but the classes are the important part for portability.

      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 .NET class libraries for free, either.

      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.
  4. Evil licensing.. by Ogerman · · Score: 4, Insightful

    Read the license here

    This is nowhere near Open Source / Free software. The license specifically states that you cannot use the code for any commercial purpose whatsoever--even writing your own software to use for your own purposes in running a business. Furthermore, the license states:

    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 other words, they're trying to use software patents to keep people from writing their own implementations of C# / CLI libraries and software.

    Which all boils down to: Microsoft wants a programming language for which you have to pay them royalties just to use, with the exception of academic use. They realize that their monopoly on operating environments is crumbling so they want to "own" and control the "next C++ or Java". My opinion: boycott this crap.

    1. Re:Evil licensing.. by informer · · Score: 4, Interesting

      In other words, they're trying to use software patents to keep people from writing their own implementations of C# / CLI libraries and software.

      This is a completely bogus interpretation of the goal. The stated goal of allowing people to view and study the source is to gain acceptance for the .NET platform, and to kick-start an understanding of the technologies, and to permit and encourage other implementations. Why have they not started legal proceedings with dotGNU or Mono? Please spare us the doomsday senario's. Evaluate the .NET / C# licenses and technologies and use them if they provide a benefit, otherwise ignore them.

      C# is an open standard. The CLI is an open standard.

      There are many libraries included with the microsoft implementation of .NET which are *not* part of the standard, and these become more like the Java libraries. Many of those classes and features which are not part of the standard are not included in the SSCLI.

      My opinion: boycott this if you want, but dont use bogus arguments for doing so.

      --

      If a penguin dies in the woods, and nobody is around to hear it, what sound does it make?
    2. Re:Evil licensing.. by Twirlip+of+the+Mists · · Score: 4, Interesting

      In other words, they're trying to use software patents to keep people from writing their own implementations of C# / CLI libraries and software.

      Hey, that's quite a scoop there. You've stumbled on the fact that this is exactly what patents are for. They are a limited monopoly on an invention or innovation. Until Microsoft's patents expire, you can't do any of the stuff described in them without an explicit license.

      I always get such a kick when people post this sort of thing to Slashdot with such indignation. "They're trying to use patents to keep people from doing things!" How dare they.

      My opinion: boycott this crap.

      Given the degree of insight inherent in your first observation, I'm not sure how much I value your opinion on this matter. But rest assured; if it's crap, a boycott will be quite unnecessary. In the computer industry moreso than any other, bad ideas wither on the vine.

      --

      I write in my journal
    3. Re:Evil licensing.. by Twirlip+of+the+Mists · · Score: 5, Interesting

      Wrong? Immoral? Unjust? No. Patents on software, just like patents on anything else, exist to encourage innovation. Without the promise of a monopoly-- temporary though it will be-- there would be no incentive to innovate. Of course, the average Slashdot poster would respond that innovation will come from hobbyists and other creators of open-source software, who believe themselves to be acting philanthropically. The average Slashdot poster hasn't the foggiest idea how the world actually works, and has no respect whatsoever for the power of the profit motive.

      And unconstitutional? Please refer to Article I, section 8: "The Congress shall have Power... To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries." All patents are fundamentally constitutional, as long as they are granted for a limited time.

      --

      I write in my journal
    4. Re:Evil licensing.. by Anonymous Coward · · Score: 3, Interesting
      This is a completely bogus interpretation of the goal. The stated goal of allowing people to view and study the source is to gain acceptance for the .NET platform, and to kick-start an understanding of the technologies, and to permit and encourage other implementations. Why have they not started legal proceedings with dotGNU or Mono? Please spare us the doomsday senario's. Evaluate the .NET / C# licenses and technologies and use them if they provide a benefit, otherwise ignore them.
      1. Reasoning that they won't pursue legal action because they haven't isn't logical.
      2. Reasoning that Microsoft's motives of releasing the source is about learning the .NET platform is only your guess at real motives you do not know. You're repeating press releases.

      As Bill says, patents allow the giants to set the entry price for new competitors. Will a key part of the .NET platform require RAND licencing fees?

      You're not being logical :)

  5. Certainly a very reasonable license, although... by linuxghoul · · Score: 4, Insightful
    The license seems refreshingly simple and short, esp. for microsoft. They do seem serious abt trying to make CLI a common standard...

    the only "funny" part of the license is "you may not distribute modifications of the Software under terms that purport to require the Software or derivative works to be sublicensed to others", a very straight, and extremely amusing ("purport"??) attack on the GPL. M$ maynot be a lot of good things, but they certainly ARE FOCUSSED! ;)

    also, can someone please explain to me the impliations of

    1. "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".: does it mean i can use techniques learnt from this code in my own code, as long as i dont copy the code verbatim (i understand abaout patent violation, am confused abt the copyright part)
    2. "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.": What does this really mean? what are the practical implications? why do they need to have it in there?

    Can someone please enlighten me?

    LinuxGhoul

    --
    Sigura Non Grata
  6. Source Code by glenstar · · Score: 3, Interesting

    It is interesting to note that many of the files have a comment with a date of June, 1999.

  7. Re:Certainly a very reasonable license, although.. by spongman · · Score: 5, Informative

    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.

  8. Re:This working under OS X? by Anonymous Coward · · Score: 3, Informative

    It only works under 10.2. strtok_r was added in Jaguar.

  9. I feel dirty. by subuni · · Score: 5, Interesting
    I feel dirty. I started by downloading a tarball from Microsoft, and after extracting the tarball, I ran a shell script that built a Microsoft product from source. I then invoked a Microsoft compiler from a UNIX shell, am greeted with a Microsoft copyright message, and get an .exe file as output. And then I ran the .exe file on a UNIX based Mac.

    Something about that experience felt really... dirty.

    And for the unofficial 'benchmarks' on my G4/800 (because printing out "Hello World!" is a valid benchmark :) ):
    # time clix hello.exe
    Hello World!
    1.240u 0.460s 0:03.28 51.8% 0+0k 0+9io 0pf+0w
    # time java hello
    Hello World!
    0.200u 0.190s 0:01.72 22.6% 0+0k 2+14io 0pf+0w
    # time perl hello.pl
    Hello World!
    0.000u 0.000s 0:00.02 0.0% 0+0k 0+0io 0pf+0w
    # time ./hello
    Hello World!
    0.000u 0.000s 0:00.01 0.0% 0+0k 0+0io 0pf+0w
    1. Re:I feel dirty. by km790816 · · Score: 3, Insightful

      Of course we all know that Microsoft did little or no optimization for the "shared-source" CLI.

      It's pretty clear that this work is purely acedemic. Having a base infrastructure that can be compiled and run on many platforms is a great way for people in Research to play with, cretique, extend, and break the CLI.

      It also gives them something to play with besides that silly Java stuff. :-)

  10. What is the Microsoft Shared Source CLI?" by fluor2 · · Score: 3, Informative
    (from readfirst.html)

    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.

  11. FreeBSD port done by Corel by rlowe69 · · Score: 3, Informative

    FYI, the FreeBSD port was done by some folks at Corel.

    --
    ----- rL
  12. This is painfully old news.. BUT by zaqattack911 · · Score: 3, Informative
    I've known about this since like 8months ago. And it's a shame Windows.Forms class libs aren't portable... it's an EXCELLENT alternative to MFCs for make win32 GUI apps. Very easy to use like Java Swing.

    I hope mono is able to port it eventually.

    --Me