Bugs with the "C++ Shell"

I'm just gonna start off with a bug that I found, but could not recreate.

-I was messing around with chrono
-To simulate a delay, I just made a big 1mill loop.
-I get a completely different outcome
-It was some random program, I cant remember it, but it just did something like 6 questions like "size of well[z0]:" (I think I put in a char instead of a int for one, and I think that might made it so that there was no outcome).

Has anyone else have a story like this with the shell?
I get a completely different outcome
Define "Different"
To simulate a delay, I just made a big 1mill loop.
Which was thrown out by the compiler because it is not doing anything.

It was some random program, I cant remember it, but it just did something like 6 questions like "size of well[z0]:" (I think I put in a char instead of a int for one, and I think that might made it so that there was no outcome)
And you broke your program. It is program problem, not shell one.
And note that every online compiler has limits on machine time each program can claim. If you exceed it program will be terminated.
No, MiiNiPaa.
This is a cpp.sh bug.
At times it gives you somebody else's program, randomly. Trying some more times will *hopefully* give back your program.
There was another topic about that somewhere in the lounge.
http://www.cplusplus.com/forum/lounge/143448/
Last edited on
There was another topic about that somewhere in the lounge.

http://www.cplusplus.com/forum/lounge/143448/
Another one:
1
2
0 1 2 3 4 5 6 7 8 9 
the total of all array elements is 45 


Its quite entertaining to just get a mystery program :D
I never noticed this, so I made this program:
1
2
3
4
5
6
7
8
#include <iostream>

int main()
{
  for(int a = 0; a < 90000; a++) {  }
  std::cout<<"asdfasdfaf";
}

and ran it about 7 times, and it gave me this output:

Este programa calculara el factorial de (2n)!! que ingrese 
Por favor ingrese su numero 
Hehe pretty funny.

Edit: I managed to find the same program as yours fabtasticwill ;p
Also found this
1
2
3
4
5
I am the Child
Process ID: -1
NumberPrime: 20407
NumberNotPrime: 209290
CPU time: 0.223505
Last edited on
I got that same one when I did it enough.
Any theories on how this bug works?
Any idea who even made/maintains cpp.sh? Was it made for this website?
http://cpp.sh/v02/about.html

That "v02" in the link seems suspicious... I recall that we used to have a v2.cplusplus.com for a while when the forums were updated. Maybe twicker made it? I would have thought it'd be easier to use an existing site like ideone.com.
Last edited on
I guess that solves that mystery. I was doing whois on cpp.sh and wasn't able to find much. Good investigative skills!

Now my question is the same as LB's, why not just use an existing service?
why not just use an existing service?
Which one? I don't see Ideone providing any API to use it externally, Coliru ask to not abuse API and maybe this site can create to many requests, other sites does not have any info on API too.
I've been able to have a word from Coliru's feedback service, but i want to finish talking with them before making anything concrete.
@MiiNiPaa: first time button is clicked, could simply submit a POST request to ideone as it does itself, and then cache the result page. There's also an API but I don't know much about it and I think it's not free.
Last edited on
could simply submit a POST request to ideone as it does itself, and then cache the result page.
Nope:
http://ideone.com/terms
Downloading of content from the ideone.com website using any user agent other than a visual or text-based web browser, downloading of content from ideone.com in bulk using automated processes, and selective parsing and post-processing of content retrieved from ideone.com, are expressly forbidden.
Ah, nevermind then.
I think that's meant for website downloaders mainly.
Let me also remember you POST requests are not for downloads in the HTTP standard, but selective parsing and postprocessing denial means one really shouldn't be looking at how it works.

wget http://ideone.com/
I've added Coliru support for my Chrome extension:
https://github.com/cpluspluscom/EnhancedCpp.com/releases/tag/v1.7.0
Topic archived. No new replies allowed.