Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 26 11:36
    diesalbla closed #187
  • Aug 31 21:11

    milessabin on typelevel-readme

    README - Deprecation notice. A… Merge pull request #188 from di… (compare)

  • Aug 31 21:11
    milessabin closed #188
  • Aug 31 21:10
    milessabin closed #186
  • Aug 31 21:10
    milessabin commented #186
  • Aug 25 22:29
    diesalbla commented #186
  • Aug 25 22:28
    diesalbla opened #188
  • Aug 23 20:55
    diesalbla opened #187
  • Jul 09 2019 15:35
    soronpo commented #186
  • Jul 09 2019 15:35
    soronpo commented #186
  • Jul 09 2019 15:24
    kevinwright commented #186
  • Jul 09 2019 15:23
    kevinwright commented #186
  • Jul 09 2019 14:58
    som-snytt commented #186
  • Jul 09 2019 13:54
    milessabin commented #186
  • Jul 09 2019 13:03
    smarter commented #186
  • Jul 09 2019 13:02
    smarter commented #186
  • Jul 09 2019 12:26
    kevinwright commented #186
  • Jul 09 2019 12:26
    kevinwright commented #186
  • Jul 03 2019 20:38
    som-snytt commented #186
  • Jul 03 2019 20:01
    clhodapp commented #186
nafg
@nafg
The idea is to represent a two-way parseable URL
I need two main interpreters, one that parses a Location, in the past I used type-level computation so that each RouteType has a corresponding handler type
This message was deleted
End#Handler[R] = R
Elem[A, N <: RouteType]#Handler[R] = A => N#Handler[R]
nafg
@nafg
Since in the future such type projections won't be supported, I might want to rethink that, though I'm not sure how
nafg
@nafg
reposted on /general
Oron Port
@soronpo
Typelevel Summit colocated with Scala Days, CFP open https://www.papercall.io/typelevel-summit-lausanne-2019
Albert Bikeev
@kell18
Hi folks! Can somebody recommend "state of the art" clients for Mongodb? :)
Tristan Lohman
@gatorcse
@kell18 There’s the “official” scala one based on observables (I think they rolled their own?). Alpakka has one. I have no experience with those. There’s ReactiveMongo which as been around for a while and is alright. It’s based on Future though. There’s one called Mongosaur that someone here wrote, based on fs2 and all that, but it’s a “scratch your own itch” library that only supports the features they need (based on the README). I primarily use ReactiveMongo (used it for a while), but I might try looking at wrapping the official one in something like fs2-reactive-streams. FWIW, I’m currently writing a from scratch Mongo lib for cats-effect/fs2, with the goal being to match the MongoDB Specification but it’s nowhere near sharable yet.
Albert Bikeev
@kell18
@gatorcse I see, thanks a lot! What do you think about https://github.com/mongodb/mongo-scala-driver ?
Tristan Lohman
@gatorcse
That’s the “official” one. I’ve never used it myself, but being from mongodb themselves it should be feature complete. I think it uses its own “observables” implementation instead of Future or anything standard.
@kell18 :point_up:
They say it’s compatible with Reactive Streams, so I’d wrap it up in that, or wrap it again in fs2-streams to get you into cats land
Albert Bikeev
@kell18
@gatorcse cool, thank you for the advises! :)
Apart from that - maybe somebody knows some tools or best practices to do schema (and maybe data) migrations for Mongo from Scala? :)
Just realized that this is compiler-dedicated chat, sorry guys, will duplicate it to Scala/Scala
Miles Sabin
@milessabin
@/all is there anyone here who's using features of Typelevel Scala which aren't now in 2.13 or Dotty?
And if so what?
Matthew Pocock
@drdozer
is there a recomended scala web development stack currently? I need rest client/servers, real-time pushing of server-side state into updates in the web UI, and data stored in mongodb
and user login management
Miles Sabin
@milessabin
I think you probably meant to post in typelevel/general ;-)
Matthew Pocock
@drdozer
thanks
Miles Sabin
@milessabin
Where next for Typelevel Scala? Please comment here: typelevel/scala#186
nafg
@nafg
@milessabin maybe it would be a good place if anyone would feel like backporting stuff from dotty without waiting for the next scala release
Tre Taylor
@TreSignify_twitter
@TreSignify_twitter
Functional Scala Contract - Scala, Shapeless and Cats for a leading Analytics company based in Central London. No remote and high rates offered.
Tre.taylor@signifytechnology.com
Conner Bryan
@cab
hi! is it possible to specify what impl to use for varargs? i want to build a library without the standard lib, but using varargs uses Seq
Christopher Davenport
@ChristopherDavenport
What is a library without the std lib, isn't that just Java?
Ghost
@ghost~54f4b69115522ed4b3dcb16d

