Skip to content

Instantly share code, notes, and snippets.

@swlaschin
swlaschin / effective-fsharp.md
Last active March 8, 2024 03:10
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

@MSDN-WhiteKnight
MSDN-WhiteKnight / DeletedMessages.md
Last active January 14, 2020 03:51
Messages deleted from ru.stackoverflow.com meta

Удалённый ответ AK (https://ru.meta.stackoverflow.com/a/8654/15479)

TL;DR проскроллируйте в конец поста если вам нужна краткая выжимка из ответа.

Не бывает верного или неверного понимания, зачем нужны отзывы на StackOverflow, потому что у каждого конкретного участника есть своё понимание.

Возможно, кроме мнения конкретных участников есть некое "официальное мнение администрации StackOverflow", но там наверняка (если что — я не видел, а в исходном посте нет ссылки) будут написаны настолько общие прекраснодушные слова, под которым не подпишется разве что только кровавый душегуб.

Как мы помним, именно администрация решает, чем является тот или иной поступок — дружеским напоминанием о незавершенной инициативе или пассивной агрессией, поэтому нужно понимать, что данный опрос "как вы определяете разницу между дружеским напоминанием о незавершенной инициативе или пассивной агрессией" имеет статус не более чем "спасибо за ваше мнение". Будем реалистами: принцип останется тот же: если начальник не прав — смот

@mrange
mrange / lazy_performance.md
Last active June 11, 2020 21:21
On the cost of being lazy

On the cost of being lazy

Full source code can be found here

Changelog

  1. 2017-01-04
  2. New performance test - Paul Westcott (@manofstick) provided his implementation of Lazy semantics (called Lazzzy) which I included in the graphs. This implementation is intended to be equivalent to Lazy<'T> in .NET with regards to functionality.
  3. 2017-01-17
  4. New performance test - is working on a PR for .NET Core. I wanted to include performance numbers for the updated Lazy<'T> class.
@mrange
mrange / pipeline_performance.md
Last active May 10, 2021 13:34
Performance comparison of different data pipelines in .NET

Performance comparison of different data pipelines in .NET

Full source code can be found here

Changelog

  1. 2016-12-20
  2. New performance test - Paul Westcott (@manofstick) made me aware that SeqComposer has a more performant API. SeqComposer2 uses this API.
  3. 2016-12-23
@mrange
mrange / fsharp_advent_2016_12_10.md
Last active December 14, 2019 21:44
F# Advent 2016 (English) - December 10 - Implementing a persistent hash map.
@bwnyasse
bwnyasse / extract-git-folder-with-history.md
Created August 9, 2016 22:56 — forked from cyberang3l/extract-git-folder-with-history.md
GIT: How to extract a specific folder from a git repository branch, including the folder's related git history only

GIT: How to extract a specific folder from a git repository branch, including the folder's related git history only

NOTE: If you want to keep the history for a specific folder in the master branch, just skip steps in lines 3,4,5,6,7

git clone <git-repository-url>
cd <git-repository-dir>

git checkout <branch-name>              # line 3; Checkout the branch of interest
git merge --strategy=ours master        # line 4; keep the content of this branch only and record a merge
git checkout master                     # line 5; Go back to the master branch
@swlaschin
swlaschin / type-dependency-graph.fsx
Last active March 4, 2021 19:24
This script analyzes the dependencies between top level types in a .NET Assembly. It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
(*
This script analyzes the dependencies between top level types in a .NET Assembly.
It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
Note that no attempt has been made to optimize the code yet!
REQUIRES:
* Mono.Cecil for code analysis
From http://www.mono-project.com/Cecil#Download