Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 06:52
    juanpedromoreno closed #567
  • Aug 13 03:41
    ikr0m synchronize #567
  • Aug 12 04:52
    ikr0m synchronize #567
  • Aug 09 07:13
    ikr0m opened #567
  • Aug 09 05:45
    ikr0m opened #566
  • Aug 05 10:32
    diesalbla closed #565
  • Aug 05 08:09
    xuwei-k synchronize #565
  • Aug 05 06:47
    xuwei-k opened #565
  • Jun 22 09:47
    diesalbla closed #176
  • Jun 07 11:39
    diesalbla closed #560
  • Jun 07 11:39
    diesalbla labeled #560
  • Mar 26 00:38
    ashkan-leo opened #564
  • Mar 13 11:19
    calvellido closed #563
  • Mar 13 10:43
    calvellido opened #563
  • Mar 13 10:31
    juanpedromoreno closed #562
  • Mar 13 10:31
    juanpedromoreno closed #561
  • Mar 13 09:32
    calvellido unlabeled #562
  • Mar 13 09:32
    calvellido labeled #562
  • Mar 13 09:31
    calvellido review_requested #562
  • Mar 13 09:27
    justjoheinz opened #562
Diego E. Alonso Blas
@diesalbla
@loewenheim It would only be fair to inform you that we are having some difficulty to adjust the development of freestyle with our current priorities.
Sebastian Zivota
@loewenheim
What do you mean by that?
Diego E. Alonso Blas
@diesalbla
I mean that we may not be able to attend to the migration of those macro annotations for some time.
Sebastian Zivota
@loewenheim
Ah, that clears it up, thanks.
Diego E. Alonso Blas
@diesalbla
FYI, here is the issue with the discussion and analysis of the alternatives for the migration. frees-io/freestyle#539
John Menke
@jmjava
We are preparing for our first meeting in NYC for the Freestyle Enthusiasts group. I have been compiling information to share with the group - the idea is to form some sort of study group exploring freestyle. Here is a link for what i have so far: https://docs.google.com/presentation/d/1ZNfGrNKoZmo9gLM4O43xdMKr6uD-ymQqINYg2C71AUM/edit?usp=sharing If anyone could suggest any improvements I would appreciate it
Sebastian Zivota
@loewenheim
FWIW, the documentation on both frees.io and github says to add addCompilerPlugin("org.scalameta" % "paradise" % "3.0.0-M10" cross CrossVersion.full) to build.sbt. At least in my case, the version number needs to be 3.0.0-M11.
John Menke
@jmjava
@ghost~540393fe163965c9bc2018ce Your book is awesome !
Diego E. Alonso Blas
@diesalbla
@jmjava If you want to reach Sam Halliday, you may need to use the @fommil handle
Ghost
@ghost~5b8a94aed73408ce4fa690fd
@jmjava no it's not, it's terrible... stop spreading such vicious rumours :stuck_out_tongue_closed_eyes:
Dermot Haughey
@hderms
yeah I bought it as well but haven't had the chance to dive in yet
seems like a really good complement to the red book
John Menke
@jmjava
@fommil - it is filling in some gaps - i have been reading the Milewski book https://github.com/hmemcpy/milewski-ctfp-pdf and this helps bring some of the concepts into the scala context
Ghost
@ghost~5b8a94aed73408ce4fa690fd
if anybody in scala/scala is confused about FP, maybe you can send them a recommendation :smile:
I'm banned there, for unexplained reasons
which was a lovely leaving gift, I have to say.
Dermot Haughey
@hderms
you are leaving scala community, is that right?
Ghost
@ghost~5b8a94aed73408ce4fa690fd
I don't know what it means to "leave the scala community"
but I am now a Haskell developer at work
Dermot Haughey
@hderms
oh congrats
Ghost
@ghost~5b8a94aed73408ce4fa690fd
and I don't have any active hobby projects in Scala
Ghost
@ghost~5b8a94aed73408ce4fa690fd
btw, would anybody be interested in creating the Spanish or Portugese translation of #fpmortals? There are Italian, French and Russian initiatives on the go. You get to keep all profits.
Diego E. Alonso Blas
@diesalbla
@fommil Let me think about it. I may be able to give it a go.
Ghost
@ghost~5b8a94aed73408ce4fa690fd
@diesalbla we have somebody who has offered to do one or two chapters already, so perhaps you could collaborate :smile:
chapters can be translated in parallel
Tim Spence
@TimWSpence
Sorry, this isn’t directly related to Freestyle but this seemed like a good room to find people who know about Cats Free Monads :) I was just reading Runar’s “Stackless Scala with Free monads” (http://days2012.scala-lang.org/sites/days2012/files/bjarnason_trampolines.pdf) and comparing to the cats free implementation. In section 4.3, he introduces a flatMap method to reassociate binds to the right on construction and says that otherwise resume can cause a stack overflow. However, without this, resume still looks to be tail-recursive and I notice that the cats free implementation does not do this re-binding. Am I missing something?
John Menke
@jmjava
@TimWSpence we are trying to start some online meetups to talk about things like this. https://www.meetup.com/New-York-FreeStyle-Enthusiasts/?_cookie-check=aQWQSqUK3G5i1rvQ
John Menke
@jmjava
I extracted the todolib examples out into separate projects and created some Giter8 templates to make it easy for developers to use the example as a prototype for their own apps: https://jmenke.blogspot.com/2018/10/giter8-templates-for-freestylerpc-part-1.html
Raúl Raja Martínez
@raulraja
@jmjava those are great. If you want you can add links and instructions to those in the Freestyle documentation. If interested feel free to fork and submit a PR and we will review it and include it in the docs. Thanks!
Raúl Raja Martínez
@raulraja
yeah we are moving Freestyle-RPC to Higher Kindness and it's gonna get a rename soon since it will be a lib exclusively focused on purely functional microservices and RPC/Http
If the templates use Freestyle-RPC then they should be there
I don't know if it's possible but ideally Travis in Freestyle-RPC also builds project instances of those templates and compiles them to ensure that we don't break them as we evolve the library.
Feel free to mention me and @juanpedromoreno when you submit the PR and one of us will get to reviewing it.
John Menke
@jmjava
I understand, I am setting up automated builds in gitlab right now. I think to be fully functional I need to automate a copy process from the examples in freestyle and freestyle-rpc into the g8 templates and then also refactor dependency versions into a separate file. I will let you know when that is working in gitlab - from there maybe it could be migrated to travis? I don't think g8 can do this dynamically - hopefully the copy task might not be that bad...even though its brute force
John Menke
@jmjava
the automated builds are here: https://gitlab.com/freestylegroup
Tim Spence
@TimWSpence
Thanks @jmjava sadly I’m in the UK :cry:
大師 Ashido Brown
@GMAshidoBrown_twitter
walks in smelling the fresh air
Vu Than
@thvu

Hello. I have a really strange compilation error when using freestyle library. My code compiles fine with Intellij IDEA and I can run, debug the app within the IDE. But when building with sbt it shows compilation error for accessing companion object of a module. Below are the code that gets error:

import freestyle.tagless._

// top most module
@module
trait Application[F[_]] {
  // some smaller modules
  val appA: ApplicationA[F]
}

@module ApplicationA[F[_]] {
  // service dependencies
 val service: Service[F]
}

// service code and interpreters …
@tagless(true)
trait Service[F[_]] { … }

// create instance of the app
type Program[A] = …
val app: Application[Program] = Application[Program] // error
// the last line is reported in sbt as "not found: value Application” 
// [error]   val app: Application[Program] = Application[Program]
// [error]                                   ^

Does anyone see any issue similar to this?

Diego E. Alonso Blas
@diesalbla
@thvu You can use the @debug annotation to print the result of the code expanded by the macros.
Ikrom
@ikr0m
Hi guys! I need some sample application to look how to use freestyle @free.
For example https://github.com/pauljamescleary/scala-pet-store shows Free monad and Tagless final usages
But I need sample which includes doobie and freestyle. Freestyle docs not useful or I don't have enough knowledge to use freestyle
I'm going to use freestyle on scala-pet-store like project
Diego E. Alonso Blas
@diesalbla
@ikr0m Good evening. If you are interested in using freestyle, perhaps you may want to check some of the examples we have in the repository.
For instance, we have an example of a Todo-app, where the handler is implemented with Doobie: https://github.com/frees-io/freestyle/blob/master/modules/examples/todolist-lib/src/main/scala/todo/persistence/runtime/TodoListRepositoryHandler.scala
The algebras for this example are written with the macro @tagless(true), which generates both the "tagless" representation as well as a Free-algebra (Called the StackSafe). Naturally, the handler for the tagless is also a handler for the free one.
Ikrom
@ikr0m
@diesalbla thanks! Examples, you provided, do not use FS effect. But samples in http://frees.io/docs/core/algebras/ heavily use FS effect. Is there any reason it's not used in examples?
Diego E. Alonso Blas
@diesalbla

So, the FS is a generated type member of the "algebra" trait, which is used as an alias for the F[_] type parameter
We added it at the time as a bit of syntactic sugar, to hide the F[_] declaration:

@free trait Fili[F[_]] {
  def kili: F[Int]
} 
///// 
@free trait Fili {
  def kili: FS[Int]
}

But it is not essential to use the macro.

I am curious: are you trying to learn about freestyle for learning the theory? Or is it something you would like to apply to your work ?

Ikrom
@ikr0m
Thanks for clarification.
I'm learning functional programming (cats, doobie, http4s, fs2, ...). We want to use these technologies in our next projects.
Now I'm writing very similar project to https://github.com/pauljamescleary/scala-pet-store
It uses tagless-final.
I wrote my project in 2 versions: tagless-final and free monad versions.
Now I'm learning Freestyle and want to apply it to scala-pet-store like project. It will be 3rd version with freestyle
Diego E. Alonso Blas
@diesalbla
@ikr0m If you want to use the tagless style, we recommend you use cats-tagless: that library has some better support for that style, with a few interesting constructors.
https://typelevel.org/cats-tagless/
Ikrom
@ikr0m
Thanks! I'll try it