Skip to content

Instantly share code, notes, and snippets.

View olivierdeckers's full-sized avatar

Olivier Deckers olivierdeckers

View GitHub Profile
@lukestephenson
lukestephenson / readme.md
Last active July 18, 2023 16:24
zio-streams performance observations

Background

I'm a long time user of reactive streams in Scala. Originally with akka-streams, and then Monix Observable.

The transition from akka streams to Monix Observable I found pretty straight forward. I was motivated by wanting to use a lazy effect system, rather than working with scala.concurrent.Future.

More recently I've been considering fs2 and Zio Streams as an alternative to Monix Observable. This has largely been motivated by the fact that Monix doesn't have much ongoing development and is stuck on cats-effect 2.

I've not found the transition from Monix Observable to Zio Streams as easy as my earlier transition (from akka -> monix). While the ergonomics of the API are similar, performance characterics differ hugely.

Chunking

Where you able to produce a binary directly from the Rust build tools that you could submit to the app/play store?


Not quite, but I tried to get as close to that as was reasonably possible. Alas, things ended up a little convoluted.

For iOS, I have a nearly empty Xcode project with a build script that copies my cargo produced executable into the .app that Xcode generates (before Xcode signs it). The build script also uses lipo to merge the executables for each architecture I’m targeting (e.g. armv7 and aarch64 for non-simulator devices) into a single, universal binary.

On top of that, there are various iOS-y things that need to happen before my application’s main method is called. SDL2 provides the Objective-C code that does all of that. In a C or C++ game, SDL2 renames main to SDL_main, and then [inserts its own mai

@kermitas
kermitas / PriorityThreadsDispatcher.scala
Last active January 30, 2019 13:47
Akka dispatcher with configurable priority for created threads.
package akka.dispatch
import com.typesafe.config.Config
object PriorityThreadsDispatcher {
/**
* Configuration key under which int value should be placed.
*/
val threadPriorityConfigKey = "thread-priority"
}