These are chat archives for non/algebra

8th
Dec 2015
Adelbert Chang
@adelbertc
Dec 08 2015 08:44
:+1: from me
Erik Osheim
@non
Dec 08 2015 11:14
awesome. i think that was everyone except avi, but since i haven't heard any objections, we'll do it ;)
(barring sudden objections of course)
Miles Sabin
@milessabin
Dec 08 2015 11:20
@non what timezone are you in now?
I can't tell if you're up early or up late ;-)
Miles Sabin
@milessabin
Dec 08 2015 11:32
:dancer:
Adelbert Chang
@adelbertc
Dec 08 2015 17:39
@non @johnynek revisitng the topic of auto-derivation of instances for things like case classes - would you guys put it inside algebra, perhaps under algebra-derive or algebra-shapeless or something, or should that go under @milessabin 's kittens? and if the latter, i'm assuming it would be a subproject under kittens ? or would it live in the same project as kittens along with all the cats derivation stuff ?
Miles Sabin
@milessabin
Dec 08 2015 17:44
The idea would be for Algebra to support export-hook then derived instances could be provided independently: https://github.com/milessabin/export-hook.
This is what I'm starting to do in Alleycats and want to extend to Cats and Algebra eventually.
The key ideas here are that export-hook is a very lightweight dependency; it doesn't require shapeless; and any mechanism that can manufacture instances, shapeless-based or otherwise, can make use of it.
Miles Sabin
@milessabin
Dec 08 2015 17:51
Currently kittens has a derivation of algebra.Eq ... I've mainly been focussing on the higher kinded type classes in Cats: https://github.com/milessabin/kittens/blob/master/core/src/main/scala/cats/derived/eq.scala
There has been some discussion of export-hook, simulacrum and machinist being rolled into a single "type class support" library ... working title: typeclassic.
I would love to see people take a swing at more derivations for Algebra type classes, whereever they ended up living.
Adelbert Chang
@adelbertc
Dec 08 2015 18:03
@non @johnynek @tixxit what are your thoughts on adding an export-hook dep to algebra and/or your thoughts on the derivation stuff
Miles Sabin
@milessabin
Dec 08 2015 18:04
export-hook also solves problems of instances of Algebra type classes being provided by Cats.
For example, an Eq instance being provided by instantiating an EqK instance.
There's an example of instantiating an EmptyK instance to get an Empty instance in the docs: https://github.com/milessabin/export-hook#exporting-and-reexporting-individual-instances
Tom Switzer
@tixxit
Dec 08 2015 19:42
export-hook looks really awesome - the only dependency is macro-compat?
Miles Sabin
@milessabin
Dec 08 2015 19:59
Yup.