4 ms·
GCC Explorer is awesome, but I would not call it a "C/C++ Fiddle". It's really slow (unusable) at the moment due to, I reckon, being on HN. Do revisit it later
by dmunoz 12y ago
GCC Explorer is awesome, but I would not call it a "C/C++ Fiddle".
It's really slow (unusable) at the moment due to, I reckon, being on HN. Do revisit it later!
I have had some issues with it in the past when importing just iostream and trying to see the output for a small example. The combined source is too large, and GCC Explorer refuses to compile and show the assembly sometimes for even small examples.
Do play with the settings. Colourise is especially nice.
The code is on GitHub [0], so I suppose you can self host it, although I have not tried to do so yet.
[0] https://github.com/mattgodbolt/gcc-explorer https://github.com/mattgodbolt/gcc-explorer
- azakai 12y ago> It's really slow (unusable) at the moment due to, I reckon, being on HN. Do revisit it later! Unfortunate. Running this on the client side would avoid that, I wonder if they considered that option.
- epi8 12y agoRunning this on the client side would require a C++ compiler in javascript, right? I don't know much about web dev.
- DannyBee 12y agoOr compiling gcc to nacl/asm.js
- azakai 12y agoYes, there are demos of such things. For example, these two: http://kripken.github.io/clangor/demo.html http://kripken.github.io/clangor/demo.html http://kripken.github.io/llvm.js/demo.html http://kripken.github.io/llvm.js/demo.html A bit old by now, but the first compiles C++ into LLVM IR, the second LLVM IR into JS and runs it. All of that happens clientside.
- mattgodbolt 12y agoI haven't considered that: porting the variety of compilers to Javascript is a bit tricky. Plus the closed-source Intel compiler wouldn't be an option. It's an interesting thought though!