5 ms·
Show HN: C# Pad – Interactive C# REPL
- ScottWhigham 13y agoSeems interesting but I got a 'Server Error: timeout' when trying to run a simple string.Format(). Bookmarked to try later!
- scottksmith95 13y agoIs this using ScriptCS?
- sunnya 13y agoNo, it's using Roslyn directly.
- sunnya 13y agoI've written a blog post on Getting Started at http://www.ahuwanya.net/blog/post/introducing-csharp-pad http://www.ahuwanya.net/blog/post/introducing-csharp-pad
- lukasm 13y agocompile roslyn to js. Don't really need server here do you?
- sunnya 13y agoI didn't know that was possible. Even if you can compile Roslyn to JS to run on the client, you still need to compile most parts of the BCL as well, or else you still need to make a server call.
- lukasm 13y agoSure. You may try compile IL to js http://jsil.org/ http://jsil.org/
- mattmanser 13y agoMarvel at convoluted error messages! (JSIL is still in development. You will hit bugs)
- polskibus 13y agoImmediate window?
- sunnya 13y agoIt's the web version of the Interactive window bundled with Roslyn.
- sandyarmstrong 13y agoThis isn't really a REPL, though. It's missing the L. :-) Not evaluating each line as it comes makes it less fun to use. With some obvious caveats, I'm a big fan of the csharp REPL provided by Mono: http://www.mono-project.com/CsharpRepl http://www.mono-project.com/CsharpRepl
- sunnya 13y agoYeah, that will be too costly because it would have to make a server call pretty quickly to confirm that the code is complete. (The Roslyn desktop C# Interactive can do this because it's right on the desktop) You can press Ctrl-Enter to send complete code, if you wish to send submissions faster.
- sandyarmstrong 13y agoYeah, I understand. My expectations were just set a bit higher since you called it a REPL. Realistically, something like this fills a different use case anyway. When I want a REPL, I want to run it locally.
- neil_s 13y agoWow, I was just looking for this a couple of days back!
- notcub 13y agoNot quite REPL (not sure C# is a great fit for REPL) but I've found LINQPad very useful for trying out code snippets locally. https://www.linqpad.net https://www.linqpad.net
- usea 13y agoLINQPad is one of the best tools I've ever used. I can't recommend it enough for anybody who wants a C# or F# scratchpad, or wants to quickly query a database.