Giter Club home page Giter Club logo

xrepl's Introduction

xrepl

Build Status LFE Versions Erlang Versions Tags

Project Logo

An experimental, general purpose LFE REPL

Table of Contents

About

This project has a long history of not coming into being, despite there being a need for it in the LFE community from fairly early in the language's history. The initial impetus and all subsquent community feature requests have been 100% inspired by what the larger Clojure community has in the nREPL project.

The xrepl project has as its primary mission:

To explore strange new LFE REPL use cases, to seek out new REPL features and new interactive development possibilities, to boldly go where LFE-proper hasn't gone. Yet.

Anything good that comes out of this project that may be even remotely useful to LFE itself will result in a ticket and/or a PR against the LFE repository for Robert's reading pleasure and discretionary approval.

Dev Process

HIC SVNT DRACONES

This project is a work in progress -- very early stages!

There's a lot of work to be done, here -- the bits that have been written down are organised by milestone, here:

Specific tickets can be view by clicking on the milestone in question in that link. Keep an eye out for "epic" tickets, as those will provide the most context for the work being done in any given milestone.

If the above notes haven't scared you off and you would like to play (or even contribute), you can run the latest xrepl code using rebar3_lfe by doing the following:

  1. git clone [email protected]:lfe/xrepl.git
  2. cd xrepl
  3. mkdir _checkouts && cd _checkouts
  4. git clone [email protected]:lfe/rebar3.git
  5. cd rebar3 && git checkout release/0.5.x
  6. cd ../../../

At this point, you should be:

  1. Back in the xrepl project directory
  2. Have a local copy of the latest rebar3 branch
  3. Be using said branch when you execute rebar3 lfe ... commands

Tests

$ rebar3 as test lfe ltest

Usage

Assuming you've following the above steps, start up xrepl with the following:

$ rebar3 lfe xrepl

License

Apache License, Version 2.0

Copyright © 2024, The LFE Community <http://lfe.io>.

xrepl's People

Contributors

oubiwann avatar rvirding avatar

Stargazers

 avatar  avatar Olav Fosse avatar Michał Zielonka avatar Colin Woodbury avatar Leif Eric Fredheim avatar

Watchers

 avatar  avatar

xrepl's Issues

Unify configuration and options

Requested features:

  • Support dynamically setting the prompt
  • Fully expose xrepl configuration to end users / developers

Tasks:

  • TBD

Nice exit messages

Since almost (totally?) its very beginnings, LFE has made continuous references to HHGG, 42, etc. I think if would be fantastic if we did our own version of what Clojure does, but along our own HHGG theme ;-)

Clojure:

user=> (quit)
Bye for now!

xrepl:

lfe> (quit)
So long, and thanks for all the fish!

Review latest LFE shell source

The task here is to review the current LFE shell code (in lfe_shell.erl) and identify all the functions that we would like to use when creating the xrepl. It looks like most of these are currently private, so we'll chat with Robert and open a PR to see if he's open to this, once we have the complete list together.

Set up skeleton project

Subasks:

  • Add README, complete with vision statement for lfe/xrepl
    • aims/goals
    • how it will take advantage of LFE's REPL/shell
    • how innovations in xrepl will be fed back into LFE proper
  • Add OTP/gen_server skeleton project
  • Add CI/CD pipeline

Implement transports

Features:

  • Create abstraction for xrepl transport
  • Support ETF communications between nodes (secure environment)
  • Support SSH access
  • Support SSH commands
  • Support HTTPS access via REST API w/session support
  • Support TTY access
  • Support the nREPL protocol

Explore possible designs for (optional) tight integration with LFE modules

Use-case illuminating comments from John Goff on the LFE Discord:

Yeah, to be honest it feels limiting to be able to define functions in the repl but not overwrite functions defined in a file. The syntax of Elixir's defmodule makes this comparatively easy, since there's no "switching namespaces", you just type in a block and when that block's end is reached, we're back in the shell. But since LFE follows Erlang in that you're limited to one module per file, the syntax in LFE wasn't really made with this in mind.

The idea that I had was if this is possible, then you can connect your editor to your running system, and you can just send the entire buffer to the repl when you've made changes in the buffer that you want to appear in the live system.

I definitely think that LFE should provide some way of reloading a module via the repl, whether that's a part of xrepl or lfe itself I'm not sure.

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.