./benchmarks/RunHtmlBenchmarks --resamples 10000 -u results.csv
warming up
estimating clock resolution...
mean is 2.045215 us (320001 iterations)
found 22885 outliers among 319999 samples (7.2%)
13018 (4.1%) low severe
9867 (3.1%) high severe
This file contains 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
An HTML document constructed using blaze-html looks like this | |
> page1 :: Html | |
> page1 = html $ do | |
> head $ do | |
> title "Introduction page." | |
> link ! rel "stylesheet" ! type_ "text/css" ! href "screen.css" | |
> body $ do | |
> div ! id "header" $ "Syntax" | |
> p "This is an example of BlazeHtml syntax." |
Make sure you have the 64-bit version of GHC. If you installed GHC using brew install haskell-platform
, you are using the 32-bit version which wont work with the instructions below. To install the 64-bit version
- Follow instructions in this [gist][ghcinstallgist]. However, note that the patch for
cabal-install
that they point to is not available anymore. There is a similar patch in [this gist][cabalinstallgist], which worked for me. Read [this comment][cabalinstallcomment] for more info on how to apply the patch.
This file contains 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
word :: Parser String | |
word = do{ c <- letter | |
; do{ cs <- word | |
; return (c:cs) | |
} | |
<|> return [c] | |
} | |
sentence :: Parser [String] | |
sentence = do{ words <- sepBy1 word separator |
This file contains 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
#!/bin/bash | |
promptValue() { | |
read -p "$1"": " val | |
echo $val | |
} | |
feature= | |
status= |
This file contains 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
commit d2bc95ebf2545b1d86463812f82917d943d8f77b | |
Author: Deepak Jois <[email protected]> | |
Date: Sat Dec 3 21:18:13 2011 -0800 | |
complicated awk -> simpler sed | |
diff --git a/post-fiddle-via-gist.sh b/post-fiddle-via-gist.sh | |
old mode 100644 | |
new mode 100755 | |
index 328b5bd..fd6d8de |
This file contains 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
#!/bin/sh | |
# Usage: generate-fiddle <folder> | |
# Creates a folder and adds some files commonly used with JSFiddle | |
set -e | |
# Create folder | |
mkdir $1 | |
cd $1 |
This file contains 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
body { display:none } |
This file contains 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
body { display:none } |