Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
rnd4222
@rnd4222_gitlab
@paul-snively I'm not going to argue on this points. As being said, its a tradeoff, and recommending to abandon IDEA is not a good advice, especially when given to a novice Scala developer
Paul Snively
@paul-snively
@rnd4222_gitlab: OK, I guess? I haven't had significant difficulty in using Visual Studio code to rename things. YMMV.
@rnd4222_gitlab: I'm sorry, but it's excellent advice, especially to a novice Scala developer, who with high probability rationally expects their IDE not to lie to them.
@atararaksin: I apologize for mischaracterizing IntelliJ as a poor choice for Scala developers.
@atararaksin: It's actually a complete tire fire that Scala developers should avoid at all costs.
@rnd4222_gitlab: Better?
Rob Norris
@tpolecat
I don't really care what editor anyone uses, I can just report what works well for me.
IntelliJ works well for lots of people. But they also bump into its limits when moving into the cats world.
Paul Snively
@paul-snively
Or Shapeless, or Spark, or...
Ryan Peters
@sloshy
IntelliJ has me deleting sbt target folders constantly on version changes... never had that issue with any other editor so for that alone it's a big win to switch from it
something something idea.sbt
Paul Snively
@paul-snively
@rnd4222_gitlab: Look, upon reflection: if IntelliJ + sbt in a shell is productive for you, mazel tov. But watch yourself advising me on the quality of advice I give others. You're not in a position to do that.
rnd4222
@rnd4222_gitlab
@paul-snively I'm not finding discussion productive if someone is going to use authority argument instead of actual arguments. Good luck!
(and, actually, using argument of someone's "position" is an evidence of lack of arguments)
Paul Snively
@paul-snively
@rnd4222_gitlab: I am the sole arbiter of what constitutes arguments about the quality of my advice. Whether you accept the fact or not is irrelevant.
@rnd4222_gitlab: I don't see you making substantive arguments, so now I'm adding hypocrisy to the list. If you want to discuss the positive value of IntelliJ, please be my guest. But leave your criticisms of my advice out of it, unless you have facts to offer.
OK, that's definitely enough hijacking of @tpolecat's room, and my apologies again.
Rob Norris
@tpolecat
(not my room, but yeah let's take it down a notch pls ;-)
Paul Snively
@paul-snively
Yes. Sorry.
rnd4222
@rnd4222_gitlab
@paul-snively It's very frustrating that Scala community have members that is going to point others on they "position" using its own privileges (which you have a lot, given that you are white male) despite the fact that its toxic and disgusting behavour
Paul Snively
@paul-snively
@rnd4222_gitlab: Look: you made what reads as a factual claim about the quality of my advice. You cross a line there, and "white privilege" has precisely fuck-all to do with it.
@rnd4222_gitlab: I've already directly apologized to @tpolecat for this exchange, so let's please, if you really want to continue down the ridiculous path you're on, take it to direct message.
Oh, I see what @tpolecat meant: I thought this was in the Doobie channel. Heh. OK, my apologies to the Cats maintainers/mods.
And now I promise I'm done.
Andrey Tararaksin
@atararaksin
Actually I found that I was missing -Ypartial-unification option, so it didn't want to work neither in Intellij nor in vscode. Now that I've added the option, it works in both.
Rob Norris
@tpolecat
doh!
Paul Snively
@paul-snively
Yay!
@atararaksin: Let me recommend https://github.com/DavidGregory084/sbt-tpolecat, then.
Andrey Tararaksin
@atararaksin
@paul-snively Will give it a try, thx.
Paul Snively
@paul-snively
@atararaksin: Sure. It's just a nice way to package up all the research @tpolecat has put into "good scalacOptions" and make it available across Scala versions.
Leif Warner
@LeifW
I've been using IntelliJ on Scala for a decade now (just using it as an editor, not to compile anything), and the main annoyances are sometimes it doesn't think an implicit is available, sometimes it thinks an implicit is unused... maybe other stuff regarding unification of type params, which Scala doesn't seem the best at anyways. The error messages are different than scalac's - so I'll ask sbt for a second opinion if the message is confusing. I'm always using sbt anyway to use the REPL on the project or running tests, so I have a good idea of what compiles apart from what IntelliJ thinks.
Paul Snively
@paul-snively
To try to be fair: I can understand someone having a higher threshold for false "won't compile" signals than I have. That's fine. I just wonder what that threshold is, and the extent to which libraries like Cats (broadly construed) and Shapeless push that boundary.
I also wonder—and this is genuinely completely open—why has it proven so hard to get the Scala plugin to use the presentation compiler or (newer) language server protocol?
But I'm sure there are very good reasons.
Leif Warner
@LeifW
For language server protocol in particular, I know Idris's ide protocol has reasons for not wanting to switch to it at this time: https://groups.google.com/d/msg/idris-lang/wd7I_SW6xYk/TfMFMbAPBwAJ
Paul Snively
@paul-snively
:+1:
But presumably that means you want something better, not something that says "this won't compile" when it will.
Travis Brown
@travisbrown
Dan Wiedeback
@danwiedeback_twitter
Hi all, trying to compose some functions. I have a function
f: A => EitherT[F, B, C]
and a function
g: C => EitherT[F, B, D]
Is there a quick way to modify g so that it accepts f's output when composing?
I need to use g in other places, so modifying the signature isn't an option.
Paul Snively
@paul-snively
Not as stated. What if the Either produced by f is a Left, i.e. a B, not a C?
If you mean “treat Either as if it were right-biased,” I imagine Kleisli and flatMap will do the trick.
Paul Snively
@paul-snively
But that may not be necessary; I think Cats gives you a Monad instance for Function1 anyway. What does f.flatMap(g) get you?
Assuming import cats.implicits._.
Dan Wiedeback
@danwiedeback_twitter
Thanks @paul-snively. f.flatMap(g) doesn't work, but something like this is what I was thinking:
def flatLift[A, B, C](f: A => EitherT[F, B, C])(implicit ec: ExecutionContext): EitherT[F, B, A] => EitherT[F, B, C] =
      _.flatMap(f)
Paul Snively
@paul-snively
I see. You want to reverse B and C?
Filippo Mariotti
@barambani

Hi, I was playing a bit with typelevel/cats#3141 and I couldn’t find any way to implement the signature

def foldA[G[_], A, B](fa: F[A], z: B)(f: (B, A) => G[B])(implicit G: Applicative[G]): G[B]

without flattening. The closest I could get was

def foldA[G[_], A, B](fa: F[A], z: B)(f: G[(B, A) => B])(implicit G: Applicative[G]): G[B]

I was wondering, what could be a possible implementation of the first ?
Thanks a lot

Rob Norris
@tpolecat
@danwiedeback_twitter that's kleisli composition. (Kleisli(f) andThen Kleisli(g)).run
You need Monad[F]