Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:24
    retronym commented #8411
  • 01:48
    SethTisue commented #11739
  • 01:48
    SethTisue labeled #11739
  • 01:10
    retronym review_requested #8411
  • Sep 15 22:44
    som-snytt commented #8420
  • Sep 15 22:43
    som-snytt review_requested #8420
  • Sep 15 21:30
    neko-kai opened #11739
  • Sep 15 18:54
    scala-jenkins milestoned #8420
  • Sep 15 18:54
    som-snytt opened #8420
  • Sep 15 17:37

    SethTisue on master

    fix bad link (compare)

  • Sep 15 16:59
    som-snytt commented #11736
  • Sep 15 14:31
    SethTisue synchronize #976
  • Sep 15 14:24
    SethTisue synchronize #976
  • Sep 15 14:01
    SethTisue commented #976
  • Sep 15 12:10
    plokhotnyuk edited #11738
  • Sep 15 12:09
    plokhotnyuk edited #11738
  • Sep 15 12:02
    plokhotnyuk edited #11738
  • Sep 15 12:01
    plokhotnyuk edited #11738
  • Sep 15 11:53
    Ichoran commented #11738
  • Sep 15 04:57
    plokhotnyuk opened #11738
Anthony Cerruti
@srnb_gitlab
Ooh
Francisco Albert Albusac
@tatitati
Anthony Cerruti
@srnb_gitlab
I might want to use webgl even though this'll be 2d
Francisco Albert Albusac
@tatitati
thanks for the help
Anthony Cerruti
@srnb_gitlab
@tatitati That looks all correct, what file is the error from?
Francisco Albert Albusac
@tatitati
I have a very tiny case class that tries to make use of that:
package domain.order

import com.github.nscala_time.time.Imports._

case class Order(
                date: DateTime,
                ....
)
Luis Miguel Mejía Suárez
@BalmungSan
@tatitati is the error showing when you try to compile? Or is it showing in Intellij or any other non-metals IDE?
Francisco Albert Albusac
@tatitati
when running my tests
Luis Miguel Mejía Suárez
@BalmungSan
Did you reloaded your sbt session?
Try ;clean;cleanFiles;reload;compile;test
Francisco Albert Albusac
@tatitati
oh...might be that
Anthony Cerruti
@srnb_gitlab
Ah yeah
I never really use sbt shell
So I never think about reload
Luis Miguel Mejía Suárez
@BalmungSan
No?
Why?
That is probably the main reason I first love it. Compared with Maven.
Anthony Cerruti
@srnb_gitlab
I should be using sbt shell
Buuuut
Anthony Cerruti
@srnb_gitlab
@tpolecat Just watched through the entire talk and I can say with complete certainty that it's super duper cool
Rob Norris
@tpolecat
:+1:
Anthony Cerruti
@srnb_gitlab
I think I'll use WebGL instead of Context2D for my stuff
It's less supported but I'll get a ton better use out of all the extra stuff it can do (especially in terms of how it can be constructed as an algebra or whatever)
Francisco Albert Albusac
@tatitati
guys, If I read the date like: System.time..... that is an IO effect as well, right?
Rob Norris
@tpolecat
Yes.
Francisco Albert Albusac
@tatitati
ok
Rob Norris
@tpolecat
Because every time you call System.currentTimeMillis you’ll probably get a different answer. So you can’t factor it out and call it once when your program starts and use that value everywhere.
Because you can’t factor it out or inline it, it’s a side-effect.
Christopher Davenport
@ChristopherDavenport
You can get this via timer directly, or if you want Java time I have cats-effect-time library to makes that easier.
Anthony Cerruti
@srnb_gitlab
  def program[F[_]: FlatMap](C: Canvas[F], W: WebGL[F]): F[Unit] =
    for {
      Some(canvas) <- C.getCanvas("#canvas")
      Some(webgl) <- C.webGLContext(canvas)
      _ <- W.clearColor(webgl, 1.0d, 0.0d, 0.0d, 1.0d)
      _ <- W.clear(webgl)
    } yield ()
Well I just did this and I feel pretty good about myself
image.png
Pasted the output into console and turned the canvas red
sinanspd
@sinanspd
is this a scala JS extention?
Anthony Cerruti
@srnb_gitlab
@sinanspd I'm recreating code from the talk here
sinanspd
@sinanspd
thanks! Certainly looks better than the normal webGL syntactically. Will check it out now
Anthony Cerruti
@srnb_gitlab
I'm tired of always needing a Matrix[N] library, going to implement one, and then having problems with literal types and implementing sized lists
Is there a widely-used ScalaJS-compatible library for matrices?
idk-kid
@idk-kid
I have IO[String]. How do I get the string and assert or match? I have no idea about IO execution.
Anthony Cerruti
@srnb_gitlab
@idk-kid Take a look at IOApp. You shouldn't be executing IOs, only composing them via map, flatMap, sequence, and etc.
Rob Norris
@tpolecat
flatMap to look at the string and decide what to do next.
Luis Miguel Mejía Suárez
@BalmungSan
@idk-kid since you said "assert"
Are you referring to a test?
Eric Peters
@er1c
This seems odd - why would a AttributeScope match a Function1[T, Boolean]?
    Error:(327, 23) ambiguous reference to overloaded definition,
both method attr in class AttributeRefs of type [T](key: String, name: String, tpe: ta.db.AttributeType[T], firstScope: ta.db.AttributeScope, restScopes: ta.db.AttributeScope*)ta.db.AttributeRef[T]
and  method attr in class AttributeRefs of type [T](key: String, name: String, tpe: ta.db.AttributeType[T], isValid: T => Boolean, scopes: ta.db.AttributeScope*)ta.db.AttributeRef[T]
match argument types (String,String,ta.db.AttributeType.Locale.type,ta.db.AttributeScope.User.type,ta.db.AttributeScope.EndUserModifiable.type)
    val LanguageTag = attr("user.language_tag", "Language Tag", Type.Locale, Scope.User, Scope.EndUserModifiable)
Seth Tisue
@SethTisue
@er1c that does seem odd. I wonder if varargs is throwing it off somehow. but also, how sure are you that AttributeScope doesn't extend T => Boolean?
Eric Peters
@er1c
I feel like there was some way to debug this to show me any implicits that were being applied, but the method escapes me
Seth Tisue
@SethTisue

I should be using sbt shell

indeed, the performance difference is enormous, vs starting sbt up every time

It was mostly like, are you sure you need it?

@BalmungSan :+1:

Eric Peters
@er1c
sealed trait AttributeType[T] extends EnumEntry - EnumEntry is just a trait that extends nothing, the only thing close I have is def implicitDefaultValue: Option[Boolean] = Some(defaultValue)
Seth Tisue
@SethTisue
@BalmungSan I think in a lot of cases it's fine to have a type that can give you a collection (or an Iterable or what have you), without it actually being a collection. (but in OP's actual use case, who knows)
Eric Peters
@er1c
oh wait that's the wrong type damnit