Giter Club home page Giter Club logo

Yin-Yang: Building DSLs in a Breeze!

Join the chat at https://gitter.im/scala-yinyang/scala-yinyangBuild Status

Yin-Yang is a library that makes it easy to use and develop deeply embedded DSLs. The DSL users will never see the complex artifacts of the deep embedding while in production they will get all their benefits. The DSL authors write the DSL in plain Scala and Yin-Yang will generate the deep embedding. All that DSL users need to do are the domain-specific optimizations.

DSL Users will never know that the DSL is deeply embedded as they can debug and prototype their code. For example:

vectorDSL {
  Collection(1,2,3) map (_ + 1)
}

DSL Authors will develop their interface in regular Scala:

object Collection {
  def apply[T](els:T*) = ...
}
class Collection[T](elements: Seq[T]) {
	def map[U](f: T => U) = ...
}

And Yin-Yang will generate the nasty Rep[_] types, IR nodes, and cakes.

Support

If you encounter any issues with Yin-Yang please report them here.

Development

If you have any questions about the project please ask them in the development mailing list.

Project Structure

Component Description Stability
components/core The core transformers of Yin-Yang (regular release) Release(soon)
components/yin-yang The main Yin-Yang transformer used for defining your DSLs Release(soon)
components/paradise provides annotations for virtualization Experimental
components/dsls Small DSLs used for experimentation. Experimental

Building the Project

To build Yin-Yang you will need SBT 0.13.x. Just invoke:

sbt package

To use Eclipse invoke:

sbt eclipse

In Eclipse use the Import Wizard to import Existing Projects into Workspace

Note: Eclipse does not support long running macros. The test cases that reify DSLs at compile time will be practically impossible to navigate in Eclipse.

License

Yin-Yang is licensed under the Scala License.

scala-yinyang's Projects

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.