gcanti
Re:Algebraic Structures: Things I wish someone had explained about FP
on Monday November 04, 2019 @11:08AM (#21442892)
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
Re:Professor Frisby's Mostly Adequate Guide to Functional Programming ...
on Tuesday May 15, 2018 @07:48AM (#17073250)
For my fellow italians, I wrote a free "Introduction to functional programming" PDF, check out https://github.com/gcanti/functional-programming
Re:Safe-money: Money in the type system where it belongs (2017)
on Thursday March 15, 2018 @01:14PM (#16594675)
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
Re:Higher-kinded types: the difference between giving up and moving fo...
on Monday August 22, 2016 @04:08PM (#12339040)
Not sure about TypeScript but with Flow you can get HKT through some contortions https://github.com/gcanti/flow-static-land (in Elm too)
Phantom types with Flowtype
The Eff monad (Flowtype)
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
Show HN: Combining Flow with tcomb to allow for runtime enforced refined types
Show HN: Babel plugin for static and runtime type checking using Flow and tcomb
Re:Migrating a 10,000-line legacy JavaScript codebase to TypeScript
on Friday June 17, 2016 @04:46AM (#11921366)
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.
Re:The hunt for an immutable, type safe data record in JavaScript
on Sunday March 06, 2016 @11:30AM (#11234308)
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
Re:The hunt for an immutable, type safe data record in JavaScript
on Sunday March 06, 2016 @11:10AM (#11234201)
> 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
Show HN: Documenting react components using runtime type introspection
Show HN: Tcomb v2.6 type-checked recursive types for JavaScript
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)
Show HN: 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
Re:Ask HN: What are some important math topics every programmer should...
on Thursday June 04, 2015 @04:45PM (#9661922)
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