понедельник, 14 августа 2017 г.

.NET Core interop with C#: native and Go

Because I can.

.NET interop is a wonderful feature and I was happy to know that in .NET Core it is still powerful and convenient. While consuming native libraries is pretty starightforward at least on Windows but today we'll try some weird things on Mac OS (I'm pretty sure on Linux it will be the same).
Calling native functions is pretty simple. Let's start with creating a basic .NET Core application:

среда, 26 апреля 2017 г.

Resharper Build does not build

If your Resharper Build&Run matrix is grey and some nodes say "This project it set to "Never Build" in options", go to ReSharper->Options->Build->Heuristics and examine the "Projects that should NEVER be built" window. One unlikely has a project she does not want to build.

понедельник, 18 июля 2016 г.

Scaffolding a Suave app with Yeoman for Visual Studio code

Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.

F# in Visual Studio Code

I'm a little bit an IDE-kid and aware of such things like Emacs and Vim however I learned a number of fancy tricks in wonderful Sublime Text and I can edit a line in Vim and then exit it without having an insult. At the same time, I see no point in choosing a text editor over an IDE in my daily works because, you know, performance matters. My performance, not my laptop's (sorry, Greg)
But sometimes you want something different.

пятница, 1 июля 2016 г.

ReSharper does not build tests on run

It took some time for me to figure out the reason, and the internet is full of advices to play with platform and framework and “run every assembly is separate app domain” settings. In my case the issue was this setting value:
Stupid thing, hard to find, impossible to trace.

понедельник, 7 марта 2016 г.

new project on GitHub

Ok, here is a new project on GitHub: ep_activepads. It is a plugin for superb collaborative text editor etherpad-lite that lists all pads people are working on right now. It is highly inspired by ep_adminpads plugin.

What I would like to add alter is data auto update, probably with the simple timer on client side.

To install the plugin, clone it into node_modules/ep_activepads folder of your etherpad installation, terminal there and do npm install.

воскресенье, 7 февраля 2016 г.

Snooker “get remaining points” small Erlang thing

Just a little reminder for myself on Erlang module structure and common mistakes I’ve made composing this. It is a little Erlang module calculating how many points are on the snooker table. Number of the red balls in represented as integer, color balls are atoms.



get_points(NumberOfReds) when is_integer(NumberOfReds) -> get_points(NumberOfReds, 0);
get_points(0) -> get_points(yellow, 0);
get_points(yellow) -> get_points(yellow, 0);
get_points(green) -> get_points(green, 0);
get_points(brown) -> get_points(brown, 0);
get_points(blue) -> get_points(blue, 0);
get_points(pink) -> get_points(pink, 0);
get_points(black) -> get_points(black, 0).

get_points(NumberOfReds, Total) when is_integer(NumberOfReds) andalso NumberOfReds =/= 0 -> get_points(NumberOfReds - 1, Total) + 1 + get_points(black);
get_points(0, Total) -> get_points(yellow, Total);
get_points(yellow, Total) -> get_points(green, Total) + 2;
get_points(green, Total) -> get_points(brown, Total) + 3;
get_points(brown, Total) -> get_points(blue, Total) + 4;
get_points(blue, Total) -> get_points(pink, Total) + 5;
get_points(pink, Total) -> get_points(black, Total) + 6;
get_points(black, Total) -> Total + 7.