
SystemE: A lightweight systemd replacement written in Emacs Lisp - jjwiseman
https://github.com/a-schaefers/systemE
======
spudlyo
I think this is really cool, but calling it a "systemd replacement" feels like
click bait to me.

Systemd manages a huge number of things, and this doesn't even reap zombies,
which all good init programs do. It doesn't support run levels, it doesn't
support "resapwn" (for getty processes) -- hell feature-wise this isn't even a
legit replacement for SysV init.

Having said that, I think this is a neat idea, and it'd be cool to have an
emacs server process as a true pid 1 init, and when you SSH or go to the
virtual terminals you'd get an "emacsclient".

~~~
teknopaul
Saying that something is not a systemd replacement because it does not do x
feature that systemd does misses the point that systemd does too much.
/sbin/init can be simple, and written in any language, and when it is, its
often better than systemd because of that.

If software supports start but not stop or restart or enable disable as both
systemV and systemd do, its still a fully functional systemd replacement if
your context does not need those features

~~~
ailideex
> Saying that something is not a systemd replacement because it does not do x
> feature that systemd does misses the point that systemd does too much.
> /sbin/init can be simple, and written in any language, and when it is, its
> often better than systemd because of that.

If someone tells me something is a systemd replacement I don't take it as them
telling me it is an init system. If it is an init system unrelated to systemd
don't call it a systemd replacement.

------
todd8
Interesting. This runs on KISS Linux.
[https://getkiss.org/](https://getkiss.org/)

Linux has become so versatile and powerful, but I miss the days of simple
OS’s. I used to be a Unix OS architect and would study kernel code
professionally while working on virtual memory systems, distributed file
systems, and so forth. Linux has gotten so big now that I don’t think I’d have
the energy to dive into the kernel code anymore.

The KISS Linux distro looks interesting because of it’s extreme focus on
simplicity.

~~~
qwerty456127
Looks curious, I'd love to try it, I always wanted a system which wouldn't run
anything I don't need (e.g. I never need Avahi or Samba, I don't need a user
manager and would love to startx, I agree to sacrifice boot speed for
simplicity - waiting a minute is ok for a desktop PC to start if you get
something as valuable as understanding your system in exchange). That's a pity
it doesn't have binary packages - building everything I need from source is
going to take too long. I also doubt everything is going to work without the
D-Bus. AFAIK many apps also fail to work with musl, and busybox might not
include all the features of the classic GNU tools I may occasionally need. So
I wish there were a slightly less radically simple Linux distribution.

PS: and I hate sh (as many others probably do), everything-LISP would probably
be more fun.

~~~
sjy
Have you tried Arch? It has binary packages; GNOME, Avahi, Samba and similar
basic but non-essential packages must be explicitly installed; the package
manager is ridiculously fast; and it’s usually easy to install proprietary
blobs and other unsupported stuff using the huge user package repository, if
you’re comfortable with the associated risks.

~~~
vpzom
> systemd

~~~
JdeBP
Hyperbola is an Arch Linux derivative that famously does not have systemd.
There are others.

