
FemtoEmacs: Tiny Emacs clone with configuration in FemtoLisp - cm3
https://github.com/FemtoEmacs/Femto-Emacs/
======
mauro3
Aside: 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
      
      >

------
cm3
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. 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
Some 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

------
satbyy
My 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
Lua 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
Not 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.

------
jjnoakes
I'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
> if I'm at a terminal on some remote machine

Why not run Emacs on local machine with plink-ssh to remote?

~~~
jjnoakes
I 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
In 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

------
qwertyuiop924
Femtolisp 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.

~~~
samatman
According to the readme[0], femtolisp has both TCO and lexical scope.

[0]:
[https://github.com/JeffBezanson/femtolisp](https://github.com/JeffBezanson/femtolisp)

~~~
qwertyuiop924
Well, yes. That's why it was even in the running to begin with.

~~~
samatman
Ah. Your sentence should have read " _If_ it has..." and reads "It it has.."
leading me down the wrong garden path[0].

[0]:
[https://en.wikipedia.org/wiki/Garden_path_sentence](https://en.wikipedia.org/wiki/Garden_path_sentence)

~~~
qwertyuiop924
Yeah. I mostly do HN on my phone, which makes it hard to catch these sorts of
errors, although I do my best.

------
dschiptsov
For 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
Maybe 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
The 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
I 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
It would be nice if the releases were tagged in git. And if it could check
/usr/share for the init stuff instead of $HOME.

