 Aug 2020

toraritte.github.io toraritte.github.io

Original post is here.
This explanation should be combined with 24 Days of GHC Extensions: Rank N Types (see related hypothes.is note).


ocharles.org.uk ocharles.org.uk

Commonly the above definition is called the identity function. But in fact we should think of it as a whole family of functions. We should really say that id is an identity function for all types a. In other words, for every type T you might come up with, there is an identity function called id, which is of type T > T. This is the typechecker’s view anyway, and by turning on the RankNTypes extension we can be explicit about that in our code: {# LANGUAGE RankNTypes #} id :: forall a. a > a id x = x
This is such a nice description of
forall
. It should be combined withforall
is the typelevel "lambda" (also saved it here). 
Now it is much clearer that id is really a family of infinitely many functions. It is fair to say that it is an abstract function (as opposed to a concrete one), because its type abstracts over the type variable a. The common and proper mathematical wording is that the type is universally quantified (or often just quantified) over a.
This was very neatly put, and
forall
above is also spot on. 
It also adds safety through a property called parametricity. If we pretend that there are no infinite loops or exceptions (it’s okay to do that, so we will do it throughout this article), then the function is actually fully determined by its type. In other words, if we see the type a > a, we know that the corresponding value must be the identity function.
If this would be the first time I came across parametricity, I wouldn't understand what it means.
https://en.wikipedia.org/wiki/Parametricity
In programming language theory, parametricity is an abstract uniformity property enjoyed by parametrically polymorphic functions, which captures the intuition that all instances of a polymorphic function act the same way.
That is, a function with the type signature
a > a
has only one implementation: it can only return its input. In a similar fashion,a > b > a
will only return the first argument and ignore the second. And so on. 
In other words you cannot choose the definition of a value based on its type (for now).
What does this mean?

 Jul 2020

Tags
Annotators
URL

 May 2020

learning.oreilly.com learning.oreilly.com

function (or in the case of type classes, we call these methods)

If you can tell that two types are equal or not equal, that type belongs in the Eq type class.
two types or rather two things of the same type?


muldoon.cloud muldoon.cloud

Programming languages These will probably expose my ignorance pretty nicely.
When to use different programming languages (advice from an Amazon employee):
 Java  enterprise applications
 C#  Microsoft's spin on Java (useful in the Microsoft's ecosystem)
 Ruby  when speed is more important then legibility or debugging
 Python  same as Ruby but also for ML/AI (don't forget to use type hinting to make life a little saner)
 Go/Rust  fresh web service where latency and performance were more important than community/library support
 Haskell/Erlang  for very elegant/mathematical functional approach without a lot of business logic
 Clojure  in situation when you love Lisp (?)
 Kotlin/Scala  languages compiling to JVM bytecode (preferable over Clojure). Kotlin works with Java and has great IntelliJ support
 C  classes of applications (operating systems, language design, lowlevel programming and hardware)
 C++  robotics, video games and high frequency trading where the performance gains from no garbage collection make it preferable to Java
 PHP/Hack  testing server changes without rebuilding. PHP is banned at Amazon due to security reasons, but its successor, Hack, runs a lot of Facebook and Slack's backends

 Apr 2020

github.com github.com
 Mar 2020
 Feb 2020

reasonablypolymorphic.com reasonablypolymorphic.com
Tags
Annotators
URL



Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have sideeffects, and they never change after they have been built.

 Nov 2019

github.com github.com

haskelloverridez is a tool and library of nix functions that simplify the use of overrides while developing haskell projects with nixpkgs.
Tags
Annotators
URL


github.com github.comjyp/styx1

A nixbased Haskell project manager

 Jun 2019

owickstrom.github.io owickstrom.github.io

This package takes a more declarative approach, and talks about events rather than signals. Widgets emit event values, and these values can be mapped and transformed into other values as the event propagates up the tree of widgets.
So this is a bit more elmy than it would otherwise be

 Apr 2019
 Mar 2019

hackage.haskell.org hackage.haskell.org
Tags
Annotators
URL

 Feb 2019

wiki.haskell.org wiki.haskell.org
Tags
Annotators
URL


wiki.c2.com wiki.c2.com

Haskell
Haskell, Keep it simple, stupid.
 FizzBuzz module Main where import Control.Monad main :: IO () main = forM_ [1..100] $ \n > putStrLn . concat . take 2 $ ["Fizz"  n `mod` 3 == 0] ++ ["Buzz"  n `mod` 5 == 0] ++ ["", show n]

 Jan 2019

mmhaskell.com mmhaskell.com

Definición de tipos de datos en Haskell y comparación con Java, Python y JavaScript.

 Oct 2018

mmhaskell.com mmhaskell.com

Deeper Stack Knowledge

 Sep 2018

www.imn.htwkleipzig.de www.imn.htwkleipzig.de

Alternativas en Haskell a las listas como contenedores.

 Apr 2018

typeclasses.com typeclasses.com

(== 10)
This confused me. I'm relatively new to Haskell and did not know about sectioning. After learning that detail, this makes sense as a (right) partial application of the
(==)
function.
Tags
Annotators
URL

 Jan 2018

byorgey.wordpress.com byorgey.wordpress.com

Whereas normal type classes represent predicates on types (each type is either an instance of a type class or it isn’t), multiparameter type classes represent relations on types

 Oct 2017

www.microsoft.com www.microsoft.com

A History of Haskell:Being Lazy With Class

 Apr 2017
 Dec 2016

blog.haskellformac.com blog.haskellformac.com

FRP library
def. FRP library: Functional Reactive Programming Library

 Oct 2016

en.wikibooks.org en.wikibooks.org
Tags
Annotators
URL

 Jul 2016

bitemyapp.com bitemyapp.com

Saw this recommended on a Quora answer whilst looking for book and article recommendations for a newcomer to Haskell

 Jun 2016

dev.stephendiehl.com dev.stephendiehl.com


www.imada.sdu.dk www.imada.sdu.dk

Useful cheatsheat for Haskell operators

 May 2016
 Oct 2014

www.fpcomplete.com www.fpcomplete.com

foldMap :: Monoid m > (a > m) > t a > m
I'm not sure, but I think what he meant here was
foldMap :: Monoid m => (a > m) > t a > m
. 
The notion behind it was that one could decompose, e.g., Applicative into an instance of the Pointed typeclass and an instance of the Apply typeclass (giving apply :: f (a > b) > f a > f b) and an instance of Pointed, such that the two interact properly.
There's more on
Applicative
(andFunctor
) here, in case you're unfamiliar with it.
