News for hackers. Stuff that matters.
Re:Making Instant C# Viable - Vizualization by swax on Friday September 21, 2012 @03:12AM (#4552688)
I've been planning to do something similar, but at run-time where the last known value of each variable is shown. This would complement my stuff nicely - https://github.com/swax/CodePerspective
Re:Making Instant C# Viable - Vizualization by vineet on Friday September 21, 2012 @10:44AM (#4553941)
Very cool.

Just a quick caution from someone who has been building similar tools (not as fancy though), is that runtime instrumentation can often severely slow down the main app to the extent that people often don't want to run such tooling.

Re:Making Instant C# Viable - Vizualization by swax on Friday September 21, 2012 @11:46AM (#4554217)
There are a bunch of settings where you can define the level of tracking. The state tracking is very low overhead though because it's on demand. So if you run your asp server through code perspective and then deploy it, you can at any time connect to it with the viewer and check out the current state information for all the classes.
Re:Making Instant C# Viable - Vizualization by yread on Friday September 21, 2012 @05:50AM (#4553052)
wow this is insane!
Re:Making Instant C# Viable - Vizualization by dos1 on Friday September 21, 2012 @10:52AM (#4553985)
This looks fantastic. The "Gibson" view is also an awesome little bonus for those of us who still love the movie Hackers.
Re:Making Instant C# Viable - Vizualization by drsim on Friday September 21, 2012 @03:43AM (#4552752)
I've been using NCrunch for some time now, and really enjoy the instant feedback it gives on failed tests. It constantly chugs away in the background like a faithful dog.

I can see things like Instant C# meaning I have to build less: a great productivity enhancer.

Re:Making Instant C# Viable - Vizualization by ermau on Friday September 21, 2012 @10:06AM (#4553776)
There's lots of places we can take this, which is why I categorize it as a research project.

Being able to create unit tests from this, or being able to look at calls from unit tests here has definitely been on my mind. The way you enter the "test code" right now is not ideal in the slightest as I talk about in my post.

Re:Making Instant C# Viable - Vizualization by eckyptang on Friday September 21, 2012 @04:29AM (#4552848)
That NCrunch is pretty awesome. Never seen that. I'm currently running TestDriven.Net every 5 minutes. Installing now :) Thanks for posting.
Re:Making Instant C# Viable - Vizualization by julius on Friday September 21, 2012 @04:44AM (#4552881)
Looks very interesting.

How would Instant C# scale up to real code? What about that bank application that has the side effect of throwing 100$ away from your account on each execution?

Re:Making Instant C# Viable - Vizualization by drsim on Friday September 21, 2012 @08:13AM (#4553404)
I see it working hand-in-hand with dependency injection. So resolved mock interface implementations will be used by Instant.
Re:Making Instant C# Viable - Vizualization by ermau on Friday September 21, 2012 @09:58AM (#4553744)
Wow, this is a great idea!
Re:Making Instant C# Viable - Vizualization by ermau on Friday September 21, 2012 @10:00AM (#4553749)
The trick is that you simply wouldn't use this on code where irreversible side effects take place. I think there's enough methods you write where this would help to make it still useful and worthwhile. Tackling the side effect issue is far, far too big of scope.
Re:Making Instant C# Viable - Vizualization by Devilboy on Friday September 21, 2012 @05:31AM (#4552991)
Side effects is definitely the biggest problem to solve here. For SQL you can start a transaction and roll it back afterwards. Disk access can be done with snapshots. Network traffic... well I guess it depends on what you're doing exactly. There's lots to do but it can work.
Re:Making Instant C# Viable - Vizualization by tylermenezes on Friday September 21, 2012 @01:16AM (#4552425)
It would be cool to see this integrated with the system used in the backend at Pex for Fun (http://www.pexforfun.com/), which tries to automatically find "interesting" inputs for a function given the code.
Re:Making Instant C# Viable - Vizualization by ermau on Friday September 21, 2012 @10:56AM (#4554005)
This is a great idea!
Re:Making Instant C# Viable - Vizualization by c3d on Saturday September 22, 2012 @12:14PM (#4558169)
In Tao, we have been trying to do it

1) for coordinates and graphical shapes 2) so that it works both ways, i.e. from code to visualizer, but also so that manipulating makes it possible to change the code.

See http://www.youtube.com/watch?v=LpPwjB46E5I for an example of how this works in practice (look around 1:20 in the video)

Re:Making Instant C# Viable - Vizualization by vineet on Friday September 21, 2012 @10:52AM (#4553983)
Nice.

I see this as a nice stepping stone in between coding and creating and creating unit test.

I have been a fan of Bret Victors work, but the video here has gotten me really excited.

Re:Making Instant C# Viable - Vizualization by nuttendorfer on Friday September 21, 2012 @04:45AM (#4552887)
Here's the link to the Bret Victor presentation where he talks about this concept: http://vimeo.com/36579366
Re:Making Instant C# Viable - Vizualization by skrebbel on Friday September 21, 2012 @03:09AM (#4552679)
Very nice. I'm a bit confused as to how basing this on Roslyn will allow for a MonoDevelop plugin, however. Or did Mono copy the entire Roslyn API, as well?
Re:Making Instant C# Viable - Vizualization by ermau on Friday September 21, 2012 @09:19AM (#4553598)
At current, I'm going to have to port it to NRefactory.
Re:Making Instant C# Viable - Vizualization by acron0 on Friday September 21, 2012 @04:52AM (#4552898)
This is awesome. That is all.
Re:Making Instant C# Viable - Vizualization by pjmlp on Friday September 21, 2012 @02:34AM (#4552602)
Cool! Nice work.