@cab This is not useful, but given

import annotation._
trait T {
  @varargs def f(s: String*): Int
}
class C extends T {
  def f(s: Array[String]): Int = s.length
  override def f(s: String*): Int = 42
}

then

        T t = new C();
        System.out.println(t.f("1", "2"));  // 2 not 42

This is almost useful:

import annotation._
trait T {
  //@varargs def f(s: String*): Int
  @elidable(100) @varargs def f(s: String*): Int = 27
}
class C extends T {
  def f(s: Array[String]): Int = s.length
  //override def f(s: String*): Int = 42
  @elidable(100) override def f(s: String*): Int = 42
}

then just

snips $ scalac -Xelide-below 200 args.scala
snips $ javac D.java
snips $ java D
2
Ghost
@ghost~54f4b69115522ed4b3dcb16d
Apparently, the RHS of the forwarding T.f is elided, so it doesn't force loading Seq.
Typelevel is going to have to come out with a 2.14 fork, and also take on the next edition of the Puzzlers.
Conner Bryan
@cab
interesting! thanks @som-snytt
@ChristopherDavenport probably not actually practical, mostly just messing around
Aaron Delaplane
@AaronDelaplane
Does anyone know of any company's that are writing Typelevel Scala and actively looking to hire (either in NYC or remote)? Am pursuing the usual channels via recruiters but thought it wouldn't hurt to reach out here as well. Have been writing Scala for the past four years and using Cats, etc for the majority of that. Am happy to send over a resume. Thanks
Miles Sabin
@milessabin
@AaronDelaplane you'd be better off asking in typelevel/general ... this channel was for discussion of the now obsolete Typelevel fork of the Scala compiler.
Aaron Delaplane
@AaronDelaplane
@milessabin Thank you Miles
rabzu
@rabzu

Hi

trait A{ 
 def a[K]: Int
}
new A{
  def a[K:SomeTypeClass] = ???
}

Is it possible to limit type parameters in methods when implementing a trait in scala? (edited)

Christopher Davenport
@ChristopherDavenport

I think

trait A{
   type Constraint[_]
   def a[K](implicit C: Constraint[K]): Int
}
new A{
   type Constraint = SomeTypeClass
   def a[K](implicit C: SomeTypeClass[K]): Int = ???
}

Trying now

Christopher Davenport
@ChristopherDavenport
In scalafiddle
trait A{
   type Constraint[_]
   def a[K](implicit C: Constraint[K]): Int
}
import cats._
import cats.implicits._

val a = new A{
   type Constraint[A] = Monoid[A]
   def a[K](implicit C: Monoid[K]): Int = 1
}

val out = a.a[Int]
println(out)
Miles Sabin
@milessabin
@rabzu this channel was for the now defunct typelevel fork of the Scala compiler. General Scala questions belong on scala/scala or, if they're typelevel-related somehow, even if just stylistically, it might be more appropriate to ask on typelevel/general.
rabzu
@rabzu
Ok, thank you
nafg
@nafg
@milessabin idk if anyone reads it but perhaps the room description could make that more obvious
Miles Sabin
@milessabin
:+1:
Done.
jrciii
@jrciii
type Warnings = Vector[String]
type Error = String
type Logging[F[_]] = FunctorTell[F, Warnings]
type Raising[F[_]] = MonadError[F, Error]
def f[F[_]: Logging: Raising: Monad](implicit M: Monad[F], L: Logging[F], R: Raising[F]) = ...
type W[A] = Writer[Warnings, A]
type E[A] = EitherT[W, Error, A]

f[E].value.value
Im getting errors about implicits not being found. Did I set this up incorrectly?
ivan-klass
@ivan-klass
At least you're defining implicit arguments twice
Miles Sabin
@milessabin
@jrciii @ivan-klass this channel was for the now defunct typelevel fork of the Scala compiler. General Scala questions belong on scala/scala or, if they're typelevel-related somehow, even if just stylistically, it might be more appropriate to ask on typelevel/general.
Diego E. Alonso Blas
@diesalbla
@milessabin Good evening.
I would like to suggest that Typelevel archives the Github repo of https://github.com/typelevel/scala and adding a notice in the README indicating the status...
Aaron Delaplane
@AaronDelaplane
Are Scala Sets unordered? I always assumed so (and if I needed an ordered Set I would use SortedSet) but am not seeing this specifically stated anywhere.
Miles Sabin
@milessabin
@AaronDelaplane this channel was for the now defunct typelevel fork of the Scala compiler. General Scala questions belong on scala/scala or, if they're typelevel-related somehow, even if just stylistically, it might be more appropriate to ask on typelevel/general.