Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
```sh | |
➜ ~ stack install sized | |
Error: While constructing the build plan, the following exceptions were encountered: | |
In the dependencies for sized-0.3.0.0: | |
equational-reasoning must match >=0.5, but the stack configuration has no specified version (latest matching | |
version is 0.6.0.0) | |
ghc-typelits-presburger must match >=0.2.0.0, but the stack configuration has no specified version (latest | |
matching version is 0.2.0.5) |
With no local config present, `stack` is picking the old ghc 8.2.2: | |
```sh | |
➜ test stack ghci | |
Note: No local targets specified, so a plain ghci will be started with no package hiding or package options. | |
You are using snapshot: lts-11.9 | |
If you want to use package hiding and options, then you can try one of the following: |
λ [9]: fmap f [1] | |
Out [9]: | |
<interactive>:186:1: error: | |
• Ambiguous type variable ‘f0’ arising from a use of ‘print’ | |
prevents the constraint ‘(Show (f0 Integer))’ from being solved. | |
Probable fix: use a type annotation to specify what ‘f0’ should be. | |
These potential instances exist: | |
instance Show a => Show (ZipList a) | |
-- Defined in ‘Control.Applicative’ |
Trying to install | |
https://github.com/litxio/ptghci | |
✗ cabal v2-build | |
Build profile: -w ghc-8.0.1 -O1 | |
In order, the following will be built (use -v for more details): | |
- ptghci-0.1.0.0 (lib) (first run) | |
- ptghci-0.1.0.0 (exe:ptghci) (first run) | |
Preprocessing library for ptghci-0.1.0.0.. | |
Building library for ptghci-0.1.0.0.. |
✗ cabal v2-build | |
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal | |
update' to download it. | |
Resolving dependencies... | |
cabal: Could not resolve dependencies: | |
[__0] next goal: ptghci (user goal) | |
[__0] rejecting: ptghci-0.1.0.0 (conflict: pkg-config package python3-any, not | |
found in the pkg-config database) | |
[__0] fail (backjumping, conflict set: ptghci) | |
After searching the rest of the dependency tree exhaustively, these were the |
✗ ghcup install | |
Installing GHC-8.6.5 for Darwin on architecture x86_64 | |
usage: mktemp [-d] [-q] [-t prefix] [-u] template ... | |
mktemp [-d] [-q] [-u] -t prefix | |
Failed to create temporary directory |
var _ = require('lodash'); | |
var log = require('../core/log.js'); | |
var RSI = require('./indicators/RSI.js'); | |
// let's create our own method | |
var method = {}; | |
// prepare everything our method needs | |
method.init = function() { |
Let us make the array functor slightly uglier.
According to Functor's definition, for every type a
,
we first need to define the type F(a)
,
the set of all admissible values for our Functor.
For the array Functor Array
, that would be the set [a]
of all arrays with entries of type a
.
We now define a new Functor F
, where we slightly change the set of values F(a)
:
Namely, we say that an array arr
is of type F(a)
if either
const Task = require('data.task') | |
Task.prototype.alt = function (that) { | |
return new Task((rej, res) => | |
this.fork(_ => that.fork(rej, res), res)) | |
} | |
const hosts = [ | |
[ 'db1.mysite.com', 'user', 'password' ], | |
[ 'db2.mysite.com', 'user', 'password' ], |