News for hackers. Stuff that matters.
Re:Compile .NET in your browser using Compilify by untog on Monday April 16, 2012 @08:22PM (#3850249)
I'm not sure of the overall utility of what's been made here, but it's very cool that it's possible.

It also is a great showcase of how .NET isn't as limiting as some people think it is- you can and should be using Redis, MongoDB, Memcached and the like as appropriate. Don't think that .NET developers can only use MS tools.

Re:Compile .NET in your browser using Compilify by flatline on Monday April 16, 2012 @08:47PM (#3850351)
I've seen several online code tools that allow you to compile, run, and even debug CLR code online. What's special about this one? The back-end Roslyn interface looks interesting though: http://msdn.microsoft.com/en-us/roslyn
Re:Compile .NET in your browser using Compilify by distilled on Monday April 16, 2012 @09:53PM (#3850601)
Simplicity and speed are the advantages.

Compilr, Coderun, and Ideone all look like great in-browser replacements for a full blown IDE. The builds even take as long as a Visual Studio would. They're great for when you want or need the full IDE experience.

But there are many times when a developer might not want that experience. Maybe you're brainstorming a new implementation for an algorithm and you just want to get an idea of what it might look like. Maybe you're in the middle of a presentation and someone in the audience asked you a slightly off-topic question, and you don't want to spin up a new instance of an IDE just to help them understand.

This tool is for those situations like those.

Re:Compile .NET in your browser using Compilify by johns on Monday April 16, 2012 @08:53PM (#3850367)
I don't know of any other online ones for .NET. Do you have a link?
Re:Compile .NET in your browser using Compilify by flatline on Monday April 16, 2012 @09:08PM (#3850438)
Also http://compilr.com.

Edit: here's the one I've used before, complete with integrated debugger: http://www.coderun.com/

Re:Compile .NET in your browser using Compilify by vyrotek on Monday April 16, 2012 @09:03PM (#3850414)
Re:Compile .NET in your browser using Compilify by nopassrecover on Monday April 16, 2012 @08:25PM (#3850260)
Interesting that it fails to mention LINQPad. I'm always surprised to find a .NET dev who doesn't use this on a daily basis (for the REPL rather than any LINQ abilities).
Re:Compile .NET in your browser using Compilify by atlantic on Tuesday April 17, 2012 @04:53AM (#3851785)
And there is also snippet compiler: http://www.sliver.com/dotnet/SnippetCompiler. Unfortunately, it only works up to framework 3.5, but that's good enough in many cases.
Re:Compile .NET in your browser using Compilify by yread on Tuesday April 17, 2012 @01:31AM (#3851309)
I always just use Immediate window
Re:Compile .NET in your browser using Compilify by nopassrecover on Tuesday April 17, 2012 @04:24AM (#3851725)
The Immediate window is cool, but you can write whole applications in LINQPad scripts if you want which I don't think you can do in the Immediate window (i.e. can you define classes in the Immediate window?). I find I often use LINQPad to mockup and run a bit of code that I would have traditionally made a full command line project for.
Re:Compile .NET in your browser using Compilify by greggman on Tuesday April 17, 2012 @12:22AM (#3851096)
It seems cool but, and maybe I'm reading something between the lines that's not really there, we have live code editing built into most browsers.

In Chrome or Safari press Ctrl-Shift-J (on OSX Cmd-Option-J) or Ctrl-Shift-K in Firefox and paste this

    c = document.createElement("canvas");
    document.body.appendChild(c);
    ctx = c.getContext("2d");
    ctx.translate(150, 75);
    ctx.beginPath();
    for (var i = 0; i < 60; ++i) {
        var a = i * 2; 
        ctx.lineTo(Math.sin(a) * 75, Math.cos(a) * 75); 
    }
    ctx.stroke();
This is one of the things I love about programming in JavaScript. Being in the browser means I always have a live "listener" where I can manipulate code on the fly.

Anytime I need to check something simple it's just a moment to try it out. If I want to make something easily inspect-able I temporarily assign it to a global.

   xxx = someObjectIWantToInspect
And now I can type `xxx` to see it live.

Since I do lots of visualizations and games and other things that re-evaluate live it's easy to just manipulate the settings as they run. For example paste this code.

    m = 2;
    c = document.createElement("canvas");
    document.body.appendChild(c);
    ctx = c.getContext("2d");
    ctx.translate(150, 75);
    setInterval(function() {
        var t = +Date.now();
        ctx.clearRect(-150, -75, 300, 150);
        ctx.beginPath();
        for (var i = 0; i < 60; ++i) {
            var a = i * m + t; 
            ctx.lineTo(Math.sin(a) * 75, Math.cos(a) * 75); 
        }
        ctx.stroke();
    }, 100);
Then try typing `m = 1` or `m = 9` etc and watching the shape change live.

Yes, I understand the OP is about C# but like I said, I read something between the lines that suggested maybe some people didn't know this. Sorry if it's off topic.

Re:Compile .NET in your browser using Compilify by wcoenen on Tuesday April 17, 2012 @07:21AM (#3852074)
Doesn't http://ideone.com already do this for a ton of languages, including C# and VB.NET?