diff options
Diffstat (limited to '2023/info/lspocaml-after.md')
-rw-r--r-- | 2023/info/lspocaml-after.md | 82 |
1 files changed, 22 insertions, 60 deletions
diff --git a/2023/info/lspocaml-after.md b/2023/info/lspocaml-after.md index 56d6ba54..bc5bdc22 100644 --- a/2023/info/lspocaml-after.md +++ b/2023/info/lspocaml-after.md @@ -1,13 +1,10 @@ <!-- Automatically generated by emacsconf-publish-after-page --> -<a name="lspocaml-mainVideo-transcript"></a> -# Transcript +<div class="transcript transcript-mainVideo"><a name="lspocaml-mainVideo-transcript"></a><h1>Transcript</h1> -[[!template new="1" text="""Introduction""" start="00:00:00.000" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""Hi, I'm Austin Theriault,""" start="00:00:00.000" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Introduction""" start="00:00:00.000" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""Hi, I'm Austin Theriault,""" start="00:00:00.000" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and this is writing a language server in OCaml""" start="00:00:01.840" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""for Emacs, fun, and profit.""" start="00:00:04.160" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Real quick, who am I?""" start="00:00:07.640" video="mainVideo-lspocaml" id="subtitle"]] @@ -16,9 +13,7 @@ [[!template text="""and I love working on programming languages, editors,""" start="00:00:13.240" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and cryptography.""" start="00:00:15.360" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""What is Semgrep?""" start="00:00:16.540" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""What is Semgrep?""" start="00:00:16.540" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""What is Semgrep?""" start="00:00:16.540" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""What is Semgrep?""" start="00:00:16.540" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""We're a small cybersecurity startup""" start="00:00:17.800" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""whose core product is a SaaS tool,""" start="00:00:20.040" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""which is static application security testing.""" start="00:00:21.920" video="mainVideo-lspocaml" id="subtitle"]] @@ -30,9 +25,7 @@ [[!template text="""and we have lots of customers all using different IDEs.""" start="00:00:36.960" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Why does that matter?""" start="00:00:39.320" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""How do we show security bugs early?""" start="00:00:40.720" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""Well, our goal is to show security bugs""" start="00:00:40.720" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""How do we show security bugs early?""" start="00:00:40.720" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""Well, our goal is to show security bugs""" start="00:00:40.720" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""as early as possible in the development cycle.""" start="00:00:42.780" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""In the industry, we call this shifting left.""" start="00:00:45.240" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""And so how far left can we shift? The editor.""" start="00:00:48.480" video="mainVideo-lspocaml" id="subtitle"]] @@ -55,9 +48,7 @@ [[!template text="""and then plug it into all of them.""" start="00:01:33.880" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""So how can we do that, though?""" start="00:01:35.800" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""What is the Language Server Protocol?""" start="00:01:37.880" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""Well, in the process of working on this stuff,""" start="00:01:37.880" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""What is the Language Server Protocol?""" start="00:01:37.880" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""Well, in the process of working on this stuff,""" start="00:01:37.880" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""I found out about""" start="00:01:40.680" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""the Language Server Protocol.""" start="00:01:43.000" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""And what's great about the Language Server Protocol is""" start="00:01:44.880" video="mainVideo-lspocaml" id="subtitle"]] @@ -76,9 +67,7 @@ [[!template text="""and you can hook it up to a bunch of language clients""" start="00:02:25.440" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and it'll just work.""" start="00:02:27.440" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Case study: Rust Analyzer""" start="00:02:29.040" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So let's do a quick case study on language servers in LSP,""" start="00:02:29.040" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Case study: Rust Analyzer""" start="00:02:29.040" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So let's do a quick case study on language servers in LSP,""" start="00:02:29.040" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""just so you get an idea of why this is super cool.""" start="00:02:34.040" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""So there's this language server called Rust Analyzer.""" start="00:02:37.240" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""It's a language server for the Rust language.""" start="00:02:40.440" video="mainVideo-lspocaml" id="subtitle"]] @@ -105,9 +94,7 @@ [[!template text="""So you can develop Rust in a way that's relatively efficient""" start="00:03:35.240" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""without having to give up your favorite editor.""" start="00:03:39.080" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Rust Analyzer in action""" start="00:03:42.760" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So here's a quick little demo""" start="00:03:42.760" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Rust Analyzer in action""" start="00:03:42.760" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So here's a quick little demo""" start="00:03:42.760" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""of all the cool things it can do.""" start="00:03:44.400" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""So you can see I typed an error.""" start="00:03:46.320" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""It tells me that I wrote an error.""" start="00:03:48.120" video="mainVideo-lspocaml" id="subtitle"]] @@ -122,9 +109,7 @@ [[!template text="""I didn't have to go and type any commands or anything.""" start="00:04:05.440" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""It just worked.""" start="00:04:07.840" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Why is this useful?""" start="00:04:09.960" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So why is this just useful in general for a user?""" start="00:04:09.960" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Why is this useful?""" start="00:04:09.960" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So why is this just useful in general for a user?""" start="00:04:09.960" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Well, you get the same experience across editors.""" start="00:04:13.400" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Like I was saying, you don't have to give up""" start="00:04:15.800" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""one editor for another""" start="00:04:17.120" video="mainVideo-lspocaml" id="subtitle"]] @@ -160,9 +145,7 @@ [[!template text="""It's great to have just one set of tests""" start="00:05:31.960" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""that you have to pass.""" start="00:05:33.840" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""So what about Emacs?""" start="00:05:36.220" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So why does a language server protocol matter with Emacs?""" start="00:05:36.220" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""So what about Emacs?""" start="00:05:36.220" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So why does a language server protocol matter with Emacs?""" start="00:05:36.220" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Well, like I was saying before,""" start="00:05:40.160" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Emacs gets the benefit from work put into other editors.""" start="00:05:42.380" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""So we get all this language support,""" start="00:05:45.480" video="mainVideo-lspocaml" id="subtitle"]] @@ -188,9 +171,7 @@ [[!template text="""but I would imagine a lot of this stuff is very similar.""" start="00:06:33.300" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Here's a list of some supported languages.""" start="00:06:37.780" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Technical part - Brief communication overview""" start="00:06:40.700" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""Now let's get into the technical part.""" start="00:06:40.700" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Technical part - Brief communication overview""" start="00:06:40.700" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""Now let's get into the technical part.""" start="00:06:40.700" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""How does LSP actually work?""" start="00:06:42.640" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""So let's go over how it communicates first.""" start="00:06:45.040" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""It uses JSONRPC,""" start="00:06:47.160" video="mainVideo-lspocaml" id="subtitle"]] @@ -226,14 +207,10 @@ [[!template text="""and the communication is relatively simple,""" start="00:07:55.400" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""which is great.""" start="00:07:57.720" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Example request""" start="00:07:58.760" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""This is what it looks like, what a request looks like.""" start="00:07:58.760" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Example request""" start="00:07:58.760" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""This is what it looks like, what a request looks like.""" start="00:07:58.760" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Notifications look somewhat similar.""" start="00:08:01.240" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""LSP capabilities""" start="00:08:03.380" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So now we know how LSP communication works,""" start="00:08:03.380" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""LSP capabilities""" start="00:08:03.380" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So now we know how LSP communication works,""" start="00:08:03.380" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""but how does the actual protocol work?""" start="00:08:05.880" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Well, almost all of the protocol is opt-in,""" start="00:08:09.860" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""meaning you don't have to support the entire specification,""" start="00:08:12.400" video="mainVideo-lspocaml" id="subtitle"]] @@ -267,9 +244,7 @@ [[!template text="""And that's a little bit more work,""" start="00:09:18.700" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""but it's better than where we were without LSP.""" start="00:09:20.400" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Tips on writing a LS""" start="00:09:23.380" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""So some quick tips on writing a language server.""" start="00:09:23.380" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Tips on writing a LS""" start="00:09:23.380" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""So some quick tips on writing a language server.""" start="00:09:23.380" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""I'm not going to get too into this""" start="00:09:25.440" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""because it's very application-specific.""" start="00:09:27.480" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""I wrote Semgrep's in OCaml""" start="00:09:30.800" video="mainVideo-lspocaml" id="subtitle"]] @@ -312,9 +287,7 @@ [[!template text="""this stuff is really easy.""" start="00:11:00.320" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""You're basically just wiring stuff up.""" start="00:11:01.680" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Supporting a LS through LSP mode in Emacs""" start="00:11:03.480" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""But, yeah. So, now we know all about""" start="00:11:03.480" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Supporting a LS through LSP mode in Emacs""" start="00:11:03.480" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""But, yeah. So, now we know all about""" start="00:11:03.480" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""LSP and language servers.""" start="00:11:08.360" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Say you want to actually""" start="00:11:10.800" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""add support for a language server in Emacs.""" start="00:11:11.880" video="mainVideo-lspocaml" id="subtitle"]] @@ -337,9 +310,7 @@ [[!template text="""to the list of clients, and then do some documentation,""" start="00:12:01.320" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""because documentation's great.""" start="00:12:03.720" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Create a client""" start="00:12:06.000" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""First, creating a client.""" start="00:12:06.000" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Create a client""" start="00:12:06.000" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""First, creating a client.""" start="00:12:06.000" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""In the `clients/` folder in `lsp-mode/`,""" start="00:12:07.640" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""literally just add, like, `lsp-` whatever it is,""" start="00:12:09.640" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""`require` the library, and register a client.""" start="00:12:12.920" video="mainVideo-lspocaml" id="subtitle"]] @@ -363,9 +334,7 @@ [[!template text="""but just know that these aren't your only options,""" start="00:13:01.200" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and then finally provide your client.""" start="00:13:03.800" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Add to list of client packages""" start="00:13:07.300" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""Next, you just have to add your client""" start="00:13:07.300" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Add to list of client packages""" start="00:13:07.300" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""Next, you just have to add your client""" start="00:13:07.300" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""to the list of clients that `lsp-mode` supports,""" start="00:13:09.800" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and now you've added support for a whole new language,""" start="00:13:12.160" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""whole new framework, whole new tool to Emacs,""" start="00:13:15.640" video="mainVideo-lspocaml" id="subtitle"]] @@ -392,14 +361,10 @@ [[!template text="""and it's similar to LSP but for debuggers,""" start="00:14:07.320" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""which is very cool,""" start="00:14:09.680" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Add documentation!""" start="00:14:11.680" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""and then finally link to your documentation.""" start="00:14:11.680" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Add documentation!""" start="00:14:11.680" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""and then finally link to your documentation.""" start="00:14:11.680" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Please, please document your stuff.""" start="00:14:14.600" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Adding commands and custom capabilities""" start="00:14:17.880" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""If you want to add, like, a custom Emacs function""" start="00:14:17.880" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Adding commands and custom capabilities""" start="00:14:17.880" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""If you want to add, like, a custom Emacs function""" start="00:14:17.880" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""or custom capabilities, it's super easy.""" start="00:14:20.480" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""It's literally just, like, calling a normal Emacs function.""" start="00:14:22.680" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""For example, Semgrep normally only scans files""" start="00:14:27.640" video="mainVideo-lspocaml" id="subtitle"]] @@ -414,9 +379,7 @@ [[!template text="""and do something with the result,""" start="00:14:56.080" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and so that's adding custom capabilities.""" start="00:14:58.460" video="mainVideo-lspocaml" id="subtitle"]] -[[!template new="1" text="""Thanks for listening""" start="00:15:01.360" video="mainVideo-lspocaml" id="subtitle"]] - -[[!template text="""That's pretty much it. Thank you for listening.""" start="00:15:01.360" video="mainVideo-lspocaml" id="subtitle"]] +<div class="transcript-heading">[[!template new="1" text="""Thanks for listening""" start="00:15:01.360" video="mainVideo-lspocaml" id="subtitle"]]</div>[[!template text="""That's pretty much it. Thank you for listening.""" start="00:15:01.360" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""Some resources here.""" start="00:15:04.320" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""These links are clickable if you get the PDF,""" start="00:15:05.640" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""if you get the slides. Semgrep: we're hiring!""" start="00:15:08.240" video="mainVideo-lspocaml" id="subtitle"]] @@ -440,12 +403,11 @@ [[!template text="""but hopefully this is sufficient for y'all,""" start="00:15:58.440" video="mainVideo-lspocaml" id="subtitle"]] [[!template text="""and now it's time for some Q&A.""" start="00:16:01.480" video="mainVideo-lspocaml" id="subtitle"]] - +</div> Captioner: sachac -<a name="lspocaml-qanda-transcript"></a> -# Q&A transcript (unedited) +<div class="transcript transcript-qanda"><a name="lspocaml-qanda-transcript"></a><h1>Q&A transcript (unedited)</h1> [[!template text="""[Speaker 0]: I would invite all on the,""" start="00:00:03.540" video="qanda-lspocaml" id="subtitle"]] [[!template text="""who are currently watching,""" start="00:00:04.600" video="qanda-lspocaml" id="subtitle"]] @@ -787,7 +749,7 @@ Captioner: sachac [[!template text="""[Speaker 1]: Oh yeah, definitely.""" start="00:14:21.560" video="qanda-lspocaml" id="subtitle"]] [[!template text="""[Speaker 0]: Dan?""" start="00:14:23.500" video="qanda-lspocaml" id="subtitle"]] -Questions or comments? Please e-mail [austin@cutedogs.org](mailto:austin@cutedogs.org?subject=Comment%20for%20EmacsConf%202023%20lspocaml%3A%20Writing%20a%20language%20server%20in%20OCaml%20for%20Emacs%2C%20fun%2C%20and%20profit) +</div>Questions or comments? Please e-mail [austin@cutedogs.org](mailto:austin@cutedogs.org?subject=Comment%20for%20EmacsConf%202023%20lspocaml%3A%20Writing%20a%20language%20server%20in%20OCaml%20for%20Emacs%2C%20fun%2C%20and%20profit) <!-- End of emacsconf-publish-after-page --> |