What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

Interactive / Real time code compilation for stackoverflow.com. That will improve the answer correctness of the stackoverflow.com.

When adding a new code block, let the user try to compile the code and see the result. It will be useful to demonstrate class designs, algorithms, and logics.

share|improve this question
1  
So, you are going to ask SO to support all the many thousands of compiled languages out there? –  nb69307 Feb 10 '10 at 21:47
    
no. they can pick languages to support. It is for simple code demonstration only. Or, they can even create their own language. Languages with dynamic code generation can support this basically without too much effort. –  gilbertc Feb 10 '10 at 21:49
3  
How about Wasabi? –  Lance Roberts Feb 10 '10 at 21:50
    
@gilbertc How does creating their own language help??? –  nb69307 Feb 10 '10 at 22:19
    
What I meant was to have a common language to show the idea of the code without ambiguity. The language does not need to be C#, or any production language. –  gilbertc Feb 10 '10 at 22:28
2  
@gilbertc This language is going to "without ambiguity" be able to demonstrate all the features of C#, C++, LISP, Haskell, COBOL and Perl (to name a only few very popular languages)? I don't think so. –  nb69307 Feb 10 '10 at 22:39
1  
@Neil Agreed, though I'd like to see codepad.org feature integrated into SO as suggested in answers below. –  gilbertc Feb 10 '10 at 22:44
    
It's worth noting that this feature, or one very similar to it was endorsed by Jon Skeet on SE podcast #4 - see jim-mkeeth's comment at 60.30. (I don't think it's possible to direct link to a point in time in soundcloud?). I'm surprised this question hasn't been voted higher, as Jon said, this would be really cool. –  therefromhere Jun 5 '11 at 16:49
    
How about taking advantage of this? github.com/kripken/emscripten/wiki –  gilbertc Oct 6 '11 at 16:16
    
I really don't see this as such a massive technical challenge, there are services like ideone that can just be re-used. All that is really needed is cross integration. I think its relatively simple, and will give significant benefits. –  Iwan Aucamp Aug 2 '13 at 11:57
add comment

2 Answers 2

up vote 7 down vote accepted

This is already a solved problem, use codepad.org.

share|improve this answer
    
No C#? Bummer... –  Robert Cartaino Feb 10 '10 at 21:55
5  
that is exactly what i am looking for. but it would be nice if SO has this feature integrated. –  gilbertc Feb 10 '10 at 21:56
    
Thanks for the link. –  Lance Roberts Feb 10 '10 at 21:59
    
@Robert: Yeah, it would be much improved with support for C# and Java (and other CLR or JVM based languages). I sent a request to the author a while ago but never heard back. –  Greg Hewgill Feb 10 '10 at 22:24
1  
If you want to test compile C++ snippets, the place to go is comeaucomputing.com/tryitout –  nb69307 Feb 10 '10 at 22:41
1  
@Robert, ideone.com has online C# compilation (and execution of the compiled sources). –  Bart Kiers Sep 4 '11 at 21:17
add comment

That's a pretty big technical challenge that would provide very little return, in my opinion.

Beside, people are discouraged from posting entire bodies of working code. You should limit your posts to just enough relevant code to describe the problem.

share|improve this answer
1  
Imagine if we have a collaborative platform with a real-time compiler, code can be modified and updated and optimized without giving up any correctness. I think that return is big enough to justify the technical challenge, if any. –  gilbertc Feb 10 '10 at 22:00
1  
I'm trying to imagine but I'm just not seeing it. I don't speak for SO but I can't recall any of my posts where this would have resulted in a better Q&A experience. Sorry. It never hurts to ask, though. –  Robert Cartaino Feb 10 '10 at 22:08
3  
"People are discouraged from posting entire bodies of working code" - really? I always try (don't always succeed) to post compilable code. –  nb69307 Feb 10 '10 at 22:13
1  
Maybe my idea of having a mini- open source platform for a Q&A site is too far from ideal... –  gilbertc Feb 10 '10 at 22:32
3  
But @Neil, I'm willing to bet you post compilable abstracts that only exhibit the feature or problem at issue, right? Which we all appreciate. As opposed to the all too common "It doesn't work!" posts that include two to four files totaling more than a hundred lines of code. –  dmckee Feb 10 '10 at 23:17
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .