Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:00

    larsrh on 3.x

    Update sbt-mdoc to 2.2.21 Merge pull request #1972 from s… (compare)

  • 11:00
    larsrh closed #1972
  • 09:30
    mergify[bot] labeled #1972
  • 09:30
    scala-steward opened #1972
  • 06:27

    github-actions[bot] on gh-pages

    deploy: 34c5e5a5435240432933908… (compare)

  • 06:26

    github-actions[bot] on gh-pages

    deploy: 3134f8aac003b00594420c4… (compare)

  • 06:21

    dependabot-preview[bot] on submodules

    (compare)

  • 06:21

    dependabot-preview[bot] on docs

    Bump versions/2.x from `7b8e783… Merge pull request #1970 from t… (compare)

  • 06:21
    dependabot-preview[bot] closed #1970
  • 06:20

    dependabot-preview[bot] on submodules

    (compare)

  • 06:20

    dependabot-preview[bot] on docs

    Bump versions/3.x from `b89686e… Merge pull request #1971 from t… (compare)

  • 06:20
    dependabot-preview[bot] closed #1971
  • 06:14
    dependabot-preview[bot] labeled #1971
  • 06:14
    dependabot-preview[bot] opened #1971
  • 06:14

    dependabot-preview[bot] on submodules

    Bump versions/3.x from `b89686e… (compare)

  • 06:14
    dependabot-preview[bot] labeled #1970
  • 06:14

    dependabot-preview[bot] on submodules

    Bump versions/2.x from `7b8e783… (compare)

  • 06:14
    dependabot-preview[bot] opened #1970
  • May 13 23:39

    vasilmkd on ce2-jmh

    (compare)

  • May 13 23:39

    vasilmkd on 2.x

    Update to sbt-jmh 0.4.2 Merge pull request #1969 from t… (compare)

Guillaume Martres
@smarter
yeah I remember that was discussed on contributors
Oleg Pyzhcov
@oleg-py
can you sneak it in before release? :D
Guillaume Martres
@smarter
absolutely not :)
also I'm not a big fan of adding a new meaning to a keyword
and it gets worse if you also want a guard on that last expression
Oleg Pyzhcov
@oleg-py
you can't have a guard on that last expression :D
you'll be forced to use the version that desugars to map, so it'll work with collections' lazy withFilter
Oleg Pyzhcov
@oleg-py
and the meaning isn't exactly new
Adam Rosien
@arosien

I'm not sure I understand what you're describing in this context

@djspiewak no it's really odd. i have code like this:

IO(new Foo().something)
  .ensureOr(s => new RuntimeException("meh: $s")(_.isError) // throws exception

vs.

IO {
  val s = new Foo().something
  if (s.isError) throw new RuntimeException("meh: $s")(_.isError)
  else s // doesn't throw exception
}
Daniel Spiewak
@djspiewak
is isError effectful?
Adam Rosien
@arosien
i have no idea, but i too was thinking that it must be lazily effectful, otherwise craziness, which is not realistic
thanks for the pep talk :)
Oleg Pyzhcov
@oleg-py

Turns a successful value into an error if it does not satisfy a given predicate.

Maybe your logic is backwards and you should check !_.isError?

Adam Rosien
@arosien
i probably wrote the code snippet incorrectly, i always write the actual snippet correctly!
arosien @arosien checks the boolean logic with extreme paranoia
Adam Rosien
@arosien
@oleg-py :kissing_heart: love you
this is why you shouldn't give me boolean expressions, i'm a complete mess!
also, :facepalm:
why yes, i have been programming for more than 30 years, oh yeah!
friends don't let friends use booleans
Olivier Mélois
@Baccata
:laughing:
Vasil Vasilev
@vasilmkd
😆
Olivier Mélois
@Baccata

So another question regarding uncancelable and self-cancel, in the case of Resource :

type Foo[A] = Resource[IO, A]
val Foo = Async[Foo]

val resource = Foo.uncancelable(_ => Foo.canceled)
resource.use(_ => IO.unit).guaranteeCase(IO.println)

This prints Canceled(), and I'm still very confused as to why

Oleg Pyzhcov
@oleg-py
why not?
the creation of resource isn't cancelable, but .use is
Daniel Spiewak
@djspiewak
here's the intuition: if you're canceled within an uncancelable block, that doesn't mean "ignore the cancel and pretend it never happened", it really just means "delay responding to the cancelation until you're unmasked"
so technically cancelation has four states:
  • Not canceled
  • Canceled but ignoring it
  • Canceled and running finalizers
  • Canceled and really, finally, dead
There's also an enforced directionality to these state transitions
(i.e. you can't move "backwards")
Jakub Kozłowski
@kubukoz:matrix.org
[m]
that's a really nice thing to know about these states
is that anywhere on the site yet?
btw. we absolutely should make the process of site deployment trivial - like, press a button if you have rights. Site deploys.
I can spend some time to work on this next week or so
Daniel Spiewak
@djspiewak
it's definitely not on the site yet
also what's not trivial about it now? you just merge a PR :-)
the docs branch build deploys the site
Olivier Mélois
@Baccata

it really just means "delay responding to the cancelation until you're unmasked"

okay that's really helpful.

Raas Ahsan
@RaasAhsan
I faintly recall describing this in detail in the scaladoc for MonadCancel :P
Olivier Mélois
@Baccata
I need to read through the docs more in depth :p
Oleg Pyzhcov
@oleg-py
why read the docs if you can complain in the chat?
Daniel Spiewak
@djspiewak

why read the docs if you can complain in the chat?

this is my whole philosophy on life

Olivier Mélois
@Baccata
I complain therefore I am
Daniel Spiewak
@djspiewak
why take time to read documentation when ignorance is free?
Anton Sviridov
@velvetbaldmime:matrix.org
[m]
it's also bliss. if your so called documentation was so good, how come no one reads or writes it, huh?
Oleg Pyzhcov
@oleg-py
Well on a serious note, docs usually give broad and fundamental information, but chats can give you precise injection of knowledge, even if it's of obscure tribal variety :)
if you're CE2 user, you'd be looking to upgrade your knowledge with such precise injections rather than forget everything you knew about effects and relearn it.
Daniel Spiewak
@djspiewak

even if it's of obscure tribal variety

I have the Big Book of Effective Rain Dances on my desk for just such occasions

Oleg Pyzhcov
@oleg-py
pics or didn't happen
Daniel Spiewak
@djspiewak
lol
Oleg Pyzhcov
@oleg-py
And I'm certainly not saying this because I want to get one like that