Re: [dev] [announce] mle: a small terminal-based text editor

From: <as_AT_php.net>
Date: Wed, 29 Mar 2017 15:57:56 -0400

> The idea of having php installed just to have my editor working terrifies me
> (or a mandatory dependency of any language interpreter for that matter). I
> liked the idea of vis in its early stage until it went the "lua" way.

No need for php at runtime or even build-time. It's used only for
codegen and the artifact is included in the repo.

> The termbox requires python for compilation. So to get this editor working one
> does need a gorilla holding a banana and entire jungle. :)
> It definitely has more then 1 external deps (eg. php, pcre). Not sure why
> dep[1-2] are not considered external? You need to build/install them
> separately, don't you?

It's true there are actually 4 deps (pcre, uthash, mlbuf, termbox).
However, if building from the repo, the end-user only needs to satisfy
the pcre requirement. The rest of the deps are included, and a single
`make` at the top level builds everything. As you point out,
unfortunately python (waf) is required to build termbox. I went with
termbox over ncurses as I vastly prefer its api, and the library
itself is cleaner. I'll see if the maintainer will merge a plain
Makefile.

Adam


On Wed, Mar 29, 2017 at 3:22 PM, Snobb <snobb_AT_gmx.com> wrote:
> The idea of having php installed just to have my editor working terrifies me
> (or a mandatory dependency of any language interpreter for that matter). I
> liked the idea of vis in its early stage until it went the "lua" way.
>
> The termbox requires python for compilation. So to get this editor working one
> does need a gorilla holding a banana and entire jungle. :)
>
> I agree with others here that syntax highlighting is mostly useless, even
> though I like tinting comments in my editor.
>
> On 29/03/17 09:57P, as_AT_php.net wrote:
>> Hello,
>>
>> I am announcing mle, a small terminal-based text editor written in C:
>>
>> https://github.com/adsr/mle
>>
>> mle weighs in at ~10k sloc, has 1 external dep[0], is configurable,
>
> It definitely has more then 1 external deps (eg. php, pcre). Not sure why
> dep[1-2] are not considered external? You need to build/install them
> separately, don't you?
>
>> extensible / scriptable, and fast. The default setup is nano- or
>> emacs-like, but it supports modes as well. I've used it daily for 2+
>> years. You can view some demos here: http://imgur.com/a/ZBmmQ
>>
>> ### Aims
>>
>> * Keep codebase small
>> * Require minimal dependencies
>> * Make extensibile and configurable
>> * Favor simplicity over portability
>> * Use shell commands to enhance functionality (e.g., grep, tree)
>> * Enjoy writing C
>> * Annoy the world with another text editor
>>
>> ### Features
>>
>> * Small codebase (~10k sloc)
>> * Only 1 out-of-repo dependency (pcre)
>> * Full UTF-8 support
>> * Syntax highlighting (via pcre)
>> * Stackable key maps (modes)
>> * Extensible via any program capable of stdio
>> * Scriptable rc file
>> * Built-in text editing language (lel)
>> * Key macros
>> * Multiple splittable windows
>> * Regex search and replace (with capture groups)
>> * Large file support (beats vim in this benchmark
>> http://i.imgur.com/VGGMmGg.gif)
>> * Incremental search
>> * Linear undo and redo
>> * Multiple cursors
>> * Headless mode
>> * Movement via less
>> * Fuzzy file search via fzf
>> * File browsing via tree
>> * File grep via grep
>> * Decently portable (tested on Linux, cygwin, macOS)
>>
>> ### Notes
>>
>> * There is a TODO list here[1].
>> * The editor back-end, mlbuf[2], is a standalone library which can be
>> repurposed.
>> * mlbuf's main data structure is a linked list of C strings, similar to nano.
>> * The built-in editing language, lel, is an experiment. I question
>> whether it belongs.
>> * There is a fork of mle called eon[3] which adds mouse support, Lua
>> plugins, and notepad-like defaults.
>>
>> As always, patches and feedback are welcome.
>>
>> Thanks,
>> Adam
>>
>> [0] pcre; termbox and uthash are included in-repo
>> [1] https://github.com/adsr/mle/blob/1e9a467/mle.h#L637
>> [2] https://github.com/adsr/mlbuf
>> [3] https://github.com/tomas/eon
>>
Received on Wed Mar 29 2017 - 21:57:56 CEST

This archive was generated by hypermail 2.3.0 : Wed Mar 29 2017 - 22:00:20 CEST