-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
370 lines (303 loc) · 18.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="last-modified" content="2016-09-27T23:34:42.2940606-07:00" />
<title>Ashutosh Raina</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css" />
<link rel="shortcut icon" href="/stylesheets/images/me.png" type="image/png">
<link rel="shortcut icon" type="image/png" href="/stylesheets/images/me.png" />
<link rel="stylesheet" type="text/css" href="/stylesheets/font-awesome/css/font-awesome.min.css" />
<link rel="canonical" href="http://ashutoshraina.github.io/" />
</head>
<body class="home blog">
<div id="page" class="hfeed site">
<header id="masthead" class="site-header fancy-container lightgreen" role="banner">
<hgroup>
<h1 class="site-title"><a href="/" title="ashutoshraina.github.io" rel="home">Ashutosh Raina</a></h1>
<h2 class="site-title"><small>For those who are still chasing</small></h2>
<p class="site-description">I love french fries!!</p>
</hgroup>
<nav role="navigation" class="site-navigation main-navigation">
<h1 class="assistive-text">Menu</h1>
<div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a>
</div>
<div class="menu">
<ul>
<li><a href="/" class="home"><i class="fa fa-home"></i></a></li>
<li><a href="/archive">Archive</a></li>
<li><a href="/category">Categories</a></li>
<li><a href="/about">About</a></li>
<li><a href="/feed.xml">RSS/Atom</a></li>
</ul>
</div>
</nav>
</header>
<div id="main">
<div id="primary" class="site-content">
<div id="content" role="main">
<ul class="posts">
<li class="post">
<h1><a href="/2015/05/scriptcs-tools/">Scriptcs : The Tooling</a></h1>
<div class="meta">
<p class="posted">06 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/05/scriptcs-getting-started/">Part 1 - Getting Started</a></li><li><a href="/2015/05/scriptcs-up-and-running/">Part 2 - Up & Running</a></li><li><a href="/2015/05/scriptcs-becoming-productive/">Part 3 - Becoming more productive with Scriptcs</a></li><li><a href="/2015/05/scriptcs-better-abstractions/">Part 4 - Raising the bar with better abstractions</a></li><li>Part 5 - Doing something Useful</li><li>Part 6 - Tools to make you productive</li></ul>
<p>Tools really make the ecosystem more productive. I list down some of the tools that I have found to be useful.</p>
<ul>
<li><p>Version Management</p>
<p>We can have multiple version of ScriptCS installed on the system. Then to pick which one to use we can use the ScriptCS version Manager <a href="https://github.com/scriptcs-contrib/svm">SVM</a>
This is essentially similar to npm and helps keep track of different scriptcs versions.</p></li>
<li><p>Running the code</p>
<ul>
<li><p>Sublime Plugin :
<a href="https://github.com/scriptcs/scriptcs-sublime">Sublime Plugin</a> </p>
<p>It is a little dodgy on mac, windows will work just fine.</p></li>
<li><p>Atom Runner :
The wiki has a good guide on how to start with Atom and Scriptcs
<a href="https://github.com/scriptcs/scriptcs/wiki/Running-scripts-in-Atom">Atom</a>
I did struggle quite a bit with getting this to work neatly on mac initially things seem to be better now.</p></li>
<li><p>Omnisharp :
One of the most active and loved .net projects. Omnisharp also has support for ScriptCS.
<a href="https://github.com/OmniSharp/omnisharp-atom">Omnisharp</a></p></li>
</ul></li>
</ul>
<p>This was a short tour of the tools and hopefully this gets you on your way.</p>
<p>With this we round up our tour of ScriptCS, it is a great project that continues to make little improvements to my every day workflow.</p>
<p><a href="/2015/05/scriptcs-tools/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/05/scriptcs-doing-something-useful/">Scriptcs : Doing something Useful</a></h1>
<div class="meta">
<p class="posted">05 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/05/scriptcs-getting-started/">Part 1 - Getting Started</a></li><li><a href="/2015/05/scriptcs-up-and-running/">Part 2 - Up & Running</a></li><li><a href="/2015/05/scriptcs-becoming-productive/">Part 3 - Becoming more productive with Scriptcs</a></li><li><a href="/2015/05/scriptcs-better-abstractions/">Part 4 - Raising the bar with better abstractions</a></li><li>Part 5 - Doing something Useful</li><li>Part 6 - Tools to make you productive</li></ul>
<p>We now have a fair grasp of how to swing with ScriptCS. Let's try and do something more useful with it.</p>
<p>Let's start by talking to a redis instance. Talking to a running instance interactively is a great a capability to have.</p>
<pre><code>scriptcs -install StackExchange.Redis
using StackExchange.Redis;
var redis = ConnectionMultiplexer.Connect("localhost");
var db = redis.GetDatabase();
db.StringSet("foo","bar");
var result = db.StringGet("foo");
Console.WriteLine(result);
</code></pre>
<p><a href="/2015/05/scriptcs-doing-something-useful/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/05/scriptcs-better-abstractions/">Scriptcs : Better Abstraction</a></h1>
<div class="meta">
<p class="posted">04 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/05/scriptcs-getting-started/">Part 1 - Getting Started</a></li><li><a href="/2015/05/scriptcs-up-and-running/">Part 2 - Up & Running</a></li><li><a href="/2015/05/scriptcs-becoming-productive/">Part 3 - Becoming more productive with Scriptcs</a></li><li>Part 4 - Raising the bar with better abstractions</li><li><a href="/2015/05/scriptcs-tools/">Part 5 - Doing something Useful</a></li><li>Part 6 - Tools to make you productive</li></ul>
<p>Abstractions are what drive most of software development.
ScriptCS also has a few abstractions which bridge the gap between the existing frameworks and the notion of scripting and REPL.</p>
<p>From the github wiki</p>
<blockquote>
<p>Script Packs allow you to bootstrap the environment for new scripts,
further reducing the amount of code necessary to take advantage of your favorite C# frameworks.</p>
</blockquote>
<p><a href="/2015/05/scriptcs-better-abstractions/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/05/scriptcs-becoming-productive/">Scriptcs : Becoming Productive</a></h1>
<div class="meta">
<p class="posted">03 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/05/scriptcs-getting-started/">Part 1 - Getting Started</a></li><li><a href="/2015/05/scriptcs-up-and-running/">Part 2 - Up & Running</a></li><li>Part 3 - Becoming more productive with Scriptcs</li><li><a href="/2015/05/scriptcs-better-abstractions/">Part 4 - Raising the bar with better abstractions</a></li><li><a href="/2015/05/scriptcs-tools/">Part 5 - Doing something Useful</a></li><li>Part 6 - Tools to make you productive</li></ul>
<p>Last time we got up and running with Scriptcs. We have done everything in the REPL so far.
When it comes to scripts we need a few more things to make everything easy.</p>
<p>Roslyn allows us to load assemblies using the #r directive.</p>
<pre><code>#r System.Data
#r System.Net.Http
</code></pre>
<p>Roslyn does not give us the power to load multiple script files. Scriptcs helps us out here by giving the #load directive.</p>
<pre><code>HelloWorld.csx
Console.WriteLine("Hello World");
MyWorld.csx
#load HelloWorld.csx
Console.WriteLine("MyWorld");
//output
Hello World
MyWorld
</code></pre>
<p>The loading of scriptcs is recursive and the script that gets loaded first gets executed first.
Scriptcs also ensures that only one version of the script is loaded at a time (e.g. File1 loads File2 & File3 and File2 also loads File3).</p>
<p>
<p><a href="/2015/05/scriptcs-becoming-productive/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/05/scriptcs-up-and-running/">Scriptcs : Up & Running</a></h1>
<div class="meta">
<p class="posted">02 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/05/scriptcs-getting-started/">Part 1 - Getting Started</a></li><li>Part 2 - Up & Running</li><li><a href="/2015/05/scriptcs-becoming-productive/">Part 3 - Becoming more productive with Scriptcs</a></li><li><a href="/2015/05/scriptcs-better-abstractions/">Part 4 - Raising the bar with better abstractions</a></li><li><a href="/2015/05/scriptcs-tools/">Part 5 - Doing something Useful</a></li><li>Part 6 - Tools to make you productive</li></ul>
<p>Last time we saw how we could get Scriptcs up and running. Before we go further, it would be nice to know what is going on.</p>
<p>Roslyn enabled in-memory compilation which means we can finally take loose C# code and start running with it.
In code terms it means we can get rid of
class Program
public static void .... </p>
<p>We can valid C# statements and then move on to doing the real thing. </p>
<p><a href="/2015/05/scriptcs-up-and-running/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/05/scriptcs-getting-started/">Scriptcs : Getting Started</a></h1>
<div class="meta">
<p class="posted">01 May 2015</p>
<ul class="categories">
<li><a href="/category/scriptcs" title="scriptcs">scriptcs</a></li>
<li><a href="/category/open source" title="open source">open source</a></li>
</ul>
</div>
<ul class="snow-series"><li>Part 1 - Getting Started</li><li><a href="/2015/05/scriptcs-up-and-running/">Part 2 - Up & Running</a></li><li><a href="/2015/05/scriptcs-becoming-productive/">Part 3 - Becoming more productive with Scriptcs</a></li><li><a href="/2015/05/scriptcs-better-abstractions/">Part 4 - Raising the bar with better abstractions</a></li><li><a href="/2015/05/scriptcs-tools/">Part 5 - Doing something Useful</a></li><li>Part 6 - Tools to make you productive</li></ul>
<p>C# even though a really nice language has always been tied to Visual Studio.
With mono we had the ability to write it on non-windows platforms as well.
One other thing that mono had was the repl and the ability to script. </p>
<p>What is Scriptcs ?</p>
<ul>
<li>Use C# as a scripting language powered by Roslyn</li>
<li>Uses the Rosyln nuget package</li>
<li>No IDE, No dlls</li>
<li>Xplat, CLI</li>
<li>Lighter experience with faster feedback</li>
</ul>
<p><a href="/2015/05/scriptcs-getting-started/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/01/windows-productivity-contd/">Everyday utilities for a Windows developer - Contd.</a></h1>
<div class="meta">
<p class="posted">12 Jan 2015</p>
<ul class="categories">
<li><a href="/category/windows" title="windows">windows</a></li>
<li><a href="/category/tips" title="tips">tips</a></li>
</ul>
</div>
<ul class="snow-series"><li><a href="/2015/01/becoming-a-little-more-productive-on-windows/">Part 1 - Everyday utilities for a Windows Developer</a></li><li>Part 2 - Everyday utilities for a Windows developer - Contd.</li></ul>
<p>From the previous post if you do end up using <a href="http://bliker.github.io/cmder/" title="Cmder Mini">cmder mini</a> like me then you should also register it and let it show up in the explorer. </p>
<pre><code> cmder.exe /REGISTER ALL
</code></pre>
<p>This time we look at some utility programs that are often required when doing deeper analysis in a windows environment.</p>
<p><a href="/2015/01/windows-productivity-contd/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2015/01/becoming-a-little-more-productive-on-windows/">Everyday utilities for a Windows developer</a></h1>
<div class="meta">
<p class="posted">05 Jan 2015</p>
<ul class="categories">
<li><a href="/category/windows" title="windows">windows</a></li>
<li><a href="/category/tips" title="tips">tips</a></li>
</ul>
</div>
<ul class="snow-series"><li>Part 1 - Everyday utilities for a Windows Developer</li><li><a href="/2015/01/windows-productivity-contd/">Part 2 - Everyday utilities for a Windows developer - Contd.</a></li></ul>
<p>As I have learned to use the command line more and more on windows I often get stuck due to lack of commands. This can be quite frustrating and if you switch between the *nix and windows then the gap can seem to quite alarming. In this post I will share some tidbits on how to overcome some of these pains. </p>
<p>First, do yourself and get a better console like Console2 or Mini Commander(or anything else that suits your style). Things are a bit better in Windows 10 (copy paste will be allowed on the command line) but that is still sometime away. If you are willing then I do suggest making the permanent shift to Powershell for all practical purposes, I don't see the windows command line (CMD) ever improving enough to make it my default console. Next, I describe some of the common things I do all the time.</p>
<p><a href="/2015/01/becoming-a-little-more-productive-on-windows/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2014/09/implicit-and-explicit-in-csharp/">Implicit and Explicit Operator in C#</a></h1>
<div class="meta">
<p class="posted">12 Sep 2014</p>
<ul class="categories">
<li><a href="/category/.net" title=".net">.net</a></li>
<li><a href="/category/csharp" title="csharp">csharp</a></li>
<li><a href="/category/C#" title="C#">C#</a></li>
</ul>
</div>
<p>One of the features that I have never used in C# is the implicit and Explicit keywords. </p>
<p>The definitive word from MSDN on explicit is "The explicit keyword declares a user-defined type conversion operator that must be invoked with a cast." Omitting the cast will result in a compile time warning.</p>
<p>The definitive word from MSDN on implicit is "The implicit keyword is used to declare an implicit user-defined type conversion operator." Implicit doesn't require an explicit cast and makes the syntax a lot easier.</p>
<p><a href="/2014/09/implicit-and-explicit-in-csharp/">Read more...</a></p>
</li>
<hr/>
<li class="post">
<h1><a href="/2014/08/ndepend-review/">NDepend Review</a></h1>
<div class="meta">
<p class="posted">25 Aug 2014</p>
<ul class="categories">
<li><a href="/category/Review" title="Review">Review</a></li>
<li><a href="/category/Tools" title="Tools">Tools</a></li>
</ul>
</div>
<p>Patrick from NDepend wasgracious enough to give me a license for NDepend. I have been wanting to get my hands on such a tool for some time now, and as it turns NDepend is actually quite good. Let's have a look at what the hell am I a talking about.
<p><a href="/2014/08/ndepend-review/">Read more...</a></p>
</li>
<hr/>
</ul>
<!-- Pagination links -->
<div id="post-pagination" class="pagination">
<!--<a href="/">Previous Page</a>-->
<p class="previous">
<a href="/page2">Next Page</a>
</p>
</div>
</div>
<!-- #content -->
</div>
<!-- #primary .site-content -->
<!-- #main -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
Powered by <a href="https://github.com/Sandra/Sandra.Snow" rel="generator">Sandra.Snow</a>.
</div>
<!-- .site-info -->
</footer>
<!-- #colophon .site-footer -->
</div>
<!-- #page .hfeed .site -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src='/javascripts/prettify.js' type='text/javascript'></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-46699881-1']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<script type='text/javascript'>
$(function () {
$("pre code").parent().each(function () {
if (!$(this).hasClass("prettyprint")) {
$(this).addClass("prettyprint");
a = true
}
});
prettyPrint();
});
</script>
</body>
</html>