Awesome
CL-REPL
Warning; WIP
The software is still alpha quality. The functionalities are incomplete and may cause unkown bugs.
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->Table of Contents
<!-- markdown-toc end -->Overview
This project aims to provide a beginner-friendly REPL for Common Lisp with rich functionalities, such as IPython for Python.
What this project tries to achieve are listed here.
- powerful multiline editing with gnu readline.
- saving and loading multiline history.
- tab-completion of symbols.
- simple installation instruction.
- code editting with text editor.
- useful debugger & inspector. (incomplete)
- syntax highlighting of input texts.
- paren-matching.
- implementation independence: builds on SBCL and CCL. Segfaults on ECL.
- autoindentation
Screenshots
<p align="center" width="640px"> <img style="width:640px;" src="./image/syntax-parenmatch.gif" alt="Syntax and Parenmatching" /> </p> <p align="center" width="640px"> <img style="width:640px;" src="./image/completion.png" alt="Tab Completion" /> </p> <p align="center" width="640px"> <img style="width:640px;" src="./image/debugger.png" alt="Debugger" /> </p>Installation
Method 1: Download the binary
Look up the latest release compatible with your OS under https://github.com/lisp-maintainers/cl-repl/releases.
If your choice of OS is not listed, you can help make lisping easier for others by contributing a PR. Take a look at the .github/workflows/CI.yml for an inspiration. If it's unix-based, it might be as simple as adding a name to matrix -> OS.
Method 2: Rosswell
CL-REPL can be installed via roswell as follows.
$ ros install lisp-maintainers/cl-repl
Before installation, please ensure that gnu readline is installed. If you use OSX, you might need to execute following command.
$ brew link --force readline
Also, ensure that your terminal support 256 colors.
Note about installation via Roswell
If you installed roswell with normal configurations, cl-repl will be located in ~/.roswell/bin
.
To use cl-repl from the command line, please ensure the PATH variable includes ~/.roswell/bin
.
Usage
$ cl-repl
or
$ ros repl
Some useful magic commands are ready to use. To list available commands:
CL-USER> %help
Configuration
You can customize CL-REPL by editting ~/.replrc
. You can change appearance, add your own commands, and do anything you want when startup.
An example can be found here.
Syntax highlighting
Syntax highlighiting of input area is new in v0.5.0.
If you want to disable it, put the following in your .replrc
.
(disable-syntax)
execute shell
If the line starts with !
, excute it as shell command, e.g. !ls -a
.
%edit magic
Line editting in repl is sometimes painful. CL-REPL allows yot to edit code with your favorite text editor.
CL-REPL> %edit <filename>
CL-REPL invokes a text editor specified by $EDITOR
.
After editting code, save and close it. Then repl will start to evaluate it.
If <filename>
is not supplied, a temporary file will be created and deleted after evaluation.
We've be sure the following editors work properly.
- vi & vim
- GNU Emacs
- joe's own editor
- Lem
Contributing
Don't hesitate to open issues or to send PRs. Any suggestions are always welcomed.
Contributors
<!-- readme: contributors -start --> <table> <tbody> <tr> <td align="center"> <a href="https://github.com/koji-kojiro"> <img src="https://avatars.githubusercontent.com/u/23150714?v=4" width="100;" alt="koji-kojiro"/> <br /> <sub><b>TANI Kojiro</b></sub> </a> </td> <td align="center"> <a href="https://github.com/digikar99"> <img src="https://avatars.githubusercontent.com/u/31390273?v=4" width="100;" alt="digikar99"/> <br /> <sub><b>Shubhamkar Ayare</b></sub> </a> </td> <td align="center"> <a href="https://github.com/xiaoyu2006"> <img src="https://avatars.githubusercontent.com/u/32544798?v=4" width="100;" alt="xiaoyu2006"/> <br /> <sub><b>Yi Cao</b></sub> </a> </td> <td align="center"> <a href="https://github.com/fukamachi"> <img src="https://avatars.githubusercontent.com/u/90570?v=4" width="100;" alt="fukamachi"/> <br /> <sub><b>Eitaro Fukamachi</b></sub> </a> </td> <td align="center"> <a href="https://github.com/vindarel"> <img src="https://avatars.githubusercontent.com/u/3721004?v=4" width="100;" alt="vindarel"/> <br /> <sub><b>vindarel</b></sub> </a> </td> <td align="center"> <a href="https://github.com/celaleddin"> <img src="https://avatars.githubusercontent.com/u/7376042?v=4" width="100;" alt="celaleddin"/> <br /> <sub><b>Celaleddin Hidayetoğlu</b></sub> </a> </td> </tr> <tr> <td align="center"> <a href="https://github.com/ryukinix"> <img src="https://avatars.githubusercontent.com/u/7642878?v=4" width="100;" alt="ryukinix"/> <br /> <sub><b>Manoel V. Machado</b></sub> </a> </td> <td align="center"> <a href="https://github.com/Release-Candidate"> <img src="https://avatars.githubusercontent.com/u/25861412?v=4" width="100;" alt="Release-Candidate"/> <br /> <sub><b>Release-Candidate</b></sub> </a> </td> <td align="center"> <a href="https://github.com/egao1980"> <img src="https://avatars.githubusercontent.com/u/919195?v=4" width="100;" alt="egao1980"/> <br /> <sub><b>Nikolai Matiushev</b></sub> </a> </td> </tr> <tbody> </table> <!-- readme: contributors -end -->List of Tasks
- (Complexity: high) Support for menu based completion: can we have an ipython-like dropdown menu based completion?
- (Complexity: moderate) MacOS Binaries through Github Actions
- (Complexity: moderate) Linux Arm64 binaries through Travis or something else
- (Complexity: moderate) Windows Binaries
- (Complexity: moderate) Automating tests
- (Complexity: moderate) Add support for logs
Author
TANI Kojiro (kojiro0531@gmail.com)
Maintainer(s)
License
CL-REPL is distributed under GPLv3.