GithubHelp home page GithubHelp logo

athos / orchard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clojure-emacs/orchard

0.0 2.0 0.0 429 KB

A fertile ground for Clojure tooling

License: Eclipse Public License 1.0

Emacs Lisp 0.10% Makefile 0.92% Clojure 98.98%

orchard's Introduction

CircleCI Coverage Clojars Project cljdoc badge

orchard

A Clojure library designed to provide common functionality for Clojure development tools (e.g. Clojure editor plugins and IDEs).

History

Originally SLIME was the most popular way to program in Clojure with Emacs and a lot of useful functionality was created for it to support things like code completion, value inspection, finding references, apropos and so on. This functionality was implemented as a swank adapter written in Clojure and lived in the swank-clojure project.

Subsequently CIDER and cider-nrepl replaced SLIME and swank, and much code was moved from swank-clojure to cider-nrepl and continued to evolve there.

You can watch the presentation The Evolution of the Emacs tooling for Clojure to learn more about all of this.

This project is an effort to prevent repeating the mistakes of the past - cider-nrepl was split into two libraries, so that non-nREPL clients can make of use of the general functionality contained in cider-nrepl (e.g. things like apropos, inspect, etc).

Much of the tooling code required to build Clojure editors and smart REPLs is tool-agnostic and should be reused between tools, instead of copied and altered in each and every tool.

Design

Orchard is meant to be used to build programmer tooling relying on inspecting the state of a running REPL. REPL-powered tooling has been a core Lisp idea for many years and there are many Clojure libraries in that space (e.g. compliment, tools.trace, sayid, etc).

One thing to keep in mind is that Orchard relies (mostly) on runtime information, not the source code itself. In simple terms - only code that's loaded (evaluated) will be taken under consideration. That's pretty different from the static analysis approach taken by tools for most programming languages where it's not possible to easily inspect the state of running program.

Some other design goals are listed bellow.

No runtime dependencies

Orchard is meant to run alongside your application and we can't have a dev tools library interfere with your app right? Dependency collisions are nasty problems which are best solved by making sure there can't be any shared libraries to cause the conflict.

Currently Orchard has one runtime dependency (dynapath), but we hope to eliminate it at some point.

API Optimized for Editors

Code editors can't know what symbols resolve to without consulting a REPL that's why they would typically send a combination of a symbol name and some ns (e.g. the current namespace), so they can't be resolved to some var on which an operation would be invoked.

That's why the majority of the functions in Orchard take a combination of a ns and a symbol instead of a var. Probably down the road we'll provide var-friendly versions of most functions as well.

REPL Agnostic

No matter whether you're using nREPL, a socket REPL, unrepl or prepl, Orchard has your back. nREPL clients might opt to wrap some of the Orchard functionality in middleware for convenience (as cider-nrepl does), but they can just eval away if they please.

API Documentation

Documentation for the master branch as well as tagged releases are available here.

Usage

orchard requires Clojure 1.8+ and Java 8+.

Just add orchard as a dependency and start hacking.

[cider/orchard "0.4.0"]

Right now orchard provides functionality like:

  • enhanced apropos
  • classpath utils
  • value inspector
  • Java class handling utilities
  • Utilities for dealing with metadata
  • Namespace utilities

Consult the API documentation to get a better idea about the functionality that's provided.

License

Copyright © 2018-2019 Bozhidar Batsov & contributors

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

orchard's People

Contributors

bbatsov avatar alexander-yakushev avatar gonewest818 avatar jeffvalk avatar arichiardi avatar slipset avatar cichli avatar severeoverfl0w avatar eslick avatar xiongtx avatar adamniederer avatar benedekfazekas avatar expez avatar abo-abo avatar pdenno avatar rpkarlsson avatar shen-tian avatar tatut avatar greg-kargin avatar sanjayl avatar

Watchers

James Cloos avatar  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.