Skip to content

wbennett/sharpy

Repository files navigation

sharpy

A web-based (r)ead (e)val (p)rint (l)oop (REPL) for the C# language. This tool was created for evaluating LINQ queries/closures on arbitrary data sets, and playing with Roslyn is fun.

See it in action!

To try it out: sharpy.herokuapp.com

To use the API for your own purposes: sharpy.apphb.com

Requirements

To download source

  • git

###For the execution service:

  • Windows
  • .NET Framework 4.5 or higher
  • Visual Studio 2012 or higher with Nuget support

###For the web application:

  • Node JS (latest)

Getting started

###Get latest sources

cd path/to/desired/home
git clone [email protected]:wbennett/sharpy.git

Execution Service

  1. Build solution (solution will automatically pull required packages)
  2. Navigate to target directory
  3. Run with desired options

cd (project directory)/sharpy/bin/Release/
#yay server is now running
./sharpy -s http://localhost:4001/

The web service is running in apphost mode, ready to accept requests.

Web Application

  1. Get latest packages using npm
  2. Configure the settings to point where the Execution Service is running.
  3. Run web application with node

cd (project directory)/SharpNet.Presentation/sharpy
# need to edit (project directory)/config/environment.js to point to the web service
npm update
node app.js

##Usage ####(after execution service and web application are running)

  1. Go to http://localhost:4000/

  2. Use the help to show some more features

    alt help

  3. Assign variables

    alt assign

  4. Offend the compiler

    alt offend

  5. Try doing something silly

    alt silly

  6. Create an arbitrary collection

    alt collection

  7. Do something LINQy with the collection

    alt linq

  8. Create a complex type

    alt complex

TODO

  • Package everything nicely
  • Make portable with mono (roslyn is open source)
  • syntax highlighting
  • tab completion
  • syntax completion
  • semantic completion
  • support re-sharper (JK :P )

SHOUT OUT

About

An online C-Sharp REPL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published