Coder Social home page Coder Social logo

ikan's Introduction

Join the chat at https://gitter.im/idris-gitter/Lobby

๐Ÿšง Ongoing project ๐Ÿšง Status: Prototype ๐Ÿšง

ikan : package manager for idris,in idris

The next generation package manager and build tool for idris,with free monads as DSL,using idris repl for scala's sbt like interaction, ,and possible other languages!

a example build file is at src/build.idr

execution of build file : src/Package/IkanExecute.idr

packages will be hosted here: https://github.com/orgs/idris-packages/ , please email me if you would like to help manage the packages. Basically, the packages this org forked would be available to ikan.

The user api is mainly monadic, using free monads, which easily allows multiple kinds of analysis and interpretation.The philosophy is emacs like,that ikan just acts like a library.

General discuss about idris package manager is here

idris-lang/Idris-dev#1825

https://github.com/idris-lang/Idris-dev/wiki/Egg-%237:-The-Idris-Package-Manager

Currently Implemented

create new project with .ipkg template

new file/module

Usage

clone and cd into this repo

idris --build ikan.ipkg
	
or
	
sh install.sh
	

and then move or symlink generated bin ikan to your path

Sources

โ”œโ”€โ”€ src
โ”‚ย ย  โ”œโ”€โ”€ Main.idr main entry
โ”‚ย ย  โ””โ”€โ”€ Package
โ”‚ย ย      โ”œโ”€โ”€ IkanAssets.idr  templates for new project ,etc
โ”‚ย ย      โ”œโ”€โ”€ IkanAst.idr
โ”‚ย ย      โ”œโ”€โ”€ IpkgAst.idr
โ”‚ย ย      โ””โ”€โ”€ IpkgParser.idr

Why is it named ikan

kan extensions subsume all concepts in 1-dimensional category theory(by Mac Lane), and this project will use freer monads, which are closely connected to kan extensions. However, using ikan will assume no knowledge of any category theory, you just have to be familiar with do notation and functional programming.

Planned functionality

any thing is put at a central place , ~/.idris-ikan ,which keeps your project directory clean

sandboxed environment for every project

multiple backends , js,jvm,etc,and library management

multiple version resolution methods, via git commit specification or automatic

build,install to local ,clean,list all pkgs

generate template project

zsh integration

a website (currently everything will be put at https://github.com/idris-packages , contact me if you want to manage packages!)

The big picture

The entry main : PkgIO () is just the IO () for our package manager (We may just use plain old IO () instead. However we do not do actions in IO directly, any operations would be implemented DSLs (deep embedding), which makes it convenient to do multiple kinds of interpretation, and allows a comprehensive way of viewing what happens at building.

The reason for this kind of separation is that we can perform any analysis or inspection before actually performing it. Although the theories behind free monads are frightening, its usage is quite simple, and as users you will only see a simple monadic interface.

DSLs: https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/embedding-short.pdf

http://www.cs.ox.ac.uk/jeremy.gibbons/publications/embedding.pdf

Some examples of freer monadic DSL can be found at https://github.com/doofin/tensorflow-idris/blob/baea775a608c2e8e29cb0d30555499edb18c8a9e/UserApi.idr

repo hosting : just use git repos forked by idris-industry

convert from/to .ipkg

Dependency

install idris-free package with freer

https://github.com/idris-industry/idris-free (not merged yet)

Where comes this idea?

greatly influenced by scala 's mill(https://github.com/lihaoyi/mill) and sbt ,which build files are first class.

haskell's shake build

clojure : https://leiningen.org/

Build Systems ร  la Carte(Haskell shake build) : http://delivery.acm.org/10.1145/3240000/3236774/icfp18main-p46-p.pdf?ip=13.231.121.81&id=3236774&acc=OA&key=4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E6D218144511F3437&__acm__=1537263121_fe5174184ffd2d85fd5c3b83994abc50

Existing idris pm

  • Elba - A package manager for Idris
  • idream - A simple build system for Idris
  • Idris Rules - Idris rules for Bazel

Contribution welcomed!

ikan's People

Contributors

doofin avatar marcesquerra avatar rpillayatl avatar

Watchers

 avatar

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.