jw- | 7 years ago | on: Curry–Howard correspondence
jw-'s comments
jw- | 8 years ago | on: Are Monads a Waste of Time?
jw- | 8 years ago | on: Linear types can change the world (1990) [pdf]
y <- x + 1
z <- x + 2
is a legal SSA expression, but it is not a legal linear expression because x appears twice.
(Corrections welcome)
jw- | 8 years ago | on: Linear types can change the world (1990) [pdf]
This is nice for functional programming because it gives you the performance of mutable state and destructive update, but in a way that is 'pure', or side-effect free, from the outside.
jw- | 8 years ago | on: Open-sourcing MonkeyType – Let your Python code type-hint itself
I'm one of the dumb ones and just let the computer do the checking for me.
jw- | 8 years ago | on: Open-sourcing MonkeyType – Let your Python code type-hint itself
[1] https://medium.com/fhinkel/runtime-type-information-for-java...
jw- | 8 years ago | on: Open-sourcing MonkeyType – Let your Python code type-hint itself
jw- | 8 years ago | on: Functional Programming Jargon
You can also add F# computation expressions to the list!
jw- | 8 years ago | on: Functional Programming Jargon
Also, trying to explain Monad, Comonad, or Applicative as 'jargon' is probably a step too far IMO. They are not important for getting started with FP, and describing them without their equational properties is kind of meaningless.
That being said I liked alot of the inclusions; partial application, closure, composition. I think the collection is probably slightly guilty of trying to be too clever by including advanced concepts.
jw- | 8 years ago | on: Functional calisthenics
jw- | 8 years ago | on: Runtime type information for JavaScript
The motivation for dynamic checking was often because many JavaScript programs couldn't be given any useful static types. With the great work on Flow and TypeScript I'm starting to become convinced that we'll just be able to statically check most JavaScript programs in the future and get decent types out.
jw- | 8 years ago | on: Runtime type information for JavaScript
jw- | 8 years ago | on: Runtime type information for JavaScript
jw- | 8 years ago | on: Runtime type information for JavaScript
INPUT >>> function add(f, b) { return f(b); };
let a = add(function(x) {return x + 1}, 3);
OUTPUT >>> function add(f: function, b: number): number { return f(b); };
let a: number = add(function(x: number): number {return x + 1}, 3);
and I noticed that the flow type annotations are added to the call site, rather than on the argument f in the definition of add. Are all the types that you generate first order?
jw- | 8 years ago | on: Things that Idris improves things over Haskell
Sounds like you are describing Session Types!
(http://groups.inf.ed.ac.uk/abcd/) (http://summerschool2016.behavioural-types.eu/programme/Dardh...)
jw- | 9 years ago | on: Self Healing Code with clojure.spec
[1] http://crest.cs.ucl.ac.uk/autotransplantation/downloads/auto...
jw- | 9 years ago | on: Beautiful JavaScript – Functional JavaScript
Time again I'm always surprised by how people over look type systems when talking about functional languages. Really, much of that list is not fundamental to FP, but always giving me an Int when you promise one matters.
jw- | 9 years ago | on: Learning Elm has gotten me confused about static vs. dynamic typing
jw- | 10 years ago | on: Virtual Weapons Are Turning Gamers into Serious Gamblers
However, I would also distinguish the "in-game" gambling in Hearthstone from CSGO because there is no legitimate or practical way to monetize your card collection. Once (or if) you have all the cards, there is little incentive to keep buying packs as you can only play with cards. In CSGO however, there is always the potential to open a new valuable skin that can be sold.
jw- | 10 years ago | on: Immutability is not enough
f :: A -> B
g :: B -> C
will let me write g(f(x)), but not f(g(x)). It does not matter if f and g are 'pure', the point is that f must come before g. I think the mistake is to think that functional programming is about immutability, and that immutability solves the problems. Immutability is there to keep the types honest, it is fine to have effects aslong as we are upfront about them, and don't conceal them under false names such as "int" and "bool".
The logical equivalent of this is an axiom (P -> P) -> P which lets you prove anything. So non-termination in a programming language corresponds to being able to prove anything - including False - in the logic.