
Compile .NET in your browser using Compilify - johns
http://blog.appharbor.com/2012/04/16/compile-net-in-your-browser-using-compilify-by-justin-rusbatch
======
untog
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.

------
flatline
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>

~~~
johns
I don't know of any other online ones for .NET. Do you have a link?

~~~
flatline
Also <http://compilr.com>.

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

------
nopassrecover
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).

~~~
yread
I always just use Immediate window

~~~
nopassrecover
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.

------
greggman
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.

------
wcoenen
Doesn't <http://ideone.com> already do this for a ton of languages, including
C# and VB.NET?

