Giter VIP home page Giter VIP logo

litable's Introduction

litable Paypal logo Patreon

On-the-fly evaluation of emacs lisp. Inspired by Light Table.

To start this up, simply enable the litable minor mode in the buffer by calling M-x litable-mode.

Litable keeps a list of pure functions as a safeguard for unwanted evaluations. A function must first be accepted into this list (using M-x litable-accept-as-pure) before it can be evaluated on-the-fly. You should take care of what function you accept as pure to avoid any unfortunate accidents. Also, note that the pure functions list persists across sessions.

Not meant to be used in production yet, be warned!

Demos

screenshot

There's also a screencast available: https://www.youtube.com/watch?v=mNO-vgq3Avg [1:50]

Contribute

  • If you feel like contributing, there are TODO annotations in the code. Mostly basic/trivial stuff, good exercise for people starting with elisp.
  • If you have more substantial ideas, start an issue so we can discuss it. I'm open to all ideas, this is simply a precaution for people to not work on the same feature.
  • If you want, you can throw a couple bucks my way or support me on Patreon (we have a long way to beat that $300k goal people!).

litable's People

Contributors

alvinfrancis avatar filsinger avatar fuco1 avatar magnars avatar malabarba avatar moyamo avatar nicferrier avatar ptrv avatar wilfred avatar youngfrog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

litable's Issues

Is this project still active?

I was impressed by your video's. I would like to donate.

Is there a goal and a roadmap? And I noticed the last activity was more than a year ago. So it makes me to wonder if this project is still active.

Thanks in advance for your reply.

Give this project better name

Ideas for better name welcome :)

Some objections:

  • the idea wasn't invented @ light table, so we shouldn't give credit
  • it's too much marketing
  • it's too little marketing

Interactively remove function from pure functions list

Hi,

I'm aware this project isn't really active anymore but it happens I've been using it here and there and I've been missing an interactive way to remove functions from litable-pure-functions-list and litable-list.el.

Here's a basic proposal using completing-read that I've been using:

(defun litable-remove-from-pure-list ()
    "Remove a function from the pure functions list."
    (interactive)
    (if (null litable-pure-functions-list)
        (message "No function trusted to be pure.")
      (let ((symbol
             (completing-read "Pure function: "
                              litable-pure-functions-list
                              nil t)))
        (setq litable-pure-functions-list
              (delq (intern symbol) litable-pure-functions-list))
        (litable--save-lists))))

Ideally, it could also be made to match the function at point and set it as initial input but I haven't looked into that.

What do you think?

Safeguard system

The readme mentions the possibility of a safeguard system.

Is that underway? I wouldn't mind lending a hand with that.

An initial (simple) implementation could check all functions about to be evaluated against a list of "known pure" functions, and quit evaluation if one is not there.

Isn't recording new functions; shows "Unsafe function"

I seem unable to do much with litable beyond calculating expressions with arithmetic operators. It doesn't seem to be adding any of the functions as I define them, and shows the "Unsafe function" alert whenever I type "defun", or relational operators like < or =, although boolean operators seem to work fine. (I didn't try others.) I'm generally not able to duplicate any of the stuff I've seen in the videos. Any idea what I could be doing wrong?

Error when launching M-x litable-mode

Debugger entered--Lisp error: (invalid-function (value (symbol-value list-symbol)))
(value (symbol-value list-symbol))()
litable--dump-list(litable-pure-functions-list)
litable--save-lists()
byte-code("\301...)
autoload-do-load((autoload "litable" "Toggle litable-mode\n\n(fn &optional ARG)" t nil) litable-mode)
#[1025 "\306...)
funcall(#[1025 "\306...)
(with-no-warnings (funcall ad--addoit-function cmd record-flag keys special))
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function cmd record-flag keys special)))
(let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function cmd record-flag keys special))) (when (fancy-narrow-active-p) (fancy-narrow--motion-function)) ad-return-value)
ad-Advice-command-execute(#[1025 "\306...)
apply(ad-Advice-command-execute #[1025 "\306...)
command-execute(litable-mode record)

Any idea what's going wrong?

Best regards

Correct placement of result string

Now litable places the result string at the end of the line where you are editing.

However, it evaluates the entire form at point. Oftentimes this means that the result string points out from some part of the form innards, instead of at the actual form end paren.

I'm hoping to use litable in my talk in a few weeks, and I would like to forestall any confusion from this.

If you could point me to the correct place to fix this, I would be happy to contribute. Or if you know just what to do, I'd be happy to sit back and enjoy the show. :)

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.