summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2021-01-23 10:24:51 -0500
committerSacha Chua <sacha@sachachua.com>2021-01-23 10:24:51 -0500
commit3cdab109c119b05bdd7daa5f13f5a8d52c825932 (patch)
tree113778e165899a78c2436f20ac8dbc82a4f08a78
parentf030bf17d1673cc7831fcbae36181c8238c159fe (diff)
downloademacsconf-wiki-3cdab109c119b05bdd7daa5f13f5a8d52c825932.tar.xz
emacsconf-wiki-3cdab109c119b05bdd7daa5f13f5a8d52c825932.zip
Fix transcript
Diffstat (limited to '')
-rw-r--r--2020/info/08.md694
1 files changed, 366 insertions, 328 deletions
diff --git a/2020/info/08.md b/2020/info/08.md
index 0527cee5..5494a68e 100644
--- a/2020/info/08.md
+++ b/2020/info/08.md
@@ -62,331 +62,369 @@ Currently trying it, and also in-process of switching from Nix to Guix.
<a name="transcript"></a>
# Transcript
-00:00:00.399 --> 00:00:36.399
-My name is Corwin Brust and I will be
-talking about getting started with Emacs
-today. I have been an Emacs user for a
-long time. First of all, thanks and a
-huge welcome to the conference from me
-and and on behalf and back to the other
-people that have been helping to
-organize. It's been amazing just to be
-involved with that and just, kind of,
-see backstage.
-
-00:00:36.399 --> 00:01:33.759
-So I've used a lot of different editors
-in my time. That's about 25 years as a
-professional software engineer. And most
-of that time I've been using Emacs. I'll
-talk a little bit in a minute (if I can
-ever find my slides) about how I got
-into Emacs, but I think if you've used
-Emacs and a lot of other editors for a
-long time, something that you notice
-right away is that you get good with it
-in a way that stays meaningful. You
-learn new things. Those things stick
-with you. You learn how to make it do
-new tricks and then keep doing those
-tricks.
-
-00:01:33.759 --> 00:02:17.200
-I want to mention that this
-conference--oops, this talk isn't about
-how to adjust your configuration
-specifically. I don't have a bunch of
-good code samples in here. There are
-other great talks at the conference,
-particularly Andrew's, that I looked at,
-that looked like they might be more
-aimed at that "hey, I'm just getting
-started with Emacs, what are some things
-to try to make it more comfortable for
-me starting?" This is about how to think
-about the problem space. Hopefully, a
-good warm up as we start thinking about
-some of the lightning talks a little
-later on.
-
-00:02:17.200 --> 00:02:29.680
-I'm just gonna quickly make sure I can
-see my IRC buffer in case I run into
-time. I didn't get my stopwatch started
-for this one. So all right, let's dive
-in.
-
-00:02:29.680 --> 00:02:53.519
-We assume that we want to install
-packages and maybe configure some
-features. This is particularly from the
-perspective of where we're working with
-a bunch of people on a team and we want
-to get something done. Some of us
-probably already have mature Emacs
-workflows. Others are installing it for
-the first time.
-
-00:02:53.519 --> 00:03:35.840
-So the first question is, you know, in
-that context: what's the value
-proposition? Why should I mess with my
-machine, my mature Emacs configuration,
-and impose my ideas over the way
-somebody else is learning Emacs? Well,
-it can be.. I'm off my slides here a
-little bit. It can be a little bit
-tricky to learn Emacs. One thing that
-helps us a lot is if people that we're
-working with can tell us, kinda,
-keystroke for keystroke at times, what
-to do and explain what everything is
-doing. Using the same packages can
-really help us working together on a
-project.
-
-00:03:35.840 --> 00:04:54.840
-Speaking from my personal experience, it
-took me decades to get to the point
-where I was excited to program in Emacs
-Lisp. I've programmed in a lot of
-programming languages, but Lisp wasn't
-on my list. I looked at my config that I
-was copy-pasting around from generation
-after generation of .emacs file or
-recrafting it from hand and from
-Internet searches, to get the things
-that I needed when I would quickly go
-install Emacs at some new job or
-contract, and be able to to quickly get
-through that workflow that caused me to
-install the program. You know, just
-little simple one-liners that that got
-committed to memory over decades
-eventually just led me to a sort of "hey
-what's going on here." And I credit Jeff
-Goff, my good friend who died earlier in
-2020, for my lifelong love of Emacs.
-Perhaps EriK and I will talk about that
-a little bit more in another talk we
-have scheduled, but Jeff was a huge
-influence on us in a number of ways and
-a huge contributor to the Raku
-programming language which is very cool.
-
-00:04:54.840 --> 00:06:23.380
-So, understanding how to make a good
-decision about splitting up
-configuration in a way to share it
-across people with really different uses
-of Emacs... That's actually a
-complicated topic and I want to sort of
-back off and stare at it for a second. I
-think Emacs is about people, so that
-means it's about community. And
-community means we're going to invite
-disagreement. In fact, that disagreement
-isn't necessarily a road-block to our
-project. In fact, some of the work that
-a community project can invite us to do
-is to get closer to each other by
-inviting those disagreements, by
-learning from them--learning from
-different people's styles and from how
-they argue, and thinking about why they
-have that perspective and what technical
-benefits that perhaps radical point of
-view might carry away. Some people are
-really aggressive arguers, and others
-are very passive and really couch their
-ideas in distancing terms, to say, "well
-probably, this is a good idea" or
-"please double check me." Those don't
-always necessarily indicate how certain
-a person is, because we're different. We
-have different ways of communicating
-ideas like certainty or excitement.
-
-00:06:24.560 --> 00:07:29.039
-When we think about a bunch of really
-diverse programmers approaching Emacs,
-probably one of our our first really big
-challenges is just to pick what we're
-going to go after. There are a lot of
-existing kit installs and things like
-this. My argument is that you could
-actually get pretty far just trading
-files around. Maybe the more valuable
-conversation to have is making the hard
-decisions about, well, "should we have
-vertical completion," should that be the
-out of the box, and the people that want
-the traditional splayed out over a
-single line completion for example in
-the mode line, those people are going to
-add a line of config to their own setup?
-
-00:07:29.039 --> 00:08:16.240
-The way to get there? I mean, how do we
-find out what works? We don't want to
-slow down the people that are super
-productive with Emacs by asking them to
-completely break their workflows and
-make it easier for new folks. At the
-same time, we do want to make sure those
-new people are excited by Emacs and not
-turned off by having to learn the entire
-jungle of Emacs history in the form of
-its unique technical stylings for things
-like frames, buffers, and other unique
-Emacs viewpoints on important interface
-concepts, especially.
-
-00:08:16.240 --> 00:09:04.800
-The encouragement here is to keep the
-initialization for a project team
-together as a crucible. Rather than
-necessarily following our defaults of
-finding the simplest configuration that
-generally work and letting people
-customize it, what if we tried to look
-for fairly specific configurations that
-we'll expect essentially all of our
-developers to be using, at least when
-they submit bug reports. In particular,
-with this, I think that degree of
-experimentation can drive back into the
-Emacs development process. In the
-development mailing list...
-
-00:09:04.800 --> 00:09:15.120
-I'm hoping I'll get a timing cue here.
-
-00:09:15.120 --> 00:09:50.720
-In the context of Emacs development as a
-greater entity, we see some of these
-struggles. Should we change this
-default? Sometimes we can have the sense
-that defaults in Emacs will never
-change. The conversation is too
-difficult. I think one thing that can
-help us get there is evidence that says,
-"hey my 30- to 40-person project is
-using this set of bindings and here's
-what we learned about brand new Emacs
-users trying to come in and get work
-done with that." (Amin: Yeah you still
-have a couple more minutes)
-
-00:09:50.720 --> 00:10:02.000
-Oh, beautiful. Okay, great. I will try
-to get through my last few slides that i
-cut in my last walkthrough, but I think
-i'm going quicker today, thank you. Thank
-you.
-
-00:10:02.000 --> 00:10:43.040
-So let's just recap real quick: in
-theory, Emacs works out of the box. That
-means we're free to experiment. We can
-throw it all away and start over. As an
-organizational principle... I don't know
-what I was thinking on that slide,
-excuse me. Bringing it back around to
-the free and open source software
-community, our goal is to enable users
-to unlock their computers, to do as much
-with them as possible.
-
-00:10:43.040 --> 00:10:57.920
-That's the context to take with project
-initialization, but sometimes it could
-make sense to put some gloves on. I've
-thrown up on the screen here just a
-couple of other ideas, ways to maybe
-think outside of the box.
-
-00:10:57.920 --> 00:11:29.120
-As you're putting together project nets,
-my words of encouragement are to
-experiment with it, try different
-things, and think really specifically
-about how different the development
-users might be from each other as you
-define standards for configuring the
-user environment of Emacs specifically
-for developing on a project. That's
-pretty much my talk.
-
-00:11:29.120 --> 00:11:32.959
-If there's any time, I would take a
-couple questions.
-
-00:11:32.959 --> 00:11:53.839
-(Amin: Thank you for your awesome talk, Corwin.
-I think we have one or two minutes for a
-few questions. Do you have the pad open
-or would you like me to read the
-questions for you?)
-
-00:11:53.839 --> 00:12:03.519
-Oh, I managed to close the pad and I am
-trying to open it again. All right,
-there it opened.
-
-00:12:03.519 --> 00:12:09.360
-Bringing it onto a screen where I can
-see it. Will you read me the first
-question while I drag windows around,
-please?
-
-00:12:09.360 --> 00:12:15.600
-(Amin: Sure. It says, "do you use Emacs
-as a community building tool?")
-
-00:12:15.600 --> 00:12:19.760
-Do I use Emacs as a community building
-tool, or how do I?
-
-00:12:19.760 --> 00:12:22.182
-(Amin: It just says do you.)
-
-00:12:22.182 --> 00:13:14.639
-Yes, absolutely. I think Emacs is an
-ambassador to the GNU tool chain. I
-think that in the fullness of time, we
-will see an Emacs that makes and that
-makes iOS and Android and other
-closed-source tools dream. That's why
-they mock us and call Emacs an operating
-system. It's because it could be, if we
-cared for it to be. It's quite a
-threatening product from the perspective
-of how many problem spaces it can
-address, how many types of users it can
-satisfy, the things that we can do to
-make it robust in those environments. I
-mean, we're always thinking about the
-weak points, but is Emacs a community
-building tool? Heck yeah.
-
-00:13:14.639 --> 00:13:26.880
-(Amin: There's like one or two more
-questions. I think they're more
-long-form so it might be better if you
-took them off stream so you could keep
-the schedule on time.)
-
-00:13:26.880 --> 00:13:33.360
-I would love to take those questions
-offline. I will respond to you in
-writing if we don't get to it in a
-breakout room.
-
-00:13:33.360 --> 00:13:38.000
-Thanks so much for joining us. I can't
-wait to see the rest of the conference.
-See you there!
-
-00:13:38.000 --> 00:13:42.800
-(Amin: Awesome. Thank you again so much, Corwin.)
+00:00:00.000 --> 00:00:24.056
+Hello, everyone. I am Andrew Tropin. I
+am a professional software engineer I
+was playing with NixOS It's an operating
+system based on the Nix package manager.
+I came up with this interesting approach
+for configuring Emacs. I want to share
+it with you.
+
+00:00:24.056 --> 00:01:31.389
+I will start with the bold statement
+that Emacs configuration is almost the
+same as system configuration. It's not
+related to that Emacs joke about Emacs
+being an operating system. It's more
+about Emacs being integrated with so
+many tools inside the environment. For
+example, if you don't even use any fancy
+workflows, you use only plain Emacs
+without any configuration, dired uses
+ls, grep.el uses grep, and info files
+placed somewhere in your system. Also
+Emacs can interact with gpg, git, make,
+and other stuff. When you grow your
+Emacs Lisp init.el file or other files
+in your .emacs.d directory, you get much
+more integration with underlying
+operating system.
+
+00:01:31.389 --> 00:02:08.622
+The question is: how to manage such
+configuration? Because you can't just
+take a bunch of .el files and move to a
+different machine and be sure that
+everything will work. Because you didn't
+move your executables. You didn't move
+configuration of other programs. You
+didn't move your service configurations.
+And you can't even just create dotfiles
+for each program and move it with your
+.el files. The approach would be a
+little broader.
+
+00:02:08.622 --> 00:02:23.722
+Everything that I am showing today is
+available on Github. Any source code,
+you can find here. but my copy of the
+repository is on my local machine.
+
+00:02:23.722 --> 00:03:45.889
+As you can see, the font is a little
+small. And also, my terminal font is
+also a little small. I can do a quick
+fix and increase the font. But imagine
+how cool it will be if you can have a
+file which contains the configuration
+for a system. You change some value.
+Here, for example, fontSize = 16 and run
+some command and based on this file and
+some other includes your operating
+system is built and all your environment
+is set up and ready for use. For example
+here, we already built the new operating
+system, and everything is already
+installed in my SSD. Now I can run the
+program and you can see that my alacrity
+terminal has much bigger font and also
+if I restart my Emacs instance it by
+default uses a much bigger font for any
+buffer. Practical, and as you can see,
+it's already working, thanks to Nix and
+NixOS.
+
+00:03:45.889 --> 00:04:44.556
+I will explain a little later how it
+works inside, but for now, let's specify
+a little more what happened right now. I
+fed my... Oh. It doesn't work. Sorry. I
+want... I have my whole operating system
+defined in a few Nix files. For example,
+here you saw the file which defines some
+variables for my environment and then a
+few more files for different programs.
+There is a folder which contains all
+Emacs-related configuration. Also, there
+are package definitions defined in Nix
+package repositories which is also
+included for the function which
+generates the operating system.
+
+00:04:44.556 --> 00:05:11.689
+Getting all my configurations written in
+Nix language and a few firewalls in ??
+languages, everything is gathered
+together, and from that input and only
+from that input, the new operating
+system is built. Emacs now is a part of
+this operating system. I can distribute
+this Emacs configuration with all the
+environment that I want.
+
+00:05:11.689 --> 00:05:50.789
+Practical so far. Let's clarify which
+problems does it solve. First of all,
+the integration problem. For example, a
+few minutes ago, you saw that I changed
+one variable. That was to update... The
+first one, for my terminal, and the
+second one, for my Emacs. It's pretty
+good that a few different programs can
+share some data. For example, you can
+have one of them for every application,
+or something like that and you change
+only one value in one place and the
+whole operating system is updated.
+
+00:05:50.789 --> 00:06:20.856
+Also, another problem is
+reproducibility. For example, when you
+install your new instance of Emacs on
+your laptop or something like that, you
+can be sure that you will get the same
+package versions and you can be sure
+that the configuration of your work
+results in newly-updated or
+newly-installed packages.
+
+00:06:20.856 --> 00:06:43.256
+Also, if you update packages, sometimes
+it's hard to revert, because it's the
+way your package manager almost every
+time works. You're just getting the
+latest available packages. If they are
+broken, you need to wait for the
+maintainer to update them.
+
+00:06:43.256 --> 00:07:39.656
+And also, your basic configuration
+almost always doesn't contain any native
+dependencies, like executables or
+something else. Recently, I saw some
+attempts to make it possible to use
+use-package for those needs, like
+ensuring native dependencies or
+something like that. It's obviously...
+If your configuration isn't reproducible
+and it doesn't have your whole
+environment, placed in one repository,
+it's very hard to share such
+configuration. You can share part of
+your configuration and some instruction
+how to get a similar environment, but it
+doesn't always work. Let's go closer to
+actually Emacs configuration itself.
+
+00:07:39.656 --> 00:08:10.839
+I had some experience with Spacemacs and
+Doom Emacs distributions. I also watched
+a lot of videos and articles by
+Protesilaos and a lot of other custom
+configurations of many different cool
+people. And also I was inspired by
+use-package and decided that I will
+create a folding structure for my Emacs
+configuration.
+
+00:08:10.839 --> 00:09:01.306
+I will be using subconfigs. It's almost
+the same as layers in Spacemacs, or
+modules in Doom Emacs, which are
+self-contained. They contain Emacs Lisp
+code which configures all packages
+necessary for this part of
+configuration. It contains all Emacs
+dependencies like Emacs packages. It
+contains all native dependencies like
+binaries or maybe info pages or
+something like that. It also contains
+variables that can be shared between
+Emacs and other applications, and it can
+contain service or system definitions
+which configure your systemd service or
+something like that that you use in your
+workflow. For example, for synchronizing
+your e-mails.
+
+00:09:01.306 --> 00:10:06.922
+Let's start from just the example that I
+already am... I have a folding structure
+for my configuration. I have some files
+here. early-init just has this. Nothing
+changes. It will be copied to that
+.emacs.d directory later with some
+exceptions that it will replace the Nix
+dir and a symlink will be created to it.
+I have use-package-init.el. It's part of
+configuration that will be on top of
+everything to be able to use use-package
+in my subconfigurations. And actually
+some Nix code to glue everything up and
+config dirs which contain all my
+subconfigs.
+
+00:10:06.922 --> 00:11:10.105
+Let's start from faces subconfig. Let's
+start from config.el which can be
+familiar for many people. Just
+use-package definition for faces package
+and some configuration for it which are
+setting some attributes. It reads some
+variables. Those variables are actually
+defined in a different place. If I open
+default.nix file, you can see that it
+contains the definition or subconfig,
+and it should contain a definition of
+variables that it uses by... I forgot to
+move it from my original default.nix
+file somewhere here. You probably can
+find definition of those variables just
+right here.
+
+00:11:10.105 --> 00:11:38.422
+I took values from my Nix expressions.
+Those values will be shared across my
+alacrity, Emacs, and other applications.
+Later, they will be placed in generated
+Emacs configuration. They will be
+available for faces config. Here I will
+be referencing them just like Emacs
+variables.
+
+00:11:38.422 --> 00:12:39.222
+Let's take a look at another more
+complicated example. For example,
+org-roam package. Just a basic
+use-package configuration which uses a
+variable and the definition. It's a
+little more complex than the previous
+one. Elisp configuration in the same
+file. emacsPackages specified here.
+Those two packages: org-roam and
+company-org-roam. systemPackages: it's
+something that should be available on
+your host operating system. And for
+emacsPackages, you need sqlite package,
+and also the definition of the variable
+which will be passed in my Emacs
+configuration later. It's equal to my
+workDir, which is defined in my
+environment, and a subdirectory of it.
+
+00:12:39.222 --> 00:12:43.222
+([Amin:] Andrew, you have about five
+minutes including questions.)
+
+00:12:43.222 --> 00:13:26.222
+Oh, okay. I'm almost finished. It was
+last example. Let me open my Org file.
+Okay. Right here. I won't give you an
+introduction to Nix itself and the
+underlying mechanism, but I can say that
+there's already a proof of concept
+framework for utilizing Nix and NixOS
+for configuring Emacs and making a very
+complex workflow reproducible on other
+machines. It gives everything that we
+saw right now.
+
+00:13:26.222 --> 00:14:05.389
+For the future work, I plan to
+reimplement it in Guile, which is a
+Scheme dialect, which is another Lisp
+language, for the GNU Guix operating
+system, because I like Lisp languages a
+little more than Nix languages and I
+want to make this project from proof of
+concept to some state which will be
+user-friendly and available for other
+people. If I will have a lot of time, I
+will make an operating system which will
+be inspired by Lisp machines to make the
+whole experience very Lispy.
+
+00:14:05.389 --> 00:14:22.622
+Thank you for your attention and now I
+will answer questions. Oh. There is a
+lot of... Okay. I see some questions.
+
+00:14:22.622 --> 00:14:29.222
+Did you release some config files such
+as Emacs custom.el, some of which have
+sensitive data?
+
+00:14:29.222 --> 00:14:59.456
+Ideally, in the folding way, I create a
+separate directory called
+local/share/emacs, and I place custom el
+files here. It's not synchronized in any
+way, and it will be just lost in case
+you move to a separate machine. I do it
+for a purpose, because I don't use
+custom.el. It's hard to make it
+reproducible if you're using such
+mechanism as custom.el.
+
+00:14:59.456 --> 00:15:06.656
+How do you learn the Nix language
+basics? Just from the manual?
+
+00:15:06.656 --> 00:15:32.989
+I read a lot of documentation. Also, I
+saw the course like Learn Nix in 15
+minutes. And also there was another
+resource. Better to ask this question in
+Nix or NixOS channel in IRC, which will
+be treated in more details.
+
+00:15:32.989 --> 00:15:38.909
+What are the main advantages besides
+switching computers, which most people
+rarely do?
+
+00:15:38.909 --> 00:16:10.556
+For example, the original idea was to
+make part of configurations available
+for projects. For example, you have some
+project, you made the setup, and want
+other developers to use the same setup
+on their machine, but you implement only
+the part of stuff, like one subconfig
+especially for this language for this
+project. With such approach, you can
+easily share such subconfig with other
+people.
+
+00:16:10.556 --> 00:16:15.239
+Have you tried Guix in place of Nix?
+
+00:16:15.239 --> 00:16:41.239
+Yes, I tried it, and currently I am in
+the state of switching from Nix to Guix.
+You can follow my Youtube channel, I
+think, I do streams twice in a month
+talking about reproducibility and
+related stuff. Probably soon I will be
+talking about installation of Guix and
+configuration of it.
+
+00:16:41.239 --> 00:16:50.406
+In case you're watching this video
+later, you can find me somewhere on the
+network using those contacts. It's my
+nickname and my e-mail address.
+
+00:16:54.072 --> 00:17:04.622
+([Amin:] Awesome. I think we're wrapping
+up just on time. Thank you so much,
+Andrew, for your great talk, and for
+hanging out to answer the questions
+live.)
+
+00:17:04.622 --> 00:17:18.000
+[Andrew:] Thank you for organizing the
+conference and thank you all
+participants for questions and
+participation. See you soon!