And yes, I agree that lack of fairness is a significant problem :joy:
Tim Spence
@TimWSpence
It think it is fine actually, it just wasn’t what I expected at first. Which leaves me back at square one :sob:
Christopher Davenport
@ChristopherDavenport
Yeah. :cry:
Tim Spence
@TimWSpence
Timer[IO].sleep(n.micros) this shouldn’t block a thread, should it? If I add a 0 to the random int bound then the whole program seems to block sometimes
@ChristopherDavenport good news! After a 7 month sebatical (to be fair, I was on paternity leave for quite a bit of it), I’ve fixed our issues with this :)
(Or at least the Santa Claus example now behaves as expected)
Thanks Ross. Yeah, just bumped the version to get rid of it :joy:
renghen
@renghenKow_twitter
hi
the library is interesting
do you have a java api, so that I can use the lib in kotlin or java
not everyone gets to use scala in thei job
_
Tim Spence
@TimWSpence
Thanks @renghenKow_twitter The implementation is pretty tied to Scala's cats effect so I think a Java API would be tied to that as well. I'd be surprised if Cats Effect supports Java at all (no implicits or higher kinded types for a start) but @ChristopherDavenport or @rossabaker might be able to give you more details - I've never tried to use it from Java
renghen
@renghenKow_twitter
Thanks very much for the answer
was thinking of a wrapper
like scala-stm does it
Tim Spence
@TimWSpence
No worries! As I said, I think a wrapper would be hard because the scala features we use don't easily map to Java (as far as I'm aware anyway) but I'm very happy to consider PRs that don't break the scala UX!
Ross A. Baker
@rossabaker
I guess if you run javap on the classes of cats-stm, you'd get some sense of how those Scala features map to Java.
I used to call Scala from Java a lot, but that was before I'd heard of higher-kinded types.
And I think the wrapper would be the most promising approach, like scala-stm's JAPI.