Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:57
    nevillelyh commented #8289
  • 19:47
    eed3si9n edited #8591
  • 19:28

    SethTisue on 2.13.x

    2.12: new Scala SHA 2.12: update expected-failure l… add akka-http-webgoat (#1017) and 1 more (compare)

  • 19:08

    SethTisue on 2.11.x

    sbt version bump (1.3.3->1.3.4)… 2.12: new Scala SHA 2.12: update expected-failure l… and 3 more (compare)

  • 19:04
    SethTisue commented #8545
  • 19:03
    som-snytt commented #11824
  • 18:54
    som-snytt labeled #11824
  • 18:54
    som-snytt commented #11824
  • 18:46
    som-snytt review_requested #8591
  • 18:46
    scala-jenkins milestoned #8591
  • 18:46
    som-snytt opened #8591
  • 18:38
    SethTisue milestoned #3237
  • 18:38
    SethTisue assigned #9386
  • 18:38
    SethTisue milestoned #9386
  • 15:21
    som-snytt commented #8590
  • 14:50
    lrytz commented #8588
  • 13:12

    lrytz on 2.13.x

    Avoid length of list Lint confusing by-name conversi… Lint by-name conversion of bloc… and 1 more (compare)

  • 13:12
    lrytz closed #8590
  • 13:12
    lrytz closed #9386
  • 13:12
    lrytz closed #3237
Rob Norris
@tpolecat
The type signature for overridden methods isn't redundant in general. In the presence of overloading you can't be sure which version you're talking about.
moritz bust
@busti
The return type uses a globally defined generic. It makes sense to me now. The thing is that the method I am working with is parameterless.
The declared generic is actually only used in the return type, which is inferred.
Rob Norris
@tpolecat
Also an override can narrow the return type so that part is never redundant.
In Java you can widen parameter types when overriding but Scala doesn't let you. Not sure why.
nafg
@nafg
@Busti can you show the real version?
moritz bust
@busti

The actual method is abstract:

def handle[E >: Event]: (M, E) => M

And I am implementing it like this:

def handle[E >: Event] = ???
nafg
@nafg
How is it inferred
BTW shouldn't that be <: ?
Rob Norris
@tpolecat
E is in contravariant position in the return type so that might make sense.
moritz bust
@busti

How is it inferred

Maybe that was the wrong term

BTW shouldn't that be <: ?

Thats what I am was thinking too, but the compiler says something else.

Ryan Williams
@ryan-williams

cross-posting from shapeless room since i think it's a more general scala question:

i want to make a typeclass that only exists for type-constructors of nested-Seqs, e.g. Id, Seq, λ[A => Seq[Seq[A]]], etc.

import shapeless.{ Lazy, the }
sealed trait IsSeqs[R[_]]
object IsSeqs {
  implicit val id: IsSeqs[Id] = ???
  implicit def rec[R[T]](implicit r: Lazy[IsSeqs[R]]): IsSeqs[λ[ASeq[R[A]]]] = ???
}
the[IsSeqs[Id]]  // compiles
IsSeqs.rec[Id]   // compiles
the[IsSeqs[Seq]]  // could not find implicit value for parameter t: IsSeqs[Seq]
the[IsSeqs[λ[ASeq[Id[A]]]]]  // could not find implicit value for parameter t: IsSeqs[[A]Seq[A]]

any ideas why the last two lines don't compile?

afaict it seems like typeclass-derivation just doesn't "work" in the presence of type-lambdas…

sken
@sken77
wrote an implementation for Schnorr Signatures on the secp256k1 in scala using cats/scodec
this is the first working version. so i still need to work on a couple of things like improve the types of the primitives and add more tests
if any want to check it out and leave comments/review please open an issue ticket :)
arunsumbria
@arunsumbria
hi i am new to spark, i installed spark on windows 10 , when using below command its showing path dosent exist, i have winutils too under c drive
 val df = spark.read.csv("file:///C:/spark/myprog/emp")
org.apache.spark.sql.AnalysisException: Path does not exist: file:/C:/spark/myprog/emp;
i have provided 777 permission to c:\tmp\hive
vijendra singh
@viju0731_twitter
How do i call object from parent class to child class
?
aby idea. i know how to call methods but when i am trying same way for object objectname extends
it is not working for me
Rob Norris
@tpolecat
can you create a minimal example that demonstrates what you're trying to do?
Dominic Egger
@GrafBlutwurst
Hi everyone. So I have a REST API that guarantees idempotence and I want to do a local trivial fixed size cache. what's the smartest way to keep this RT? State?
Fabio Labella
@SystemFw
@GrafBlutwurst Ref + IO
possibly behind a final tagless api to not expose implementation details
State can't deal with concurrent state, so you can't do (most types of) caching with it
Dominic Egger
@GrafBlutwurst
yeah that's what I'm doing anyway I don't want to expose the caching to external user except size
ah I see
<3 looks exactly like what I needed thanks!
Fabio Labella
@SystemFw
let me know if you're having problems encoding the logic you need there, but generally fs2.Ref + fs2.Promise (now cats.effect.Ref and cats.effect.Deferred) are your friends
moritz bust
@busti
Is there a way to automatically create a companion object for a class?
ndv87
@ndv87
@Busti in IDEA u can Alt+Insert -> Comp obj
moritz bust
@busti
That is a nice idea, but I am thinking more about a code thing here...
What I am trying to do is to implicitly create a companion object for every child of a class. Since it always has the same members, there is no need to re-write it every time that class is extended.
But I guess that could only be solved by codegen, which might not be that good of an idea.
Dominic Egger
@GrafBlutwurst
@SystemFw this does this seem sensible?
I'll only have to do a fixed size alternative to Map and evict LRU style when adding
maybe just use Chris' scalacache
Fabio Labella
@SystemFw
@GrafBlutwurst there's a problem with that
you are creating new Ref and HttpClient every time
with the Client, it's just wasteful
with the Ref, it won't work because you aren't sharing the state
Dominic Egger
@GrafBlutwurst
lazyness?
Fabio Labella
@SystemFw
nope, purity
if you mention cache, you create a new cache
Dominic Egger
@GrafBlutwurst
oh right. substitution ... derp
Fabio Labella
@SystemFw
if you want to share the state, you need to pass it as an argument and flatMap everytime
this is a feature because it means that the region of state sharing is the same as your call graph