please note this is subject to change.
specifically this is currently using a single folder structure.
this approach is for learning purposes, with this structure likely
to become a unit of work.
- unit of work
- external calls
$a = [array]::CreateInstance([int],101) | |
1..1000000 | %{ get-random -max 100 -min 0 } | %{ $a[$_] = $a[$_] + 1 } | |
0..100| select @{n='Value';e={$_}}, @{n='Count';e={$a[$_]}} | sort count | |
gave the following results | |
Value Count | |
----- ----- | |
100 0 | |
32 9669 |
// | |
namespace Badger { | |
public class WhereYouNeedAThing { | |
public Growl Lalala(string thing, Person customer, NoiseMaker speakers) { | |
return new KindOfGrowl().WithA(thing).ForThe(customer).AmplifiedBy(speakers) as Growl; | |
} | |
} |
$x = @' | |
using System; | |
namespace X { | |
public class Y { | |
public string Echo(string echo) { | |
return echo + echo; | |
} } } | |
'@ | |
add-type -typedefinition $x |
using System; | |
using System.Linq; | |
namespace Facepalm { | |
// This is an example of SDD - Sarcasm Driven Development. | |
public class Program { | |
public static void Main(params string[] args) { | |
DoTheBanOThon.LikeRightNow(); |
[alias] | |
lg = log --graph --oneline --all --decorate | |
lga = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(bold white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lgv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
nuke = !git clean -xfd && git reset HEAD --hard && git status | |
clear = !git add -A && git checkout -f && git status; |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
// Please Note this has a dependency on Rx-Main |
using System; | |
namespace Options { | |
public abstract class Option<T> | |
{ | |
public class Some : Option<T> | |
{ | |
public T Value { get; private set; } | |
public Some(T value) |
using System.Collections; | |
using System.Collections.Generic; | |
namespace System.CollectionsEx | |
{ | |
public static class ArrayListExtensions | |
{ | |
public static IEnumerable<T> AsEnumerable<T>(this ArrayList collection) | |
{ |
(by @andrestaltz)
So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.