cpp-tour icon indicating copy to clipboard operation
cpp-tour copied to clipboard

Chose compiler service

Open Leandros opened this issue 8 years ago • 10 comments

Current alternatives:

Decided on Wandbox!

Leandros avatar Dec 01 '17 14:12 Leandros

I like Wandbox'es API more. Feature-wise they seem mostly equivalent, but Wandbox supports using multiple files (can be useful, for more advanced lessons), and returns result as JSON (probably easier to work with). Coliru, on the other hand, is slightly faster (on my machine).

grisumbras avatar Dec 07 '17 07:12 grisumbras

Agreed! I think the choice of Wandbox to start with is obvious. Let's go with that.

Leandros avatar Dec 07 '17 07:12 Leandros

@Leandros What should we expect for you all editor UI aside from compile button and output window? Should we have way to provide expected output for our lessons?

DoumanAsh avatar Dec 08 '17 07:12 DoumanAsh

My current vision for the editor UI is to have two buttons: "Reset" and "Run". Reset will reset the code to the original code snippet, while "Run" will compile and run the code. We should probably also show a tab with the current "filename", to get users used to seeing multiple files in an editor window?

Leandros avatar Dec 08 '17 08:12 Leandros

I'm too late too late to the party. Maybe not too late to change.

How about a client side compiler? what about emscripten? or getting a client side virtual linux box? Online service have queues, and sometimes it takes a while to compile, plus there is internet component. Emscripten these days is very fast, and now wasm support is very popular. And there is also x86 emulators in javascript which can run linux all using client side resources. Lots of options how to set up the compiler on client side. With the x86 emulator approach you can continuously run cppcheck or the like as user types and be more speedy. webworkers on the web can do it in background.

I don't know how emscripten would work. I think the only client side option is one of the x86 emulators in javascript and setup linux with gcc & clang setup.

graph avatar Dec 09 '17 03:12 graph

If you're aware of existing solution that would let us to complie C++ to wasm, I'm all for that.

But I'm not sure if there any solution such as it at the moment, so for now we can go with wandbox API.

DoumanAsh avatar Dec 09 '17 06:12 DoumanAsh

https://copy.sh/v86/?profile=linux3

I'm sure gcc/clang can be installed some how. And the download images to be cached so it's faster for repeat visitors. It's definitely more work to setup than wandbox.

graph avatar Dec 09 '17 16:12 graph

@graph It seems to be quite surprising to run the whole OS in JS. Will need to investigate it further so for now I'll pin it to first post. Thanks

DoumanAsh avatar Dec 09 '17 16:12 DoumanAsh

Thanks for investigating. This route is alot of work so I can understand not going this route. And this project would be the leader of client side c++ compiling as I don't think a virtual machine has been setup for this yet. If your team does go this route I think it would be very cool. When I use some site that uses a compile service, the queues can get quite long. Something client side will definitely help with that.

graph avatar Dec 09 '17 16:12 graph

Maybe you could use my free service Judge0 API. It's available on GitHub and you can try running some C++ code in my online code editor Judge0 IDE. Let me know how can I help you if you choose to use Judge0.

hermanzdosilovic avatar Dec 10 '17 21:12 hermanzdosilovic