* [https://hyperbola.info/](https://hyperbola.info/)

~~~
qwerty456127
> A fully free, stable, secure, simple, lightweight and long-term support
> distribution

The first, second and the last attributes make a kind of distributions I am
really (really!) glad they exist but, unfortunately, am hardly going to use
because from the real life perspective this means your hardware is not going
to work, you won't be able to read common file formats and you will be limited
to ancient version of software.

------
m463
So here's this new kid, systemd, mindlessly gobbling os functionality and
annoying the elders with binary log files.

And then the sleeping giants wake, Lisp and Emacs.

62-year old Lisp, based on Lambda calculus from 80-90 years ago, pretty much
pioneered much of computer science.

And 44-year old emacs and 35-year old elisp, they pioneered subsuming.

I mean, there's a church of emacs.

[https://upload.wikimedia.org/wikipedia/commons/b/bf/Richard_...](https://upload.wikimedia.org/wikipedia/commons/b/bf/Richard_Stallman_-
_Preliminares_2013.jpg)

by the way, emacs has already been used as init:

[http://www.informatimago.com/linux/emacs-on-user-mode-
linux....](http://www.informatimago.com/linux/emacs-on-user-mode-linux.html)

~~~
KC8ZKF
What rough beast, its hour come round at last, slouches towards Bethlehem to
be born?

~~~
rusk
Haha thanks :-)

 _Turning and turning in the widening gyre The falcon cannot hear the
falconer; Things fall apart; the centre cannot hold; Mere anarchy is loosed
upon the world,_

[http://www.potw.org/archive/potw351.html](http://www.potw.org/archive/potw351.html)

------
chabad360
As interesting as this is, SystemD replacement seems to be the wrong term, as
it doesn't seem to support SystemD service, target, etc. files.

Maybe a better term might be "Init System"...

~~~
teknopaul
To replace the functionality of something you dont have to read its ugly
config files. :)

E.g. nginx can be used as an apache replacement.

If it read exiting config file typically you would call it a "drop in
replacement".

~~~
chabad360
Considering how ubiquitous SystemD is, I think a drop in replacement might
just be a better idea.

------
gumby
On the old fsf machine* I used Emacs as my login shell (in /etc/passwd), but
this takes it to a whole new level. Outstanding!

* yes there was a time when the fsf’s only computer was a fax 750 (“soon to be running gnu”)

~~~
KC8ZKF
What did rms use? GDB?

~~~
gumby
That's not as weird as it might sound (perhaps you knew this). He used /bin/sh
until bfox wrote bash.

But on ITS, the PDP-10 OS we mostly used until the mid 80s, DDT (the debugger)
_was_ the shell. There were no core dumps for interactive programs; if your
program halted abnormally you were already in the debugger so it was no big
deal. The Lispm, of course, worked this way too although the debugger was more
sophisticated than DDT.

------
kbumsik
I'm curious if it is actually more "lightweight" than Systemd in terms of
memory consumption or CPU load, especially it depends on emacs PID2. Less
lines of code does not always means lightweight.

------
steve1977
When something written in Emacs Lips is the lightweight alternative... we're
living in marvelous times indeed...

~~~
fctorial
I'm waiting for intellij to become a lightweight alternative.

~~~
viraptor
It is... to Eclipse.

~~~
fctorial
How much ram does it eat?

------
themckman
If you’re looking for a service manager written in a lisp, there’s always GNU
Shepherd. Written in and configured with Guile scheme.

------
Koshkin
See also [http://www.informatimago.com/linux/emacs-on-user-mode-
linux....](http://www.informatimago.com/linux/emacs-on-user-mode-linux.html)

------
dredmorbius
Zawinski's Law, updated: All software attemps to expand until it can replace
systemd.

------
idoubtit
I now expect a few features from anything that aims at replacing my init and
service manager. Beyond booting the system, I want to manage daemons:

* ease of use: I don't want to deal with background/foreground processes, storing PID in files and hacks like the old start-stop-daemon.sh.

* reliable services: if it stops, restart it automatically. But stop hammering if it fails repeatedly.

* sandboxing: this service must have no access to the network nor to /home, etc.

This "lightweight replacement" does not have this small subset of features, so
it's more an alternative init than a replacement of systemd.

------
JdeBP
"emacs is a great operating system lacking only a decent text editor", goes
the old joke. It's amusing that people are doing this. I wonder what text
editor M. Schaefers will end up using. (-:

------
bilekas
This is pretty interesting but sketchy..

Also.. Lets be cautious about getting Emacs reapable.. Do we really want to
witness hoard of abominations (nice things too ofc) that would surface! :D

------
Aardwolf
Lightweight, but written in EMACS aka "Eats Memory And CPU Superbly"?

Just kidding, I know EMACS is lightweight for todays standards, at least
compared to electron apps :)

~~~
euske
Now someone has to write an init in Chrome.

~~~
Aardwolf
This comes close to that:
[https://bellard.org/jslinux/](https://bellard.org/jslinux/)

------
whalesalad
Pretty soon you'll be able to set your init process to just be emacs.

------
ngcc_hk
As it is based on kiss, no pi 4 ver I guess?

------
lilyball
This is fascinating, but I just have to ask _why_?

~~~
na85
One could ask the same question about systemd and its ecosystem.

~~~
flatiron
Because it’s way better than what we had before. SystemD doesn’t care to be
portable so it can expose a ton of nice Linux specifics and it centralizes a
ton of stuff that was all over the place previously. I understand people hate
it just consuming functionality one by one as it grows but from an end user
perspective it’s been helpful.

~~~
asveikau
The "not portable" thing is actually such a weird point. Every other non-linux
OS had its own pid 1, none of them identical to the sysvinit package formerly
used by Linux distros. (though some of them quite similar) So I don't think
you could really claim the thing systemd replaces needed to support the BSDs
or anything. Because it did not.

In some cases you might reuse rc.d scripts across multiple OSs... But rc.d
itself was not "a thing" everywhere.

~~~
gmueckl
It is not a weird point because systemd imposes the use of non-standard
interfaces on daemons to be regarded as good citizens of the systemd OS. So
porting daemons that do this to another Unix becomes significantly more than
locating and fixing a few edge cases that are handled differently.

~~~
asveikau
I suppose that's true. I was saying gp's point that portability was a burden
was weird. As if anyone who touched sysvinit was cursing at themselves in fury
because they needed to support BSD (which doesn't use it).

