Skip to content

Instantly share code, notes, and snippets.

@michaeljklein
Last active November 22, 2017 20:02
Show Gist options
  • Save michaeljklein/7bb7767c36ffc54c24409bd2fa682a3a to your computer and use it in GitHub Desktop.
Save michaeljklein/7bb7767c36ffc54c24409bd2fa682a3a to your computer and use it in GitHub Desktop.

Quotes from: https://blog.fugue.co/2015-11-11-guide-to-emacs.html

Flock is not Emacs

A CEO's Guide to Emacs

This is an impromptu response to A CEO's Guide to Emacs.

Flock vs. Emacs

Flock is (theoretically) proven to be compatible with Emacs.

Size

Flock's core is much smaller than Emacs, it's microscopic in comparison.

  • This allows it to be much faster and more embeddable than all of "Emacs"
  • Flock's goal is much "cheaper" than Emacs': it doesn't have an implementation as an application

I hope that, eventually, there will be a complete embedding of Flock in Emacs.

Experiments I've done show it's theoretically very compatible (on a foundational level), but there's no implementation.

Box analogy

If Emacs is a box for code, then Flock:

  • Describes properties and symmetries of that box
  • Can be embedded as a box inside the "Emacs-box"

Flock is a language, a pattern of organizing code. Emacs is a family of text editor applications.

Lasting Advantages

The long-term advantages that come with using Emacs just make life easier.
The net gain makes the initial lift entirely worthwhile. 

That's one of the goals for Flock: an initial implementation should provide sufficient "important" solutions to lead to long-term advantages.

What kind of long-term advantages?

Since Flock is a highly organized language, many of its long-term benefits revolve around ease of organization.

No More Context Switching

Many applications can be full screened all day and used to edit text.
Emacs is singular because it is both an editor and a Lisp interpreter.
In essence, you have a Turing complete machine a keystroke or two away at all times,
while you go about your business.

If you know a little or a lot about programming,
you'll recognize that this means you can do anything in Emacs.

Flock is singular because it is both:

  • A language of expression and a language of impressions
  • A language with a high-level type-system and a bootstrapped-by-definition language

Considering the Flock language "space", many of the subspaces (sublanguages) appear to be or are simply proven to be Turing complete. This means you're rarely far from undecidable problems.

Flock's answer is architectural: it implicitly provides an interlocking system of lightweight, functional expressions, which may be used to translate solutions to and from Flock.

Taking Everything with You and Keeping It Forever

The third reason I find Emacs more advantageous than other environments
Is that it's easy to take all your stuff with you.
By this, I mean that, rather than having a plethora of apps interacting and syncing in their own ways,
all you need is one or two directories syncing via Dropbox or the like.
It's dead simple and reliable.
I've found this capability to be so useful that I dread dealing with 
Pages, GDocs, Office, or other kinds of files and applications
That force me back into finding stuff somewhere on the filesystem or in the cloud.
The limiting factor in keeping things forever on a computer is file format.
Assuming that humans have now solved the problem of storage 6 for good,
the issue we face over time is whether we can continue to access
The information we've created.
Text files are the most long-lived format for computing.

Example of Flock code

Here's what Flock's file format may look like:

(Bijection, from very explicit to very implicit)
Bijection := '(f := _) -> '(a := _) -> '(b := _) -> '(n := _ : Nat) -> '(m := _ : Nat) -> '(f : (a :# n) -> (b :# m)) -> '(n = m)
Bijection := '(f) -> '(a) -> '(b) -> '(n : Nat) -> '(m : Nat) -> '(f : (a :# n) -> (b :# m)) -> '(n = m)
Bijection := '(f) -> '(a) -> '(b) -> '(n) -> '(m) -> '(f : (a :# n) -> (b :# m)) -> '(n = m)
Bijection := '(f : (a :# n) -> (b :# m)) -> '(n = m)
Bijection := '(_ : (a :# n) -> (b :# m)) -> '(n = m)
Bijection := '(_ : (_ :# n) -> (_ :# m)) -> '(n = m)
Bijection := '(_ : (_ :# n) -> (_ :# n)) -> '(n = n)
Bijection := '((_ :# n) -> (_ :# n)) -> '(n = n)
Bijection := '((_ :# n) -> (_ :# n))
Bijection := (_ :# n) -> (_ :# n)
Bijection := _ :# n -> _ :# n

Note some details:

  • Compatible "at a glance" with most fonts/encodings
  • Very capable of being verbose
  • Very capable of being concise: Bijection := _ :# n -> _ :# n
  • "Small" changes between levels of verbosity

Compatibility

Flock is designed to be compatible with a huge variety of text formats, styles, encodings, etc.

How?

One of my first inspirations for Flock was about 6 years ago. Since then, I've encountered a lot of ways that people use text.

I've tried to pick out the important parts of the structure of the text I work with (mostly code) and distill it into modular pieces.

You easily can open a text file from 1970 in Emacs.
That�s not so true for Office applications.
Text files are also nice and small�radically smaller than Office application data files.

I've done some work with Office formats: patching Pandoc for Authorea. It was nice that Pandoc is written in Haskell, and that the changes I needed to make were well-defined, because formats like .docx are so complex.

Since they're so complex, it's much harder to maintain files in that format.

We're all susceptible to bit rot. Sometimes we don't care and sometimes bit rot in critical infrastructure can "strongly encourage" us to care.

As a digital pack rat and as someone who makes lots of little notes as things pop into my head, 
having a simple, light, permanent collection of stuff that is always available is important to me.

Same here. Flock was partially born out of my desire to express a lot of the ways I like to reorganize.

The core is small because I have trouble managing huge collections of code.

If you�re feeling ready to give Emacs a try, read on! 
The sections that follow don�t take the place of a full tutorial, but will have you operational by the time you finish reading.

I really enjoyed this article, but I'm still figuring out where Emacs fits in.

Thanks to Josha Stella for writing this up! @joshstella

Learn more

If you're interested to learn more about Flock, here are some of my other writings:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment