Transcript

[[!template new="1" text="""An introduction to the Emacs reader""" start="00:00:00.720" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Hello EmacsConf!""" start="00:00:00.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""Today I'm here to introduce you to the Emacs Reader.""" start="00:00:02.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""It is a general-purpose document viewer""" start="00:00:06.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""that lives inside our beloved Emacs.""" start="00:00:08.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""It tries to prioritize memory""" start="00:00:12.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""and performance efficiency as much as possible""" start="00:00:14.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""even when you're using a lower-end hardware.""" start="00:00:17.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""And, most importantly,""" start="00:00:20.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""it tries to do things in an Emacs manner.""" start="00:00:22.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""That is, it tries to integrate""" start="00:00:25.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""with existing packages as much as possible""" start="00:00:27.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""instead of reinventing the wheel.""" start="00:00:29.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""And architecturally, it tries to take the advantage""" start="00:00:32.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""of dynamic or native modules""" start="00:00:36.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""which were introduced back in 2015 into Emacs.""" start="00:00:38.480" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Yet another document viewer in Emacs?""" start="00:00:44.760" video="mainVideo-reader" id="subtitle"]]
[[!template text="""You would ask, why exactly do we need""" start="00:00:44.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""another document viewer in Emacs?""" start="00:00:46.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""Don't we already have the built-in DocView""" start="00:00:49.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""and the notorious pdf-tools?""" start="00:00:51.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""Well, the built-in DocView has unusable latency,""" start="00:00:55.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""and I'm going to show you this later""" start="00:00:59.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""when I compare this with Emacs Reader.""" start="00:01:01.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""The famous pdf-tools has actually multiple issues.""" start="00:01:04.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""One, it is extremely memory-hungry""" start="00:01:08.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""regardless of what kind of PDFs you're reading.""" start="00:01:10.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""And, well, it can only read PDFs.""" start="00:01:14.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""Poppler, the library which pdf-tools uses,""" start="00:01:17.940" video="mainVideo-reader" id="subtitle"]] [[!template text="""is actually sub-optimal,""" start="00:01:22.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""especially relative to MuPDF,""" start="00:01:23.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""which is what Emacs Reader is based on.""" start="00:01:25.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-tools is also extremely painful to install.""" start="00:01:28.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""If you've ever installed pdf-tools,""" start="00:01:31.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""you know that it has a bunch of dependencies,""" start="00:01:34.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""including a server that is supposedly packaged.""" start="00:01:38.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""across package managers, system package managers.""" start="00:01:42.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's extremely difficult to install""" start="00:01:45.062" video="mainVideo-reader" id="subtitle"]] [[!template text="""and painful to install.""" start="00:01:47.738" video="mainVideo-reader" id="subtitle"]] [[!template text="""And of course, pdf-tools""" start="00:01:50.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""since the last couple of years""" start="00:01:52.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""has not been maintained as much.""" start="00:01:54.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""There's huge PRs that have been unnoticed and unmerged.""" start="00:01:56.560" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Architecture of Emacs Reader""" start="00:02:05.760" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Architecturally, Emacs Reader takes a distance""" start="00:02:05.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""from both DocView and pdf-tools.""" start="00:02:09.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""So how DocView works is that""" start="00:02:12.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""it basically wraps around""" start="00:02:15.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""a tool called mutool.""" start="00:02:18.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""mutool is actually""" start="00:02:20.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""a command line tool from MuPDF itself.""" start="00:02:22.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""It relies on mutool and a bunch""" start="00:02:26.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""of other similar command line tools,""" start="00:02:28.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""and basically makes process calls""" start="00:02:30.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""from Elisp to the CLI tools.""" start="00:02:34.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's how DocView works,""" start="00:02:36.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and that's why it sort of has latency issues""" start="00:02:38.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""because that's the best you can do""" start="00:02:41.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""by literally calling CLI tools""" start="00:02:42.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and outputting the images into Emacs.""" start="00:02:45.020" video="mainVideo-reader" id="subtitle"]] [[!template text="""How pdf-tools works is that it tries""" start="00:02:50.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""to have a server-client model.""" start="00:02:55.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""So the client is Emacs""" start="00:02:57.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""and the server is basically""" start="00:02:59.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""something they call epdfinfo.""" start="00:03:00.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's supposed to render the images using Poppler""" start="00:03:03.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then send the images to Emacs""" start="00:03:07.241" video="mainVideo-reader" id="subtitle"]] [[!template text="""which then tries to display.""" start="00:03:10.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""I think the server client model is terrible.""" start="00:03:13.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""One, for latency purposes,""" start="00:03:16.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""and two, it makes things""" start="00:03:18.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""unnecessarily more complicated.""" start="00:03:19.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""Here is where we come""" start="00:03:21.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""and introduce dynamic modules.""" start="00:03:24.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""So Emacs Reader is based on""" start="00:03:26.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""the concept of dynamic modules""" start="00:03:30.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""which I'm going to talk about in a bit.""" start="00:03:32.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""But how it works is that we have C modules.""" start="00:03:34.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we have the emacs-module.h,""" start="00:03:37.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""that's the dynamic module header""" start="00:03:39.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""which every dynamic module package must have.""" start="00:03:40.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""And then we have our C files.""" start="00:03:43.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""And these C files essentially define functions""" start="00:03:45.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""that are going to be used in Emacs but in C.""" start="00:03:52.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""We then load these C modules""" start="00:03:56.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""using simple (require ...) in our Elisp modules.""" start="00:03:59.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""And then whenever we call""" start="00:04:03.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""something in the Emacs runtime,""" start="00:04:05.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""say I'm going to open""" start="00:04:07.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""PDF files in (find-file) or (reader-open-doc),""" start="00:04:09.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""what it does is that""" start="00:04:13.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""it tries to use one of the functions""" start="00:04:15.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is wrapped in Elisp,""" start="00:04:19.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""but actually tries to call a function in C.""" start="00:04:21.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""And then the C module is actually""" start="00:04:24.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""going to make calls to the MuPDF.""" start="00:04:26.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""Here the MuPDF system package,""" start="00:04:29.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""this is actually a system package""" start="00:04:31.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is dynamically linked to the C modules.""" start="00:04:33.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we're basically""" start="00:04:35.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""just using it as a shared library.""" start="00:04:36.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you have the fz_load_page, for example,""" start="00:04:39.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""it's a MuPDF function""" start="00:04:43.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""that we're going to be using in the C modules.""" start="00:04:44.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""So it's going to make""" start="00:04:47.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""a shared dynamic call to MuPDF""" start="00:04:50.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then render the page""" start="00:04:53.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then show this to Emacs.""" start="00:04:55.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""This pipeline, I argue,""" start="00:04:59.180" video="mainVideo-reader" id="subtitle"]] [[!template text="""is much better and leaner and efficient""" start="00:05:01.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""than a server-client model.""" start="00:05:05.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""One, because we don't really need""" start="00:05:07.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""the server-client model.""" start="00:05:09.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""So back when Politza""" start="00:05:10.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""first introduced pdf-tools,""" start="00:05:12.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""that was like 10 years ago in 2015,""" start="00:05:14.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""the concept of dynamic modules""" start="00:05:19.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""were not integrated into Emacs.""" start="00:05:21.241" video="mainVideo-reader" id="subtitle"]] [[!template text="""I think they came around""" start="00:05:23.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""like one or two years late, 2017.""" start="00:05:24.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's the best he could go with.""" start="00:05:28.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""We don't really have to, today,""" start="00:05:31.220" video="mainVideo-reader" id="subtitle"]] [[!template text="""because, since we can use MuPDF""" start="00:05:33.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""as a shared library""" start="00:05:35.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""which can render things in real-time""" start="00:05:37.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""and just give us the rendered images""" start="00:05:39.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""which we can then display,""" start="00:05:41.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""there's no reason for a server to do things for us.""" start="00:05:43.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's the main architectural difference""" start="00:05:49.660" video="mainVideo-reader" id="subtitle"]] [[!template text="""that Emacs Reader introduces""" start="00:05:53.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""compared to pdf-tools and DocView.""" start="00:05:55.480" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""A word on dynamic modules""" start="00:06:00.280" video="mainVideo-reader" id="subtitle"]]
[[!template text="""What exactly are dynamic modules?""" start="00:06:00.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""Well, I can't really give you""" start="00:06:02.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""a full-fledged explanation,""" start="00:06:04.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""but essentially dynamic modules""" start="00:06:06.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""let you evaluate""" start="00:06:08.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""native compiled code""" start="00:06:10.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""in other languages like C, C++, Rust""" start="00:06:12.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""that behaves like regular Emacs Lisp.""" start="00:06:15.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""So when our Emacs C modules,""" start="00:06:18.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""the render-core.c or render-theme.c,""" start="00:06:23.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""when all of these are compiled,""" start="00:06:26.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""and they're called from the Elisp modules.""" start="00:06:28.300" video="mainVideo-reader" id="subtitle"]] [[!template text="""They behave like Elisp even though""" start="00:06:30.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""they're as fast as a C function""" start="00:06:34.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""because they're compiled C code.""" start="00:06:37.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""But you essentially call them""" start="00:06:39.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""just like Elisp functions.""" start="00:06:41.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can find them using C-h f and so on.""" start="00:06:42.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you can call any function""" start="00:06:47.820" video="mainVideo-reader" id="subtitle"]] [[!template text="""from any language that supports""" start="00:06:49.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""the C ABI, which is virtually everything,""" start="00:06:51.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""without leaving Emacs""" start="00:06:53.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and without losing any performance.""" start="00:06:54.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is extremely helpful""" start="00:06:56.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""when you want to use""" start="00:06:58.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""existing libraries like MuPDF""" start="00:06:59.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""or any other cryptographic library""" start="00:07:02.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is written in C""" start="00:07:04.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""and you don't want to rewrite""" start="00:07:06.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""the entire thing in Elisp,""" start="00:07:07.038" video="mainVideo-reader" id="subtitle"]] [[!template text="""but you can just use it as a native library.""" start="00:07:08.538" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can read more""" start="00:07:11.740" video="mainVideo-reader" id="subtitle"]] [[!template text="""on how dynamic modules work""" start="00:07:13.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""and how you can write one in this blog.""" start="00:07:14.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is something that I wrote myself""" start="00:07:17.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""just after starting this package""" start="00:07:19.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it will give you a bit more guidance""" start="00:07:22.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""on how to use dynamic modules more efficiently.""" start="00:07:25.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""I think dynamic modules""" start="00:07:27.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""should be used more and more in Emacs""" start="00:07:28.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""and I think their advantages""" start="00:07:32.300" video="mainVideo-reader" id="subtitle"]] [[!template text="""have not been exploited""" start="00:07:34.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""as much as they should.""" start="00:07:36.080" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Features of Emacs Reader""" start="00:07:39.560" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Now we're going to talk a bit about""" start="00:07:39.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""the core features of Emacs Reader.""" start="00:07:42.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""And these are the following features""" start="00:07:46.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""that we're going to talk about.""" start="00:07:48.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""And finally, to talk about""" start="00:07:50.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""some challenges that we faced.""" start="00:07:51.960" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Memory efficiency""" start="00:07:56.760" video="mainVideo-reader" id="subtitle"]]
[[!template text="""First is memory efficiency.""" start="00:07:56.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""I already told you that""" start="00:07:58.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs Reader's first priority""" start="00:08:00.820" video="mainVideo-reader" id="subtitle"]] [[!template text="""is to make sure that we are not slow""" start="00:08:03.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""and we are not taking""" start="00:08:06.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""a bunch of memory unnecessarily.""" start="00:08:07.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So here's a graph of the heap memory size""" start="00:08:10.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""as it grows for DocView.""" start="00:08:14.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this is again in emacs -Q.""" start="00:08:17.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this is a fresh Emacs session""" start="00:08:20.638" video="mainVideo-reader" id="subtitle"]] [[!template text="""with just DocView.""" start="00:08:22.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""It grows up to 900MB""" start="00:08:25.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""for a very small PDF that is a LaTeX PDF.""" start="00:08:27.820" video="mainVideo-reader" id="subtitle"]] [[!template text="""No scanned huge PDF. It's a 2MB PDF.""" start="00:08:31.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""But when I scrolled from the beginning""" start="00:08:36.780" video="mainVideo-reader" id="subtitle"]] [[!template text="""of the PDF to the end,""" start="00:08:39.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""it went up to 900MB.""" start="00:08:41.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's the memory heap size.""" start="00:08:43.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""Does pdf-tools make this any better?""" start="00:08:46.820" video="mainVideo-reader" id="subtitle"]] [[!template text="""It actually doesn't.""" start="00:08:49.700" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, pdf-tools pretty much""" start="00:08:51.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""does the same thing.""" start="00:08:55.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""if you look at it here""" start="00:08:57.220" video="mainVideo-reader" id="subtitle"]] [[!template text="""just so if you're going to ask me""" start="00:08:58.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""are they two different graphs,""" start="00:09:01.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""or are you just showing me the same graph,""" start="00:09:02.940" video="mainVideo-reader" id="subtitle"]] [[!template text="""they're actually two different graphs,""" start="00:09:04.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""because if you look at the DocView graph""" start="00:09:06.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""it uses cairo and it uses librsvg""" start="00:09:08.780" video="mainVideo-reader" id="subtitle"]] [[!template text="""because docview by default""" start="00:09:11.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""converts the images into SVG.""" start="00:09:13.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""The rendered images are SVGs.""" start="00:09:16.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-tools doesn't, so you don't see""" start="00:09:18.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""any librsvg calls here or anything""" start="00:09:20.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this is pdf-tools""" start="00:09:24.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it basically takes up""" start="00:09:25.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""the same amount of memory, 900MB,""" start="00:09:27.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""and exactly the same operation,""" start="00:09:29.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""exactly the same PDF,""" start="00:09:30.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""exactly scrolling from first to the last.""" start="00:09:32.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""Where do we stand?""" start="00:09:36.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""Well, we actually do much better.""" start="00:09:37.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""So let me zoom in this.""" start="00:09:40.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if you see, we stand within""" start="00:09:42.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""at a peak of 72MB.""" start="00:09:46.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""Exactly the same PDF,""" start="00:09:49.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""exactly the same operation""" start="00:09:51.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""from the beginning to the end,""" start="00:09:53.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""around 285 pages scrolled.""" start="00:09:54.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""We take much less than 80 MB.""" start="00:09:57.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""And actually, to be very frank,""" start="00:10:03.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""the only memory that we're storing in Emacs,""" start="00:10:05.072" video="mainVideo-reader" id="subtitle"]] [[!template text="""oh, sorry, not in Emacs,""" start="00:10:09.205" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the MuPDF heap is just about 30 MB.""" start="00:10:12.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's this dark red one.""" start="00:10:16.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's the cache that we're storing.""" start="00:10:19.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's the memory that we're interacting with""" start="00:10:22.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""in real time.""" start="00:10:24.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is stuff that Emacs adds on top of it""" start="00:10:25.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""and a bit of libmupdf.""" start="00:10:29.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you can see, in terms of memory,""" start="00:10:32.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""we're saving...""" start="00:10:35.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""we're literally down,""" start="00:10:37.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""what, a fraction of 10!""" start="00:10:41.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""This was a priority for us""" start="00:10:45.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""since the beginning,""" start="00:10:48.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""because when I was starting to use pdf-tools,""" start="00:10:49.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""it was unusable for me""" start="00:10:52.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""because I was on a lower-end hardware""" start="00:10:53.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and I thought it should not be""" start="00:10:55.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""really that difficult""" start="00:10:57.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""for a document reader""" start="00:10:58.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""to not take a gigabyte of memory.""" start="00:11:00.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""It really shouldn't because""" start="00:11:04.100" video="mainVideo-reader" id="subtitle"]] [[!template text="""you're not really doing that much,""" start="00:11:05.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""you're just displaying images.""" start="00:11:07.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's how efficient""" start="00:11:10.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""we are in terms of memory.""" start="00:11:12.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""Let's see how efficient""" start="00:11:13.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""we are in terms of speed.""" start="00:11:15.372" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Performance and speed""" start="00:11:18.720" video="mainVideo-reader" id="subtitle"]]
[[!template text="""So Emacs Reader is actually""" start="00:11:18.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""as fast as pdf-tools,""" start="00:11:21.100" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it is actually""" start="00:11:23.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""way more faster than DocView.""" start="00:11:24.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""In some cases,""" start="00:11:27.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""it actually beats existing""" start="00:11:28.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""standalone document readers and browsers.""" start="00:11:31.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""So let's actually see this in action.""" start="00:11:34.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""So here we are with""" start="00:11:41.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""a few emacs -Q sessions.""" start="00:11:42.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm using emacs -Q so as to give you...""" start="00:11:46.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""that this is actually""" start="00:11:50.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""as less overhead possible.""" start="00:11:52.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we have first DocView.""" start="00:11:55.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""All of these tests""" start="00:11:57.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""are going to be done on the same PDF.""" start="00:12:01.138" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's the documentation manual from MuPDF.""" start="00:12:03.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if I scroll, this is fine.""" start="00:12:07.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm just pressing n""" start="00:12:10.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it seems to work fine.""" start="00:12:12.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""If I press and hold n,""" start="00:12:15.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""I have pressed n and I'm holding.""" start="00:12:19.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""And Emacs is stuck.""" start="00:12:21.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""And it's going to stay stuck""" start="00:12:26.420" video="mainVideo-reader" id="subtitle"]] [[!template text="""because it's making calls""" start="00:12:27.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""to the CLI tool that I said, mutool.""" start="00:12:28.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""And after it's done getting stuck,""" start="00:12:31.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""it is going to get back.""" start="00:12:35.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""As you can see, if you go back,""" start="00:12:40.180" video="mainVideo-reader" id="subtitle"]] [[!template text="""you're able to go back fine.""" start="00:12:43.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""It does not get stuck""" start="00:12:45.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""because what Emacs does""" start="00:12:46.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""is it basically calls mutool,""" start="00:12:48.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""like fetches a bunch of pages,""" start="00:12:51.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""essentially all the pages""" start="00:12:53.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""that you asked for it,""" start="00:12:54.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it puts them into the memory.""" start="00:12:56.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""And that's it.""" start="00:12:59.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""It puts them into the memory""" start="00:12:59.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then scrolls through it.""" start="00:13:01.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""So going back, you will most likely""" start="00:13:03.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""not have any stuck issues.""" start="00:13:05.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""Sometimes you do""" start="00:13:07.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""because some images do get GC'd.""" start="00:13:07.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""But that's the idea.""" start="00:13:10.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""Whenever there's no image in memory,""" start="00:13:13.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""it gets stuck.""" start="00:13:16.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""And it gets stuck good.""" start="00:13:18.740" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's DocView.""" start="00:13:21.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-tools is actually""" start="00:13:23.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""not problematic here.""" start="00:13:25.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-tools is extremely efficient""" start="00:13:27.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and extremely fast.""" start="00:13:29.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we can go through the pages""" start="00:13:30.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""without any issues.""" start="00:13:32.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""We can zoom.""" start="00:13:34.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""The zoom did get stuck a bit,""" start="00:13:37.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""but that's relatively fine.""" start="00:13:39.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs Reader is exactly as fast""" start="00:13:44.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""as pdf-tools here.""" start="00:13:46.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this is pdf-view,""" start="00:13:49.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""this is Emacs Reader.""" start="00:13:50.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""Let's scroll through the pages.""" start="00:13:51.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""As you can see, nothing is getting stuck""" start="00:13:55.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""because we're not really waiting""" start="00:13:59.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""for any tool to send us any images.""" start="00:14:00.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""We just have a little cache""" start="00:14:06.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and we're scrolling through them""" start="00:14:08.300" video="mainVideo-reader" id="subtitle"]] [[!template text="""and rendering images in real time.""" start="00:14:09.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""Zooming also works fine.""" start="00:14:13.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, with regards to this,""" start="00:14:17.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""we're in parity with pdf-tools.""" start="00:14:19.520" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Scanned PDFs""" start="00:14:23.680" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Now, where pdf-tools and actually""" start="00:14:23.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""a lot of readers have issues""" start="00:14:26.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""is when they're dealing with scanned PDF.""" start="00:14:28.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, we have this PDF which is notorious""" start="00:14:32.500" video="mainVideo-reader" id="subtitle"]] [[!template text="""for being really difficult to render""" start="00:14:36.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""because this is entirely built""" start="00:14:40.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""with scanned images.""" start="00:14:42.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is the kind of PDF""" start="00:14:43.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""that you get from Internet Archive.""" start="00:14:44.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is essentially someone""" start="00:14:46.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""took photos of the book in a camera""" start="00:14:47.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""and literally turned them into a PDF.""" start="00:14:50.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs Reader actually does not have""" start="00:14:56.660" video="mainVideo-reader" id="subtitle"]] [[!template text="""any issues rendering this.""" start="00:14:58.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""As you can see, it renders it smoothly""" start="00:15:01.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""and fine without any halts.""" start="00:15:05.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""I can change Emacs even while it's doing so,""" start="00:15:09.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it does not have any issues.""" start="00:15:13.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-tools are the same.""" start="00:15:17.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""PDF also does not have any issues.""" start="00:15:20.072" video="mainVideo-reader" id="subtitle"]] [[!template text="""Sorry. Click pdf-view-mode.""" start="00:15:21.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""pdf-view (pdf-tools) is a bit slower""" start="00:15:26.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""but does not have any issues. It works.""" start="00:15:29.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""Here, actually, pdf-tools and Emacs Reader""" start="00:15:35.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""are more efficient than even browsers.""" start="00:15:40.701" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, if I try to open""" start="00:15:46.100" video="mainVideo-reader" id="subtitle"]] [[!template text="""the same page in a browser,""" start="00:15:47.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm trying to scroll.""" start="00:15:50.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""And after I've scrolled and I leave,""" start="00:15:52.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""scrolling is going to load""" start="00:15:54.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""for a bunch of seconds""" start="00:15:58.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""to give me the page.""" start="00:15:59.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's more than five seconds,""" start="00:16:03.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""as you can see,""" start="00:16:04.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""and this is actually totally not usable.""" start="00:16:05.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""If you're going to read this book,""" start="00:16:08.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""an electromagnetics book,""" start="00:16:10.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""you're going to have a terrible time""" start="00:16:12.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""reading this in a browser,""" start="00:16:13.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""which is supposed to be""" start="00:16:14.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""the fastest thing alive.""" start="00:16:15.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""You sort of have the same experience""" start="00:16:17.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""in Okular. So this is Okular.""" start="00:16:19.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""If I try to scroll through this,""" start="00:16:20.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""it will do the same thing.""" start="00:16:22.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""And while it is better than the browser,""" start="00:16:25.420" video="mainVideo-reader" id="subtitle"]] [[!template text="""it still takes a while""" start="00:16:28.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it still has, like, if you zoom,""" start="00:16:31.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""you're going to have a bit of a delay.""" start="00:16:34.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""You don't really face that in Emacs Reader.""" start="00:16:36.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""We zoom in and out just fine.""" start="00:16:41.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""And even with using mouse,""" start="00:16:45.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""you can zoom in and out just fine.""" start="00:16:47.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this is how Emacs Reader performs""" start="00:16:51.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""in terms of speed with these other tools.""" start="00:16:54.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now we will go back to the original presentation.""" start="00:17:01.120" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""System-level multi-threading""" start="00:17:08.960" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Now, how exactly is Emacs Reader""" start="00:17:08.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""able to do a lot of this?""" start="00:17:11.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""I wish I could sort of spend""" start="00:17:14.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""an entire session""" start="00:17:17.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""just talking about this, but I can't.""" start="00:17:19.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""So I'm just going to make this short.""" start="00:17:21.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""When you load Emacs Reader,""" start="00:17:22.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the standard output,""" start="00:17:24.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""it's going to say this:""" start="00:17:26.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""that eight threads have been initialized.""" start="00:17:27.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now, what we did with Emacs here""" start="00:17:29.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""is that we enabled""" start="00:17:32.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""system-level multithreading.""" start="00:17:33.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now, Emacs is not multithreaded.""" start="00:17:35.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""We all know that notoriously.""" start="00:17:36.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""It is single-threaded.""" start="00:17:38.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""But we don't really""" start="00:17:39.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""need Emacs to be multithreaded, though.""" start="00:17:41.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs does not need to be multithreaded.""" start="00:17:43.820" video="mainVideo-reader" id="subtitle"]] [[!template text="""What needs to be multithreaded""" start="00:17:45.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""is the rendering part""" start="00:17:47.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""because that's the most expensive part.""" start="00:17:48.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""In Emacs, we're only just displaying images.""" start="00:17:50.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs itself does not have a PDF engine""" start="00:17:53.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is rendering stuff.""" start="00:17:56.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""MuPDF is supposed to take care of that.""" start="00:17:57.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if I can do multithreading""" start="00:18:00.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the rendering pipeline,""" start="00:18:03.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is when I'm rendering pages""" start="00:18:05.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""instead of displaying them,""" start="00:18:07.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""that's fine for me because""" start="00:18:08.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""the rendering part most of the time,""" start="00:18:10.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""especially in scanned PDFs,""" start="00:18:11.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""is the most expensive part.""" start="00:18:12.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if you look at this graph,""" start="00:18:14.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""we have two parts here.""" start="00:18:16.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""We have the display pipeline""" start="00:18:17.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""and we have the rendering pipeline.""" start="00:18:19.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""In the display pipeline,""" start="00:18:22.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""we have just the Emacs session""" start="00:18:23.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""which has the reader loaded""" start="00:18:26.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and that's the main thread.""" start="00:18:29.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""Then we have the rendering pipeline""" start="00:18:31.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""which has the MuPDF system package""" start="00:18:33.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""dynamically linked.""" start="00:18:35.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""So when you load Emacs Reader,""" start="00:18:38.460" video="mainVideo-reader" id="subtitle"]] [[!template text="""we initialize a thread pool with eight threads.""" start="00:18:40.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now what you do is let's say we are at page 50.""" start="00:18:45.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""At page 50, the Emacs Reader""" start="00:18:48.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""maintains a cache.""" start="00:18:51.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's like a stack of pages""" start="00:18:54.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""that we keep in memory all the time.""" start="00:18:56.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""This cache is entirely outside of Emacs.""" start="00:18:58.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""It is not inside Emacs environment.""" start="00:19:02.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""It is in the C memory heap,""" start="00:19:04.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the MuPDF memory heap""" start="00:19:07.571" video="mainVideo-reader" id="subtitle"]] [[!template text="""that is outside of Emacs environment.""" start="00:19:09.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""It does not make any calls to Emacs anything.""" start="00:19:11.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""It does not have a single Elisp line.""" start="00:19:13.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this cache is stored outside.""" start="00:19:15.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now when I want to retrieve""" start="00:19:20.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""anything from this cache,""" start="00:19:22.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""let's say, so I have cached""" start="00:19:23.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""up until 55, from 45 to 55.""" start="00:19:26.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""So what happens is that""" start="00:19:29.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""when you're at page 50,""" start="00:19:31.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""you always have a cache""" start="00:19:32.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""that's n + 5 and n - 5.""" start="00:19:34.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you have cache of 5 pages forward""" start="00:19:36.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""and 5 pages backward.""" start="00:19:39.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""But let's say I want to go to page 56.""" start="00:19:41.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So I will ask an Emacs render page 56.""" start="00:19:45.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""And I'm not going to ask it""" start="00:19:50.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""to MuPDF directly.""" start="00:19:51.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm going to ask it""" start="00:19:53.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""to the thread pool that do this job.""" start="00:19:54.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""And thread pool is going to""" start="00:19:56.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""assign one thread to it.""" start="00:19:58.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""Let's say the thread 1""" start="00:19:59.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""which is going to render page 56.""" start="00:20:00.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""So this thread is going to make calls to MuPDF""" start="00:20:03.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""through our code dynamic module.""" start="00:20:06.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""And MuPDF after rendering it""" start="00:20:08.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""is going to store it in the cache.""" start="00:20:11.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we're going to add another 56 page to this.""" start="00:20:13.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now, while this is happening,""" start="00:20:18.060" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs Reader does not, like Emacs itself,""" start="00:20:21.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""the session is not going to be stuck""" start="00:20:24.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""because we just made a call to the thread.""" start="00:20:27.380" video="mainVideo-reader" id="subtitle"]] [[!template text="""We just asked the thread.""" start="00:20:30.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""So like this, this call, like it's done.""" start="00:20:32.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you just assign something to a thread""" start="00:20:35.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then this is fine.""" start="00:20:38.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""Like, you're not waiting for the thread""" start="00:20:40.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""to complete or anything.""" start="00:20:42.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs is not waiting for the thread to complete.""" start="00:20:43.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""The dynamic module or the C side""" start="00:20:46.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""might wait to complete""" start="00:20:48.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""but that is entirely different from""" start="00:20:49.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""the Emacs session.""" start="00:20:51.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""So Emacs viewer can continue to""" start="00:20:52.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""display the page 50""" start="00:20:54.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""while the rendering pipeline""" start="00:20:56.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""is still rendering the 56th page.""" start="00:20:58.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""And when Emacs asks to display page 56,""" start="00:21:01.980" video="mainVideo-reader" id="subtitle"]] [[!template text="""it's going to ask it to a thread pool.""" start="00:21:05.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""Then thread pool is going to assign""" start="00:21:09.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""another thread, let's say this one,""" start="00:21:11.537" video="mainVideo-reader" id="subtitle"]] [[!template text="""to retrieve page 56 from the memory cache.""" start="00:21:13.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""And then the 56 page is going to be sent""" start="00:21:17.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""to the Emacs to be displayed.""" start="00:21:20.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""Again, the retrieval part""" start="00:21:24.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""is entirely independent of Emacs.""" start="00:21:26.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs does not have to wait for it.""" start="00:21:28.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs only needs to wait to display it.""" start="00:21:30.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, the displaying part""" start="00:21:34.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""and the rendering pipeline""" start="00:21:36.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""are entirely asynchronous, so to speak.""" start="00:21:37.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""And in the diagram, if you see,""" start="00:21:41.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""all the arrows that are""" start="00:21:43.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""magenta in color,""" start="00:21:46.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""they are native to the Emacs runtime.""" start="00:21:48.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""That is, they are single-threaded.""" start="00:21:51.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""They are connected to Emacs.""" start="00:21:53.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""And all the arrows that are red in color,""" start="00:21:55.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""they are totally asynchronous.""" start="00:21:58.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""They can be multi-threaded if you want.""" start="00:22:01.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""They are multi-threaded by default""" start="00:22:03.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""because they interact""" start="00:22:05.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""only with the MuPDF shared library""" start="00:22:07.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""and the C heap.""" start="00:22:09.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""They do not touch anything""" start="00:22:11.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the Emacs runtime.""" start="00:22:12.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is how we're able to switch quickly""" start="00:22:14.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""between these huge scanned PDFs""" start="00:22:18.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""that have huge images""" start="00:22:22.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""in each of their pages""" start="00:22:23.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""because we don't really wait for""" start="00:22:25.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""each page to be rendered.""" start="00:22:28.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""And Emacs does not wait for that.""" start="00:22:31.380" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's another architectural feature""" start="00:22:35.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""of Emacs Reader""" start="00:22:39.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""that we are system-level multithreaded.""" start="00:22:40.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now Emacs viewer also supports""" start="00:22:43.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""almost all document formats.""" start="00:22:47.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""It supports PDF, EPUB, MOBI, XPS, CPZ comics,""" start="00:22:49.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it even supports""" start="00:22:54.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""other non-ebook formats""" start="00:22:56.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""like document format,""" start="00:22:59.971" video="mainVideo-reader" id="subtitle"]] [[!template text="""so you can open""" start="00:23:00.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""LibreOffice documents in it,""" start="00:23:01.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""and even stuff like PPT and Excel in it,""" start="00:23:04.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""even though they're not going to be""" start="00:23:07.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""supported in a as nice manner.""" start="00:23:08.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""And we can do that because MuPDF does this.""" start="00:23:13.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""MuPDF has support for all of this""" start="00:23:16.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it treats them just as it treats PDF.""" start="00:23:18.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""Nothing special.""" start="00:23:22.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""The only thing that we don't support right now""" start="00:23:24.540" video="mainVideo-reader" id="subtitle"]] [[!template text="""is DejaVu, so that is not supported right now.""" start="00:23:26.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm going to work on making it supported""" start="00:23:30.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""at the upstream MuPDF.""" start="00:23:33.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's going to take a long time,""" start="00:23:36.020" video="mainVideo-reader" id="subtitle"]] [[!template text="""but it's in the plans.""" start="00:23:38.440" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Native Emacs integrations""" start="00:23:44.240" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Now with Emacs Reader,""" start="00:23:44.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""we also integrate""" start="00:23:45.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""with existing Emacs packages""" start="00:23:46.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""as much as possible.""" start="00:23:48.620" video="mainVideo-reader" id="subtitle"]] [[!template text="""So bookmarks, C-x r b,""" start="00:23:50.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""you can do it natively.""" start="00:23:53.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you can save a page as a bookmark""" start="00:23:54.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""just as you save anything else in Emacs""" start="00:23:57.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""as a bookmark.""" start="00:23:59.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""There's also saveplace integration.""" start="00:24:00.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you can scroll a PDF, close it,""" start="00:24:02.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then come back to it""" start="00:24:06.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""at the same page that you saved it at.""" start="00:24:07.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""Sorry, that you closed it at.""" start="00:24:10.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""And it's going to work just out of the box""" start="00:24:12.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""because of the saveplace""" start="00:24:14.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""package in Emacs that is built in.""" start="00:24:16.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""We also have imenu integration""" start="00:24:19.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""for table of contents.""" start="00:24:20.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if you see this, this is imenu""" start="00:24:22.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""and you can scroll through the contents""" start="00:24:26.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""just like you scroll through any imenu.""" start="00:24:28.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can also do it in the menu bar by clicking.""" start="00:24:30.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""It works just as nice.""" start="00:24:39.500" video="mainVideo-reader" id="subtitle"]] [[!template text="""We also have something like""" start="00:24:40.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""the outline mode that pdf-tools has.""" start="00:24:42.740" video="mainVideo-reader" id="subtitle"]] [[!template text="""So if you press O in a document,""" start="00:24:44.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""it's going to give you this outline.""" start="00:24:48.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""And these are buttons that are clickable.""" start="00:24:49.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can click them.""" start="00:24:53.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can press Enter at them.""" start="00:24:54.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""And this is the menu bar item that I was looking at.""" start="00:24:56.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""If you click here, index,""" start="00:25:00.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""it's going to show you""" start="00:25:02.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""the exact same thing""" start="00:25:03.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""but in a different interface.""" start="00:25:05.340" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""(Naive) dark mode""" start="00:25:10.340" video="mainVideo-reader" id="subtitle"]]
[[!template text="""We also have a naive dark mode,""" start="00:25:10.340" video="mainVideo-reader" id="subtitle"]] [[!template text="""which is not really as nice as""" start="00:25:15.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""we would like it to be,""" start="00:25:17.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""and dark mode fanatics""" start="00:25:18.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""I'm sure will have issues with it,""" start="00:25:20.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""but we're going to improve it in time.""" start="00:25:22.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""For now, this is what we have.""" start="00:25:24.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""And it can be enabled per document,""" start="00:25:27.380" video="mainVideo-reader" id="subtitle"]] [[!template text="""so you can have one, like,""" start="00:25:30.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""one document that is in dark mode,""" start="00:25:33.100" video="mainVideo-reader" id="subtitle"]] [[!template text="""but another one that is not.""" start="00:25:34.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""That is nice to have.""" start="00:25:36.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""Eventually we're going to work on more themes.""" start="00:25:39.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""You should be able to actually integrate it""" start="00:25:42.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""with Emacs themes as much as possible.""" start="00:25:46.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can make it default so that""" start="00:25:49.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""it inherits colors from the Emacs theme.""" start="00:25:52.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""That is one of the things""" start="00:25:54.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""that we also have planned.""" start="00:25:56.360" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Challenges and further improvements""" start="00:26:01.140" video="mainVideo-reader" id="subtitle"]]
[[!template text="""We did face a bunch of challenges""" start="00:26:01.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""while trying to implement these features.""" start="00:26:03.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""One of the initial challenges was that""" start="00:26:05.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""SVGs were actually a bad idea.""" start="00:26:07.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""They're huge, especially in scanned PDFs,""" start="00:26:09.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""and they make things much slower.""" start="00:26:12.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we chose to actually have PPMs,""" start="00:26:14.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""which is the simplest image format ever possible.""" start="00:26:18.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""Now, it was also very difficult""" start="00:26:24.100" video="mainVideo-reader" id="subtitle"]] [[!template text="""to make reader-mode be window-specific.""" start="00:26:26.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""So, you know, while you're scrolling""" start="00:26:29.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""the same document in one window,""" start="00:26:31.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""the other window with the same document""" start="00:26:34.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""should not change.""" start="00:26:36.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""We should be able to have multiple pages""" start="00:26:37.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""in different windows of the same document.""" start="00:26:39.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""That was very difficult""" start="00:26:42.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""because as I told you about the cache,""" start="00:26:44.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""the cache works in an idiosyncratic manner""" start="00:26:46.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""and we needed to make it so that each window""" start="00:26:50.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""will have its own cache""" start="00:26:54.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""instead of having a global cache for each file.""" start="00:26:56.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""That took some rewrite.""" start="00:27:01.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""And now, because we needed to do""" start="00:27:03.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""this sort of multithreading,""" start="00:27:06.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""system-level multithreading,""" start="00:27:07.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""we needed to use""" start="00:27:09.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""a specific package of MuPDF""" start="00:27:10.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""that had a bug for this which got fixed.""" start="00:27:13.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""And that's 1.26.0.""" start="00:27:16.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""Because we did that,""" start="00:27:20.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""a lot of the GNU/Linux distributions did not""" start="00:27:23.337" video="mainVideo-reader" id="subtitle"]] [[!template text="""really have this latest package.""" start="00:27:26.463" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we had to actually""" start="00:27:28.872" video="mainVideo-reader" id="subtitle"]] [[!template text="""package it in-tree.""" start="00:27:30.772" video="mainVideo-reader" id="subtitle"]] [[!template text="""as a git sub-module.""" start="00:27:33.805" video="mainVideo-reader" id="subtitle"]] [[!template text="""That was a horror! But eventually... now""" start="00:27:36.972" video="mainVideo-reader" id="subtitle"]] [[!template text="""I think most GNU/Linux distributions""" start="00:27:40.738" video="mainVideo-reader" id="subtitle"]] [[!template text="""already have this [version].""" start="00:27:43.605" video="mainVideo-reader" id="subtitle"]] [[!template text="""The upcoming features that we have planned""" start="00:27:46.341" video="mainVideo-reader" id="subtitle"]] [[!template text="""are the first one is that we need to rewrite""" start="00:27:48.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""the display mechanism entirely from scratch""" start="00:27:52.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""to use a tiled rendering approach.""" start="00:27:55.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""So right now we just take an image""" start="00:27:57.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""and display it inside an Emacs buffer""" start="00:28:00.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""just like that.""" start="00:28:02.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""But it will be changed so that the image""" start="00:28:03.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""will be displayed in the tiled manner""" start="00:28:08.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""so there will be multiple tiles""" start="00:28:10.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""but it'll be pixel perfect""" start="00:28:12.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""so you won't really see a difference.""" start="00:28:14.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""The reason to do this is to implement features""" start="00:28:16.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""for text selection, actually.""" start="00:28:19.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we can't really do text selection""" start="00:28:21.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""without running into a bunch of memory""" start="00:28:24.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""and other issues latency issues""" start="00:28:27.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""if we don't do tiling.""" start="00:28:30.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""So we need to do those two things,""" start="00:28:33.020" video="mainVideo-reader" id="subtitle"]] [[!template text="""they are at the highest priority right now.""" start="00:28:35.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""And then, once we're done with that,""" start="00:28:38.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""we're going to support annotations,""" start="00:28:40.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""highlighting, everything that you're used to""" start="00:28:42.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""in pdf-tools and org-noter.""" start="00:28:45.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""And once we're done with that,""" start="00:28:47.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""we're going to also integrate with AucTeX and SyncTeX.""" start="00:28:50.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""Because right now, when a PDF gets updated,""" start="00:28:55.020" video="mainVideo-reader" id="subtitle"]] [[!template text="""especially a LaTeX PDF,""" start="00:28:58.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""since there is no SyncTeX integration,""" start="00:29:00.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""it can't really do it nicely""" start="00:29:03.438" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it sometimes even crashes Emacs.""" start="00:29:05.772" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's something that""" start="00:29:08.661" video="mainVideo-reader" id="subtitle"]] [[!template text="""we will be planning to implement.""" start="00:29:11.538" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""What Emacs can learn?""" start="00:29:14.272" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Now, from this experiment,""" start="00:29:14.272" video="mainVideo-reader" id="subtitle"]] [[!template text="""what exactly can Emacs,""" start="00:29:16.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""the Emacs core devs and others""" start="00:29:17.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""who are building packages can learn?""" start="00:29:20.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""Well, the first thing is that all of this""" start="00:29:22.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""should not be really this difficult""" start="00:29:24.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""because all we're asking from Emacs""" start="00:29:27.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""is to display images in real-time""" start="00:29:30.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and update them in real-time.""" start="00:29:32.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""That should not be that difficult""" start="00:29:36.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""of a thing to do, but apparently it is.""" start="00:29:37.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""And that's why Emacs's graphical interface""" start="00:29:40.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""needs to be more modular, more composable,""" start="00:29:43.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""and flexible for real-time graphics.""" start="00:29:47.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""If it is supposed to have things like,""" start="00:29:51.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""again, a document reader,""" start="00:29:54.220" video="mainVideo-reader" id="subtitle"]] [[!template text="""something like a video editor,""" start="00:29:56.180" video="mainVideo-reader" id="subtitle"]] [[!template text="""and something like that,""" start="00:29:57.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs's graphical interface""" start="00:29:58.980" video="mainVideo-reader" id="subtitle"]] [[!template text="""needs to grow and be more mature.""" start="00:30:00.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""One of the things""" start="00:30:05.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""that's stopping it from doing that""" start="00:30:06.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""is actually Emacs's overlay functionality.""" start="00:30:08.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""So right now, the way we display""" start="00:30:10.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""an image in a buffer""" start="00:30:13.940" video="mainVideo-reader" id="subtitle"]] [[!template text="""is using an overlay,""" start="00:30:16.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""actually multiple overlays.""" start="00:30:18.901" video="mainVideo-reader" id="subtitle"]] [[!template text="""Overlays are static in the sense that""" start="00:30:22.020" video="mainVideo-reader" id="subtitle"]] [[!template text="""if I attach to one image to one overlay,""" start="00:30:25.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""I need to have an entirely different image""" start="00:30:29.740" video="mainVideo-reader" id="subtitle"]] [[!template text="""updated for that overlay.""" start="00:30:34.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""So I need to create another different image,""" start="00:30:37.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""change it in the memory,""" start="00:30:39.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""and then display it to update it.""" start="00:30:41.180" video="mainVideo-reader" id="subtitle"]] [[!template text="""I can't change the image data""" start="00:30:43.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""in real time of the overlay.""" start="00:30:46.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""And that is a big issue.""" start="00:30:49.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""I've actually made an emacs-devel""" start="00:30:54.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""mailing list thread about it.""" start="00:30:56.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""I talked to Eli about it as well.""" start="00:30:58.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""And he said there's a possibility""" start="00:31:01.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""that this can be changed,""" start="00:31:04.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""but it's going to take""" start="00:31:05.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""a certain amount of rewrite.""" start="00:31:06.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""There's also issues with Emacs GC.""" start="00:31:09.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs GC sometimes leaks memory""" start="00:31:12.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""when you update images too quickly.""" start="00:31:14.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""That is, when you have a bunch of images""" start="00:31:16.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""that are getting churned out too quickly,""" start="00:31:18.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs GC starts leaking""" start="00:31:21.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""and it just goes up to""" start="00:31:23.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""a huge number of gigabytes in RAM.""" start="00:31:25.160" video="mainVideo-reader" id="subtitle"]] [[!template text="""That's also a huge problem.""" start="00:31:29.680" video="mainVideo-reader" id="subtitle"]] [[!template text="""The dynamic module API,""" start="00:31:32.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""the emacs-module.h header,""" start="00:31:33.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""needs to have more helpers.""" start="00:31:37.140" video="mainVideo-reader" id="subtitle"]] [[!template text="""It's really bare bones,""" start="00:31:38.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""and I like that it is bare bones""" start="00:31:41.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""so that other languages can use it,""" start="00:31:43.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""but at the same time, I think""" start="00:31:45.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""it'll be really good""" start="00:31:46.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""if we can have some helpers""" start="00:31:47.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""that can do better memory interaction,""" start="00:31:49.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""like strings and so on,""" start="00:31:53.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""which we also faced some issues with.""" start="00:31:57.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""Emacs's fractional scaling system""" start="00:32:00.380" video="mainVideo-reader" id="subtitle"]] [[!template text="""seems to be broken across different toolkits.""" start="00:32:02.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""We have bug reports that say in pgtk in Wayland,""" start="00:32:05.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""something seems to render differently""" start="00:32:11.000" video="mainVideo-reader" id="subtitle"]] [[!template text="""because they have fractional scaling enabled.""" start="00:32:13.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""So that's something""" start="00:32:17.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""that I think Emacs, overall,""" start="00:32:18.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""I think Emacs needs to focus on improving""" start="00:32:21.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""the graphical interface pipeline""" start="00:32:24.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""to be a much more mature one.""" start="00:32:28.240" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Contributing to the development""" start="00:32:32.300" video="mainVideo-reader" id="subtitle"]]
[[!template text="""And finally, how can you contribute""" start="00:32:32.300" video="mainVideo-reader" id="subtitle"]] [[!template text="""to the development of Emacs Reader?""" start="00:32:34.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""Well, we are on Codeberg.""" start="00:32:35.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""We are not on GitHub, sorry.""" start="00:32:37.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can go there,""" start="00:32:40.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""you can look through the issues""" start="00:32:41.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""and send us a PR if you're interested.""" start="00:32:43.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""The next major release""" start="00:32:45.280" video="mainVideo-reader" id="subtitle"]] [[!template text="""is going to go to GNU ELPA.""" start="00:32:46.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""Finally, we are not yet at GNU ELPA,""" start="00:32:49.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""so you can't really do M-x package-install""" start="00:32:52.260" video="mainVideo-reader" id="subtitle"]] [[!template text="""and install our package.""" start="00:32:54.440" video="mainVideo-reader" id="subtitle"]] [[!template text="""you would need to install it""" start="00:32:56.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""through use-package :vc.""" start="00:32:58.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""And since we're going to go to GNU ELPA,""" start="00:33:04.940" video="mainVideo-reader" id="subtitle"]] [[!template text="""we request you to assign""" start="00:33:07.500" video="mainVideo-reader" id="subtitle"]] [[!template text="""your copyright to Emacs""" start="00:33:09.120" video="mainVideo-reader" id="subtitle"]] [[!template text="""because GNU ELPA is essentially part of GNU Emacs.""" start="00:33:10.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""So you would need to do copyright assignment""" start="00:33:13.960" video="mainVideo-reader" id="subtitle"]] [[!template text="""if you make non-trivial contribution.""" start="00:33:16.720" video="mainVideo-reader" id="subtitle"]] [[!template text="""You can join us at IRC""" start="00:33:20.580" video="mainVideo-reader" id="subtitle"]] [[!template text="""at #phi-mu-lambda.""" start="00:33:22.480" video="mainVideo-reader" id="subtitle"]] [[!template text="""And I also stream the development""" start="00:33:24.360" video="mainVideo-reader" id="subtitle"]] [[!template text="""of this package""" start="00:33:27.200" video="mainVideo-reader" id="subtitle"]] [[!template text="""bi-weekly on Sundays""" start="00:33:28.040" video="mainVideo-reader" id="subtitle"]] [[!template text="""at PeerTube at the following channel.""" start="00:33:29.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""Feel free to join us.""" start="00:33:31.640" video="mainVideo-reader" id="subtitle"]]
[[!template new="1" text="""Acknowledgements""" start="00:33:35.520" video="mainVideo-reader" id="subtitle"]]
[[!template text="""Finally, I want to thank Tushar,""" start="00:33:35.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""who has been persistently contributing""" start="00:33:38.500" video="mainVideo-reader" id="subtitle"]] [[!template text="""to the project since 0.1.0,""" start="00:33:40.640" video="mainVideo-reader" id="subtitle"]] [[!template text="""and I'm very, very thankful for him,""" start="00:33:42.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""for his suggestions,""" start="00:33:46.520" video="mainVideo-reader" id="subtitle"]] [[!template text="""and for his code contributions as well.""" start="00:33:47.760" video="mainVideo-reader" id="subtitle"]] [[!template text="""I would also like to thank Prom,""" start="00:33:50.880" video="mainVideo-reader" id="subtitle"]] [[!template text="""who fixed a major bug""" start="00:33:53.320" video="mainVideo-reader" id="subtitle"]] [[!template text="""in the Windows build,""" start="00:33:55.800" video="mainVideo-reader" id="subtitle"]] [[!template text="""since I don't really use Windows anymore,""" start="00:33:56.860" video="mainVideo-reader" id="subtitle"]] [[!template text="""so that was really nice,""" start="00:33:58.840" video="mainVideo-reader" id="subtitle"]] [[!template text="""and for Teeoius, for fixing a pthread bug.""" start="00:33:59.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""I would also like to thank others""" start="00:34:05.460" video="mainVideo-reader" id="subtitle"]] [[!template text="""who helped fix little things,""" start="00:34:06.920" video="mainVideo-reader" id="subtitle"]] [[!template text="""who come to the stream to chat,""" start="00:34:09.560" video="mainVideo-reader" id="subtitle"]] [[!template text="""who sort of see me bang my head""" start="00:34:13.180" video="mainVideo-reader" id="subtitle"]] [[!template text="""across these C memory bugs.""" start="00:34:16.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""So thank you to all of those.""" start="00:34:19.240" video="mainVideo-reader" id="subtitle"]] [[!template text="""And thank you finally to the viewers""" start="00:34:21.600" video="mainVideo-reader" id="subtitle"]] [[!template text="""and to EmacsConf organizers as well.""" start="00:34:24.400" video="mainVideo-reader" id="subtitle"]] [[!template text="""This is a splendid opportunity.""" start="00:34:28.080" video="mainVideo-reader" id="subtitle"]] [[!template text="""Thank you.""" start="00:34:31.940" video="mainVideo-reader" id="subtitle"]]
Captioner: jay_bird

