I hereby claim:
- I am adamchester on github.
- I am adamchester (https://keybase.io/adamchester) on keybase.
- I have a public key whose fingerprint is 6573 51C0 41D2 58D2 9BE8 83F1 835B 3087 94D3 EC6F
To claim this, I am signing this object:
diff --git a/Octokit.Tests/OctoKit.Tests-NetCore45.csproj b/Octokit.Tests/OctoKit.Tests-NetCore45.csproj | |
index 351d930..00bf659 100644 | |
--- a/Octokit.Tests/OctoKit.Tests-NetCore45.csproj | |
+++ b/Octokit.Tests/OctoKit.Tests-NetCore45.csproj | |
@@ -1,5 +1,5 @@ | |
?<?xml version="1.0" encoding="utf-8"?> | |
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuild | |
<PropertyGroup> |
let whereNotExistsIn itemsToExclude itemToTest = | |
itemsToExclude |> Seq.exists (fun j -> itemToTest = j) |> not | |
let except itemsToExclude allItems = | |
allItems |> Seq.filter (whereNotExistsIn itemsToExclude) | |
[| "one"; "two"; "three"; |] | |
|> except [|"two"|] | |
|> Dump |
let except ex all = all |> Seq.filter (not << Set.ofSeq(ex).Contains) | |
let filtered = [| 1..1000000 |] |> except [| 20..29 |] | |
#I @"packages/" | |
#r @"FSharp.Data/lib/net40/FSharp.Data.dll" | |
#load @"FSPlot\FsPlotBootstrap.fsx" | |
#r @"Deedle\lib\net40\Deedle.dll" | |
do fsi.AddPrinter(fun (printer:Deedle.Internal.IFsiFormattable) -> "\n" + (printer.Format())) | |
open FSharp.Data | |
type Tweets = CsvProvider<"fsharp_2013-2014.csv"> |
open System | |
type WeekOf<'T> = { Mo:'T; Tu:'T; We:'T; Th:'T; Fr:'T; Sa:'T; Su:'T } | |
with | |
static member FromDays (allDays: (DayOfWeek * 'T)[]) = | |
let dayFor theDay = snd (allDays |> Array.find (fun (day, data) -> day = theDay)) | |
{ Mo = dayFor DayOfWeek.Monday | |
Tu = dayFor DayOfWeek.Tuesday | |
We = dayFor DayOfWeek.Wednesday | |
Th = dayFor DayOfWeek.Thursday |
I hereby claim:
To claim this, I am signing this object:
This blog is based on gistblog.
It is currently hosted on azure as Rarely updated.
This blog exists purely a learning experience. See the source code here.
As you may notice, the blog posts are actually github gists (http://gist.github.com/). It is based on gistblog (see also http://withouttheloop.com/).
Software
I am not good at writing bug-free code in JavaScript or CoffeeScript. I am equally not good at writing bug-free tests. It would be nice to have a way to quickly build a basic 'safety net' for my code, and be able to describe the tests in a format less verbose than 'describe->it-should->etc'.
It should also be a good learning experience.
How do you create a CoffeeScript class instance using 'apply'?
The answer is, like this:
util = require('util')
assert = require('assert')
class MyClass
constructor: (@splatArgs...) -> @first = splatArgs[0]; @second = splatArgs[1]