News for hackers. Stuff that matters.

gcanti

fp-ts [1] contains an implementation of Higher Kinded Types, which TypeScript doesn’t support natively (the idea for emulating higher kinded types in TypeScript is based on "Lightweight higher-kinded polymorphism" [2])

[1] https://github.com/gcanti/fp-ts [2] https://www.cl.cam.ac.uk/~jdy22/papers/lightweight-higher-ki...

Re:Announcing TypeScript 3.0 on Monday July 30, 2018 @02:04PM (#17646574)
for a functional library that plays nicely with TS check this out: https://github.com/gcanti/fp-ts
For my fellow italians, I wrote a free "Introduction to functional programming" PDF, check out https://github.com/gcanti/functional-programming
Here's a (partial) porting to TypeScript https://github.com/gcanti/money-ts
Re:Elm in Production: 25K Lines Later on Monday July 31, 2017 @12:05PM (#14893148)
working on a fp library for TypeScript if you want to take a look https://github.com/gcanti/fp-ts
Re:TypeScript at Slack on Tuesday April 11, 2017 @11:16PM (#14094457)
You could write the runtime definition and extract the static types from that https://github.com/gcanti/io-ts
Re:TypeScript at Slack on Tuesday April 11, 2017 @10:46PM (#14094318)
This is a TypeScript compatible runtime type system for IO validation https://github.com/gcanti/io-ts
Re:Towards Idris Version 1.0 on Wednesday November 30, 2016 @12:38PM (#13072754)
what's the state of the JavaScript backend? I do frontend and I'd really love to write some code in idris
Not sure about TypeScript but with Flow you can get HKT through some contortions https://github.com/gcanti/flow-static-land (in Elm too)
Re:Maintainable JavaScript (2014) on Saturday July 16, 2016 @08:01AM (#12106075)
I wrote a library [1] and a babel plugin [2] (bonus point: is Flow compatible) in order to deal with those cumbersome runtime type checks.

[1] https://github.com/gcanti/tcomb [2] https://github.com/gcanti/babel-plugin-tcomb

I'm working on a babel plugin [1] that should make the migration even more gradual. At the end of the process you get both static and runtime type safety.

[1] https://github.com/gcanti/babel-plugin-tcomb

Yep. However static and runtime type checking are not mutually exclusive. Actually there's a TypeScript definition file included in the repo. Moreover such a runtime type checking brings additional features like refinement types and runtime type introspection
> I was hooked on the idea of having a type safe data record that was also immutable

Me too, thus I wrote https://github.com/gcanti/tcomb

Re:Must-See JavaScript Dev Tools on Sunday November 29, 2015 @08:11AM (#10644501)
Shameless plug: https://github.com/gcanti/tcomb. Used in development/production in several places, included the new MapBox Studio
Re:Immutable Data Structures and JavaScript on Monday October 05, 2015 @11:56AM (#10332642)
Hi, shameless plug: another (typed) immutable data structure library, https://github.com/gcanti/tcomb. Main features:

- works with regular objects and arrays - runtime type checks - easy debugging with Chrome DevTools - immutability and immutability helpers - runtime type introspection - easy JSON serialization / deseralization - pattern matching

Also https://github.com/gcanti/redux-tcomb (Immutable and type-checked state and actions for Redux)

Re:Show HN: Generate React forms from JSON form schemas on Saturday August 22, 2015 @04:58AM (#10101982)
Hi, author here. Thanks for your kind words :)
Re:React UI Builder on Sunday July 12, 2015 @06:15AM (#9873048)
> They often need to build forms quickly and a lot of them

I wrote a library specifically with this goal: https://github.com/gcanti/tcomb-form. React.js + Bootstrap + ARIA support. Maybe it could be integrated with react-ui-builder

set theory, equivalence relations, partial and total orders, algebra (monoids, lattices, ...), graphs
Re:Easy to use functional validators in Javascript on Monday April 06, 2015 @03:34AM (#9327045)
Interesting: here the key point is composability. I wrote a validation library in the same vein but using functions as representations of sets https://github.com/gcanti/tcomb-validation

Older »