Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Emacs standing alone on a Linux Kernel (informatimago.com)
60 points by mlLK on Nov 30, 2009 | hide | past | favorite | 14 comments


"Emace: A pretty good operating system, but it could use a better text editor."

I can't trace the source of this quip but I'm glad someone has set out to prove the first part of it...


You can't trace it because everyone on the internet has said it at least once.


Isn't it possible to do that with any program with no external dependencies?


Yes, it is. I've had embedded systems boot straight into busybox like shells for example. Even more fun, the system didn't have a BIOS at all (it was hard wired to just jump into a location in flash, were we placed the Linux second stage boot loader to uncompress the kernel image to RAM, which then executed the shell immediately. Even the shell was really mostly there to aid debugging - in production use it'd immediately spawn the main app for the system.

As long as the kernel has whatever drivers you need compiled in instead of as modules, and as long as your app either doesn't directly or indirectly spawn lots of child processes or if it does it takes care of wait()'ing for them, and as long as you don't need any getty's (without spawning them yourself) there's no problems tearing out everything and replacing it with a self contained static app.


I saw it done with Squeak. IIRC.

With a rotated monitor, it would pretty much pass for an Alto 2002 ;-)


There is actually a easier way to do this. Pass this parameter while in your boot loader

    init=/usr/bin/emacs-nox
This will fire up emacs instead of init once the kernel is done booting up. You also need mount, but you can run that within emacs.


Who would have known... it really is an OS.


Lots of Lispers and Smalltalkers would roll their eyes at this. (Some CS research history: Both those languages were OS.)


Single threaded OS?


M-x shell or M-!


You could use vim as init as well, it just wouldn't be as much fun, since you couldn't do any programming.


Actually, vim has a programming language built in to it: vimscript. So you could certainly program from it.

And that's not to mention the various other programming language interfaces vim has. If you've compiled vim with the right options, you could use Perl, Python, Ruby, or Lua from within vim.


Sounds about perfect for netbookin'.


except you'd have a devil of a time dealing with wireless networks




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: