Code Monkey home page Code Monkey logo

functadelic's Introduction

functadelic

Build Status

This repo is a hub for projects related to multi-staged programming in Scala. It uses Lightweight Modular Staging. The main project is on staged parser combinators. Please find documentation for this project here.

To run the code, please follow these steps:

  1. Clone this here repo in a separate folder: git clone [email protected]:manojo/functadelic.git.
  2. Profit:
  $ cd functadelic
  $ sbt
  > test

Hope you have fun!

LMS Coding conventions

Here are some basic LMS conventions I use when writing LMS code:

  • Each new Ops gets its own file
  • An Exp trait only mixes other Exp traits that are not Opt trait
  • Opt traits are mixed in at a later stage. If you are often going to use one, create an Opt trait for your Ops which mixes the relevant Opt traits. Fat optimizations should not be mixed in with the classical Opt traits, but used independently.
  • If I use a certain feature (ex Option) in my current trait, I mix it in explicitly, even if some other trait I'm using has it already. Serves for documentation purposes. Of course, for really trivial stuff it's not necessary to do so.

functadelic's People

Contributors

manojo avatar

Stargazers

Alex Gryzlov avatar Bastian Müller avatar Cem Turan avatar ytakano avatar Kota Mizushima avatar Cédric Bastin avatar

Watchers

 avatar kenji yoshida avatar James Cloos avatar

functadelic's Issues

Broken Build - Missing Dependency

When I try to build the project with a fresh clone, the compiler reports errors that ZeroVal cannot be found:

[error] .../functadelic/src/main/scala/stagedparsec/ParseResultCPS.scala:25: not found: type ZeroVal
[error]     with ZeroVal { self: ReaderOps =>

This can be fixed by importing (copy & pasting) https://github.com/namin/lms-verify/blob/master/src/main/scala/lms/verify/ZeroVal.scala into the project. Appearently this file is part of your lms-utils project. It is a bit confusing that the dependency is not resolved, since lms-utils is mentioned as dependency in [build.sbt](https://github.com/manojo/functadelic/blob/master/build.sbt).

Broken Build - Bad Symbolic Reference

Trying to build the project after fixing #2 still results in the following errors:

[error] bad symbolic reference to scala.lms.common.Base.Nul encountered in class file 'OptionOps.class'.
[error] Cannot access type Nul in trait scala.lms.common.Base. The current classpath may be
[error] missing a definition for scala.lms.common.Base.Nul, or OptionOps.class may have been compiled against a version that's
[error] incompatible with the one found on the current classpath.
[error] bad symbolic reference to scala.lms.internal.Expressions.Nul encountered in class file 'OptionOpsExp.class'.
[error] Cannot access type Nul in trait scala.lms.internal.Expressions. The current classpath may be
[error] missing a definition for scala.lms.internal.Expressions.Nul, or OptionOpsExp.class may have been compiled against a version that's
[error] incompatible with the one found on the current classpath.
[error] /Users/jonathan/AeroFS/work/github/functadelic/src/main/scala/stagedparsec/StagedParsers.scala:175: diverging implicit expansion for type StagedParsersExp.this.Typ[StagedParsersExp.this.Input => StagedParsersExp.this.ParseResult[T]]
[error] starting with value evidence$12
[error]         val funSym = fresh[Input => ParseResult[T]]

Am I maybe using the wrong version of LMS? build.sbt says "org.scala-lang.lms" %% "lms-core" % "1.0.0-SNAPSHOT".

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.