Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dou you plan to instrument bytecode produced by Scala compiler? #45

Closed
volth opened this issue May 15, 2014 · 6 comments

Comments

Projects
None yet
5 participants
@volth
Copy link

commented May 15, 2014

Hi.
I tried to translate simple Quasar examples from Java to Scala.
The most simple ones work, but as the complexity increases the code emits "WARNING: Uninstrumented methods on the call stack" and then crashes with NullPointerException or something like this.

It would be nice to have Quasar for Scala (Akka is not the replacement especially for implementing parsers of complex network protocols).
Do you plan to support Scala ?

@pron

This comment has been minimized.

Copy link
Member

commented May 15, 2014

Hi.
Short answer is: absolutely. Longer answer is, yes, but not very soon. Scala is a very (very, very, very, very) complex language (oh my god, it's so incredibly complex!), and it would take a long time to test Quasar with the many (many-many-many) Scala features. Given the relatively small number of Scala developers, and the heavy integration costs, this may take some time. We do, however support Clojure (much simpler integration), and will soon probably (or maybe we already do) support Kotlin (trivial integration).

You can help though. We would need a catalog of what works with Scala right now and what doesn't. Maybe we'll support Scala gradually, starting with the more important parts of that unfathomably complicated language.

@volth

This comment has been minimized.

Copy link
Author

commented May 15, 2014

This example https://github.com/puniverse/quasar-intro-jdk7/blob/0936df8a42855e892434c42797756da28bd66dfe/src/main/java/foo/Main.java works if you translate Java's for loop as "var i=0; while(i<10) { ....; i+=1}" and does not with "for (i <- 0 until 10) {...}".

It seems that the for's closure must have @Suspendable annotation, but in Scala it is not possible to annotate so tiny closures. May be the pessimistic assumption that all the functions in Fiber are potentially suspendable would help.

@pron

This comment has been minimized.

Copy link
Member

commented May 18, 2014

We plan to make instrumentation completely automatic (i.e. the process will automatically detect which methods are potentially blocking and instrument them). I guess this will solve most (or even all) such problems.

@mepcotterell

This comment has been minimized.

Copy link

commented Feb 19, 2015

Has there been any more traction with this issue?

@pron

This comment has been minimized.

Copy link
Member

commented Feb 20, 2015

I am afraid not... Other than Java, our focus is currently on Clojure and Kotlin.
I hope that in the near future Quasar will be completely transparent to user code (no need for suspendable annotations), so that it would automatically work with JVM code written in any language. We're working on that, but we're not there yet. Supporting Scala specifically is quite hard as the language is so big, the number of primitive constructs is high, and the compiler is rather impenetrable. Also, Scala developers seem to like the monad approach to asynchronous code.

To sum up: we have not begun work on providing explicit support for Scala, even though this is something we'd like to do in the future. We have begun work on making Quasar completely transparent (so that it would automatically support Scala), but this depends on changes to the JDK so might take some time.

However, if you or anyone else would like to help us with this task, we'll be more than happy to accept it, and promise to provide the necessary guidance.

@cocodrino

This comment has been minimized.

Copy link

commented Jun 21, 2015

the channel system looks very cool, I'd like use them with scala, I really hope than quasar will be a real alternative to typesafe stack, although is hard considering all the advertising made by them...I'm going to suscribe to this issue for future notifications

@volth volth closed this Jul 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.