Skip to content

Instantly share code, notes, and snippets.

@maestrow
maestrow / New-FsLabJournal.psm1
Last active September 18, 2017 23:43
Clone an FsLab Journal template to current directory (w/o .git folder and existing items like .gitignore for example)
function new-TemporaryDirectory {
$parent = [System.IO.Path]::GetTempPath()
$name = [System.IO.Path]::GetRandomFileName()
New-Item -ItemType Directory -Path (Join-Path $parent $name)
}
function copy1 ([string] $sourcePath, [string] $destPath) {
# FYI https://stackoverflow.com/questions/731752/exclude-list-in-powershell-copy-item-does-not-appear-to-be-working
Write-Host "Source path: $sourcePath";
$originalFiles = Get-ChildItem -Path $sourcePath -Exclude @('.git');
@maestrow
maestrow / copy-to-readme.md
Last active March 24, 2018 04:36
Start Scripting with F# and Paket on Windows (Использование Paket в скриптах F# на Windows, автоматизация)
@maestrow
maestrow / program.cs
Created September 16, 2017 08:09
Returns Nuget package dependency tree and prints to console
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using NuGet;
namespace ConsoleApplication1
{
class Program
{
@maestrow
maestrow / readme.md
Last active November 4, 2020 19:49
serebniti-universe

Вселенная Серебряных Нитей

Что такое Вселенная Серебряных Нитей

Я очень люблю передачи Александра Данилина в его клубе "Серебряные Нити". Данилин - психолог, психотерапевт, нарколог, филосов, автор книг. Ранее он вел передачу "Серебряные Нити" на Радио России. После того как передачу на радио закрыли (15 августа 2016 г. https://serebniti.ru/2016/08/zakrytie-radioperedachi-serebryanye-niti/) переместился на YouTube. Передачи Данилина посвящены человеческой душе, психологии человека. Эти передачи о нас с вами - о наших мечтах, о проблемах, страхах и пути их преодоления.

Передача существует с 2003 года и с того времени набралось большое количество материала (http://audio.serebniti.ru). Можно найти передачу практически на любую тему. В передачах Данилин часто ссылается на книги и известных людей. И это очень здорово, т.к. всегда можно глубже погрузиться в тему.

Имея доступ к такому большому количеству интересных материалов (записи радиопередач и эфиров youtube) со ссылками на другие не менее интересные

@maestrow
maestrow / readme.md
Last active September 13, 2017 20:13
Word Document Generation
@maestrow
maestrow / fs-member-constraints.md
Last active August 17, 2017 09:18
F# Member constraints

Member contraints constrain the type not just to a base class or interface but instead to the specific members that are required by the function. As long as a type can provide implementations for the required members then the constraint is fulfilled, regardless of its type or type heirarchy. This is commonly known as duck typing. Member constraints can only be used with statically resolved type parameters and inline functions. Usage of member constraints is restricted to member functions that are declared in tupled form only.

http://www.readcopyupdate.com/blog/2014/09/26/type-constraints-by-example-part1.html#memberconstraints

The member constraint system is quite complex and separate from the nominal type system, so you don't get nominal member invocation syntax for free. In fact, (^a : (member Walk : unit -> unit) creature) doesn't invoke anything, it is a template for generating an (inlined) type specific implementation of the function at compile time. I suppose the unified syntax desired

@maestrow
maestrow / ItemGroupOrderMatters.md
Last active August 1, 2017 13:12
Intellisense broken in #vscode #ionide

If you have a broken intellisense in VSCode Ionide, (re)save your fsproj file.

@maestrow
maestrow / SameReference-GetLastChar.png
Last active July 31, 2017 11:23
Strings Memory Test in F#
SameReference-GetLastChar.png
@maestrow
maestrow / ometa-concept.md
Last active July 30, 2017 11:04
Концепция OMeta
@maestrow
maestrow / fsharp-and-dotnetcli.md
Last active July 27, 2017 22:32
F# & .NET CLI