robertkennedy 2017-02-23 03:52:50
Is there a library for lambdabot? Or other tools to run code from databases?
robertkennedy 2017-02-23 03:53:40
I can get people to write lambda terms
sm 2017-02-23 03:53:56
trkpa: it's good
robertkennedy 2017-02-23 03:55:45
Also, does anyone know a combinator <||> that can evaluate `loop <||> (+1) $ 3` ?
robertkennedy 2017-02-23 03:56:14
(evaluates it to 4)
robertkennedy 2017-02-23 03:56:49
Or `pure 4`, if it needs that
robertkennedy 2017-02-23 03:57:19
I tried with STM but couldn't manage it
lyxia 2017-02-23 04:02:58
(<||>) = const id
athan 2017-02-23 04:03:43
robertkennedy: what is `loop`?
athan 2017-02-23 04:04:27
are you looking for compositional concurrency or something?
fryguybob 2017-02-23 04:12:21
robertkennedy: race?
fryguybob 2017-02-23 04:12:33
@hoogle race
lambdabot 2017-02-23 04:12:33
Control.Concurrent.Async race :: IO a -> IO b -> IO (Either a b)
lambdabot 2017-02-23 04:12:33
Control.Concurrent.Async.Lifted race :: MonadBaseControl IO m => m a -> m b -> m (Either a b)
lambdabot 2017-02-23 04:12:33
Control.Concurrent.Async.Lifted.Safe race :: (MonadBaseControl IO m, Forall (Pure m)) => m a -> m b -> m (Either a b)
fryguybob 2017-02-23 04:13:26
robertkennedy: Or perhaps unamb?
fryguybob 2017-02-23 04:14:12
(or amb) from the unamb package.
robertkennedy 2017-02-23 04:24:16
I tried with race. Can post an example. The short motivation would be like `isPos n = n - 1 == 0 || isPos (n-1); isNeg = isPos . (-1*); isPositive n = isPos n <||> not (isNeg n)
robertkennedy 2017-02-23 04:24:54
(with something for zero ofc)
robertkennedy 2017-02-23 04:25:19
I'll look at amb
max3 2017-02-23 04:25:42
does compiling with -prof -fprof-auto -fprof-cafs significantly slow down an executable?
lyxia 2017-02-23 04:29:01
yes it does
max3 2017-02-23 04:31:25
how much is significant? single digit or double digit?
praveen 2017-02-23 04:33:43
exit
c_wraith 2017-02-23 04:43:14
max3: in some cases, asymptotic. It disables most optimizations.