Home  | Regexes  | Run Code  | Code Wall  | Feedback  | Login 

About

Rextester - some online tools for anyone who finds them useful. It was started as online .net regex tester.
Short faq and troubleshooting.

Regex tester - .net regex tester.
Regex replace - .net regex replacement.
Regex reference - short regex reference.
Run code - online compiling and execution for some languages.

C#, Visual basic
.Net framework v. 4 is used. Your code will be given max 5 sec of cpu time and limited memory (~100 Mb). Also your code will run in an appdomain with basic execution, reflection and thread control privileges only.
The entry point for you code is given Main method in type Program in namespace Rextester. This entry point shouldn't be changed. Types from following assemblies are available: If you found security breaches and can break something in some way - we would appreciate your feedback on this.

Sql Server
Sql Server 2008 R2 is used. There is only one database that queries run against. Queries executed on behalf database owner so all sort of actions are allowed including DDL queries. However, all actions run in transaction which is rolled back immediately after execution is over. This way any desired objects may be built, populated with data and worked on within the scope of one request. There is 10 seconds limit for work to be completed. Execution of queries is achieved using ado.net mechanisms, in particular SqlDataReader type. This reader is also monitored for memory and cpu consumption.
'GO' statement just like in transact sql has special meaning: 'GO' will be removed from your code, but statements separated by 'GO' will be executed separately, in different batches. So, for example, if you want to create a function and later use it in select statement you have to separate create statement and select statement by 'GO', otherwise you'll receive an error from parser since in select statement you would be reffering to a function which doesn't yet exist.
For convinience there is simple pre-built schema, shown here.

Java, Python, C, C++ and others
These languages run on linux. Here are compiler versions: Your code will be run on behalf user 'nobody' and group 'nogroup'. Also your code will be executed from Python wrapper which sets various limits to the process. It does so by using 'setrlimit' system call. You'll have max 5 sec of cpu time, limited memory (~100 Mb) and other restrictions will apply (like no network access and no writing permissions). Also your process and all its children will be run in a newly created process group which will be terminated after 10 seconds from start if still running.

We don't claim that this is secure. In many senses you'll have the power of 'nobody' user. On a bright side, this has some useful side-effects. The reason why, at least for now, we leave so many potential security breaches is because it's hard to make it really secure. What are the options? So, if you can take the system down - then be it, but please report how you did this. Your advice on this topic is always welcome.

Input support
Everything that will be submitted as input will be piped to process via stdin stream. So your code should consume input as if it came from keyboard.

Live collaboration
Write code so that others see this real-time. Every participant can make changes and see changes made by others. ShareJS library is used for operational transformations on text.

Credit
Special thanks goes to people behind CodeMirror, Edit area and ShareJS.

Code wall - place code on a wall for public display. Code snippets that might be useful to others are good candidates, for example: Code snippet should be given a meaningful title.
Feedback - give us feedback.
Login - once logged in you'll be able to track your saved snippets.