Coder Social home page Coder Social logo

colibri's People

Contributors

armanbilge avatar busti avatar cornerman avatar dependabot[bot] avatar fdietze avatar scala-steward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

colibri's Issues

ZIO 2.0 integration

ZIO 2.0 was recently released. ZIO integration needs to be updated to latest streams.

Referential transparent API

Subscriptions, Cancellations and onNext/onError should be referentially transparent. We should return an effect type.

Assigning an Rx of tuple to multiple vars fails

The following code fails using the macro.

val myRx: Rx[(Int, Int, Int)] = ???

Rx {
  val (x, y, z) = myRx() // No implicit LiveOwner is available here! Wrap inside `Rx { <code> }`, or provide an implicit `LiveOwner`.
}

Case class cannot be the first definition in an Owned block

The following code fails to compile:

    def foo: VNode = Owned {
      case class Foo(a: Int, b: String)

      div
    }

With the following error message:

[error] /bar/foo.scala:390:22: private[this] not allowed for case class parameters
[error]       case class Foo(a: Int, b: String)
[error]                      ^
[error] /bar/foo.scala:390:30: private[this] not allowed for case class parameters
[error]       case class Foo(a: Int, b: String)
[error]                              ^
[error] /bar/foo.scala:390:18: value a is not a member of Nothing
[error]       case class Foo(a: Int, b: String)
[error] 

CE3

Hey! I was working on an Outwatch project, and wanted to pull in some new Http4s dependencies, and I got stuck on the classic problem of "you need Cats Effect 3 for this" problem - would it be helpful if I took a crack at upgrading colibri to Cats Effects 3, or is there anything blocking that at the moment?

Get first emitted element of Observable as Future (or Effect in general)

I'm using this right now:

  extension [T](obs: Observable[T]) {
    def first(using ExecutionContext) = observableFirstFuture(obs)
  }

  def observableFirstFuture[T](obs: Observable[T])(using ExecutionContext): Future[T] = {
    val promise    = Promise[T]
    val future     = promise.future
    val cancelable = obs.take(1).attempt.unsafeForeach(value => promise.complete(value.toTry))
    future.onComplete(_ => cancelable.unsafeCancel())
    future
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.