Live data from Hacker News

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

cshell.net

71–80 of 90 posts

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

#71
post #32

Earlier quoted context omitted.

There are a few hedge funds that are quite happy to contribute open-source to the world. Blue Mountain Capital for example; https://github.com/BlueMountainCapital One of their projects is Deedle; an F#/C#-equivalent of the Python 'Pandas' data frame package. Which would in fact make a nice complement to CShell I imagine. Jane Street would be another choice: http://janestreet.github.io/ Their work on OCaml is currentl…

wow, didn't know that. thanks for putting together that list - maybe we should start a list somewhere where people can add, this is definitely super interesting.

Agreed - here's another one (I am not affiliated): https://github.com/renshawbay/

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

#73

Earlier quoted context omitted.

Type inference in C# with the var keyword doesn't work like a dynamic language like javascript. It works by simply using var as a placeholder for whatever type the right hand side returns, which is determined at compile time.

So the type depends upon the initial values, which might not be representative of your full intent? A list of strings doesn't guarantee you won't want later to put something else in there. I guess you'd just have to declare it explicitly in that case.

But you could explicitly declare the string table and still try to put an integer into it. Your example isn't an issue of type inference, it's an issue with the developer not properly tracking what variables store what types in his/her own code.

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

#76
post #56

I'm getting "(35,0): error CS1525: Unexpected symbol `static'" 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's "Unexpected symbol `MyMath'"). public static class Foo { public static string B; } Foo.B = "5"; doesn't work either ("Unexpected symbol `Foo'"). I really don't get how to use that thi…

the thing is you can't really mix class definitions and straight scripting lines in one execution. So what you need to do, is execute the class first and then execute the other part.

For the MyMath example you'd just select the lines for that class, press Alt+Enter. And then run: > MyMath.Fibonacci(12);

With your example, you would enter following in the REPL: > public static class Foo { public static string B; } > Foo.B = "hi" > Foo.B hi >

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

#77
post #53

First of all, let me say this is something I've wanted for a while, so good job and thank you to the author. When I try the Tutorial.csx, I can't get this snippet to work: static class MyMath { public static long Fibonacci(long n) { //anything more than 48 will result in a stack overflow. if (n >= 48) throw new ArgumentException("Enter a number less than 48"); if (n == 0) return 0; if (n == 1) return 1; return Fibona…

Yep, I see the tutorial is not clear, will change it.

Anyhow what you need to do is simply select line 35-45 with your cursor, then press Alt+Enter.

And then, after that, execute MyMath.Fibonacci(12);

Post reply on HN