News for hackers. Stuff that matters.
Re:Pastebin which is able to run your code. Accepts 40 langu... by onewland on Thursday November 19, 2009 @10:19AM (#950363)
I don't want to test on somebody's server and cause them to have a bad day, but does this thing have proper stack overflow/memory protection?

  #include <stdio.h>
  int evil(int y)
  {
      char *x = (char *) malloc(y);
      return(evil(y+1)-evil(y+2));
  }

  int main(int argc, char **argv)
  {
       int a = evil(1);
       return 0;
  }
Re:Pastebin which is able to run your code. Accepts 40 langu... by onewland on Thursday November 19, 2009 @11:43AM (#950527)
I'm getting an infinite (>5m wait time) "waiting for compilation" message with the above code.

Are you trying to traverse function calls before compilation? You'll eventually run into the halting problem (http://en.wikipedia.org/wiki/Halting_problem) if this is your approach, though there may be a way to determine cases as simple as mine.

Re:Pastebin which is able to run your code. Accepts 40 langu... by gacek on Thursday November 19, 2009 @12:00PM (#950564)
It won't compile ;) (no stdlib.h/string.h)

And it won't crash the server (at least... should not). There is a fixed limit on how much memory a process can allocate. This program will crash, but not because of malloc, just because the recursion gets too deep (stack overflow).

Re:Pastebin which is able to run your code. Accepts 40 langu... by onewland on Thursday November 19, 2009 @01:06PM (#950699)
Maybe it won't compile, but:

  /spoj/c_run: line 5:  3844 Segmentation fault      ./prog
is the error I got, and that doesn't look like a compile error. (Also, just to be pedantic, I had noted the stack overflow possibility in my original post).

http://ideone.com/view/09u9091w9h# is the snippet.

Re:Pastebin which is able to run your code. Accepts 40 langu... by z8000 on Thursday November 19, 2009 @11:23AM (#950483)
Is there a description of the sandboxing and watchdogging performed that we can read?

Are said components open source?

I cannot find this information about SPOJ. It is a black box.

Re:Pastebin which is able to run your code. Accepts 40 langu... by gacek on Thursday November 19, 2009 @12:11PM (#950583)
Unfortunatelly for the readers it is closed-source, and part of the security model is obscurity. The core service has been developed for http://spoj.pl - a bit ancient-looking repository of algorithmic problems.
Re:Pastebin which is able to run your code. Accepts 40 langu... by bham on Thursday November 19, 2009 @08:12PM (#951608)
Security by obscurity is not security at all. You should seriously consider opening up the source.

As my great aunt Ada used to say, "more eyeballs are better than your eyeballs."

Re:Pastebin which is able to run your code. Accepts 40 langu... by japherwocky on Thursday November 19, 2009 @11:57AM (#950556)
yes, properly sandboxing all of those languages would be quite a feat, amirite?

letting lots of people execute arbitrary code in lots of languages on your servers seems like a huge "what could go wrong here?" from a security perspective.

Re:Pastebin which is able to run your code. Accepts 40 langu... by gacek on Thursday November 19, 2009 @12:08PM (#950575)
Actually if you can do it properly for C using off-the-shelf gcc the rest follows - PHP or Java are on a completely different threat level.
Re:Pastebin which is able to run your code. Accepts 40 langu... by GeoJawDguJin on Thursday November 19, 2009 @12:22PM (#950600)
"But a pastebin like no other in the Internet."

Isn't this pretty much a reimplementation of codepad.org? So that's not entirely accurate...

Re:Pastebin which is able to run your code. Accepts 40 langu... by mima on Thursday November 19, 2009 @09:21PM (#951715)
# run your code on server side in almost 40 programming languages # and do it all with your own input data!
Re:Pastebin which is able to run your code. Accepts 40 langu... by philjr on Thursday November 19, 2009 @10:10AM (#950351)
It would be nice if the languages in the sidebar on the left were in some non-abitrary order, preferably alphabetical :)

apart from that, a definite improvement on the languages http://codepad.org/ supports

Chromium and Firefox 3.5 on Ubuntu just sit there "Loading...waiting for compilation"

Re:Pastebin which is able to run your code. Accepts 40 langu... by wastedbrains on Thursday November 19, 2009 @11:36AM (#950509)
I like this and also really like http://codepad.org before it, but all I really want added is an embed feature. So you can post code snippets on your blog, and as people read the examples they can run the code.

Consider this a feature request for either service, it would be great.

Re:Pastebin which is able to run your code. Accepts 40 langu... by kuszi on Saturday November 21, 2009 @06:13AM (#954432)
Please have a look at Scarky (scarky.com) - is it the style of embedding you would accept?
Re:Pastebin which is able to run your code. Accepts 40 langu... by mima on Thursday November 19, 2009 @10:46AM (#950410)
@onewland : feel free to test it ;) it's still in beta version, so any suggestions (even evil ones :D) are welcome!

@est: yeah... :)

@philjr: first ten languages are most popular ones, the rest is in the alphabetical order (between them is a special one - TEXT)

@philjr: we upgrade the servers - till 6 p.m. (CET) (planned)

Re:Pastebin which is able to run your code. Accepts 40 langu... by memetichazard on Thursday November 19, 2009 @07:36PM (#951554)
I'm guessing you're the owner of the site. Question - Is 'Clips' supposed to be CLisp? There is an article about a CLIPS programming language on Wikipedia, but I couldn't find anything else for Common Lisp on your site.
Re:Pastebin which is able to run your code. Accepts 40 langu... by mima on Thursday November 19, 2009 @09:28PM (#951718)
CLIPS != CLisp
Re:Pastebin which is able to run your code. Accepts 40 langu... by kuszi on Saturday November 21, 2009 @06:12AM (#954430)
Yes, CLIPS is CLIPS ;)
Re:Pastebin which is able to run your code. Accepts 40 langu... by olegk on Thursday November 19, 2009 @10:47AM (#950412)
http://codepad.org is better, I don't have to see "Loading... waiting for compilation"
Re:Pastebin which is able to run your code. Accepts 40 langu... by mima on Thursday November 19, 2009 @10:49AM (#950416)
come back in a few hours, sorry for inconvenience
Re:Pastebin which is able to run your code. Accepts 40 langu... by kuszi on Saturday November 21, 2009 @06:11AM (#954429)
Thank you for inspiring comments and some tricky codes you have submitted to the site - this is also helpfull.
Re:Pastebin which is able to run your code. Accepts 40 langu... by est on Thursday November 19, 2009 @10:26AM (#950369)
Great, now all we need is an online IDE that supports editing SVN and GIT directly.
Re:Pastebin which is able to run your code. Accepts 40 langu... by shookon on Thursday November 19, 2009 @11:12AM (#950460)
Try http://www.coderun.com/ide/ As I understand, SVN support will be added next week.
Re:Pastebin which is able to run your code. Accepts 40 langu... by hhjj on Thursday November 19, 2009 @04:40PM (#951189)
C# fails : Mono requires /proc to be mounted.
Re:Pastebin which is able to run your code. Accepts 40 langu... by albertcardona on Thursday November 19, 2009 @12:39PM (#950631)
Java fails:

/usr/lib/jvm/sun-jdk-1.6/bin/javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory