Permalink
Commits on Sep 30, 2014
  1. Demo of a serializer for Aeson's Value type

    lpsmith committed Sep 30, 2014
    This code is messy, but should be shared.
Commits on Feb 1, 2013
  1. Bump Version to 0.3

    lpsmith committed Feb 1, 2013
Commits on Jun 19, 2012
  1. Bump version to 0.2.5

    lpsmith committed Jun 19, 2012
  2. Update copyrights

    lpsmith committed Jun 19, 2012
Commits on Feb 26, 2012
  1. Add instances for Vector

    lpsmith committed Feb 26, 2012
Commits on Nov 12, 2011
Commits on Oct 29, 2011
  1. Add a .gitignore

    lpsmith committed Oct 29, 2011
  2. Bump version to 0.2.3

    lpsmith committed Oct 29, 2011
Commits on Oct 25, 2011
  1. Delete Trailing Whitespace

    lpsmith committed Oct 25, 2011
  2. Fix long line endings

    lpsmith committed Oct 25, 2011
  3. Fix links in Haddocks

    lpsmith committed Oct 25, 2011
  4. Clarify comments

    lpsmith committed Oct 25, 2011
Commits on Jul 2, 2011
  1. Add INLINE pragma for hexEscape

    lpsmith committed Jul 2, 2011
    This is a small, but seemingly clear win.  Interestingly, adding
    a INLINE pragma quoteChar appears to be performance hit.
Commits on Jun 13, 2011
  1. Minor code cleanup

    lpsmith committed Jun 13, 2011
Commits on Jun 12, 2011
  1. bump version to 0.2.2

    lpsmith committed Jun 12, 2011
  2. Improve Haddock Comments

    lpsmith committed Jun 12, 2011
Commits on Jun 9, 2011
  1. Bump version to 0.2.1

    lpsmith committed Jun 9, 2011
  2. Bump version to 0.2.0

    lpsmith committed Jun 9, 2011
Commits on Jun 8, 2011
  1. Bump version to 0.1.1

    lpsmith committed Jun 8, 2011
  2. Improved performance from strict Comma constructor

    lpsmith committed Jun 8, 2011
    Three variants of mappend were benchmarked,  along with both lazy and strict
    Comma constructors,  for a total of 6 variations.  Of the three combinations
    that lead to a "lazy" mappend,  variant 2 with a lazy comma performed worst,
    but I did not discern a performance difference between variant 2 with a
    strict comma and variant 3 with a lazy comma.   The strict combinations
    performed somewhat better in this benchmark, but I feel that the lazier
    semantics is important,  so I went with variant 2 with a strict comma.
    
    {--
    --- Variant 1
    --- This is always strict
    
      mappend Empty x = x
      mappend x Empty = x
      mappend (Comma a) (Comma b)
            = Comma (a ++ fromChar ',' ++ b)
    --}
    
    {--}
    --- Variant 2
    --- This is always Lazy,  but Comma should be strict for better performance
      mappend Empty     x = x
      mappend (Comma a) x
            = Comma (a ++ case x of
                            Empty   -> mempty
                            Comma b -> fromChar ',' ++ b)
    --}
    
    {--
    --- Variant 3
    --- This is strict if and only if Comma is strict
      mappend Empty x = x
      mappend (Comma a) x
            = Comma (case x of
                       Empty   -> a
                       Comma b -> a ++ fromChar ',' ++ b)
    --}
    
    However,  Variant 3 with a lazy comma can be differentiated from Variant 2 by
    following expression:
    
    toJsonLazyByteString (         mconcat (map element [1..big_number])
                         `mappend` mconcat (repeat mempty))
    
    where big_number is big enough to fill up a chunk of the lazy bytestring.
    Variant 2 will produce chunks before entering the non-productive infinite loop,
    whereas Variant 3 will never produce anything.
  3. Change the implementation of CommaTracker to CommaMonoid

    lpsmith committed Jun 8, 2011
    This appears to be faster, on par with Aeson, and avoids the need
    for implementations of methods such as
    
      toJson :: Value a => [a] -> Json
    
    to break the json-builder abstraction for performance reasons.
    So far, my attempts to improve this method by breaking abstractions
    has resulted in worse performance
Commits on Jun 4, 2011
  1. add "Json" type

    lpsmith committed Jun 4, 2011