• This repository has been archived on 11/Feb/2020
  • Stars
    star
    115
  • Rank 304,148 (Top 7 %)
  • Language
    Java
  • License
    Eclipse Public Li...
  • Created over 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A better Interactive REPL for Clojure

IClojure

An Interactive Clojure repl, inspired by IPython.

Build Status

Getting started

Standalone

The simplest way to start with IClojure is to download the latest standalone IClojure jar

curl -O -L http://clk.tc/iclojure-latest.jar
java -jar iclojure-latest.jar

Alternatively, you can download the following script, mark it executable and put it somewhere in path

curl -O https://raw.github.com/cosmin/IClojure/master/bin/iclojure
chmod +x iclojure
sudo mv iclojure /usr/local/bin

Then you can simply launch iclojure at any time.

Leiningen

If you are already using Leiningen the simplest way to get started with IClojure is to use the lein-iclojure plugin.

Leiningen 1.x

lein plugin install lein-iclojure 1.2

Leiningen 2

Add [lein-iclojure "1.2"] to the :user profile in ~/.lein/profiles.clj. Here is an example

{:user {:plugins [ [lein-iclojure "1.2"] ]}}

Maven

If you are already using the latest clojure-maven-plugin snapshot you can simply add IClojure to your dependencies

<dependency>
  <groupId>com.offbytwo.iclojure</groupId>
  <artifactId>iclojure</artifactId>
  <version>1.2.0</version>
</dependency>

and then IClojure will replace the usual repl

mvn clojure:repl

Development

IClojure ships with the latest alpha of Clojure 1.4, although it supports Clojure >= 1.2

git checkout https://github.com/cosmin/IClojure
cd IClojure
bin/run.sh

Package

You can package IClojure for distribution, including sources and a standalone jar with

mvn clean package

The iclojure-*-standalone.jar is a self-contained Jar that includes all the necessary dependencies.

Features

  • Tab completion
  • Shorthand for source and doc
  • Shorthand for introspecting Java objects and classes via reflection
  • Proper Control-C handling, although not very portable
  • persist history across sessions to ~/.iclojure_history
  • input and output caching of last 1000 elements

Tab completion

  • variable
  • method invocations
  • "(.method" completion for all java methods for any of the classes in the current namespace
  • "(. object method" completion for all the methods of the object (or a form that evaluates to an object)
  • namespaces
  • java classes
  • import statements for both symbols and import lists

Input / output caching

In addition to the Clojure convention of caching the last 3 output in *1, *2 and *3 IClojure also caches the last 1000 input and output

(input 102) ; => returns the input from line 102
(output 102) ; => returns the output from line 102

Other shorthands

    ?symbol          => (doc symbol)
    ??symbol         => (source symbol)
    %d symbol        => show constructors, methods and fields of the given object or Class
    %f class         => find all classes matching this name (supports globs)
    %f class package => like the above, but restrict search to the given package

Roadmap

  • tab completion for require and use forms
  • abort long runing tasks with Ctrl+C
  • launch editor from within IClojure

License

Copyright (C) 2013 Cosmin Stejerean

Distributed under the Eclipse Public License, the same as Clojure.

More Repositories

1

git-hg

A git-hg utility for checking out and tracking a mercurial repo.
Shell
307
star
2

stashy

Python API client for the Atlassian Stash REST API
Python
230
star
3

route53-transfer

Backup and restore Route53 zones, or transfer between AWS accounts.
Python
151
star
4

s3-bash

Access s3 from bash
Shell
107
star
5

jenkins-radiator

A build pipeline radiator for Jenkins using Python/Django and the Jenkins API
Python
28
star
6

clojure-reader

A re-implementation of the Clojure reader, written in Clojure
Clojure
23
star
7

ControlJS

JavaScript
14
star
8

git-svn-extensions

Extensions to git-svn to simplify common tasks like creating and deleting branches in svn
Shell
13
star
9

samples

random code samples that didn't fit anywhere else
Python
12
star
10

cljenv

Utilities for creating and managing multiple clojure environments
Shell
11
star
11

elasticpony

A set of scripts to help with deploying Django applications to Amazon Web Services
Shell
11
star
12

docker-ffmpeg

ffmpeg build with x264/x265/libvpx/libaom on top of Ubuntu 18.04
Dockerfile
11
star
13

ec2audit

Dump all EC2 information to a folder suitable for version control
Python
11
star
14

clojure-in-clojure

Clojure
10
star
15

lein-iclojure

Leiningen plugin to launch an IClojure REPL
Clojure
7
star
16

docker-lhls-segmenter

Docker container running LHLS segmenter to demo a live stream
Shell
6
star
17

sicp-scheme

My solutions to the SICP in Scheme.
Scheme
4
star
18

pdns-dynamodb

PowerDNS backend using DynamoDB
Python
4
star
19

stash-enforce-author-hook

Stash hook to prevent users from pushing commits they have not authored.
Java
4
star
20

stash-broken-build-hook

Stash hook to reject pushes to the default branch if the build is broken (unless the push fixes it)
Java
3
star
21

symlink

Symlink reads your mind so you no longer have to remember the correct argument order
3
star
22

beanhelpers

Utilities for dealing with JavaBeans in Clojure
Clojure
3
star
23

launchbox

Packaging and dependency resolution for chef-solo cookbooks
Python
3
star
24

docker-video-tools

Base image for doing video transcoding work
Dockerfile
3
star
25

hgformlogin

an extension to Mercurial allowing it to be used with repositories protected by a form login
Python
2
star
26

clktc

A simple URL shortener built using Django.
CSS
2
star
27

cosmin.github.io

Cosmin's website
Shell
2
star
28

clj-itunes

A Clojure client for the iTunes search API
Clojure
2
star
29

dnsrecords

A library for dealing with DNS records, including field validation
Python
2
star
30

weathermoment

Display current weather, GPS coordinates and address
JavaScript
2
star
31

clojure-project-template

A template for easily starting a new Clojure project. Currently using Maven.
Clojure
2
star
32

class-finder

A utility to find classes, designed for use at the REPL
Java
1
star
33

ulid-java

ULID implementation for Java with ability to convert to/from UUID
Java
1
star
34

streaming-http-server

An HTTP server that allows low latency downloads of files while they are being uploaded
Go
1
star
35

aws-switch

Switch between multiple AWS accounts
Shell
1
star
36

stash-email-notification-hook

Email notification hook for Stash
Java
1
star
37

docker-nginx-webdav

Nginx WebDAV container based on Ubuntu 18.04 (Bionic)
Dockerfile
1
star
38

stash-enforce-pull-requests-hook

Reject direct pushes to enforce pull requests
Java
1
star
39

datatables-backend-java

A Java implementation of the DataTables server-side processing API
Java
1
star
40

cs193p

My solutions to the Stanford iPhone Programming Class Assignments
Objective-C
1
star