emacs/var/elfeed/db/data/32/324cf7253b8bcfdd52fc89928d1c66f111d9a56b
2022-01-03 12:49:32 -06:00

75 lines
7.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="By Pedro Delfino" />
<title>How can I make Emacs my web browser?</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header>
<h1 class="title">How can I make Emacs my web browser?</h1>
<p class="author">By Pedro Delfino</p>
</header>
<h1 id="the-original-idea">The original idea</h1>
<p>In the beginning of 2017, Nyxt was founded. By then, the project (initially named nEXT (from <em>n</em> Extensions)) was born from a pain: the impossibility of having a good Emacs experience while using the Internet.</p>
<p>Nyxt was forged as an answer to this problem. As a consequence, Nyxt shares multiple similarities with Emacs. Moreover, beyond the initial idea, Nyxt has always been built by programmers using Emacs as their main text editors. Naturally, this creates an unconscious influence on how a person sees the (computing) world which endorses Emacs weight on Nyxt's code and design.</p>
<p>I am not a founder of Nyxt. When I was introduced to the project, I only had had brief exposure to Lisp- more specifically- to Racket. I also had had a brief exposure to Emacs (trying it for less than an hour, and seeing other people using it). But, it was too light, as any Emacs experienced user would point out.</p>
<p>When I started working on Nyxt, Emacs became my main tool. It was funny to realize the similarities between the two. Sometimes, I would see a feature in Emacs and, then, something similar in Nyxt. Other times, the opposite happened. The first time I saw a Helm buffer, I thought <em>Oh, that looks similar to Nyxt's prompt-buffer</em>. Which is chronologically incorrect :)</p>
<p>If I could go back in time, as a newcomer, it would have been awesome to read an article pointing out the similarities between the two projects. This could be a good read for newcomers to either Nyxt and/or the Emacs universe. So, let's do it!</p>
<blockquote>
<p><img src="../static/image/article/michelangelo-creation-of-adam.jpg" /></p>
<p>The Creation of Adam, Michelangelo - 1512</p>
</blockquote>
<h2 id="ethos">Ethos</h2>
<p>Let's begin with philosophy: both projects take a stance in the free and open-source movement. Licenses are just part of the equation. A community driven by tinkering and hackability is what makes freedom real, and contributions so rich.</p>
<p>Also, Nyxt and Emacs take a different approach than Unix. Instead of doing one thing and doing it well, Nyxt and Emacs share a core foundation built upon extensibility. They are designed to be introspected, changed, and hacked on the fly.</p>
<h2 id="user-experience-and-vocabulary">User Experience and Vocabulary</h2>
<p>The User Experience of Nyxt and Emacs is similar in many ways. Even the vocabulary is suchlike - including the oddness. Thus, users are presented with uncommon words such as buffers. Secondly, even though the user can use the mouse, both of them are keyboard-driven desktop applications.</p>
<p>Furthermore, it must be highlighted the likeness of their interfaces. In both cases, there is a message-area, a status area, and a main focus on the screen (the buffer). In Emacs parlance, that is the mini-buffer, the mode-line, and the buffer, respectively.</p>
<p>With regard to the User Interface's components, Nyxt's prompt-buffer deserves special attention due to its resemblance to popular Emacs' packages such as Helm, and Ivy. They are optional packages, but their popularity makes choosing one of them almost mandatory.</p>
<h2 id="value-proposition">Value proposition</h2>
<p>What is Emacs proud to offer? According to the GNU Emacs manual:</p>
<blockquote>
<p>Emacs is the extensible, customizable, self-documenting, real-time display editor.</p>
</blockquote>
<p>Well, ditto for Nyxt. The official web page presents the following definition:</p>
<blockquote>
<p>Nyxt: the hacker's power-browser.</p>
<p>Out of the box Nyxt ships with tens of features that allow you to quickly analyze, navigate, and extract information from the Internet. Plus, Nyxt is fully hackable - all of its source code can be introspected, modified, and tweaked to your exact specification.</p>
</blockquote>
<p>Note that they do not use <em>an</em> but <em>the</em> as a definite article. You can see the ambition here :D</p>
<p>Both programs are made as tools for tinkerers. This is the main reason people will probably love (or hate) them.</p>
<p>A concrete point to illustrate this aspect is the fact that their settings are mainly controlled via configuration files written in fully general-purpose programming languages. More specifically, languages from the Lisp family! You simply cannot get more flexible, introspectable, and powerful than that :)</p>
<p>Unlike Nyxt and Emacs, most text editors and browsers only offer buttons and a Graphic User Interface (GUI) for settings definitions. Nyxt and Emacs also offer a point and click interface. But even the best GUI design is incomparable to the power of a <code>.lisp</code> or <code>.elisp</code> file.</p>
<h2 id="architecture">Architecture</h2>
<p>According to the book <em>Mastering Emacs</em> (Peterson, Mickey - 2015), the <strong>buffer</strong> is the data structure of Emacs. All commands act on buffers. And not on an internal data structure as some people might think. The same for Nyxt.</p>
<p>Elisp, in Emacs, and Common Lisp, for Nyxt, also guarantee the introspectability of their objects. Thus, both applications are self-documented and it's possible to change things on the fly.</p>
<p>They are even <em>dynamically</em> self-documented. As you tweak your configuration files, the descriptions of functions and bindings will also be updated.</p>
<h2 id="technically-inclined-people">Technically inclined people</h2>
<p>Programmers are famous for igniting flame wars around which tool is the best. Although the quality debate causes divergence, there is a consensus that Emacs is not an easy tool. The same can be said about Nyxt.</p>
<p>Point and click text editors and web browsers have less steep learning curves. However, from this &quot;problem&quot; arises a positive side-effect: the users tend to be technically inclined - for real. And you can learn a lot by simply being part of this community.</p>
<h2 id="vim-as-a-subset">Vim as a subset</h2>
<p>Another tool frequently used by power users as a text editor is Vim. In order to welcome Vim aficionados, it is possible to have a Vim experience in Emacs with Evil-mode. The same is possible in Nyxt with vi-mode. <em>Evil</em> is a cooler name, though - we must admit.</p>
<p>As you can see, Emacs and Nyxt treat Vim as a subset. And there is no reason to be angry about this affirmative. It is a technical fact :)</p>
<h1 id="the-road-ahead">The road ahead</h1>
<p>As stated by Eric S. Raymond,</p>
<blockquote>
<p>Every good work of software starts by scratching a developers personal itch.</p>
</blockquote>
<p>I'm not sure if Nyxt already qualifies as good work of software, but it definitely started as a developer's personal itch.</p>
<p>Finally, after all this notorious synergy, a question arises: If Nyxt has so many similarities to Emacs and if Emacs has a vibrant ecosystem of extensions and packages, why not build Nyxt as an Emacs package instead of a solo application?</p>
<p>Well, I asked myself that very question a couple of times and the answer to it deserves it's own article. Stay tuned and may the power of Nyxt be with you!</p>
</body>
</html>