Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block giuliohome

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
giuliohome / app_offline.htm
Created May 14, 2019 — forked from robert-claypool/app_offline.htm
A simple "app offline" template for ASP.NET
View app_offline.htm
<!DOCTYPE html>
<meta charset="UTF-8">
<body style="margin:3em;font-family:sans-serif">
<p>This site is offline for maintenance.</p>

A quadratic space is a real vector space V with a quadratic form Q(x), e.g. V = R^n with Q as the squared length. The Clifford algebra Cl(V) of a quadratic space is the associative algebra that contains V and satisfies x^2 = Q(x) for all x in V. We're imposing by fiat that the square of a vector should be the quadratic form's value and seeing where it takes us. Treat x^2 = Q(x) as a symbolic rewriting rule that lets you replace x^2 or x x with Q(x) and vice versa whenever x is a vector. Beyond that Cl(V) satisfies the standard axioms of an algebra: it lets you multiply by scalars, it's associative and distributive, but not necessarily commutative.

Remarkably, this is all you need to derive everything about Clifford algebras.

Let me show you how easy it is to bootstrap the theory from nothing.

We know Cl(V) contains a copy of V. Since x^2 = Q(x) for all x, it must also contain a copy of some nonnegative reals.

View Differ.fs
type DifferenceType<'TKey, 'T> =
| Added of 'TKey * 'T
| Removed of 'TKey * 'T
| Modified of 'TKey * 'T * 'T * seq<string * (string * string)> with
member this.Key =
match this with
| Added (key, _)
| Removed (key, _)
| Modified (key, _, _, _) -> key
giuliohome / Hylo.fs
Created Feb 19, 2018 — forked from CarstenKoenig/Hylo.fs
Factorial using a Hylomorphism in F#
View Hylo.fs
type List<'i,'r> = Nil | Cons of 'i*'r
type FixList<'i> = FixList of List<'i,FixList<'i>>
let rec fmap (f : 'a -> 'b) (l : List<'i,'a>) : List<'i,'b> =
match l with
| Nil -> Nil
| Cons (x, tail) -> Cons (x, f tail)
// you can express hylo directly without using ana and cata (by either following the
giuliohome / free.fsx
Created Aug 1, 2017 — forked from battermann/free.fsx
Free Monad like pattern in F#
View free.fsx
#load @"paket-files/fsprojects/Chessie/src/Chessie/ErrorHandling.fs"
type Continuation<'output, 'next> = 'output -> 'next
module TerminalDsl =
open Chessie.ErrorHandling
type Terminal<'next> =
| WriteLine of string * Continuation<unit, 'next>
| ReadLine of unit * Continuation<string, 'next>
giuliohome / io.fsx
Created Jun 6, 2017 — forked from battermann/io.fsx
IO Monad in F#
View io.fsx
module IO =
type IO<'a> =
| Return of (unit -> 'a)
| Suspend of (unit -> IO<'a>)
let rec run x =
match x with
| Return v -> v()
giuliohome / simple_wcf.fs
Last active Nov 6, 2016 — forked from dgfitch/simple_wcf.fs
A sample WCF host and client in F#, extremely simple but a starting point
View simple_wcf.fs
open System
open System.ServiceModel
open System.ServiceModel.Description
[<ServiceContract(ConfigurationName = "PublishService", Namespace = "")>]
type IPublishService =
abstract member TestMethod : name:string -> string
You can’t perform that action at this time.