Getting Windows Subshell for Linux working

If you’ve been working with Cygwin or MinGW, you may want to step over to Windows Subsystem for Linux (WSL) to take advantage of building and running tools in that environment. While the goal of Cygwin and MinGW has been to provide a Linux command-line tool set to Windows, it’s too easy to run the wrong tool (e.g., forgetting to install a tool in one environment, and picking up the identically named tool in another). In fact, many tools install their own private copy of MinGW (Git for Windows, SourceTree, Vagrant, …), so you find yourself constantly manipulating the search path.

Continue reading “Getting Windows Subshell for Linux working”

Another Visual Studio Extension for Antlr4 Files: AntlrVSIX

There are several Visual Studio extensions for Antlr: Antlr4Code, ANTLR Language Support, Actipro SyntaxEditor for WPF, and Syntax Highlighting Pack. However, each has problems (works on Antlr3, has advertisements, does not offer a “go to definition” right-click context menu command, etc). So, over the last few days, I implemented a simple VS 2015/2017 extension for Antlr4 grammars. You can find the sources on Github (https://github.com/kaby76/AntlrVSIX). … Continue reading Another Visual Studio Extension for Antlr4 Files: AntlrVSIX

Getting Xamarin.Forms apps working with .NET Standard and Roslyn

Recently, I was trying to write a Xamarin.Forms app that uses Roslyn, Microsoft’s NET languages compiler framework. But, no matter what I did, it seemed as though it wasn’t possible. But, I tried a few things, and noticed that the Roslyn library could link with Android and iOS applications. That’s when I realized it might be possible. That said, it depends on what you will … Continue reading Getting Xamarin.Forms apps working with .NET Standard and Roslyn

C# v7.0 pattern matching

Visual Studio “15” Preview 4 was recently released, so I decided to take it for a spin. In the upcoming C# 7.0, of the features being implemented, pattern matching is probably the most interesting. Consider how often we’ve designed code that uses a switch statement with complex cases, but then when we go to implement the design, a nested if-then-else statement must be coded instead because switch labels … Continue reading C# v7.0 pattern matching

Alternatives to Deeply-Nested Callback Functions in Javascript

A few days ago, I wrote a server in Node.js, the purpose of which is to email me when an API found in Nuget is updated. I thought the project would take a few hours, but as it turned out, it took several days. You may ask “How is this possible for such an easy problem?” Unfortunately, I spent a lot of time trying to figure out what API to use to read a text file, and how to use the API. It led me to an understanding of a fundamental problem with Javascript known as “callback hell” (1, 2).

Continue reading “Alternatives to Deeply-Nested Callback Functions in Javascript”

Resources for C# WebSockets

WebSockets is a communication protocol on TCP between a web browser (or other client) and a server. It is full-duplex, event-driven. One important advantage of the technology is the elimination of the client polling of the server. The following post lists some resources for C# WebSockets (1). C#/WebSocket Resources System.Net.WebSockets (client only) https://www.nuget.org/packages/System.Net.WebSockets/ First release Monday, June 27, 2016 http://www.infoworld.com/article/3088338/application-development/how-to-work-with-web-sockets-in-net.html Cannot target NET Portable 4.5 framework. WebSocket4Net (client only) … Continue reading Resources for C# WebSockets