It looks like you're new here. If you want to get involved, click one of these buttons!
What it iscodepad.org is an online compiler/interpreter, and a simple collaboration tool. It's a pastebin that executes code for you. You paste your code, and codepad runs it and gives you a short URL you can use to share it. Paste the URL into chat or email to get help or to show someone how to do something. Or just try things out when you don't have an interpreter handy. It works well on many phones.codepad was written (and still is being written!) by Steven Hazel. Please contact me at email@example.com if you have any problems or feature requests. I'll add new languages if they're frequently requested (or if I just like them).Note: codepad works like a compiler or interpreter, not like the read-eval-print loop of an interactive interpreter prompt. If you want to print the value of an expression, you need to use your language's print command. If your language requires a "main" function, your program won't work in codepad without one.How it worksCode execution is handled by a supervisor based on geordi. The strategy is to run everything under ptrace, with many system calls disallowed or ignored. Compilers and final executables are both executed in a chroot jail, with strict resource limits. The supervisor is written in Haskell.The web site is written in Python, using Pylons and SQLAlchemy.Can you break it?You're welcome to try. Let me know if you have any success!ParanoiaWhen your app is remote code execution, you have to expect security problems. Rather than rely on just the chroot and ptrace supervisor, I've taken some additional precautions:The supervisor processes run on virtual machines, which are firewalled such that they are incapable of making outgoing connections.The machines that run the virtual machines are also heavily firewalled, and restored from their source images periodically.FollowingFollow me on twitter: @sahazel.Lately I spend most of my time on my Selenium testing company, Sauce Labs. If you're testing your web app with Selenium, you should check it out.I also have a blog at www.hackerdashery.com where I'll be posting updates about codepad, along with other random observations and ideas about software and startups.ContributionsIn the process of adding Tcl support, I wrote a Pygments lexer for Tcl. Hopefully it will make its way into a future release of Pygments, but in the mean time, you can get it here: TclLexer.py.Compiler and interpreter versionsHere are the compilers and interpreters codepad uses to execute code:C: gcc 4.1.2 flags: -O -fmessage-length=0 -fno-merge-constants -fstrict-aliasing -fstack-protector-allC++: g++ 4.1.2 flags: -O -std=c++98 -pedantic-errors -Wfatal-errors -Werror -Wall -Wextra -Wno-missing-field-initializers -Wwrite-strings -Wno-deprecated -Wno-unused -Wno-non-virtual-dtor -Wno-variadic-macros -fmessage-length=0 -ftemplate-depth-128 -fno-merge-constants -fno-nonansi-builtins -fno-gnu-keywords -fno-elide-constructors -fstrict-aliasing -fstack-protector-all -Winvalid-pchD: Digital Mars D Compiler v1.026Haskell: Hugs, September 2006 flags: -98Lua: Lua 5.1.3OCaml: Objective Caml version 3.10.1PHP: PHP 5.2.5Perl: Perl v5.8.0Python: Python 2.5.1Ruby: Ruby 1.8.6Scheme: MzScheme v372 [cgc]Tcl: tclsh 8.4.16