Live data from Hacker News

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

cshell.net

41–50 of 90 posts

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

#41

As much as i like C#, static typed languages are inadequate when using them in shell. You really don't want to type all that. Powershell has access to the BCL and can do all that with a nicer syntax when using it in the shell.

Did you even look at the link? It is about a REPL for C#.

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

#42
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 .c and .h excluding the .svn and .git directories. Etc etc.

So I'm sorry but a "scripting" language whose print operator is longer than 5 chars is not a scripting language :)

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

#43
post #30

I guess I'm old. My first thought was http://en.wikipedia.org/wiki/C_shell

It probably should have been named CSShell :-)

But I read it as CSS hell. Maybe SharpShell? Anyways, both are better than the original IMHO.

By the way, this is really useful. Loaded all our app libraries and works like a charm. I feel much more productive now except for the fact that it made me comment on HN =)

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

#44
post #40

Also see http://www.hanselman.com/blog/ProjectlessScriptedCWithScript... - no REPL though, although that would be easy to create since there's a SrciptingEngine for C# ( http://blogs.msdn.com/b/csharpfaq/archive/2011/12/02/introdu... )

ScriptCS does have REPL. Maybe it didn't at the time of that article. http://scriptcs.net/

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

#45
post #42

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 .c and .h excluding the .svn and .git directories. Etc etc. So I'm sorry but a "scripting" language whose print operator is longer than 5 chars is not a scripting langua…

    Action print = Console.WriteLine;
I mean, it's not perfect but you can also create a .Dump() extension method for all objects like Linqpad does. It comes really handy.

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

#47

As much as i like C#, static typed languages are inadequate when using them in shell. You really don't want to type all that. Powershell has access to the BCL and can do all that with a nicer syntax when using it in the shell.

If your language has you type more because it has a static ype system then it's just poor at inferring types and/or it's syntax has you write out things that it could infer anyway. You may have to write types in C# from time to time, but often you don't have to:

// This an array of integers.

var x = new[]{1, 2, 3};

// This is a list of integers.

var y = x.ToList();

// This is an anonymous type.

var pet = new { Age = 10, Name = "Fluffy" };

Zero type names there. Not all types can be inferred by literals though, most annoyingly dictionaries:

var myDict = new Dictionary{ { "test", "test" }, { "test2", "test2" } };

although I'm sure that could also have been created without typing out the name if you really wanted.

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

#48

As much as i like C#, static typed languages are inadequate when using them in shell. You really don't want to type all that. Powershell has access to the BCL and can do all that with a nicer syntax when using it in the shell.

If your language has you type more because it has a static ype system then it's just poor at inferring types and/or it's syntax has you write out things that it could infer anyway. You may have to write types in C# from time to time, but often you don't have to: // This an array of integers. var x = new[]{1, 2, 3}; // This is a list of integers. var y = x.ToList(); // This is an anonymous type. var pet = new { Age =…

Inferring types is cool, if it doesn't create bugs. But it does. Its not a lot of work to just say it outright, and it can save your life.

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

#49
post #42

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 .c and .h excluding the .svn and .git directories. Etc etc. So I'm sorry but a "scripting" language whose print operator is longer than 5 chars is not a scripting langua…

Also, I like Scala REPL's automatic labels for the results.

    scala > 7 * 7
    res0:Int = 49
    
    scala > res0 - 9
    res1:Int = 40
Saves a lot of typing.

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

#50

Earlier quoted context omitted.

If your language has you type more because it has a static ype system then it's just poor at inferring types and/or it's syntax has you write out things that it could infer anyway. You may have to write types in C# from time to time, but often you don't have to: // This an array of integers. var x = new[]{1, 2, 3}; // This is a list of integers. var y = x.ToList(); // This is an anonymous type. var pet = new { Age =…

Inferring types is cool, if it doesn't create bugs. But it does. Its not a lot of work to just say it outright, and it can save your life.

Can you elaborate? I'm not sure what you mean.
Post reply on HN