8 ms·
FemtoEmacs: Tiny Emacs clone with configuration in FemtoLisp
- jjnoakes 10y agoI've been using JED [0] (programmed in S-Lang [1]) for over a decade. It's my go-to editor if I'm at a terminal on some remote machine. I build it (it's pretty portable) if I need it, and I get (either out of the box or because I configured it) all of the emacs keybindings that I can't live without. I don't use many advanced emacs features; this only covers basic editing (moving around, cutting and yanking, and macros) but it's the smallest subset I need to be productive. I should look into this. I wonder how it compares. [0]: http://www.jedsoft.org/jed/ http://www.jedsoft.org/jed/ [1]: http://www.jedsoft.org/slang/ http://www.jedsoft.org/slang/
- snaky 10y ago> if I'm at a terminal on some remote machine Why not run Emacs on local machine with plink-ssh to remote?
- jjnoakes 10y agoI really dislike editing files remotely. I'm usually dropping into the shell to run commands, change my directory, and I work much better if I can pop up a terminal where I am, quickly edit a few things, and exit. It's just my preferred workflow.
- RBerenguel 10y agoIn my experience as a hardcore emacs user (10 years already of using it daily for almost everything) learning to use vim (evil in emacs for the past 3 years) has made me use the command line differently for small edits. Before it was nano, or remote emacs, now I can handle basic vim just fine to do the quick edits I may need on a remote machine
- zeveb 10y ago> I'm usually dropping into the shell to run commands, change my directory TRAMP enables this pretty well …
- satbyy 10y agoMy favourite Emacs clone is mg [1] from OpenBSD, but packages exist for Linux as well. I've cross-compiled it to many ARM embedded systems. Earlier, I used to use Zile, but they moved to Lua which made cross-compiling harder (so gcc / binutils are no longer enough). [1]: http://homepage.boetes.org/software/mg/ http://homepage.boetes.org/software/mg/
- jpfr 10y agoLua has great support for cross-compiling. It is written in the subset of features available in both (ANSI and more recent) C and C++. https://www.lua.org/manual/5.2/manual.html https://www.lua.org/manual/5.2/manual.html
- satbyy 10y agoNot denying that. Lua by itself is easy. The thing is, to compile Zile, you need to first x-compile Lua, then x-compile luarocks, install the necessary Lua packages, then continue with x-compiling zile. Comparatively, I've found that x-compiling vanilla emacs `--without-x` is often more easier and faster. X-compiling Mg is more or less "gcc *.c" which is very straight-forward.
- mauro3 10y agoAside: femtolisp is used in the Julia parser, and was created by one of (or the) main Julia contributors. A femtolisp REPL is included in the Julia executable: >> julia --lisp ; _ ; |_ _ _ |_ _ | . _ _ ; | (-||||_(_)|__|_)|_) ;-------------------|---------------------------------------------------------- > (+ 1 2) 3 >
- dschiptsov 10y agoFor an editor a dialect of Lisp with proper module-based multiple namespaces (a-la Python) is a much better choice. It is also nice to have a CL package, which makes porting of relatively easy. And FemtoLisp is a beautiful thing, of course.
- cm3 10y agoMaybe this can be the basis for what guile-emacs has promised but not yet delivered. If this gets elisp support, it could turn into a viable replacement.
- karma_vaccum123 10y agoThe biggest issue with guile-emacs seems to be that the community doesn't seem particularly interested in it. As a daily almost-everything-in-emacs user, I definitely understand the shortcomings of elisp, but generally speaking it does the job. Yeah guile would be an improvement, but I'm not sure it is worth rocking the boat. It doesn't seem that the idea that elisp needs replacing has that much currency.
- cm3 10y agoI meant replacing the VM, not the Lisp dialect. The value of Emacs is the elisp code available and the platforms it runs on. I don't think there are many users who like the underlying Lisp implementation's runtime behavior.
- keenerd 10y agoIt would be nice if the releases were tagged in git. And if it could check /usr/share for the init stuff instead of $HOME.
- qwertyuiop924 10y agoFemtolisp looks interesting, although the weak documentation makes it hard to know. It it has no lexical scoping, no TCO, and no hygenic macros (I don't care if it's lowlevel or highlevel (er-macro-expander, or syntax-rules), or even if it's fexprs like Kernel, but it has to be hygenic), I tend to dismiss it out of hand, unless it has some really cool feature that means it can't, or is otherwise interesting (newlisp, picolisp). But femtolisp has most of that, so my only concerns are lack of hygene (which is a big concern in a lisp-1), and taking too much of the large and unweildly r6rs. But that would be hard, given the size.
- emidln 10y agoWhy does lack of hygenic macros matter? You can go from basic macros to Clojure's syntax-quote (quasiquote with auto gensyms for certain reader-defined forms) in 100 lines of code[1]. I've listed a few other implementations of the clojure-style of quasiquote plus auto-gensym, but there are a ton of them floating around the web for almost every lisp you can think of. [1] As a clojure library - https://github.com/brandonbloom/backtick/blob/master/src/backtick.clj https://github.com/brandonbloom/backtick/blob/master/src/bac... (although you have to rewrite lines 51-56 to use explicit gensyms in a let instead of using the internal syntax-quote so that it bootstraps cleanly). [2] Using the alternate Clojure reader - https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader.clj https://github.com/clojure/tools.reader/blob/master/src/main... [3] Using Hylang - https://github.com/hylang/hy/blob/master/hy/core/macros.hy#L200 https://github.com/hylang/hy/blob/master/hy/core/macros.hy#L...
- qwertyuiop924 10y agoThe problem isn't having to make sure that you've gensymed everything. I said I'd be okay with er-macro-transformer, from scheme, which has the same problems, albeit with proper hygene and with rename instead of gensym, which is nicer (and indeed, in CHICKEN we have ir-macro-transformer, which is like syntax-quote, but better, because it operates on the generated output instead of on the input). The problem is gensym itself. Most people think that the only axis macro systems rest on is hygenic vs non-hygenic: Hygenic |Non-hygenic syntax-rules|defmacro and gensym This actually isn't true. Macro systems rest on two axies: Hygenic vs Non-Hygenic, and Lowlevel vs Highlevel: Hygenic Lowlevel |Non-hygenic Lowlevel er-macro-transformer|defmacro and gensym ir-macro-transformer| sc-macro-transformer| --------------------+---------------------- Hygenic highlevel |Non-hygenic highlevel syntax-rules |??? Highlevel macros use declarative pattern-matching. Lowlevel macros are imperative. Hygenic macros guarantee that there will be no name-clashes in a rename. Depending on your language, gensym may or may not do this, but usually does. However, hygenic macros also guarantee that all renamed expressions take on the value they have at in the environment within which the expansion occurs. Gensym does not, and never will, do this. This is acceptable in a Lisp-2 with packages (barely), but in a Lisp-1 of any sort, there is an extreme risk of function shadowing, and other nasty bugs (see http://community.schemewiki.org/?hygiene-versus-gensym http://community.schemewiki.org/?hygiene-versus-gensym for details). Hopefully, this explains why I insist on hygenic macros, and why I think PG really screwed up by not adding hygenic lowlevel macros to arc.
- cm3 10y agoAs an answer to sibling comments: if your Emacs clone doesn't support elisp, then it's not a replacement because the elisp code out there is the #1 selling point of Emacs. And much of that elisp code exists because the editor is a flexible core with stuff exposed to elisp and all kinds of crazy stuff built on top of it.
- klibertp 10y agoSome numbers: there are ~120kloc of Elisp in Emacs proper. I have nearly 500kloc of Elisp in my `.emacs.d`. Granted, some of it are reimplementations and wrappers around what is in the core, and some are plugins I downloaded, tried out and forgot to delete, but still, that's a huge amount of code. That's 136 man-years, according to sloccount: Total Physical Source Lines of Code (SLOC) = 499,088 Development Effort Estimate, Person-Years (Person-Months) = 136.18 (1,634.17) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 3.47 (41.59) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 39.29 Total Estimated Cost to Develop = $ 18,396,178 (average salary = $56,286/year, overhead = 2.40). SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
- coldtea 10y ago>As an answer to sibling comments: if your Emacs clone doesn't support elisp, then it's not a replacement because the elisp code out there is the #1 selling point of Emacs. For some. For others a clone that does 20% of what Emacs does and has a few nice plugins could be enough.