Q&A transcript (unedited)

[[!template text="""The first question,""" start="00:00:00.000" video="qanda-reader" id="subtitle"]] [[!template text="""and I'm reading from the etherpad here,""" start="00:00:01.480" video="qanda-reader" id="subtitle"]] [[!template text="""is there a scope for integrating""" start="00:00:03.600" video="qanda-reader" id="subtitle"]] [[!template text="""the C library to Emacs itself""" start="00:00:05.520" video="qanda-reader" id="subtitle"]] [[!template text="""with MuPDF becoming an optional dependency?""" start="00:00:07.840" video="qanda-reader" id="subtitle"]] [[!template text="""Right, so integrating the C library into Emacs itself""" start="00:00:13.160" video="qanda-reader" id="subtitle"]] [[!template text="""is like having MuPDF inside Emacs source tree.""" start="00:00:18.720" video="qanda-reader" id="subtitle"]] [[!template text="""I don't think Emacs devs would be inclined to do that,""" start="00:00:24.360" video="qanda-reader" id="subtitle"]] [[!template text="""and I don't think we really need it.""" start="00:00:28.000" video="qanda-reader" id="subtitle"]] [[!template text="""Um, I think as it is, uh, Emacs""" start="00:00:30.080" video="qanda-reader" id="subtitle"]] [[!template text="""with doc view needs new tool, which is something you need""" start="00:00:33.040" video="qanda-reader" id="subtitle"]] [[!template text="""to install from new PDF anyways.""" start="00:00:36.440" video="qanda-reader" id="subtitle"]] [[!template text="""So, um, I think it is almost expected""" start="00:00:38.920" video="qanda-reader" id="subtitle"]] [[!template text="""that you install new PDF from system package manager.""" start="00:00:42.600" video="qanda-reader" id="subtitle"]] [[!template text="""Um, and I think that as it is, is better""" start="00:00:46.280" video="qanda-reader" id="subtitle"]] [[!template text="""because we don't really need to have""" start="00:00:49.120" video="qanda-reader" id="subtitle"]] [[!template text="""a whole PDF engine inside Emacs.""" start="00:00:51.000" video="qanda-reader" id="subtitle"]] [[!template text="""Um, Next question also from the pad,""" start="00:00:53.440" video="qanda-reader" id="subtitle"]] [[!template text="""the dynamic module some great,""" start="00:00:59.880" video="qanda-reader" id="subtitle"]] [[!template text="""and it's amazing that they've been there since 2017.""" start="00:01:01.760" video="qanda-reader" id="subtitle"]] [[!template text="""Why do you think they've been slowly""" start="00:01:06.640" video="qanda-reader" id="subtitle"]] [[!template text="""so slow to get adopted?""" start="00:01:09.840" video="qanda-reader" id="subtitle"]] [[!template text="""Is there a prior art with them? Right?""" start="00:01:11.560" video="qanda-reader" id="subtitle"]] [[!template text="""That's a good question.""" start="00:01:14.280" video="qanda-reader" id="subtitle"]] [[!template text="""Actually, I think 1 of the reasons is that.""" start="00:01:16.360" video="qanda-reader" id="subtitle"]] [[!template text="""Most of the time, I think people love Emacs""" start="00:01:22.120" video="qanda-reader" id="subtitle"]] [[!template text="""because they can do so much with Elisp.""" start="00:01:24.920" video="qanda-reader" id="subtitle"]] [[!template text="""I think certainly there is a bias""" start="00:01:27.520" video="qanda-reader" id="subtitle"]] [[!template text="""towards trying to do things with Elisp.""" start="00:01:28.920" video="qanda-reader" id="subtitle"]] [[!template text="""I think there's only a sort of specific class of problems""" start="00:01:31.320" video="qanda-reader" id="subtitle"]] [[!template text="""that you can solve with dynamic modules,""" start="00:01:35.040" video="qanda-reader" id="subtitle"]] [[!template text="""such as this, where you want to use a native library""" start="00:01:36.880" video="qanda-reader" id="subtitle"]] [[!template text="""to do something in a faster, better way.""" start="00:01:40.880" video="qanda-reader" id="subtitle"]] [[!template text="""I use that quite a lot.""" start="00:01:44.240" video="qanda-reader" id="subtitle"]] [[!template text="""There's of course libvterm, which uses a dynamic module""" start="00:01:48.960" video="qanda-reader" id="subtitle"]] [[!template text="""and it does it really well.""" start="00:01:53.320" video="qanda-reader" id="subtitle"]] [[!template text="""And I think there's another one, a plotting library""" start="00:01:55.120" video="qanda-reader" id="subtitle"]] [[!template text="""or package in Emacs that was using something from Python.""" start="00:02:00.440" video="qanda-reader" id="subtitle"]] [[!template text="""So, dynamic modules are good,""" start="00:02:05.880" video="qanda-reader" id="subtitle"]] [[!template text="""but I think they don't really come""" start="00:02:07.880" video="qanda-reader" id="subtitle"]] [[!template text="""to the surface level packages, your day-to-day packages,""" start="00:02:10.040" video="qanda-reader" id="subtitle"]] [[!template text="""because most of the day-to-day packages that we use in Emacs""" start="00:02:13.975" video="qanda-reader" id="subtitle"]] [[!template text="""can be done with Elisp. So, unless you really need""" start="00:02:17.360" video="qanda-reader" id="subtitle"]] [[!template text="""something system-level efficient,""" start="00:02:20.880" video="qanda-reader" id="subtitle"]] [[!template text="""Most of the time, you don't want to write C or C++ or something.""" start="00:02:23.200" video="qanda-reader" id="subtitle"]] [[!template text="""But there is actually a really nice Rust crate for native modules,""" start="00:02:29.520" video="qanda-reader" id="subtitle"]] [[!template text="""and there's a really nice Haskell package.""" start="00:02:34.920" video="qanda-reader" id="subtitle"]] [[!template text="""So there's actually really good support""" start="00:02:37.240" video="qanda-reader" id="subtitle"]] [[!template text="""for multiple languages.""" start="00:02:39.880" video="qanda-reader" id="subtitle"]] [[!template text="""So it's there, it's just not used as much. Yeah.""" start="00:02:41.280" video="qanda-reader" id="subtitle"]] [[!template text="""So what you're saying is""" start="00:02:45.800" video="qanda-reader" id="subtitle"]] [[!template text="""if Elisp weren't so simple to learn and easy to use""" start="00:02:47.040" video="qanda-reader" id="subtitle"]] [[!template text="""and so fully featured,""" start="00:02:51.280" video="qanda-reader" id="subtitle"]] [[!template text="""we'd get a lot more mileage""" start="00:02:52.880" video="qanda-reader" id="subtitle"]] [[!template text="""out of this super cool dynamic module feature.""" start="00:02:54.960" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah. Cool I'll take I'll bring in the next question.""" start="00:02:57.800" video="qanda-reader" id="subtitle"]] [[!template text="""How how? How difficult is our PDF tools to install?""" start="00:03:02.160" video="qanda-reader" id="subtitle"]] [[!template text="""The questioner is installing it""" start="00:03:07.400" video="qanda-reader" id="subtitle"]] [[!template text="""using the built-in package manager""" start="00:03:10.440" video="qanda-reader" id="subtitle"]] [[!template text="""looking at the Emacs reader installation instructions""" start="00:03:12.520" video="qanda-reader" id="subtitle"]] [[!template text="""It doesn't necessarily cover""" start="00:03:16.680" video="qanda-reader" id="subtitle"]] [[!template text="""how how to install that easily""" start="00:03:18.480" video="qanda-reader" id="subtitle"]] [[!template text="""person is not using use package or straight and Okay.""" start="00:03:20.400" video="qanda-reader" id="subtitle"]] [[!template text="""Oh, and they say that you didn't""" start="00:03:25.680" video="qanda-reader" id="subtitle"]] [[!template text="""catch much of this in the presentation.""" start="00:03:27.960" video="qanda-reader" id="subtitle"]] [[!template text="""Okay, so you want me to skip that or should I answer?""" start="00:03:32.440" video="qanda-reader" id="subtitle"]] [[!template text="""It's your choice. If you would like to say more.""" start="00:03:35.080" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah, I think just as a thing,""" start="00:03:38.160" video="qanda-reader" id="subtitle"]] [[!template text="""the reason I said PDF tools is difficult""" start="00:03:40.520" video="qanda-reader" id="subtitle"]] [[!template text="""is PDF tools has a huge list of dependencies.""" start="00:03:43.320" video="qanda-reader" id="subtitle"]] [[!template text="""The only thing Emacs Vita depends""" start="00:03:45.840" video="qanda-reader" id="subtitle"]] [[!template text="""on is new PDF, nothing else. There's a single dependency.""" start="00:03:47.640" video="qanda-reader" id="subtitle"]] [[!template text="""PDF tools depends on a lot of things""" start="00:03:50.600" video="qanda-reader" id="subtitle"]] [[!template text="""and they have their own server,""" start="00:03:54.480" video="qanda-reader" id="subtitle"]] [[!template text="""which is packaged as a system package,""" start="00:03:57.760" video="qanda-reader" id="subtitle"]] [[!template text="""which you don't really find everywhere.""" start="00:04:00.040" video="qanda-reader" id="subtitle"]] [[!template text="""And there's like systems, the new Linux systems""" start="00:04:02.360" video="qanda-reader" id="subtitle"]] [[!template text="""where the package is very difficult to build""" start="00:04:05.040" video="qanda-reader" id="subtitle"]] [[!template text="""because of so many dependencies.""" start="00:04:07.360" video="qanda-reader" id="subtitle"]] [[!template text="""So my goal was to sort of reduce""" start="00:04:10.080" video="qanda-reader" id="subtitle"]] [[!template text="""the number of dependencies.""" start="00:04:13.160" video="qanda-reader" id="subtitle"]] [[!template text="""And then right now it's very, it's sort of a key""" start="00:04:14.840" video="qanda-reader" id="subtitle"]] [[!template text="""to install Emacs Reader.""" start="00:04:19.560" video="qanda-reader" id="subtitle"]] [[!template text="""Once we go to GNU Elpa, it's just""" start="00:04:21.120" video="qanda-reader" id="subtitle"]] [[!template text="""going to be Emacs package install, just that.""" start="00:04:23.320" video="qanda-reader" id="subtitle"]] [[!template text="""Right now you have to do package VC""" start="00:04:26.000" video="qanda-reader" id="subtitle"]] [[!template text="""a bit. Boy, we get spoiled as""" start="00:04:27.920" video="qanda-reader" id="subtitle"]] [[!template text="""Emacs users. Everything just gets so easy""" start="00:04:32.360" video="qanda-reader" id="subtitle"]] [[!template text="""for us. It's like an IDE for our""" start="00:04:35.360" video="qanda-reader" id="subtitle"]] [[!template text="""whole machine. What tools did you use to measure the""" start="00:04:37.960" video="qanda-reader" id="subtitle"]] [[!template text="""memory usage between the three packages?""" start="00:04:44.840" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah, that's a good question.""" start="00:04:48.880" video="qanda-reader" id="subtitle"]] [[!template text="""So during my development, I used mostly for debugging""" start="00:04:50.120" video="qanda-reader" id="subtitle"]] [[!template text="""purposes Valgrind. So Valgrind is a a set of suite""" start="00:04:54.800" video="qanda-reader" id="subtitle"]] [[!template text="""of debugging tools.""" start="00:05:00.120" video="qanda-reader" id="subtitle"]] [[!template text="""And one of the tools that it has is Massive.""" start="00:05:01.560" video="qanda-reader" id="subtitle"]] [[!template text="""It's a heap analyzer, heap profiler.""" start="00:05:03.800" video="qanda-reader" id="subtitle"]] [[!template text="""So Valgrind plus Massive,""" start="00:05:08.920" video="qanda-reader" id="subtitle"]] [[!template text="""and then there's a KDE package""" start="00:05:10.840" video="qanda-reader" id="subtitle"]] [[!template text="""called Massive Visualizer.""" start="00:05:14.120" video="qanda-reader" id="subtitle"]] [[!template text="""So I first get the Massive output using Valgrind,""" start="00:05:15.760" video="qanda-reader" id="subtitle"]] [[!template text="""and then put that output into Massive Visualizer.""" start="00:05:19.840" video="qanda-reader" id="subtitle"]] [[!template text="""That gives me the grasp.""" start="00:05:23.160" video="qanda-reader" id="subtitle"]] [[!template text="""Are there Emacs integrations for those components at all?""" start="00:05:24.520" video="qanda-reader" id="subtitle"]] [[!template text="""Does Valgrind have them?""" start="00:05:28.600" video="qanda-reader" id="subtitle"]] [[!template text="""I don't think so. I don't think so.""" start="00:05:30.280" video="qanda-reader" id="subtitle"]] [[!template text="""There's, yeah, there's I think a few packages""" start="00:05:32.400" video="qanda-reader" id="subtitle"]] [[!template text="""which do something with Massive,""" start="00:05:37.320" video="qanda-reader" id="subtitle"]] [[!template text="""but I don't think like they're maintained.""" start="00:05:38.880" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah. Gotcha. Cool. Awesome opportunity""" start="00:05:42.160" video="qanda-reader" id="subtitle"]] [[!template text="""there for someone spunky.""" start="00:05:47.760" video="qanda-reader" id="subtitle"]] [[!template text="""How is conversion between Elisp and foreign language types?""" start="00:05:49.400" video="qanda-reader" id="subtitle"]] [[!template text="""For example, when interfacing with the C++ library""" start="00:05:55.400" video="qanda-reader" id="subtitle"]] [[!template text="""that makes heavy use of the C++ object system and templates.""" start="00:05:59.040" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah, that's a good question.""" start="00:06:03.440" video="qanda-reader" id="subtitle"]] [[!template text="""So the go-to answer is the blog post that I wrote,""" start="00:06:05.880" video="qanda-reader" id="subtitle"]] [[!template text="""which is an extensive explanation""" start="00:06:10.520" video="qanda-reader" id="subtitle"]] [[!template text="""on how the internals of dynamic modules work.""" start="00:06:12.200" video="qanda-reader" id="subtitle"]] [[!template text="""The short answer is that basically what happens""" start="00:06:14.680" video="qanda-reader" id="subtitle"]] [[!template text="""is anything that is compatible with C-ABI""" start="00:06:21.120" video="qanda-reader" id="subtitle"]] [[!template text="""When you compile that language code,""" start="00:06:24.640" video="qanda-reader" id="subtitle"]] [[!template text="""so when I compile C++ code, I would have a particular API.""" start="00:06:27.760" video="qanda-reader" id="subtitle"]] [[!template text="""So we have a dynamic module API,""" start="00:06:33.560" video="qanda-reader" id="subtitle"]] [[!template text="""which is the emacs-module.h, the file that I showed.""" start="00:06:35.800" video="qanda-reader" id="subtitle"]] [[!template text="""You have to put that into your C++ package program""" start="00:06:39.120" video="qanda-reader" id="subtitle"]] [[!template text="""and then link it to...""" start="00:06:45.800" video="qanda-reader" id="subtitle"]] [[!template text="""So emacs-module.h is basically going to...""" start="00:06:48.680" video="qanda-reader" id="subtitle"]] [[!template text="""like use things in your Emacs installation""" start="00:06:51.120" video="qanda-reader" id="subtitle"]] [[!template text="""to interact with this C++ language. So it's basically FFI.""" start="00:06:56.800" video="qanda-reader" id="subtitle"]] [[!template text="""And what this gives you is that you can have things in C++.""" start="00:07:04.360" video="qanda-reader" id="subtitle"]] [[!template text="""So let's say you want to do multi-threading""" start="00:07:10.960" video="qanda-reader" id="subtitle"]] [[!template text="""the way I did system level multi-threading.""" start="00:07:13.120" video="qanda-reader" id="subtitle"]] [[!template text="""You can have C++ be responsible for the multi-threading.""" start="00:07:15.280" video="qanda-reader" id="subtitle"]] [[!template text="""but you want the output""" start="00:07:20.520" video="qanda-reader" id="subtitle"]] [[!template text="""of the multithreading to go into Emacs.""" start="00:07:23.000" video="qanda-reader" id="subtitle"]] [[!template text="""So then you write like a piece of C++ function,""" start="00:07:24.880" video="qanda-reader" id="subtitle"]] [[!template text="""which is going to be a dynamic module function.""" start="00:07:29.040" video="qanda-reader" id="subtitle"]] [[!template text="""A dynamic module function""" start="00:07:31.880" video="qanda-reader" id="subtitle"]] [[!template text="""is written in the language that you target,""" start="00:07:32.920" video="qanda-reader" id="subtitle"]] [[!template text="""that is C++ or C or Rust.""" start="00:07:34.960" video="qanda-reader" id="subtitle"]] [[!template text="""And then that is going to be compiled""" start="00:07:37.360" video="qanda-reader" id="subtitle"]] [[!template text="""into a share library like SO.""" start="00:07:40.760" video="qanda-reader" id="subtitle"]] [[!template text="""shared object, and then that shared object""" start="00:07:43.280" video="qanda-reader" id="subtitle"]] [[!template text="""is going to be loaded into Emacs system using require.""" start="00:07:46.440" video="qanda-reader" id="subtitle"]] [[!template text="""So when I do require render core""" start="00:07:50.640" video="qanda-reader" id="subtitle"]] [[!template text="""in one of the slides that I showed,""" start="00:07:53.120" video="qanda-reader" id="subtitle"]] [[!template text="""I'm basically loading that shared object,""" start="00:07:54.800" video="qanda-reader" id="subtitle"]] [[!template text="""and that shared object already has""" start="00:07:58.440" video="qanda-reader" id="subtitle"]] [[!template text="""the compiled dynamic module functions and so on.""" start="00:08:00.517" video="qanda-reader" id="subtitle"]] [[!template text="""But my blog will explain that better.""" start="00:08:03.892" video="qanda-reader" id="subtitle"]] [[!template text="""Gotcha. I thought that was pretty clear.""" start="00:08:06.309" video="qanda-reader" id="subtitle"]] [[!template text="""I'm looking forward to seeing that blog post""" start="00:08:10.017" video="qanda-reader" id="subtitle"]] [[!template text="""and understanding what I glossed over""" start="00:08:12.017" video="qanda-reader" id="subtitle"]] [[!template text="""trying to understand from that explanation.""" start="00:08:13.642" video="qanda-reader" id="subtitle"]] [[!template text="""That was great.""" start="00:08:15.861" video="qanda-reader" id="subtitle"]] [[!template text="""Can one look at PDF metadata with Emacs Reader?""" start="00:08:18.421" video="qanda-reader" id="subtitle"]] [[!template text="""Can you do annotations? Does it understand forms?""" start="00:08:22.880" video="qanda-reader" id="subtitle"]] [[!template text="""Can it handle encrypted PDFs?""" start="00:08:26.200" video="qanda-reader" id="subtitle"]] [[!template text="""In other words, I think reading between the lines,""" start="00:08:29.960" video="qanda-reader" id="subtitle"]] [[!template text="""wow, this is awesome.""" start="00:08:33.160" video="qanda-reader" id="subtitle"]] [[!template text="""Is there anything I can't do? You're right.""" start="00:08:34.280" video="qanda-reader" id="subtitle"]] [[!template text="""So Emacs Reader will be able to do all of those things.""" start="00:08:39.200" video="qanda-reader" id="subtitle"]] [[!template text="""It can do annotations. It will be able to do forms.""" start="00:08:44.120" video="qanda-reader" id="subtitle"]] [[!template text="""And we have an issue open for interpret PDFs.""" start="00:08:48.360" video="qanda-reader" id="subtitle"]] [[!template text="""The thing is, right now we are struggling with""" start="00:08:52.280" video="qanda-reader" id="subtitle"]] [[!template text="""making Emacs Reader be very efficient""" start="00:08:54.840" video="qanda-reader" id="subtitle"]] [[!template text="""in terms of highlighting and text selection""" start="00:08:58.760" video="qanda-reader" id="subtitle"]] [[!template text="""because of the challenges that I mentioned in the slides,""" start="00:09:02.680" video="qanda-reader" id="subtitle"]] [[!template text="""so it will be able to do all that.""" start="00:09:05.520" video="qanda-reader" id="subtitle"]] [[!template text="""Once we tackle the basic features""" start="00:09:07.960" video="qanda-reader" id="subtitle"]] [[!template text="""down in an efficient manner. Gotcha. Um.""" start="00:09:10.960" video="qanda-reader" id="subtitle"]] [[!template text="""Comment or questioner says,""" start="00:09:18.600" video="qanda-reader" id="subtitle"]] [[!template text="""I installed Emacs Reader already as promised. Great job.""" start="00:09:24.120" video="qanda-reader" id="subtitle"]] [[!template text="""How can I associate ODT files to open with Emacs Reader?""" start="00:09:28.800" video="qanda-reader" id="subtitle"]] [[!template text="""You don't really need to do anything.""" start="00:09:34.880" video="qanda-reader" id="subtitle"]] [[!template text="""You should be just able to do find file,""" start="00:09:38.480" video="qanda-reader" id="subtitle"]] [[!template text="""Control X, Control F, and open.""" start="00:09:40.600" video="qanda-reader" id="subtitle"]] [[!template text="""And it should open with Emacs Reader""" start="00:09:42.960" video="qanda-reader" id="subtitle"]] [[!template text="""because we have an auto mode list,""" start="00:09:45.320" video="qanda-reader" id="subtitle"]] [[!template text="""a list that takes an ODT file""" start="00:09:47.760" video="qanda-reader" id="subtitle"]] [[!template text="""and opens it with reader mode.""" start="00:09:51.680" video="qanda-reader" id="subtitle"]] [[!template text="""So you should just be able to do find file.""" start="00:09:53.200" video="qanda-reader" id="subtitle"]] [[!template text="""If you're not able to do that,""" start="00:09:55.640" video="qanda-reader" id="subtitle"]] [[!template text="""you should open Embug report.""" start="00:09:56.880" video="qanda-reader" id="subtitle"]] [[!template text="""And I'll just mention""" start="00:09:58.200" video="qanda-reader" id="subtitle"]] [[!template text="""we've got about 10 minutes left of our live Q&A,""" start="00:10:00.760" video="qanda-reader" id="subtitle"]] [[!template text="""but if you're watching the stream,""" start="00:10:03.240" video="qanda-reader" id="subtitle"]] [[!template text="""it's possible that we'll just keep going.""" start="00:10:06.080" video="qanda-reader" id="subtitle"]] [[!template text="""The questions just keep coming, which I just love that.""" start="00:10:08.440" video="qanda-reader" id="subtitle"]] [[!template text="""So feel free to join the BBB link""" start="00:10:10.800" video="qanda-reader" id="subtitle"]] [[!template text="""that should have shown in the IRC chat.""" start="00:10:14.520" video="qanda-reader" id="subtitle"]] [[!template text="""Jump in and we can take questions""" start="00:10:17.440" video="qanda-reader" id="subtitle"]] [[!template text="""as long as Divya has steam for that.""" start="00:10:21.560" video="qanda-reader" id="subtitle"]] [[!template text="""If a PDF file is open in Emacs Reader""" start="00:10:26.000" video="qanda-reader" id="subtitle"]] [[!template text="""and I reintegrate the PDF with some changes,""" start="00:10:30.440" video="qanda-reader" id="subtitle"]] [[!template text="""does the Emacs Reader refresh the PDF on its own""" start="00:10:33.200" video="qanda-reader" id="subtitle"]] [[!template text="""or do I reload it?""" start="00:10:36.520" video="qanda-reader" id="subtitle"]] [[!template text="""Right, that's also a really good question.""" start="00:10:38.920" video="qanda-reader" id="subtitle"]] [[!template text="""So one answer is that it depends on""" start="00:10:41.320" video="qanda-reader" id="subtitle"]] [[!template text="""how you change the PDF.""" start="00:10:44.600" video="qanda-reader" id="subtitle"]] [[!template text="""So for example, if I just replaced the PDF""" start="00:10:46.080" video="qanda-reader" id="subtitle"]] [[!template text="""with something else of the same name,""" start="00:10:50.840" video="qanda-reader" id="subtitle"]] [[!template text="""Emacs will update it immediately.""" start="00:10:52.640" video="qanda-reader" id="subtitle"]] [[!template text="""If you have auto revert mode on,""" start="00:10:55.800" video="qanda-reader" id="subtitle"]] [[!template text="""it'll just revert the buffer""" start="00:10:57.920" video="qanda-reader" id="subtitle"]] [[!template text="""and it'll reload the PDF really nicely.""" start="00:10:59.120" video="qanda-reader" id="subtitle"]] [[!template text="""But if you're doing it something like LaTeX,""" start="00:11:01.880" video="qanda-reader" id="subtitle"]] [[!template text="""where you're writing something in LaTeX""" start="00:11:05.440" video="qanda-reader" id="subtitle"]] [[!template text="""and LaTeX is continuously producing the PDF,""" start="00:11:07.400" video="qanda-reader" id="subtitle"]] [[!template text="""that needs SyncTeX integration.""" start="00:11:10.520" video="qanda-reader" id="subtitle"]] [[!template text="""Because LaTeX, while it's producing the PDF,""" start="00:11:13.280" video="qanda-reader" id="subtitle"]] [[!template text="""it does a lot of funky things.""" start="00:11:16.160" video="qanda-reader" id="subtitle"]] [[!template text="""It does not provide a sort of renderable PDF all the time.""" start="00:11:19.160" video="qanda-reader" id="subtitle"]] [[!template text="""So Emacs will sort of crash trying to""" start="00:11:24.520" video="qanda-reader" id="subtitle"]] [[!template text="""basically render a PDF that is not ready yet.""" start="00:11:28.680" video="qanda-reader" id="subtitle"]] [[!template text="""So we need SyncTex to sync""" start="00:11:31.680" video="qanda-reader" id="subtitle"]] [[!template text="""with LaTeX to do that really nice.""" start="00:11:34.800" video="qanda-reader" id="subtitle"]] [[!template text="""Okay, so we have to do some care""" start="00:11:37.280" video="qanda-reader" id="subtitle"]] [[!template text="""and feeding of the exact timing""" start="00:11:39.560" video="qanda-reader" id="subtitle"]] [[!template text="""if we have more of a continuous behind the curtains, so to speak.""" start="00:11:41.320" video="qanda-reader" id="subtitle"]] [[!template text="""That makes a lot of sense to me. What are the challenges""" start="00:11:46.880" video="qanda-reader" id="subtitle"]] [[!template text="""with integrating synctex and AucTex?""" start="00:11:50.960" video="qanda-reader" id="subtitle"]] [[!template text="""This would be great to see as PDF handles as well,""" start="00:11:55.720" video="qanda-reader" id="subtitle"]] [[!template text="""or PDF tools handles as well. Yeah, yeah.""" start="00:11:58.920" video="qanda-reader" id="subtitle"]] [[!template text="""So, we have Synctex and Auctex planned.""" start="00:12:02.320" video="qanda-reader" id="subtitle"]] [[!template text="""I don't really see any major obstacles""" start="00:12:04.400" video="qanda-reader" id="subtitle"]] [[!template text="""for doing that, to be very honest.""" start="00:12:06.840" video="qanda-reader" id="subtitle"]] [[!template text="""I think we can do it in a much simpler way""" start="00:12:08.680" video="qanda-reader" id="subtitle"]] [[!template text="""than PDF Tools does.""" start="00:12:11.520" video="qanda-reader" id="subtitle"]] [[!template text="""The only reason we haven't done it yet is because, again,""" start="00:12:12.480" video="qanda-reader" id="subtitle"]] [[!template text="""we have more important highlighting""" start="00:12:17.480" video="qanda-reader" id="subtitle"]] [[!template text="""and text selection and those features planned,""" start="00:12:20.480" video="qanda-reader" id="subtitle"]] [[!template text="""but it's anticipated. Yeah. All right. This next question""" start="00:12:24.400" video="qanda-reader" id="subtitle"]] [[!template text="""I love your presentation. Will you be giving another talk""" start="00:12:32.920" video="qanda-reader" id="subtitle"]] [[!template text="""on the architecture you went over a deep dive on?""" start="00:12:36.440" video="qanda-reader" id="subtitle"]] [[!template text="""That would be awesome. I'm not sure if an EmacsConf talk""" start="00:12:39.400" video="qanda-reader" id="subtitle"]] [[!template text="""will be appropriate for this, but I do stream bi-weekly.""" start="00:12:44.920" video="qanda-reader" id="subtitle"]] [[!template text="""So you're always welcome to come on my stream and ask,""" start="00:12:48.480" video="qanda-reader" id="subtitle"]] [[!template text="""and I would be very happy to go deep into this.""" start="00:12:52.600" video="qanda-reader" id="subtitle"]] [[!template text="""I'm looking forward to catching that myself.""" start="00:12:55.360" video="qanda-reader" id="subtitle"]] [[!template text="""Thank you for the shout. Is there search functionality,""" start="00:12:58.120" video="qanda-reader" id="subtitle"]] [[!template text="""something like isearch and occur?""" start="00:13:02.640" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah, we don't really have it,""" start="00:13:05.320" video="qanda-reader" id="subtitle"]] [[!template text="""but this is the most immediate feature""" start="00:13:07.600" video="qanda-reader" id="subtitle"]] [[!template text="""after we have text selection.""" start="00:13:09.600" video="qanda-reader" id="subtitle"]] [[!template text="""So once we have text selection,""" start="00:13:10.960" video="qanda-reader" id="subtitle"]] [[!template text="""once we're able to select the text,""" start="00:13:12.400" video="qanda-reader" id="subtitle"]] [[!template text="""then we can have iSearch so that it can highlight the text.""" start="00:13:14.360" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah. Um, all right. And then, um, there's, I'm just gonna,""" start="00:13:17.680" video="qanda-reader" id="subtitle"]] [[!template text="""I'll read out this question""" start="00:13:26.680" video="qanda-reader" id="subtitle"]] [[!template text="""and then I have to do a little bookkeeping on the pad.""" start="00:13:28.800" video="qanda-reader" id="subtitle"]] [[!template text="""Um, does the dynamic module, uh, prevent customization""" start="00:13:30.640" video="qanda-reader" id="subtitle"]] [[!template text="""that Emacs usually provides advice, hooks, et cetera,""" start="00:13:35.640" video="qanda-reader" id="subtitle"]] [[!template text="""or does everything just kind of""" start="00:13:40.000" video="qanda-reader" id="subtitle"]] [[!template text="""No, if you have a dynamic module,""" start="00:13:44.360" video="qanda-reader" id="subtitle"]] [[!template text="""it doesn't limit you into doing anything.""" start="00:13:46.560" video="qanda-reader" id="subtitle"]] [[!template text="""You can do everything on the Elisp side that you want,""" start="00:13:49.280" video="qanda-reader" id="subtitle"]] [[!template text="""and you only take care of certain things""" start="00:13:52.840" video="qanda-reader" id="subtitle"]] [[!template text="""on the dynamic module side.""" start="00:13:55.720" video="qanda-reader" id="subtitle"]] [[!template text="""If you're asking whether""" start="00:13:56.880" video="qanda-reader" id="subtitle"]] [[!template text="""you can do advices, hooks, and all of that""" start="00:13:58.000" video="qanda-reader" id="subtitle"]] [[!template text="""on the dynamic module itself,""" start="00:14:01.880" video="qanda-reader" id="subtitle"]] [[!template text="""from the dynamic module itself,""" start="00:14:03.880" video="qanda-reader" id="subtitle"]] [[!template text="""that's a bit tricky because something like""" start="00:14:05.680" video="qanda-reader" id="subtitle"]] [[!template text="""Calling a macro or doing macros and dynamic modules""" start="00:14:09.720" video="qanda-reader" id="subtitle"]] [[!template text="""is not really that nice You have to pretty much manually""" start="00:14:14.000" video="qanda-reader" id="subtitle"]] [[!template text="""expand the macro yourself in the dynamic module""" start="00:14:18.120" video="qanda-reader" id="subtitle"]] [[!template text="""so if you want to do it from the dynamic module,""" start="00:14:21.360" video="qanda-reader" id="subtitle"]] [[!template text="""there's not much support right now,""" start="00:14:23.840" video="qanda-reader" id="subtitle"]] [[!template text="""but you can do everything on the elisp side""" start="00:14:25.960" video="qanda-reader" id="subtitle"]] [[!template text="""without touching the dynamic module. Got it""" start="00:14:29.480" video="qanda-reader" id="subtitle"]] [[!template text="""So those are the questions that I see.""" start="00:14:33.400" video="qanda-reader" id="subtitle"]] [[!template text="""I'm just going to take a quick peek,""" start="00:14:38.280" video="qanda-reader" id="subtitle"]] [[!template text="""but let me invite you if you want to.""" start="00:14:40.000" video="qanda-reader" id="subtitle"]] [[!template text="""We've got just about 5 minutes left""" start="00:14:42.640" video="qanda-reader" id="subtitle"]] [[!template text="""and I will get carried away sometimes""" start="00:14:46.000" video="qanda-reader" id="subtitle"]] [[!template text="""and fail to make this invitation before we cut away live,""" start="00:14:48.240" video="qanda-reader" id="subtitle"]] [[!template text="""especially if we do keep going a bit.""" start="00:14:51.280" video="qanda-reader" id="subtitle"]] [[!template text="""that you have live onto the stream.""" start="00:14:54.480" video="qanda-reader" id="subtitle"]] [[!template text="""Of course, you don't have to do that.""" start="00:14:57.800" video="qanda-reader" id="subtitle"]] [[!template text="""You said a lot in your presentation.""" start="00:15:02.600" video="qanda-reader" id="subtitle"]] [[!template text="""No, I think mostly that's fine.""" start="00:15:05.800" video="qanda-reader" id="subtitle"]] [[!template text="""I'm just really happy""" start="00:15:12.200" video="qanda-reader" id="subtitle"]] [[!template text="""that people are interested in the package,""" start="00:15:13.680" video="qanda-reader" id="subtitle"]] [[!template text="""and I would be glad to have contributors""" start="00:15:17.080" video="qanda-reader" id="subtitle"]] [[!template text="""and viewers or anything. That would be nice. Awesome.""" start="00:15:19.880" video="qanda-reader" id="subtitle"]] [[!template text="""So here comes one more question,""" start="00:15:25.200" video="qanda-reader" id="subtitle"]] [[!template text="""or actually a couple more questions coming in.""" start="00:15:28.880" video="qanda-reader" id="subtitle"]] [[!template text="""Following up on dynamic modules,""" start="00:15:31.960" video="qanda-reader" id="subtitle"]] [[!template text="""do you usually create an Elisp shim""" start="00:15:34.240" video="qanda-reader" id="subtitle"]] [[!template text="""from foreign function interface""" start="00:15:38.480" video="qanda-reader" id="subtitle"]] [[!template text="""and then use them with Elisp?""" start="00:15:40.400" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah, so basically how you do is you write,""" start="00:15:41.560" video="qanda-reader" id="subtitle"]] [[!template text="""let's say I have a C function""" start="00:15:46.160" video="qanda-reader" id="subtitle"]] [[!template text="""that I've written in the dynamic module.""" start="00:15:49.640" video="qanda-reader" id="subtitle"]] [[!template text="""It's a dynamic module function.""" start="00:15:51.400" video="qanda-reader" id="subtitle"]] [[!template text="""And then when I'm trying to call""" start="00:15:52.880" video="qanda-reader" id="subtitle"]] [[!template text="""the dynamic module function,""" start="00:15:54.640" video="qanda-reader" id="subtitle"]] [[!template text="""most of the time, I don't call it like that.""" start="00:15:56.040" video="qanda-reader" id="subtitle"]] [[!template text="""I wrap it inside a proper Elisp function""" start="00:15:59.000" video="qanda-reader" id="subtitle"]] [[!template text="""and then call that Elisp function.""" start="00:16:01.680" video="qanda-reader" id="subtitle"]] [[!template text="""So that's how I think it's better to do that because""" start="00:16:03.560" video="qanda-reader" id="subtitle"]] [[!template text="""You can take care of certain cases""" start="00:16:08.280" video="qanda-reader" id="subtitle"]] [[!template text="""on when you want the dynamic module function to be called.""" start="00:16:12.560" video="qanda-reader" id="subtitle"]] [[!template text="""Maybe sometimes you don't want""" start="00:16:15.200" video="qanda-reader" id="subtitle"]] [[!template text="""the dynamic module function""" start="00:16:17.200" video="qanda-reader" id="subtitle"]] [[!template text="""to be called immediately.""" start="00:16:18.840" video="qanda-reader" id="subtitle"]] [[!template text="""So it's better to wrap it.""" start="00:16:19.880" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah. Okay. So timing issues. Yeah.""" start="00:16:22.160" video="qanda-reader" id="subtitle"]] [[!template text="""For the purposes of managing timing issues,""" start="00:16:26.600" video="qanda-reader" id="subtitle"]] [[!template text="""that elisp shim is preferred.""" start="00:16:31.680" video="qanda-reader" id="subtitle"]] [[!template text="""Yeah. Makes sense. Um.""" start="00:16:34.320" video="qanda-reader" id="subtitle"]] [[!template text="""Uh, so question question here""" start="00:16:38.960" video="qanda-reader" id="subtitle"]] [[!template text="""is searching for the person is searching for a roadmap.""" start="00:16:44.640" video="qanda-reader" id="subtitle"]] [[!template text="""Is that already available as a feature?""" start="00:16:47.440" video="qanda-reader" id="subtitle"]] [[!template text="""Searching is on the roadmap.""" start="00:16:49.280" video="qanda-reader" id="subtitle"]] [[!template text="""It is not available yet as a feature, but it's on priority.""" start="00:16:52.240" video="qanda-reader" id="subtitle"]] [[!template text="""I think you may have may have touched on that.""" start="00:16:56.560" video="qanda-reader" id="subtitle"]] [[!template text="""Sorry. All right. Those are the questions that I see.""" start="00:16:59.840" video="qanda-reader" id="subtitle"]] [[!template text="""We've got just a couple of minutes.""" start="00:17:06.560" video="qanda-reader" id="subtitle"]] [[!template text="""I'm not sure if you have more you wanted to say,""" start="00:17:08.280" video="qanda-reader" id="subtitle"]] [[!template text="""but I have to say how much I appreciate your talk,""" start="00:17:10.400" video="qanda-reader" id="subtitle"]] [[!template text="""especially you jumping in live with us""" start="00:17:13.720" video="qanda-reader" id="subtitle"]] [[!template text="""and just taking everything on the fly.""" start="00:17:16.120" video="qanda-reader" id="subtitle"]] [[!template text="""I think this is a big part of what adds the energy,""" start="00:17:19.080" video="qanda-reader" id="subtitle"]] [[!template text="""you in particular, just really dynamic speaker.""" start="00:17:24.560" video="qanda-reader" id="subtitle"]] [[!template text="""Thank you. Thank you. Thank you. I enjoyed it as well.""" start="00:17:28.040" video="qanda-reader" id="subtitle"]] [[!template text="""A person is, and I think this may have been touched on already,""" start="00:17:31.480" video="qanda-reader" id="subtitle"]] [[!template text="""but let's maybe get into it more specifically.""" start="00:17:37.160" video="qanda-reader" id="subtitle"]] [[!template text="""We've said that search is kind of""" start="00:17:39.440" video="qanda-reader" id="subtitle"]] [[!template text="""a next up type of feature as things,""" start="00:17:42.160" video="qanda-reader" id="subtitle"]] [[!template text="""as the current iteration stabilizes.""" start="00:17:44.720" video="qanda-reader" id="subtitle"]] [[!template text="""Question was, you know, occur like, how would you?""" start="00:17:48.160" video="qanda-reader" id="subtitle"]] [[!template text="""Totally. There will be occur searches.""" start="00:17:52.240" video="qanda-reader" id="subtitle"]] [[!template text="""There will be isearch enabled, isearch.""" start="00:17:56.160" video="qanda-reader" id="subtitle"]] [[!template text="""used to with PDF tools,""" start="00:17:59.640" video="qanda-reader" id="subtitle"]] [[!template text="""we would be like parity with the features,""" start="00:18:02.880" video="qanda-reader" id="subtitle"]] [[!template text="""all the features that you're used to with PDF tools.""" start="00:18:06.440" video="qanda-reader" id="subtitle"]] [[!template text="""Um, so, uh, certainly occur anything""" start="00:18:08.720" video="qanda-reader" id="subtitle"]] [[!template text="""that is important in Emacs with text""" start="00:18:12.600" video="qanda-reader" id="subtitle"]] [[!template text="""and that can be done with PDFs.""" start="00:18:15.680" video="qanda-reader" id="subtitle"]] [[!template text="""We really want to do that because, um,""" start="00:18:17.360" video="qanda-reader" id="subtitle"]] [[!template text="""I want the package to be as knitted""" start="00:18:19.840" video="qanda-reader" id="subtitle"]] [[!template text="""into Emacs ecosystem as possible.""" start="00:18:22.680" video="qanda-reader" id="subtitle"]] [[!template text="""Okay. We'll see if we can get in this last question here.""" start="00:18:24.960" video="qanda-reader" id="subtitle"]] [[!template text="""Do you have a timing expectation for ELPA?""" start="00:18:28.160" video="qanda-reader" id="subtitle"]] [[!template text="""Uh, yeah, next major release essentially.""" start="00:18:30.320" video="qanda-reader" id="subtitle"]] [[!template text="""So next major release is most likely""" start="00:18:33.200" video="qanda-reader" id="subtitle"]] [[!template text="""going to be within a month or two.""" start="00:18:35.280" video="qanda-reader" id="subtitle"]] [[!template text="""So once we have the next major release, we're going to be.""" start="00:18:37.320" video="qanda-reader" id="subtitle"]] [[!template text="""Uh, timing couldn't be more perfect.""" start="00:18:39.640" video="qanda-reader" id="subtitle"]] [[!template text="""Maybe this is a good, good point to break.""" start="00:18:43.480" video="qanda-reader" id="subtitle"]] [[!template text="""We'll be cutting away to the next talk""" start="00:18:45.520" video="qanda-reader" id="subtitle"]] [[!template text="""in just a couple of minutes.""" start="00:18:47.760" video="qanda-reader" id="subtitle"]] [[!template text="""So let me say one more time how much""" start="00:18:48.880" video="qanda-reader" id="subtitle"]] [[!template text="""on behalf of all the attendees""" start="00:18:51.480" video="qanda-reader" id="subtitle"]] [[!template text="""and all the volunteers and all everybody,""" start="00:18:52.960" video="qanda-reader" id="subtitle"]] [[!template text="""um, how much we appreciate your talks""" start="00:18:54.960" video="qanda-reader" id="subtitle"]] [[!template text="""and, uh, your awesome contribution to the Emacs world.""" start="00:18:57.080" video="qanda-reader" id="subtitle"]] [[!template text="""Thanks, Corwin.""" start="00:19:01.300" video="qanda-reader" id="subtitle"]]
Questions or comments? Please e-mail [divya@subvertising.org](mailto:divya@subvertising.org?subject=Comment%20for%20EmacsConf%202023%20reader%3A%20An%20introduction%20to%20the%20Emacs%20Reader)