You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to make an nearly empty grid 1000 by 1000 cells, but after it used 40 GB of system memory I had to kill it. Sample code:
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
moduleMainwhereimportControl.Lenshiding ((#))
importData.DefaultimportData.ListimportData.List.SplitimportData.TypeableimportDiagrams.Backend.SVG.CmdLineimportDiagrams.PreludeimportDiagrams.TwoDdefault (Int)
example::Int->Int-> [((Int, Int), (Double, Double), ColourDouble)]
->DiagramB
example n m =foldr (\((x, y), (w, h), c) -> situate x y w h c)
$ gridWithHalves n m
where
situate x y w h c =flip placeDiagramOnGrid [((x*2)+1, (y*2)+1) :: (Int, Int)]
$ rect (w /fromIntegral n) (h /fromIntegral m)
# alignTL
# lc c
# fc c
main::IO()
main = mainWith $ example 10001000 shapes
where
shapes = [ ((3, 4), (2, 2), black)
, ((5, 7), (3, 1), red)
]
The text was updated successfully, but these errors were encountered:
I tried to make an nearly empty grid 1000 by 1000 cells, but after it used 40 GB of system memory I had to kill it. Sample code:
The text was updated successfully, but these errors were encountered: