Better HN
topnewbestaskshowjobs
Log inSign up

gcanti

111 karma · joined Aug 4, 2014 (12y ago) · 72 submissions

giulio.canti@gmail.com
Submissions

comment 7y ago · link · parent

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...

comment 8y ago · link · parent

for a functional library that plays nicely with TS check this out: https://github.com/gcanti/fp-ts

comment 8y ago · link · parent

For my fellow italians, I wrote a free "Introduction to functional programming" PDF, check out https://github.com/gcanti/functional-programming

comment 8y ago · link · parent

Here's a (partial) porting to TypeScript https://github.com/gcanti/money-ts

comment 9y ago · link · parent

working on a fp library for TypeScript if you want to take a look https://github.com/gcanti/fp-ts

comment 9y ago · link · parent

You could write the runtime definition and extract the static types from that https://github.com/gcanti/io-ts

comment 9y ago · link · parent

This is a TypeScript compatible runtime type system for IO validation https://github.com/gcanti/io-ts

comment 9y ago · link · parent

what's the state of the JavaScript backend? I do frontend and I'd really love to write some code in idris

9.

Slaying a UI Antipattern with Flow(medium.com ↗)

2 points · by gcanti · 10y ago · discuss

comment 10y ago · link · parent

Not sure about TypeScript but with Flow you can get HKT through some contortions https://github.com/gcanti/flow-static-land (in Elm too)

11.

Phantom types with Flowtype(medium.com ↗)

3 points · by gcanti · 10y ago · discuss

12.

The Eff monad (Flowtype)(medium.com ↗)

1 points · by gcanti · 10y ago · discuss

comment 10y ago · link · parent

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

14.

Show HN: Combining Flow with tcomb to allow for runtime enforced refined types(github.com ↗)

4 points · by gcanti · 10y ago · discuss

15.

Show HN: Babel plugin for static and runtime type checking using Flow and tcomb(github.com ↗)

2 points · by gcanti · 10y ago · discuss

comment 10y ago · link · parent

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

comment 10y ago · link · parent

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

comment 10y ago · link · parent

> 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

19.

Show HN: Documenting react components using runtime type introspection(github.com ↗)

4 points · by gcanti · 10y ago · discuss

20.

Show HN: Tcomb v2.6 type-checked recursive types for JavaScript(github.com ↗)

8 points · by gcanti · 10y ago · discuss

comment 10y ago · link · parent

Shameless plug: https://github.com/gcanti/tcomb. Used in development/production in several places, included the new MapBox Studio

comment 11y ago · link · parent

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)

23.

Show HN: Immutable and type-checked state and actions for Redux(github.com ↗)

20 points · by gcanti · 11y ago · 2 comments

comment 11y ago · link · parent

Hi, author here. Thanks for your kind words :)

comment 11y ago · link · parent

> 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

comment 11y ago · link · parent

set theory, equivalence relations, partial and total orders, algebra (monoids, lattices, ...), graphs

comment 11y ago · link · parent

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

28.

Show HN: React Native-powered forms generator(github.com ↗)

25 points · by gcanti · 11y ago · 1 comment

123