All Projects → fukamachi → mondo

fukamachi / mondo

Licence: GPL-3.0 License
Simple Common Lisp REPL

Programming Languages

common lisp
692 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to mondo

magic-console
Interactive programming for Atom
Stars: ✭ 13 (-67.5%)
Mutual labels:  repl
ts-comint
ts-comint will send the code from Emacs into a Typescript REPL.
Stars: ✭ 28 (-30%)
Mutual labels:  repl
KittyTerminalImages.jl
A package that allows Julia to display images in the kitty terminal editor
Stars: ✭ 57 (+42.5%)
Mutual labels:  repl
org-babel-eval-in-repl
Send and eval org-mode babel code blocks in various REPLs (therefore it's async)
Stars: ✭ 49 (+22.5%)
Mutual labels:  repl
retro12
This repo is retired. See http://forthworks.com:8000/
Stars: ✭ 18 (-55%)
Mutual labels:  repl
rethinkdb.nim
RethinkDB driver for Nim
Stars: ✭ 35 (-12.5%)
Mutual labels:  repl
jsxt
The collection of Javascript / JScript / VBScript extensions, tools and more
Stars: ✭ 23 (-42.5%)
Mutual labels:  repl
uptime-bot
A Discord uptime bot which keeps repl.it links up forever!!
Stars: ✭ 14 (-65%)
Mutual labels:  repl
dockerfiles
Dockerfiles for Common Lisp programming
Stars: ✭ 30 (-25%)
Mutual labels:  roswell
re-mote
Re-mote operations using SSH and Re-gent
Stars: ✭ 61 (+52.5%)
Mutual labels:  repl
cl-slug
Small library to make slugs, mainly for URIs, from english and beyond.
Stars: ✭ 22 (-45%)
Mutual labels:  roswell
minicpp
A REPL-style development environment for small C++ snippets
Stars: ✭ 46 (+15%)
Mutual labels:  repl
InteractiveCodeSearch.jl
Interactively search Julia code from terminal
Stars: ✭ 74 (+85%)
Mutual labels:  repl
sbcli
A REPL for my SBCL needs
Stars: ✭ 68 (+70%)
Mutual labels:  repl
CircuitPython-online-IDE
CircuitPython online IDE
Stars: ✭ 15 (-62.5%)
Mutual labels:  repl
cuic
Clojure UI testing with Chrome
Stars: ✭ 23 (-42.5%)
Mutual labels:  repl
solid-playground
Quickly discover what the solid compiler will generate from your JSX template
Stars: ✭ 45 (+12.5%)
Mutual labels:  repl
slyblime
Interactive Lisp IDE with REPL, Inspector, Debugger and more for Sublime Text 4.
Stars: ✭ 35 (-12.5%)
Mutual labels:  repl
go-playground
GNU/Emacs mode that setup local Go playground for code snippets like play.golang.org or even better :)
Stars: ✭ 64 (+60%)
Mutual labels:  repl
lavalink-replit
hosting lavalink on replit has never been easier than before. just click on run then you’re done.
Stars: ✭ 26 (-35%)
Mutual labels:  repl

mondo

This is a simple Common Lisp REPL, just like SLIME REPL that works on terminal. It's not intended to achieve the same behavior, but it aims to provide its functionality outside of Emacs.

Not only evaluating Lisp forms in the REPL, it also relays the communication with a Swank server between different protocol servers over TCP. See Editor Integration for the detail.

Prequisite

Features

  • Basic REPL functions
    • Complete function/macro names
    • Show an argument list
    • Keep input history
  • Run a Lisp implementation by name and version
  • Connect to a running Swank server
  • TCP server to relay between a Swank server and editors
    • Currently, only Vlime (Vim/Neovim) is supported

Installation

Install GNU Readline

For Debian/Ubuntu users, install libreadline-dev via apt:

$ sudo apt install libreadline-dev

For macOS users, install readline via Homebrew:

$ brew install readline

If your Mac works with M1 chip, Homebrew installs under different directory, so the following steps will be additionally required:

$ sudo mkdir -p /usr/local/opt/readline/lib
$ sudo ln -s  /opt/homebrew/opt/readline/lib/* /usr/local/opt/readline/lib

Install Roswell

See Roswell's installation guide.

Install mondo

$ ros install fukamachi/mondo

Be sure that ~/.roswell/bin is added to PATH.

Usage

$ mondo --help
Usage: mondo [OPTIONS...] [DIRECTORY]

OPTIONS:
    -L, --lisp [NAME]
        Run the specific Lisp implementation (Default: sbcl-bin)
    -S, --source-registry [SOURCE REGISTRY]
        Overwrite source registry of ASDF with the argument
    -Q, --quicklisp [QUICKLISP HOME]
        Use the different Quicklisp home from the default one.
        Would be useful when using Qlot.
    -h, --host [NAME]
        Hostname of the running Swank server to connect to
    -p, --port [PORT]
        Port of the running Swank server to connect to
    --server [TYPE]
        Start a server to communicate with external tools such as editors
    --no-color
        Disable colors
    --version
        Print version
    --help
        Print this message
    --debug
        Print debug logs

ARGUMENTS:
    DIRECTORY
        Optional. If specified, REPL will be started assuming that directory is the project root.
        The directory path is added to ASDF source registry, and use its local Quicklisp if exists.
        ex) `mondo .` is approximately equivalent to `mondo -S . -Q ./.qlot`.

Quickstart

The simplest use case is to use REPL in Terminal.

$ mondo
SBCL 2.1.7 running at 127.0.0.1:50476 (pid=484434)
CL-USER>

If a directory path is given, REPL will be started assuming that directory is the project root.

$ cd /path/to/project
$ mondo .
SBCL 2.1.7 running at 127.0.0.1:50006 (pid=484668)
Project root: /path/to/project/
CL-USER>

ASDF systems in the directory are implicitly accessible by ASDF and Quicklisp. If .qlot/ directory exists, mondo loads the project-local Quicklisp dist.

Editor Integration

Mondo allows editors that can't accept Swank protocol to take advantage of Swank's powerful features through mondo.

Picture how mondo relays messages between an editor and a Swank server

Vlime (Vim/Neovim)

Run mondo in Vlime server mode to communicate with Vlime.

$ mondo --server vlime
Server created: (#(127 0 0 1) 50550)
SBCL 2.1.7 running at 127.0.0.1:50006 (pid=485312)
CL-USER>

When you see the REPL running, invoke <LocalLeader>cc on Vim/Neovim, and connect to the indicated port number (50550 in this case).

A more sophisticated way to do this is to set up the following configurations, run an editor, and then run <LocalLeader>rr.

nnoremap <silent> <LocalLeader>rr :call VlimeStart()<CR>
let g:vlime_cl_impl = "mondo"
let g:vlime_cl_use_terminal = v:true

function! VlimeBuildServerCommandFor_mondo(vlime_loader, vlime_eval)
    return ["mondo", "--server", "vlime"]
endfunction

function! VlimeStart()
    call vlime#server#New(v:true, get(g:, "vlime_cl_use_terminal", v:false))
endfunction

Other

Input history

Input history is stored under ~/.mondo/history (or $XDG_DATA_HOME/mondo/history if it's set).

License

GNU General Public License v3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].