This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A bunch of the stuff above relies on this, especially the aliases. | |
[user] | |
# you probably want to change this bit. | |
name = isaacs | |
email = [email protected] | |
signingkey = 0x6C481CF6 | |
[alias] | |
ci = commit | |
st = status | |
br = branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using SimpleCqrs.Commanding; | |
using SimpleCqrs.Domain; | |
using SimpleCqrs.Eventing; | |
namespace ConsoleApplication4 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* F# lacks proper support for higher-kinded abstraction such as ML | |
functors or Haskell typeclasses. In particular it makes it seemingly | |
impossible to define functions that work for every type constructor. | |
The code below demonstrates that this functionality can be partially | |
recovered by using inline functions with static member constraints. | |
The approach requires explicitly passing typeclass instance values. | |
Error messages and derived types are horrible. Nonetheless, there is | |
some type safety - if the typeclass instances have been defined right, | |
type-unsafe code will be rejected by the typechecker, albeit with a | |
hairy message. Another disadvantage is the need to invent operators. *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just found out that VB.NET can infer function types correctly. I.e. this won't work in C#: | |
var withMemoryStream = | |
(Action<MemoryStream> f) => () => { | |
using (var ms = new MemoryStream()) | |
f(ms); | |
}; | |
("Cannot assign lambda expression to implicitly-typed local variable", because it can't tell a Func<T> from an Expression<Func<T>>). | |
But the exact same code in VB.NET does work: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir> | |
<!-- Windows specific commands --> | |
<PackagesConfig Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig> | |
<PackagesDir Condition=" '$(OS)' == 'Windows_NT'">$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir> | |
<!-- We need to launch nuget.exe with the mono command if we're not on windows --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// These classes are helper classes to help type inference for lambdas. | |
/// <example>var f = () => 4; // will not compile, | |
/// var f = Infer.Func(() => 4); // will compile.</example> | |
/// <see cref="http://blogs.msdn.com/b/jaredpar/archive/2007/12/14/c-lambda-type-inference.aspx"/> | |
/// | |
/// </summary> | |
public static class Infer | |
{ | |
public static Func<A> Func<A>(Func<A> f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22:43:40.516 - Publishing message of type AutoTest.Messages.InformationMessage | |
22:43:40.528 - Initial configuration finished | |
22:43:40.563 - Checking license | |
22:43:40.668 - Setting up cache | |
22:43:40.686 - C:\Dev\Scratch\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj initialize cache | |
22:43:40.693 - C:\Dev\Scratch\ClassLibrary1\ClassLibrary1\ClassLibrary1.csproj preparing cache | |
22:43:40.720 - Trying to get path Class1.cs relative to C:\Dev\Scratch\ClassLibrary1\ClassLibrary1 | |
22:43:40.726 - Trying to get path Properties\AssemblyInfo.cs relative to C:\Dev\Scratch\ClassLibrary1\ClassLibrary1 | |
22:43:40.728 - Trying to get path packages.config relative to C:\Dev\Scratch\ClassLibrary1\ClassLibrary1 | |
22:43:40.733 - Publishing message of type AutoTest.Messages.InformationMessage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Simple.Testing; | |
using Simple.Testing.ClientFramework; | |
namespace ClassLibrary1 | |
{ | |
public class Class1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SSCASTFLP | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.Write("Holy Fucking Shit. That Codebase Is Shocking."); | |
Console.ReadKey(true); | |
} |