TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

CShell: A simple, yet powerful, C# scripting IDE

142 点作者 rayvega大约 11 年前

29 条评论

jasonkester大约 11 年前
Well presented. I clicked the link and spent my loading-spinner time thinking thoughts along the lines of &quot;This is silly. Why would anybody build a C# IDE to compete with VS.NET + ReSharper? Surely nobody would ever use anything but that??? I can&#x27;t believe that anybody would be cheap enough to...&quot;<p>... and then I arrived at a page that spent ten seconds clearly explaining exactly why I would want to use this thing even though I have VS.NET already installed on my machine.<p>A lot of open source &amp; developer-facing small product sites in the world would be well served to read the contents of this page and study exactly what the author did there.<p>Well done!
评论 #7719830 未加载
评论 #7723056 未加载
blunte大约 11 年前
I guess I&#x27;m old. My first thought was <a href="http://en.wikipedia.org/wiki/C_shell" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;C_shell</a>
评论 #7720017 未加载
评论 #7721793 未加载
评论 #7720884 未加载
j_s大约 11 年前
Nice to see another entrant in this space, offering functionality beyond LINQPad⁰ and the old SnippetCompiler¹. Microsoft has experimented with a REPL of their own² but there&#x27;s nothing official yet.<p>Mono&#x27;s REPL³ (MIT X11&#x2F;GNU GPL; 2008) still has some rough edges on Windows. CS-Script⁴ (MIT; 2009) seems to have received the widest use but was hampered by a weird license until recently. Microsoft MVPs have stepped into the ring with scriptcs⁵ (Apache; 2013) based on the brand new Roslyn tech.<p>⁰ <a href="https://www.linqpad.net/CodeSnippetIDE.aspx" rel="nofollow">https:&#x2F;&#x2F;www.linqpad.net&#x2F;CodeSnippetIDE.aspx</a><p>¹ <a href="http://www.sliver.com/dotnet/SnippetCompiler/" rel="nofollow">http:&#x2F;&#x2F;www.sliver.com&#x2F;dotnet&#x2F;SnippetCompiler&#x2F;</a><p>² <a href="http://stackoverflow.com/questions/1187423/anders-hejlsbergs-c-sharp-4-0-repl" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1187423&#x2F;anders-hejlsbergs...</a><p>³ <a href="http://tirania.org/blog/archive/2008/Sep-08.html" rel="nofollow">http:&#x2F;&#x2F;tirania.org&#x2F;blog&#x2F;archive&#x2F;2008&#x2F;Sep-08.html</a><p>⁴ <a href="http://www.csscript.net/index.html" rel="nofollow">http:&#x2F;&#x2F;www.csscript.net&#x2F;index.html</a><p>⁵ <a href="https://github.com/scriptcs/scriptcs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;scriptcs&#x2F;scriptcs</a>
评论 #7722504 未加载
uggedal大约 11 年前
Why don&#x27;t people do a quick search before naming things: <a href="http://en.m.wikipedia.org/wiki/C_shell" rel="nofollow">http:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;C_shell</a>
评论 #7721924 未加载
ahy1大约 11 年前
A combined REPL and editor for C# looks useful. I will try it next time I have some spare time.<p>The name is confusing. A C shell already exists (<a href="http://en.wikipedia.org/wiki/C_shell" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;C_shell</a>). An alternative name could be CSharpShell. Btw, while googling that name, I found CsharpRepl, which seems to be a somewhat similar tool.
评论 #7722586 未加载
评论 #7719917 未加载
xedarius大约 11 年前
Not very often you find a hedge fund behind an open source project. I guess it makes sense really, as many quants will be happy to mess around in a python shell, having a C# shell will probably play nicer with the rest of the companies infrastructure.
评论 #7719941 未加载
评论 #7719869 未加载
ahmett大约 11 年前
Scriptcs is out there for quite some time now. <a href="http://scriptcs.net/" rel="nofollow">http:&#x2F;&#x2F;scriptcs.net&#x2F;</a> it also has the motto &quot;Unleash your C# from Visual Studio.&quot;<p>It provides you proper scripting abilities by using other libraries, writing classes in the REPL and scripting, like proper scripting languages. CShell just seemed like a windowed application whereas Scriptcs also runs on Unix environment with Mono I guess.
QuadDamaged大约 11 年前
A C# REPL is welcome indeed, but C# is still too verbose for its own good. The F# REPL is much more useful when exploring dataset.
评论 #7719838 未加载
mojuba大约 11 年前
The point of scripting is to do things quickly at the expense of possibly being ugly. Most of the things we do in the UNIX shell are one-off local stuff. I want to rename all file extensions in a directory. I want to find a regex in files ending with <i>.c and </i>.h excluding the .svn and .git directories. Etc etc.<p>So I&#x27;m sorry but a &quot;scripting&quot; language whose print operator is longer than 5 chars is not a scripting language :)
评论 #7720299 未加载
评论 #7720375 未加载
lukebuehler大约 11 年前
hey, I&#x27;m the developer of CShell, nice for this project to get some love. I&#x27;m aware of some of the shortcomings. Will definitely read you guy&#x27;s comments and see what I can do.
dukeNukem64大约 11 年前
Similar: <a href="https://github.com/drew-r/maverick" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;drew-r&#x2F;maverick</a><p>Provides a Lua REPL with access to the .NET framework. Also allows you to run mini-apps made up of a combination of C# &#x27;scripts&#x27; and Lua scripts.
guiomie大约 11 年前
First of all, let me say this is something I&#x27;ve wanted for a while, so good job and thank you to the author.<p>When I try the Tutorial.csx, I can&#x27;t get this snippet to work:<p>static class MyMath { public static long Fibonacci(long n) { &#x2F;&#x2F;anything more than 48 will result in a stack overflow. if (n &gt;= 48) throw new ArgumentException(&quot;Enter a number less than 48&quot;); if (n == 0) return 0; if (n == 1) return 1; return Fibonacci(n - 1) + Fibonacci(n - 2); } }<p>&#x2F;&#x2F; Now the method can be called like so: MyMath.Fibonacci(12);<p>It gives me : &quot;(14,0): error CS1525: Unexpected symbol `MyMath&#x27;&quot; in the repl, anyone knows why?
评论 #7721775 未加载
评论 #7720734 未加载
stinos大约 11 年前
Also see <a href="http://www.hanselman.com/blog/ProjectlessScriptedCWithScriptCSAndRoslyn.aspx" rel="nofollow">http:&#x2F;&#x2F;www.hanselman.com&#x2F;blog&#x2F;ProjectlessScriptedCWithScript...</a> - no REPL though, although that would be easy to create since there&#x27;s a SrciptingEngine for C# (<a href="http://blogs.msdn.com/b/csharpfaq/archive/2011/12/02/introduction-to-the-roslyn-scripting-api.aspx" rel="nofollow">http:&#x2F;&#x2F;blogs.msdn.com&#x2F;b&#x2F;csharpfaq&#x2F;archive&#x2F;2011&#x2F;12&#x2F;02&#x2F;introdu...</a>)
评论 #7720285 未加载
bruceboughton大约 11 年前
I&#x27;ve just started using scriptcs (<a href="http://scriptcs.net/" rel="nofollow">http:&#x2F;&#x2F;scriptcs.net&#x2F;</a>) and this looks pretty similar.<p>I&#x27;m not sure about the name. CShell implies C not C#.
评论 #7719926 未加载
评论 #7719964 未加载
V-2大约 11 年前
I&#x27;m getting &quot;(35,0): error CS1525: Unexpected symbol `static&#x27;&quot; trying to run Tutorial.csx (when MyMath is uncommented), whether running the entire script or just the class and the MyMath.Fibonacci call alone, by Run Selection (then it&#x27;s &quot;Unexpected symbol `MyMath&#x27;&quot;).<p>public static class Foo { public static string B; } Foo.B = &quot;5&quot;;<p>doesn&#x27;t work either (&quot;Unexpected symbol `Foo&#x27;&quot;).<p>I really don&#x27;t get how to use that thing.
评论 #7720773 未加载
评论 #7721761 未加载
S_A_P大约 11 年前
I mean this as truly constructive criticism. There are several spelling errors on the site that made me want to cringe.<p>It allows you to use C# without any fluff right in a console like environment <i>caled</i> a read-eval-print-loop (REPL).<p>CShell is a project sponsored and maintained by Arnova Asset Management Ltd., a quant <i>hege</i> fund, which uses CShell daily for their research. The main contributor from Arnova is @lukebuehler.<p>That said I like this idea and look forward to trying it.
xiaq大约 11 年前
Mono has had a C# repl for quite some time: <a href="http://www.mono-project.com/CsharpRepl" rel="nofollow">http:&#x2F;&#x2F;www.mono-project.com&#x2F;CsharpRepl</a><p>Good to see the same thing coming to vanilla .Net!
Systemic33大约 11 年前
This is exactly what i need to test out if some code behaves how i want it to, without having to create a new test, open a new project or running code in actual project.
cadab大约 11 年前
I want this, but with nuget support. LinqPad seems about the best option, but i don&#x27;t need all the SQL&#x2F;Database stuff that comes with it.
iamsalman大约 11 年前
This may be useful for loading GBs of data and it&#x27;s quick exploration but I am wondering if there are any other uses for it besides that?
评论 #7720057 未加载
NicoJuicy大约 11 年前
I should look into it, but it seems to support multiple lines. So the ideal use case would be to add a seperate window into Visual Studio
评论 #7719724 未加载
Pxtl大约 11 年前
... you know that whole PowerShell thing MS made?<p>They should&#x27;ve just skipped that and made this. Hot damn, neat!
V-2大约 11 年前
What &quot;I&#x2F;O error occurred&quot;? I mean the IntelliSense hint on the screenshot.
评论 #7719896 未加载
评论 #7719899 未加载
ufmace大约 11 年前
Just tried it out, and it looks pretty awesome - I always wanted a real REPL for C#.
CmonDev大约 11 年前
Seems dead - last commit ~1 year ago?
bjoerns大约 11 年前
this is pretty cool, thanks for sharing! will see if I can integrate this with Excel-DNA.
NKCSS大约 11 年前
Very cool and useful, thanks!
rjfwhite大约 11 年前
Unity3D port anybody?
mariusmg大约 11 年前
As much as i like C#, static typed languages are inadequate when using them in shell. You really don&#x27;t want to type all that.<p>Powershell has access to the BCL and can do all that with a nicer syntax when using it in the shell.
评论 #7720344 未加载
评论 #7720216 未加载
评论 #7720063 未加载
评论 #7720191 未加载
评论 #7720235 未加载
评论 #7720214 未加载