Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 14 2018 11:04

    notxcain on master

    So long, and thanks for all the… (compare)

  • Aug 27 2018 14:07
    fommil closed #15
  • Apr 03 2018 04:33

    notxcain on master

    update readme.md (#17) (compare)

  • Apr 03 2018 04:33
    notxcain closed #17
  • Apr 03 2018 04:33
    notxcain commented #17
  • Apr 03 2018 04:18
    nikdon opened #17
  • Mar 29 2018 14:19

    notxcain on master

    Set version to 0.8.0 Set version to 0.8.1-SNAPSHOT Update README (compare)

  • Mar 29 2018 13:48

    notxcain on invocations

    (compare)

  • Mar 29 2018 13:48

    notxcain on master

    Reified Invocations (#16) (compare)

  • Mar 29 2018 13:48
    notxcain closed #16
  • Mar 29 2018 13:46
    notxcain edited #16
  • Mar 29 2018 13:40
    notxcain synchronize #16
  • Mar 29 2018 13:40

    notxcain on invocations

    wip (compare)

  • Mar 29 2018 08:58
    notxcain assigned #16
  • Mar 29 2018 08:58
    notxcain opened #16
  • Mar 29 2018 08:57

    notxcain on invocations

    wip wip (compare)

  • Mar 27 2018 09:34
    fommil edited #15
  • Mar 27 2018 09:33
    fommil edited #15
  • Mar 27 2018 09:33
    fommil opened #15
  • Dec 26 2017 08:39

    notxcain on master

    Set version to 0.7.0 Set version to 0.7.1-SNAPSHOT Update README (compare)

Alexey Romanchuk
@13h3r
@notxcain really impressive library! Thanks!
What the purpose of fromFunctionK and toFunctionK? Just a way to construct interpreter from trait and vice versa?
Alexey Romanchuk
@13h3r
Also idea always highlights code generated by macros. Any idea how to fix it?
Denis Mikhaylov
@notxcain
@13h3r thanks! Yes, these functions are provided to simplify construction of interpreters. Regarding IDEA, I reported all expansions bugs to Scala Plugin YouTrack, and most of them are fixed already.
I'm still exploring how to hide presence of AST from user at all, it feels like implementation detail to me
Denis Mikhaylov
@notxcain
This message was deleted
@13h3r Are you on nightly Scala Plugin ?
Example from readme has no red code in IDEA on latest nightly
Alexey Romanchuk
@13h3r
@notxcain give me few minutes I will try nightly build
Alexey Romanchuk
@13h3r
It works!
Denis Mikhaylov
@notxcain
Cool :)
Alexey Romanchuk
@13h3r

Hey! What about having a way to construct free-related boilerplate without marking trait with @free. The thing I do not like with this annotation is a pollution of implementation into an implementation agnostic interface. Something like

trait MyService[F[_]] { }
object App {
  val myS = liberate[MyService]
}

The only stuff we lose is def apply[F[_]](implicit instance: KeyValueStore[F])

WDYT?

Denis Mikhaylov
@notxcain
There is no support for this kind of macros in scala meta paradise yet. Also I don't think that this is an implementation, it's more like alternative representation. Like shapeless Generic but for methods of a trait. However I'm open to explore other implemetations of the idea, as soon as there is ability in scala meta.
Alexey Romanchuk
@13h3r
@notxcain, is it any way to implicitly transform algebras? For example, I have a program based on algebras A and B. And have such interpreters: A ~> Coproduct[B, C] and B ~> C and C ~> Future. It will be cool to build implicit interpreter to Future. I tried to figure out how to do this, but messed up :)
Probably it is supposed to transform it in another way?
Jonathan
@b-studios

@notxcain Hey, cool project, first of all! Have you thought about supporting contravariant occurences of the functor F? As in

import io.aecor.liberator.macros.free

@free
trait Expr[F[_]] {
  def add(l: F[Int], r: F[Int]): F[Int]
  def lit(n: F[Int]): F[Int]
}

?

Denis Mikhaylov
@notxcain
@b-studios thanks! How do you see it converted to ADT?
Jonathan
@b-studios
I would expect something like:
trait Expr[T]
case class Add(l: Expr[Int], r: Expr[Int]) extends Expr[Int]
case class Lit(n: Int) extends Expr[Int]
(Btw. lit above should be lit(n: Int))
Denis Mikhaylov
@notxcain
I see, but you won't be able to lift it into Free. What is the point then? Simplify AST creation?
Jonathan
@b-studios
The original signature is often used to represent a church encoded variant of the ADT (also called object algebras in some hemispheres). If you can also generate the corresponding fold that might be helpful for some people, I guess.
Ólafur Páll Geirsson
@olafurpg
Denis Mikhaylov
@notxcain
@olafurpg I saw that :) Great news, thank you very much!
Denis Mikhaylov
@notxcain
Is there anyone who use Liberator? :) I want to archive the project in favour of https://github.com/typelevel/cats-tagless.