

Show HN: DotNetFiddle – JsFiddle for .Net - refactormonkey
http://www.dotnetfiddle.net

======
acc00
While this one doesn't have the nice "fiddle" suffix, it has been around for a
while and supports a lot of platforms:

[http://ideone.com/](http://ideone.com/)

~~~
HarshaThota
There is also [https://compilify.net/](https://compilify.net/) and
[http://executify.com/](http://executify.com/). But it's always good to have
more options.

~~~
philliphaydon
compilify seems to take a long time to compile code :(

~~~
distilled
It is open source though.

------
upthedale
Great! I was going to say F# should be supported, but then I remembered
there's this:
[http://www.tryfsharp.org/Create](http://www.tryfsharp.org/Create)

Still, I can definitely see myself using this to share little pieces of code
where currently I write it up in linqpad and email to colleagues.

Any chance you could add an extension method like linqpad's Dump() to pretty
print objects?

~~~
refactormonkey
Yes, that sounds like a great idea. Will add it in next couple of days.

------
fekberg
Nice work! Is this inspired by Compilify? How are you securing execution?
Source? I did a blog post a long time ago on hosted execution with Roslyn and
that is how we do it with Compilify (which is open source).

~~~
refactormonkey
Yeah we definitely looked at some Complify code and the blog post was helpful
also.

------
bret_maverick
Great tool! I even tried to make an infinite loop (excuse me for that :) )
which was handled gracefully by your program.

------
louthy
This is great. One small bug cropped up, I collaborated on a fiddle with a
work colleague and he couldn't see any output from clicking Run.

[http://www.dotnetfiddle.net/lN6m0S](http://www.dotnetfiddle.net/lN6m0S)

Great work though, will be in my favourites :)

~~~
refactormonkey
Yes, will be fixed by tomorrow. Thanks for reporting it.

~~~
louthy
Good stuff!

------
duiker101
Very sweet! I like it a lot! It's nice to see that people still remember of
.NET

~~~
CmonDev
Xamarin and Unity are heavily used and are based on .NET. There is plenty of
.NET around, we just don't scream "it's the future!" all the time and do not
post [useless] 30-liners. The latter might change now :).

------
drharris
Very nice! I have a "scratchpad" project for fiddling around with things, but
this might wind up a permanent tab on my browser. Less overhead than a VS
project, for sure.

~~~
upthedale
Try Linqpad for a scratchpad too. Don't let the linq name fool you - its great
for general purpose fiddling about. It has been truly indispensable when
developing on .Net.

[http://www.linqpad.net](http://www.linqpad.net)

~~~
ygra
I usually use PowerShell for fiddling which is often nice enough for trying
out things with the BCL.

------
philliphaydon
This is super awesome! I was thinking of building something like this the
other day because I wanted to test some code and not make a new test console
app.

Totally awesome!

~~~
doktorn
As stated elsewhere linqpad is really great for testing ad-hoc, throwaway C#
code (much more than just linq expressions). It kind of like a REPL for .net.

~~~
rjbwork
If you're doing any Entity Framework development, you should be using LinqPad
and checking generated SQL for pretty much every canned (read re-used, not
inline) query you write. Somethings can be unexpectedly ugly and badly
performing if not optimized properly.

------
victorin
This is really awesome, good job!

I've found a minor glitch. Seems that the Intellisense (auto-complete) does
not work when I try to call a custom class method inline, like:

Console.WriteLine("Hello World, " \+ new MyClass().PrintTestSentence());

(Public methods of class "MyClass" does not show up there)

See here:
[http://www.dotnetfiddle.net/5oF8oR](http://www.dotnetfiddle.net/5oF8oR)

~~~
refactormonkey
Thanks for reporting it!

It works if you declare class first
[http://www.dotnetfiddle.net/IjtjcG](http://www.dotnetfiddle.net/IjtjcG)

but not if u do initialization and call at the same time. Will take a look.

~~~
jorgem
Also, "intellisense" for the "using" statement doesnt work.

Example:

    
    
       using System.
    

I don't get any choices...

------
CSDude
What kind of hardware are you using? Are the jobs parallel? I do not know
about .NET very much, but it seems very slow. Would that be feasbile for you
to maintain this?

~~~
_random_
.NET CLR is faster then most VMs.

~~~
gnaritas
Than, not then.

------
defcon84
'Roslyn'?

~~~
refactormonkey
Yep. It is pretty amazing library.

~~~
defcon84
interesting :)

------
mandeepj
This is really great. Infact you gave it edge over jsfiddle by providing
collaborate, auto-complete and compile-as-you-type features.

There are times when I quickly want to test some idea with strings, async,
linq etc. without firing full fledged VS IDE. You did an excellent job.
Cheers!

------
sspross
This is executed serverside, right?

~~~
refactormonkey
Yes, all server-side using several worker agents.

------
sremani
Really nice, I can see myself using this tool. Couple of pointers - when
typing fast (my usual programming speed), its going a bit awry, but I see it
is trying to do some intellisense stuff.

This is perfect tool for teaching/learning coding.

------
dsschnau
Oh my goodness this is amazing. I've wanted this my whole career.

------
smartdonkey
[http://liveweave.com](http://liveweave.com) is by far the best HTML/CSS/JS
playground out there. you guys should totally try it out.

~~~
filearts
Honest question: Why?

~~~
browserspot
I think I can answer that. IMHO Liveweave has something most of the other JS
"playgrounds" do not have. It has context-sensitive code-hinting for core
JavaScript and jQuery...also for CSS/HTML/HTML5/CSS3. Personally, I think this
makes a huge difference, at least for me and may be some others.

------
philliphaydon
O M G

Collaboration coding in the browser is SERIOUSLY cool!

~~~
bpicolo
JSFiddle has had this for a while.

~~~
philliphaydon
But for .NET, that's what makes it neater. JSFiddle collab has been helpful,
now we have it in .NET too :D

------
hudo
It would be great to see (somehow) method params, types. Intellisense is
great, but I'm really missing method signature ... Great work guys, thank you
for this!

------
NKCSS
Boohoo, any file access is disabled, and any Environment.GetFolderPath will
return an empty string (except System, which throws a security violation) :P

~~~
refactormonkey
We may look to add local storage sandbox for this.

~~~
voltagex_
IsolatedStorage may work well for this.

------
ctekin
Is intellisense case-sensitive for a reason? I typed "Console.w" and auto-
complete list was gone. It works fine with "Console.W".

~~~
refactormonkey
Thanks for mentioning it. Will fix...

------
chrisbridgett
Nice. It's a shame [http://fiddle.net](http://fiddle.net) wasn't available.

~~~
CmonDev
On the other hand there will be consistency once wee see more
languages/platforms. javafiddle.net? dartfiddle.net?

------
kmfrk
Here's one for R:

[http://www.r-fiddle.org/](http://www.r-fiddle.org/)

------
Rudism
This is really neat. Adding something like LinqPad's Dump() extension method
would make this supercool.

------
jonkemp
Doesn’t seem to work in IE10 ironically.

~~~
gavinpc
If the page is _completely_ blank, it may be because you have cookies blocked.

~~~
jonkemp
Nevermind. It was IE. Somehow 'Display all websites in Compatibility View' was
turned on. Turning it off fixed it. Thanks.

------
Varcht
Pretty cool, nested classes do not work though. Throws "Method must have a
return type".

------
wehadfun
Very useful. This will be a great way to answer questions and demo algorithms

------
manojlds
Is it open source? If not, is there any plans of making it?

------
talles
Great pretty handy. You even got auto complete, kudos.

------
phill_andrade
Great! I totally bookmarked this!

------
codygator
Hey I love your auto-complete !

------
orenbarzilai
Is it compiled in server side?

~~~
refactormonkey
Yes, website passes Run requests to back-end worker processes which compile
and execute code and return results back to website for display.

~~~
orenbarzilai
I assume that you have created some kind of sand box in order to prevent
malicious code execution. Can you share some details about that?

------
smortaz
very nice. please add IronPython & F# if you get a chance :)

------
guiomie
Nice ! I support this.

------
CmonDev
So cool, thank you!

------
michaelcullina
Wow! Very good.

------
phaed
Love it!

------
IvanK_net
Nice try, closed-source proprietary technologies! (Hope that at least they run
it in Mono)

~~~
jayhoon
Hmm, what part of C# or CLI is closed? They are open standards - you are free
to create your own compiler and environment.

