Skip to content

Instantly share code, notes, and snippets.

@jlareck
jlareck / share_macros.md
Last active Sep 2, 2021
How to share Quotes entities between multiple methods
View share_macros.md

Problem: we need to share same symbols between two methods. How we can do this? The first idea of solution: We can create a class like Helper with [Q <: Quotes, T: Type](using val q: Q) and in this case we avoid duplication of (using Quotes) for each entitiy.

class Helper[Q <: Quotes, T: Type](using val q: Q) {
  import q.reflect.*

  val classDynamicSymbol = Symbol.requiredClass("me.shadaj.scalapy.py.Dynamic")
  val classReaderSymbol = Symbol.requiredClass("me.shadaj.scalapy.readwrite.Reader")
  val classWriterSymbol = Symbol.requiredClass("me.shadaj.scalapy.readwrite.Writer")
  val classAnySymbol = Symbol.requiredClass("me.shadaj.scalapy.py.Any")
View Medynskyi_Mykola_GSoC_2021_Progress.md

Google Summer of Code 2021: Implement support for ScalaPy in Scala 3

Description

The name Scala comes from the word scalable, and true to that name, the Scala language is used to power busy websites and analyze huge data sets. Scala is one of the leading languages in the implementation of big data systems. It is widely used in streaming data. Similarly, Python has become the language of choice for data scientists with its many high-quality scientific libraries. ScalaPy is that bridge that gives an opportunity to use Python libraries in Scala. Last year a new version of Scala was introduced. At the moment it is not released but Scala 3 brings many new features and changes. The aim of this project is to discover those new features and implement support for ScalaPy in Scala 3. ScalaPy will possibly help Scala 3 to become more popular among scientists and maybe this will be the core moment in combining data processing and data analysis worlds in Scala 3.

Mentors