This file contains hidden or 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
May 16, 2016 10:39:43 AM org.apache.fontbox.util.FontManager findTTFontname | |
WARNING: Font not found: TimesNewRomanPS-BoldMT | |
May 16, 2016 10:39:43 AM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString | |
WARNING: Changing font on <> from <AKCNGD+Cmex9> to the default font | |
May 16, 2016 10:39:43 AM org.apache.pdfbox.pdmodel.font.PDSimpleFont drawString | |
WARNING: Changing font on <> from <AKCNGD+Cmex9> to the default font | |
May 16, 2016 10:39:43 AM org.apache.pdfbox.pdmodel.font.PDTrueTypeFont getawtFont | |
INFO: Can't find the specified font Arial-Black | |
May 16, 2016 10:39:43 AM org.apache.fontbox.util.FontManager findTTFontname | |
WARNING: Font not found: Arial-Black |
This file contains hidden or 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
class (MonadPlus m) => MonadLogic m where | |
-- | Attempts to split the computation, giving access to the first | |
-- result. Satisfies the following laws: | |
-- | |
-- > msplit mzero == return Nothing | |
-- > msplit (return a `mplus` m) == return (Just (a, m)) | |
msplit :: m a -> m (Maybe (a, m a)) | |
-- | Fair disjunction. It is possible for a logical computation | |
-- to have an infinite number of potential results, for instance: |
This file contains hidden or 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
x@nixos ~/t3/ghcjs-websockets-reflex$ cabal2nix . ~/t3/ghcjs-websockets-reflex | |
{ mkDerivation, base, binary, bytestring, containers | |
, ghcjs-websockets, lens, reflex, reflex-dom, stdenv, text | |
, transformers | |
}: | |
mkDerivation { | |
pname = "ghcjs-websockets-reflex"; | |
version = "0.1"; | |
src = ./.; | |
libraryHaskellDepends = [ |
This file contains hidden or 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
[nix-shell:~/torch-pkg]$ luarocks install cwrap | |
Error: Your user does not have write permissions in /nix/store/vniy48rrb3ip7avdc5cwmgdhsqrqfk3y-luarocks-2.2.2 | |
-- you may want to run as a privileged user or use your local tree with --local. | |
This file contains hidden or 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
I have a mental model where: | |
entire FRP program = a directed graph | |
directed edge from node A -> node B IFF node B dependes on node A, i.e. | |
B = A + C -- here, we have edges (A -> B), (C -> B) | |
each node contains: | |
* current value (or "last" value) | |
* function to be called whenever an incoming arrow's node changes it's value |
This file contains hidden or 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
-- reflex code | |
listWithKey :: forall t k v m a. (Ord k, MonadWidget t m) => Dynamic t (Map k v) -> (k -> Dynamic t v -> m a) -> m (Dynamic t (Map k a)) | |
listWithKey vals mkChild = do | |
postBuild <- getPostBuild | |
rec sentVals :: Dynamic t (Map k v) <- foldDyn (flip applyMap) Map.empty changeVals | |
let changeVals :: Event t (Map k (Maybe v)) | |
changeVals = attachWith diffMapNoEq (current sentVals) $ leftmost | |
[ updated vals | |
, tag (current vals) postBuild |
This file contains hidden or 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
Question 1: Why is the following a loop? | |
do rec { | |
sample (current d); | |
d <- hold "foo" never | |
} | |
Question 2: Is this also a loop? | |
do rec { | |
d <- hold "foo" never | |
sample (current d); |
This file contains hidden or 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
Facts: | |
Suppose I have a JS FFI, where I have the following two operations: | |
data Location = Location Double Double -- x y | |
data Foo = some abstract type | |
addMarker :: Location -> IO Foo | |
addMarker (Location x y) = adds a marker at point (x,y), returns some "identifier" Foo, not necessairly a DOM element | |
This file contains hidden or 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
a :: Event t a | |
b = fmap f a :: Event t b | |
internal representation of a: | |
* for push events, when 'a' is updated, | |
everything that depends on 'a' needs to be updated | |
* therefore, there needs to be *SOME TYPE* of reference from a to b | |
now, when nothing else depends on 'b' | |
'b' should really "unsubscribe" from a |
NewerOlder