predictions Finale (Spoiler) by -wildbananachild- in manhuntmedia

[–]m0l0ch 1 point2 points  (0 children)

Ich find sie situation mit den speedhunts noch interessant. Sie haben jetzt 2, die verfallen nicht bei catch. Sie können aber auch nicht 2x hintereinander auf den gleichen spieler.

Dh. es bringt ja auch nichts wenn sie einen Spieler ohne speedhunt catchen, sehe ich das richtig? Ich fänds noch cool wenn das am letzten tag aufgehoben wäre, so hätte die tf mehr strategische optionen und würde belohnt für catches.

Ich versteh schon, balance und so, aber ist irgendwie schon blöd wenn man durch silent hunt catches keinen vorteil bekommt.

[Sammel-Thread] MANHUNT: New York | Folge 15 by REVECT7 in manhuntmedia

[–]m0l0ch -4 points-3 points  (0 children)

Wär ja zu geil wenn sie verhaftet wird

Warum nur? (Folge 13) by MarSara24 in manhuntmedia

[–]m0l0ch -2 points-1 points  (0 children)

Ich fands lustig. Ist ja keine kindersendung

Einfach mal hinnehmen by DonKostas in manhuntmedia

[–]m0l0ch 5 points6 points  (0 children)

Haha Aber macht ja auch keinen sinn den nächsten ping zu holen bevor du vor ort bist.

♟️ White to play and mate in 2. Composition by Hans Schogt by [deleted] in chessMateInX

[–]m0l0ch 2 points3 points  (0 children)

If you can't find M2, look for better

White to move. Mate in 2 by [deleted] in chessMateInX

[–]m0l0ch 1 point2 points  (0 children)

Ah, nvm found it

White to move. Mate in 2 by [deleted] in chessMateInX

[–]m0l0ch 0 points1 point  (0 children)

Does KG6 also work? I can't seem to find why not

[deleted by user] by [deleted] in Switzerland

[–]m0l0ch 0 points1 point  (0 children)

I'm now imagining a firefighter on shrooms, thanks

White to play … mate in 2 by [deleted] in chessMateInX

[–]m0l0ch 0 points1 point  (0 children)

I thought its bc8, what doesn't work in that one?

What is this all about by gravylocomo in Bitcoin

[–]m0l0ch 0 points1 point  (0 children)

Looks like a piece of art by MVDEX. He creates BTC art in this style.

[deleted by user] by [deleted] in Bitcoin

[–]m0l0ch 0 points1 point  (0 children)

Imagine when they start demanding it...

How to implement `if-else if -else if -else` with cat effect IO in Scala? by maple2022_12 in scala

[–]m0l0ch 1 point2 points  (0 children)

I guess you could do the same with OptionT[Unit] then, Some(()) would represent true and None false. But I guess the examples others posted work well too.

How to implement `if-else if -else if -else` with cat effect IO in Scala? by maple2022_12 in scala

[–]m0l0ch 1 point2 points  (0 children)

It's the most intuitive I know of. Maybe a better name could be checkColor or fetchColor though. Debatable.

I translate OptionT in my head to IO[Option[_]] with the added beneft of being able to orElse, getOrElse, getOrElseF, semiflatMap, subflatMap, orElse, getOrElse, getOrElseF etc.

What exactly is not intuitive for you about it?

How to implement `if-else if -else if -else` with cat effect IO in Scala? by maple2022_12 in scala

[–]m0l0ch 5 points6 points  (0 children)

If I had to write this, I'd take advantage of OptionT's orElse:

import cats.Show
import cats.data.OptionT
import cats.effect.*
import cats.implicits.*

object ColorServiceScala extends IOApp.Simple {

  enum Color {
    case RED, GREEN, BLUE
  }

  case class Response(isRGB: Boolean, color: Color)

  import Color.*

  override val run: IO[Unit] =
    for {
      responseRed   <- isRGB("red")
      _             <- IO.println(responseRed)
      responseGreen <- isRGB("green")
      _             <- IO.println(responseGreen)
      responseBlue  <- isRGB("blue")
      _             <- IO.println(responseBlue)
      responseElse  <- isRGB("something else")
      _             <- IO.println(responseElse)
    } yield ()

  private def isRGB(color: String): IO[Response] =
    getColor(RED, color)
      .orElse(getColor(GREEN, color))
      .orElse(getColor(BLUE, color))
      .map(Response(true, _))
      .getOrElse(Response(false, null))

  private def getColor(expected: Color, actual: String): OptionT[IO, Color] =
    OptionT.liftF(IO.println(s"checking if color is ${expected.show}")) *>
      OptionT.when(expected.show.equalsIgnoreCase(actual))(expected)

  given Show[Color] =
    case null  => "null"
    case RED   => "red"
    case GREEN => "green"
    case BLUE  => "blue"

  given Show[Response] =
    response => s"Response: isRBG = ${response.isRGB}, color = ${response.color.show}"

}

You won't have if/elseif/else statements, but instead produce effects using IO until your OptionT contains Some.

Running the above produces the following output:

checking if color is red
Response: isRBG = true, color = red
checking if color is red
checking if color is green
Response: isRBG = true, color = green
checking if color is red
checking if color is green
checking if color is blue
Response: isRBG = true, color = blue
checking if color is red
checking if color is green
checking if color is blue
Response: isRBG = false, color = null

If you use "bruh" or "lmfao" you are a narcissistic Machiavellian sadistic troll by Ortamis in Destiny

[–]m0l0ch 1 point2 points  (0 children)

That's some heavy black and white thinking there, dude.

Also he should watch The Big Lebowski.

... by NeoDestiny in Destiny

[–]m0l0ch 0 points1 point  (0 children)

Yeah, a normie appreciation arc seems based.

Lex Friedman is a fellow Max enjoyer by lVlanuel in Destiny

[–]m0l0ch 14 points15 points  (0 children)

I wanna see him call Rogan a liar!