**SubHeader ***SubSubHeader
- Plain List 1
- Item 2
- Item 3
- this works
- 2nd item
| type test = | |
| | One | |
| | Two | |
| member this.Add = | |
| let number = | |
| match this with | |
| | One -> 1 | |
| | Two -> 2 | |
| (fun secondNumber -> number + secondNumber) |
| let behavior () = printfn "1" | |
| type Actions = | |
| | Run | |
| | Learn of (unit->unit) | |
| | Die | |
| let mailbox = | |
| MailboxProcessor.Start(fun inbox -> | |
| let rec loop learnedBehavior = |
| //This is to handle the unix ctrl+c signal | |
| let handleSigInt () = | |
| let quitApplication () = | |
| Async.CancelDefaultToken() | |
| async { | |
| let mutable signals = | |
| [| | |
| new Mono.Unix.UnixSignal (Mono.Unix.Native.Signum.SIGINT) | |
| new Mono.Unix.UnixSignal (Mono.Unix.Native.Signum.SIGTERM) | |
| |] |
| #Set the terminal session with super user privileges | |
| sudo -s | |
| #Install dependencies for compiling code | |
| yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget | |
| #Download Mono, extract the files, make, and make install | |
| cd /usr/local/src | |
| wget http://download.mono-project.com/sources/mono/mono-5.0.1.1.tar.bz2 | |
| tar jxf mono-4.3.2.467.tar.bz2 |
| let readInput = System.Console.ReadLine | |
| [<Measure>] type HumanYear | |
| [<Measure>] type CatYear | |
| [<Measure>] type TimeLordYear | |
| let averageCatLifeSpan = 15<HumanYear> | |
| let averageHumanLifeSpan = 80<HumanYear> | |
| let averageTimeLordLifeSpan = 7000<HumanYear> |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |