diff options
Diffstat (limited to '')
4 files changed, 1476 insertions, 0 deletions
diff --git a/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main--chapters.vtt b/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main--chapters.vtt new file mode 100644 index 00000000..afb34b6a --- /dev/null +++ b/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main--chapters.vtt @@ -0,0 +1,41 @@ +WEBVTT + + +00:00:00.071 --> 00:02:14.025 +Introduction + +00:02:14.825 --> 00:03:25.462 +Typical coding agent review + +00:03:28.261 --> 00:04:18.130 +Hutch + +00:04:19.220 --> 00:04:50.950 +Tools + +00:04:51.291 --> 00:05:12.425 +Report + +00:05:14.317 --> 00:05:34.800 +Comments + +00:05:37.385 --> 00:06:11.953 +Additional reviews + +00:06:13.194 --> 00:07:01.263 +Storing review notes + +00:07:03.876 --> 00:07:36.482 +Formal eval and Perfetto + +00:07:38.342 --> 00:09:29.750 +Tracing performance with Perfetto + +00:09:32.417 --> 00:09:53.294 +SQL queries + +00:09:55.100 --> 00:11:07.694 +Model comparison + +00:11:09.356 --> 00:11:43.462 +Summary diff --git a/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main.vtt b/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main.vtt new file mode 100644 index 00000000..2fb37039 --- /dev/null +++ b/2026/captions/emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--main.vtt @@ -0,0 +1,758 @@ +WEBVTT captioned by sacha + +NOTE Introduction + +00:00:00.071 --> 00:00:00.572 +I'm Akshay. + +00:00:01.112 --> 00:00:03.694 +I'm going to talk about a local code review tool + +00:00:03.774 --> 00:00:06.477 +I've been building for Emacs for the past five + +00:00:06.557 --> 00:00:08.219 +months or so. + +00:00:08.239 --> 00:00:10.661 +I've previously been an Emacs user for about 10 + +00:00:10.701 --> 00:00:13.704 +years, and I use it as a daily driver for most of + +00:00:13.724 --> 00:00:15.205 +my code and prose editing. + +00:00:16.306 --> 00:00:19.509 +When I say a local review tool, I mean local + +00:00:19.529 --> 00:00:22.272 +to Emacs and not necessarily local LLMs on + +00:00:22.292 --> 00:00:24.334 +device, even though I think that's theoretically + +00:00:24.374 --> 00:00:25.014 +possible today. + +00:00:26.475 --> 00:00:28.797 +By code reviews, I specifically mean the + +00:00:28.837 --> 00:00:32.339 +thing we do on pull requests and on tools like + +00:00:32.378 --> 00:00:34.581 +Gerrit and Phabricator in the past. + +00:00:36.242 --> 00:00:38.924 +In other words, a system for gating code before + +00:00:38.984 --> 00:00:40.405 +it's merged to be released. + +00:00:42.778 --> 00:00:45.321 +I should say that there have been many good + +00:00:45.381 --> 00:00:48.384 +talks about LLMs in AI and what that means for + +00:00:48.564 --> 00:00:51.266 +Emacs, so I'm not going to relitigate any of + +00:00:51.307 --> 00:00:52.207 +those arguments again. + +00:00:52.728 --> 00:00:55.551 +I approach this, as many others in the community, + +00:00:55.611 --> 00:00:58.794 +by letting go of semantic boundaries under which + +00:00:58.934 --> 00:01:02.918 +Emacs is considered an editor, but just rather a + +00:01:03.158 --> 00:01:05.239 +mutable productivity environment instead. + +00:01:07.072 --> 00:01:09.074 +But I do want to briefly show you my experience + +00:01:09.114 --> 00:01:11.415 +with existing code review tools that are around + +00:01:12.296 --> 00:01:15.718 +because I have a bit of a love-hate relationship + +00:01:15.759 --> 00:01:16.079 +with them. + +00:01:16.819 --> 00:01:19.741 +It can be pretty overwhelming to keep up with the + +00:01:19.841 --> 00:01:23.324 +speed at which the amount of code gets produced + +00:01:23.384 --> 00:01:26.366 +daily these days, especially if you work in a + +00:01:26.426 --> 00:01:31.109 +team, but also the amount of review text that now + +00:01:31.169 --> 00:01:33.291 +gets attached to that code. + +00:01:34.639 --> 00:01:37.942 +In my experience, even though the noise to + +00:01:37.962 --> 00:01:39.442 +signal for these tools worst case + +00:01:39.443 --> 00:01:42.123 +is like 10 to 1, I don't feel like + +00:01:42.124 --> 00:01:44.345 +we can get rid of them entirely + +00:01:44.346 --> 00:01:45.787 +because those ones can sometimes be + +00:01:45.827 --> 00:01:47.828 +pretty sharp and important. + +00:01:49.330 --> 00:01:53.593 +But I do think there's value in sort of shifting + +00:01:53.613 --> 00:01:56.495 +the process to the left to borrow a term from the + +00:01:56.555 --> 00:01:58.116 +DevRel industry. + +00:01:59.997 --> 00:02:01.818 +Because it's useful to see the work you did + +00:02:02.699 --> 00:02:05.980 +before you create more work for others, for your + +00:02:06.020 --> 00:02:07.001 +colleagues and your peers. + +00:02:07.821 --> 00:02:09.942 +Many of these flows can now be easily + +00:02:10.002 --> 00:02:12.744 +unlocked in Emacs given the excellent building + +00:02:12.784 --> 00:02:14.025 +blocks we have today. + +NOTE Typical coding agent review + +00:02:14.825 --> 00:02:17.587 +But before I walk you through how a Hutch + +00:02:17.627 --> 00:02:20.328 +workflow works, I want to show you what a typical + +00:02:20.408 --> 00:02:22.749 +coding agent review looks like today. + +00:02:23.490 --> 00:02:25.891 +These examples are from a real open source + +00:02:25.951 --> 00:02:28.032 +product that I've been building for the past + +00:02:28.092 --> 00:02:28.653 +three years. + +00:02:29.671 --> 00:02:31.792 +This is one pull request from the project. + +00:02:32.432 --> 00:02:35.214 +It's a single review pass by a review agent. + +00:02:35.834 --> 00:02:37.035 +Has 23 comments. + +00:02:37.775 --> 00:02:42.317 +Every single one of them flagged as a potential issue. + +00:02:42.397 --> 00:02:44.178 +Five of them are marked critical. + +00:02:45.359 --> 00:02:48.621 +This is technically a review and it's probably a + +00:02:48.661 --> 00:02:49.261 +decent one. + +00:02:50.041 --> 00:02:53.343 +But it's also a bit of a DOS attack on my attention. + +00:02:54.982 --> 00:02:57.105 +If we look behind the scenes on one of those + +00:02:57.145 --> 00:03:00.870 +critical flags, it ran 40-something shell scripts. + +00:03:00.930 --> 00:03:01.991 +It ran web searches. + +00:03:02.452 --> 00:03:04.895 +It wrote a little prompt for another AI to go and + +00:03:04.955 --> 00:03:05.536 +fix the thing. + +00:03:06.297 --> 00:03:08.540 +All of it to tell me that one method was + +00:03:08.600 --> 00:03:10.302 +undefined and would crash at runtime. + +00:03:11.687 --> 00:03:14.650 +But at the end of all of it, it was still incorrect. + +00:03:14.730 --> 00:03:17.373 +The method comes from a Ruby gem, and this was + +00:03:17.413 --> 00:03:20.156 +simply my reply in six words, which to its credit + +00:03:20.336 --> 00:03:23.059 +it apologized and updated its memory for. + +00:03:23.960 --> 00:03:25.462 +This is not a one-off thing. + +NOTE Hutch + +00:03:28.261 --> 00:03:30.962 +So I built Hutch for myself. + +00:03:31.022 --> 00:03:31.602 +It's up here. + +00:03:31.742 --> 00:03:34.383 +It lives in Emacs and on top of Magit. + +00:03:35.403 --> 00:03:38.183 +You decide when you want to trigger it and any + +00:03:38.303 --> 00:03:41.604 +obvious to relatively bigger issues get caught up + +00:03:41.684 --> 00:03:44.065 +front before you push your code up. + +00:03:45.305 --> 00:03:47.786 +When it does have something to say, it's usually + +00:03:47.806 --> 00:03:50.286 +a full-size diff you can directly apply. + +00:03:51.107 --> 00:03:53.927 +But even if it doesn't, it's prose for you to + +00:03:53.987 --> 00:03:56.708 +read and not five other people collectively. + +00:03:58.338 --> 00:04:00.479 +So here's how you kick it off. + +00:04:00.519 --> 00:04:02.681 +When you're ready to commit, you open up the + +00:04:02.701 --> 00:04:06.343 +change diffs in Magit, you stage your changes as + +00:04:06.503 --> 00:04:09.285 +usual, and then select the hutch action and + +00:04:09.345 --> 00:04:10.345 +trigger a new review. + +00:04:11.666 --> 00:04:13.627 +Once this is done, you'll see a new hutch buffer + +00:04:13.667 --> 00:04:13.987 +show up. + +00:04:14.628 --> 00:04:17.228 +I also have a debug log buffer that can be + +00:04:17.309 --> 00:04:18.130 +optionally enabled. + +NOTE Hutch tools + +00:04:19.220 --> 00:04:21.642 +This review has been run on the Hutch codebase + +00:04:21.682 --> 00:04:24.224 +itself and the agent is sifting through the code + +00:04:24.404 --> 00:04:26.126 +and you can see a bunch of tools being called + +00:04:26.206 --> 00:04:28.608 +like `read_file` and `search_codebase` and stuff. + +00:04:29.649 --> 00:04:32.771 +There's around five tools that Hutch exposes, one + +00:04:32.812 --> 00:04:35.554 +of which is called `surrounding_context` that uses + +00:04:35.694 --> 00:04:37.636 +TreeSitter if you have that installed to + +00:04:37.836 --> 00:04:40.698 +increasingly fetch more context around certain + +00:04:40.718 --> 00:04:43.741 +suspicious lines without needing to read whole + +00:04:43.781 --> 00:04:44.822 +files and waste tokens. + +00:04:45.927 --> 00:04:48.169 +You'll see that it took around five rounds to + +00:04:48.229 --> 00:04:50.950 +finish this review this time. + +NOTE +Hutch walkthrough +#+SCREENSHOT: emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--reencoded-00-04-51-300.jpg +#+SCREENSHOT_TIME: 00:04:51.300 + +00:04:51.291 --> 00:04:53.532 +Once the Hutch buffer is ready, you'd see + +00:04:53.572 --> 00:04:54.253 +something like this. + +00:04:54.553 --> 00:04:56.554 +It'll report the total tokens at the top. + +00:04:57.055 --> 00:04:59.236 +You'll see the findings organized under + +00:04:59.276 --> 00:05:01.538 +suggestions, comments, and LGTM + +00:05:01.998 --> 00:05:02.878 +(which is "looks good to me"). + +00:05:03.759 --> 00:05:06.361 +Just like Magit, you can open the submenus up. + +00:05:06.961 --> 00:05:09.263 +If you agree with the suggestion and the + +00:05:09.343 --> 00:05:12.425 +attached patch, you can hit `m` to queue it up. + +NOTE Applying suggestions + +00:05:14.317 --> 00:05:16.119 +Comments are just text for you to read and + +00:05:16.159 --> 00:05:17.260 +determine if they make sense. + +00:05:17.601 --> 00:05:19.723 +These can also be copied and sent off to someone + +00:05:19.763 --> 00:05:22.286 +else to take a look or another agent that you + +00:05:22.306 --> 00:05:23.007 +might have running. + +00:05:24.568 --> 00:05:27.091 +Once all the suggestions are queued up, you + +00:05:27.131 --> 00:05:30.395 +can apply them all with the key binding `A` + +00:05:31.236 --> 00:05:33.598 +and the patches get applied to the staged files + +00:05:33.679 --> 00:05:34.800 +directly, bottom-up. + +NOTE Additional reviews + +00:05:37.385 --> 00:05:40.727 +But perhaps at this point, I'm not convinced yet. + +00:05:40.887 --> 00:05:43.308 +I'd like to run another review on these corrected + +00:05:43.368 --> 00:05:45.009 +changes, and I can do so. + +00:05:52.573 --> 00:05:55.295 +So here we get another suggestion to fix that + +00:05:55.335 --> 00:05:57.596 +wasn't caught the last time. + +00:05:57.636 --> 00:06:00.878 +We queue it up, apply it, and verify that it's + +00:06:00.938 --> 00:06:04.019 +lodged in, and then run one more final review + +00:06:04.059 --> 00:06:04.820 +before we commit. + +00:06:07.010 --> 00:06:08.671 +So at this point, I'm happy with the changes. + +00:06:08.711 --> 00:06:10.812 +The comments are not actionable, so I go ahead + +00:06:11.112 --> 00:06:11.953 +and write my commit. + +NOTE +Storing review notes +#+SCREENSHOT: emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--reencoded-00-06-22-900.jpg +#+SCREENSHOT_TIME: 00:06:22.900 + +00:06:13.194 --> 00:06:15.155 +Another useful thing you can enable as a + +00:06:15.235 --> 00:06:17.897 +post-commit hook is having your review notes be + +00:06:17.937 --> 00:06:20.218 +stored within Git as a separate ref. + +00:06:21.219 --> 00:06:22.859 +In the terminal pane on the right, you can see + +00:06:22.900 --> 00:06:25.821 +our last review was durably kept for posterity. + +00:06:26.522 --> 00:06:29.003 +This can be useful for maintaining a related + +00:06:29.043 --> 00:06:31.385 +history of reviews along with your commits and + +00:06:31.465 --> 00:06:33.666 +for sharing the reviews with your team as well. + +00:06:35.874 --> 00:06:36.314 +That's it. + +00:06:36.554 --> 00:06:40.075 +It's hopefully pretty simple and intuitive to get + +00:06:40.116 --> 00:06:41.356 +started with. + +00:06:41.396 --> 00:06:43.257 +There's a lot more things to configure that you + +00:06:43.277 --> 00:06:44.197 +can find in the README. + +00:06:45.177 --> 00:06:47.678 +If you're the kind that never wants to go back to + +00:06:47.718 --> 00:06:50.679 +writing code in editors by hand again, but are + +00:06:50.779 --> 00:06:53.400 +still the kind that enjoys programming on their + +00:06:53.440 --> 00:06:57.101 +own projects, this might be a nice thin layer to + +00:06:57.121 --> 00:06:59.862 +get your work verified without over-relying on + +00:07:00.003 --> 00:07:01.263 +LLMs for everything. + +NOTE Formal eval and Perfetto + +00:07:03.876 --> 00:07:06.498 +On a separate note, Hutch does have + +00:07:06.499 --> 00:07:08.121 +a formal eval pipeline. + +00:07:09.302 --> 00:07:12.205 +If you set `hutch-trace-dir` and give it a + +00:07:12.245 --> 00:07:15.729 +path, it can emit Perfetto traces that can then + +00:07:15.789 --> 00:07:18.552 +be piped into some of the eval scripts that we + +00:07:18.632 --> 00:07:22.737 +have to get fresh data about agent quality. + +00:07:23.812 --> 00:07:29.016 +We can also use the traces to visualize the agent itself. + +00:07:29.116 --> 00:07:33.459 +They're useful for both post runtime observability + +00:07:33.460 --> 00:07:36.482 +and to fetch data for verifying its correctness. + +NOTE +Tracing performance with Perfetto +#+SCREENSHOT: emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--reencoded-00-08-10-767.jpg +#+SCREENSHOT_TIME: 00:08:10.767 + +00:07:38.342 --> 00:07:41.603 +Perfetto is an open source performance tracing tool + +00:07:41.604 --> 00:07:45.266 +that comes with a bundled SQL query engine as well. + +00:07:46.087 --> 00:07:49.129 +You see this typically being used in Android + +00:07:49.209 --> 00:07:52.351 +and on Chrome for performance profiling and things. + +00:07:53.251 --> 00:07:56.153 +But it turns out it works pretty well as a simple + +00:07:56.553 --> 00:07:59.735 +agent tracing tool because it's entirely + +00:07:59.875 --> 00:08:00.856 +infrastructure-free. + +00:08:01.476 --> 00:08:04.658 +You just emit JSON in its own trace format and + +00:08:04.698 --> 00:08:07.480 +you can load it up on ui.perfetto.dev. + +00:08:08.823 --> 00:08:10.726 +So once you load it up, this is what the + +00:08:10.766 --> 00:08:11.987 +visualization looks like. + +00:08:12.228 --> 00:08:15.793 +There's a timeline of what the agent did, what + +00:08:15.913 --> 00:08:19.357 +tools it called, the slices of LLM calls, and + +00:08:19.558 --> 00:08:22.742 +down below the tokens that were consumed. + +00:08:24.710 --> 00:08:26.771 +We can zoom into one of these tool calls and we + +00:08:26.791 --> 00:08:29.392 +can check out what all the agent did. + +00:08:30.013 --> 00:08:34.475 +So here we see a `search_codebase` tool call with + +00:08:34.515 --> 00:08:37.135 +that search string and it looks like it took + +00:08:37.196 --> 00:08:39.477 +about 400 milliseconds to finish. + +00:08:40.897 --> 00:08:43.719 +If we move further along, we'll see another + +00:08:43.779 --> 00:08:48.120 +`search_codebase` call being called with slightly + +00:08:48.160 --> 00:08:49.501 +different arguments. + +00:08:49.541 --> 00:08:51.562 +It took a little longer to finish. + +00:08:53.357 --> 00:08:57.321 +As you can see, as we move along the trace, + +00:08:57.361 --> 00:08:59.903 +the number of tokens consumed are increasing over time. + +00:09:01.164 --> 00:09:05.928 +If we go all the way to the end, we'll see two markers. + +00:09:06.028 --> 00:09:09.171 +The first one is where the LLM calls end. + +00:09:10.672 --> 00:09:12.954 +This is where the agent is done with all its findings. + +00:09:13.715 --> 00:09:16.337 +At this point, no models are being called and + +00:09:16.517 --> 00:09:18.819 +everything that we got back is being now + +00:09:18.859 --> 00:09:20.020 +processed by Hutch. + +00:09:21.081 --> 00:09:22.923 +A few milliseconds later, we see the final + +00:09:22.963 --> 00:09:25.386 +findings that are eventually rendered onto the + +00:09:25.426 --> 00:09:26.106 +Hutch buffer. + +00:09:26.286 --> 00:09:29.750 +These are verified and are sanitized for correctness. + +NOTE Perfetto SQL queries + +00:09:32.417 --> 00:09:37.301 +You can also run SQL queries on Perfetto. + +00:09:37.521 --> 00:09:40.444 +Here we have a very simple query to fetch all the + +00:09:40.484 --> 00:09:41.565 +tool call durations. + +00:09:42.185 --> 00:09:45.106 +Here we can see the `search_codebase` + +00:09:45.107 --> 00:09:48.470 +tool call seems to have taken the most amount of time + +00:09:48.510 --> 00:09:49.571 +in this particular trace. + +00:09:50.071 --> 00:09:53.294 +`read_file` seems to have been called the most. + +NOTE Comparison of model findings + +00:09:55.100 --> 00:09:57.342 +Before I wrap this section up, I wanted to share + +00:09:57.382 --> 00:10:00.064 +a couple of quick findings from slightly older + +00:10:00.124 --> 00:10:03.386 +models run on Martian's code review dataset + +00:10:03.387 --> 00:10:06.890 +of 40 PRs across different difficulty levels. + +00:10:07.911 --> 00:10:10.193 +You can find more detailed benchmarks and eval + +00:10:10.213 --> 00:10:12.635 +runs in the README if anyone's curious. + +00:10:14.137 --> 00:10:16.479 +This first graph shows that different models tend + +00:10:16.499 --> 00:10:17.480 +to find different issues. + +00:10:18.445 --> 00:10:21.307 +So not all of them necessarily agree on what a + +00:10:21.367 --> 00:10:22.208 +real bug is. + +00:10:23.188 --> 00:10:25.690 +But if you theoretically combine their results, + +00:10:25.970 --> 00:10:29.192 +you would get about a 50% jump in the bug hit rate. + +00:10:30.853 --> 00:10:34.016 +The second graph shows how many rounds each model + +00:10:34.076 --> 00:10:36.077 +took to grind through the dataset. + +NOTE +Rounds vs. token cost +#+SCREENSHOT: emacsconf-2026-hutch--hutch-code-reviews-for-the-mildly-disenfranchised--akshay-gupta--reencoded-00-10-36-700.jpg +#+SCREENSHOT_TIME: 00:10:36.700 + +00:10:36.697 --> 00:10:40.360 +Here, GPT takes many more rounds and Opus is far fewer. + +00:10:41.881 --> 00:10:43.922 +But rounds can be misleading because they don't + +00:10:43.962 --> 00:10:44.723 +track cost. + +00:10:46.221 --> 00:10:49.142 +Opus finishes in the fewest rounds but burns the + +00:10:49.182 --> 00:10:52.604 +most input tokens by far, likely because of the + +00:10:52.644 --> 00:10:54.105 +growing conversation context. + +00:10:55.065 --> 00:10:56.806 +GLM does it in under 2 million. + +00:10:57.627 --> 00:10:59.968 +So on the axis that actually costs money, GLM is + +00:10:59.988 --> 00:11:02.169 +the cheapest of the three, which is the reason + +00:11:02.209 --> 00:11:04.210 +why it's my default model of choice. + +00:11:05.891 --> 00:11:07.694 +That's it from me for today. + +NOTE Summary + +00:11:09.356 --> 00:11:12.480 +Rich Hickey wrote a post recently arguing that LLMs + +00:11:12.741 --> 00:11:15.184 +aren't tools, they're automation. + +00:11:15.985 --> 00:11:19.090 +They do the work and they take the thinking with it. + +00:11:20.961 --> 00:11:23.724 +Hutch is my attempt at keeping as much of this + +00:11:23.804 --> 00:11:27.087 +process under your control as possible. + +00:11:27.327 --> 00:11:30.590 +You choose when to run it, you read what it says, + +00:11:30.950 --> 00:11:33.132 +and then you apply the fixes yourself. + +00:11:33.993 --> 00:11:38.678 +It's a small local "tool-enough" for people still + +00:11:38.718 --> 00:11:41.140 +reading what they write, and it's available to + +00:11:41.180 --> 00:11:43.462 +download on MELPA and on GitHub. diff --git a/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main--chapters.vtt b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main--chapters.vtt new file mode 100644 index 00000000..0179993b --- /dev/null +++ b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main--chapters.vtt @@ -0,0 +1,32 @@ +WEBVTT + + +00:00:01.067 --> 00:00:31.214 +Introduction + +00:00:31.914 --> 00:01:25.042 +Remote files + +00:01:26.282 --> 00:05:04.913 +Accessing GitHub + +00:05:05.353 --> 00:06:43.708 +Opening Github + +00:06:44.008 --> 00:09:23.457 +Embark + +00:09:23.837 --> 00:09:42.364 +Codeberg + +00:09:42.484 --> 00:09:47.025 +Issues + +00:09:47.085 --> 00:11:20.761 +Plans + +00:11:21.382 --> 00:11:44.288 +Why not a TRAMP backend? + +00:11:45.008 --> 00:12:10.382 +Why not plain HTTP? diff --git a/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt new file mode 100644 index 00000000..00df4ccd --- /dev/null +++ b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt @@ -0,0 +1,645 @@ +WEBVTT captioned by sachac + +NOTE Introduction + +00:00:01.067 --> 00:00:03.628 +Okay, hello people of Emacs, my favorite kind of people. + +00:00:04.268 --> 00:00:06.869 +I would like to show you this thing I've been + +00:00:06.909 --> 00:00:08.829 +messing around with lately. + +00:00:09.080 --> 00:00:11.830 +So I hope this is big enough. + +00:00:13.270 --> 00:00:16.911 +Most of you probably know that you can do this in Emacs. + +00:00:17.071 --> 00:00:19.512 +When you do `C-x C-f`, which is + +00:00:19.712 --> 00:00:21.953 +normal `find-file` dialog, + +00:00:22.233 --> 00:00:25.531 +you can browse folders and files + +00:00:25.532 --> 00:00:30.294 +and that's a built-in feature of Emacs. + +00:00:30.414 --> 00:00:31.214 +Everybody knows about it. + +NOTE Remote files + +00:00:31.914 --> 00:00:37.317 +Now, you can also type /ssh: and + +00:00:37.337 --> 00:00:39.898 +then if you type the name of the machine and you + +00:00:39.938 --> 00:00:43.079 +have access to it, you can actually browse things + +00:00:43.859 --> 00:00:45.199 +on that remote machine + +00:00:45.200 --> 00:00:47.561 +as if you're browsing things locally. + +00:00:48.001 --> 00:00:51.783 +Similarly, you can do sudo. + +00:00:52.583 --> 00:00:55.264 +You can do Docker. + +00:00:55.344 --> 00:00:57.685 +You can do FTP. + +00:00:58.345 --> 00:00:59.705 +You can do SFTP. + +00:00:59.805 --> 00:01:03.346 +You can do SMB to access some other sources. + +00:01:03.446 --> 00:01:07.208 +You can do Podman, Kubernetes, some other things. + +00:01:07.268 --> 00:01:08.128 +You can do SCP. + +00:01:09.108 --> 00:01:12.269 +This feature is built-in into Emacs. + +00:01:14.070 --> 00:01:15.030 +It's been there forever. + +00:01:15.630 --> 00:01:16.890 +And it's called TRAMP. + +00:01:17.111 --> 00:01:20.712 +TRAMP stands for Transparent Remote File Access + +00:01:20.752 --> 00:01:21.512 +Multiple Protocol. + +00:01:22.421 --> 00:01:23.141 +And it's fantastic. + +00:01:23.201 --> 00:01:25.042 +It's one of the killer features of Emacs. + +NOTE Accessing GitHub + +00:01:26.282 --> 00:01:32.084 +I've been sitting thinking, well, can I use + +00:01:32.324 --> 00:01:35.405 +Tramp to access GitHub stuff? + +00:01:35.865 --> 00:01:39.587 +So if somebody gives me a URL, I have a URL in my + +00:01:39.627 --> 00:01:40.267 +browser open. + +00:01:40.367 --> 00:01:42.327 +Let me just bring it here. + +00:01:42.447 --> 00:01:44.028 +I have a handy command for that. + +00:01:44.468 --> 00:01:48.270 +So it inserted it in Org mode format because I'm + +00:01:48.330 --> 00:01:49.491 +in an Org mode buffer. + +00:01:50.011 --> 00:01:53.253 +Let's convert this into a plain URL. + +00:01:53.373 --> 00:01:58.016 +So if somebody gives me the URL like this, and I + +00:01:58.076 --> 00:02:02.699 +want just to see what's on in this repo, and I + +00:02:02.759 --> 00:02:07.161 +can do `C-x C-f`, paste that URL, + +00:02:07.622 --> 00:02:09.523 +press RET, and browse it. + +00:02:10.933 --> 00:02:13.474 +Turns out that is possible and that is not that + +00:02:13.514 --> 00:02:14.695 +difficult to achieve. + +00:02:15.495 --> 00:02:19.016 +And I started writing a package and I called it + +00:02:19.257 --> 00:02:19.897 +el-remoto. + +00:02:20.417 --> 00:02:24.019 +el-remoto is a pun on the EL extension. + +00:02:24.299 --> 00:02:25.799 +So it's basically self-recursive. + +00:02:25.939 --> 00:02:31.262 +It's el-remoto, remoto.el. And that's what it does. + +00:02:31.582 --> 00:02:36.384 +But we typically don't operate with URLs, + +00:02:36.404 --> 00:02:37.824 +specifically like full.[??] + +00:02:40.890 --> 00:02:42.531 +Let's say you want to look up something in, let's + +00:02:43.052 --> 00:02:44.513 +say Linux kernel. + +00:02:57.423 --> 00:02:59.123 +And Linux kernel is, + +00:02:59.124 --> 00:03:01.004 +it's kind of big, I think, right? + +00:03:01.064 --> 00:03:02.505 +Let's check how big it is. + +00:03:02.705 --> 00:03:06.646 +So I'm going to send https, I'm going to send a + +00:03:06.686 --> 00:03:10.627 +request to api.github.com. + +00:03:11.607 --> 00:03:16.688 +I think it's repos and then, well, I think, + +00:03:16.689 --> 00:03:19.530 +is it Torvalds? Linux, right? + +00:03:19.570 --> 00:03:23.451 +So if I sent this, if I sent this request... + +00:03:27.432 --> 00:03:28.974 +Okay, it gave me some data. + +00:03:30.275 --> 00:03:32.437 +There should be some numbers, I think. + +00:03:33.138 --> 00:03:33.799 +Was it size? + +00:03:34.059 --> 00:03:36.221 +Okay, let's just focus on size. + +00:03:36.241 --> 00:03:41.226 +I'm going to pipe it into jq with size. + +00:03:41.827 --> 00:03:44.850 +So this, I believe this is something like six + +00:03:44.890 --> 00:03:46.291 +gigabytes, not 60. + +00:03:46.731 --> 00:03:49.794 +And just to make sure, let's pipe it to, how do I? + +00:03:50.395 --> 00:03:53.337 +I think there is numfmt, but if I just do it like + +00:03:53.357 --> 00:03:54.918 +this, this is not, nothing going to happen. + +00:03:54.938 --> 00:03:58.400 +I think I have to convert it to, well, I don't + +00:03:58.460 --> 00:03:59.800 +remember exact parameters. + +00:03:59.840 --> 00:04:02.602 +Let's look them up. + +00:04:03.182 --> 00:04:08.725 +Why things are..., Oh yeah, numfmt, + +00:04:08.786 --> 00:04:19.672 +to maybe this one, let's try that. + +00:04:20.753 --> 00:04:21.553 +Let's write that. + +00:04:22.874 --> 00:04:23.815 +So I do this. + +00:04:24.915 --> 00:04:25.515 +And see? + +00:04:26.176 --> 00:04:27.036 +No, this is wrong. + +00:04:27.897 --> 00:04:29.017 +It can be six megabytes. + +00:04:29.918 --> 00:04:31.478 +I think we need + +00:04:32.179 --> 00:04:36.861 +from 1024, something like this? + +00:04:49.010 --> 00:04:50.730 +Oh, I need from unit, not from. + +00:04:53.671 --> 00:04:56.411 +So yeah, it's roughly six gigs, like I said. + +00:04:56.791 --> 00:04:59.452 +So you don't want to clone the entire six + +00:04:59.472 --> 00:05:01.432 +gigabytes just to look up something, right? + +00:05:02.773 --> 00:05:04.913 +And I wanted the browsing experience. + +NOTE Opening Github + +00:05:05.353 --> 00:05:08.474 +So if I press C-x C-f, and then type + +00:05:08.674 --> 00:05:15.015 +/github:, and you can see it shows my orgs. + +00:05:15.853 --> 00:05:17.855 +That's available because I'm using my own token. + +00:05:18.655 --> 00:05:21.877 +And if I type "torvalds", + +00:05:21.878 --> 00:05:25.320 +you see it's matching on the names. + +00:05:25.921 --> 00:05:29.042 +And at any point, if I press RET right here, + +00:05:29.043 --> 00:05:29.744 +it will open. + +00:05:30.064 --> 00:05:32.105 +Well, it matched on Torvalds, + +00:05:32.106 --> 00:05:33.807 +but let's go back again. + +00:05:34.548 --> 00:05:39.211 +Let me just explain what's happening. + +00:05:39.231 --> 00:05:40.812 +So if I type "tor", + +00:05:42.714 --> 00:05:47.536 +It will open all the matching authors and + +00:05:47.556 --> 00:05:50.697 +maintainers and orgs, but we need specifically + +00:05:50.777 --> 00:05:51.357 +"torvalds". + +00:05:52.478 --> 00:05:54.498 +And if I press enter here, and you can see this + +00:05:54.619 --> 00:05:59.180 +is normal Dired experience. + +00:05:59.341 --> 00:06:02.562 +It doesn't feel like I'm browsing something remote. + +00:06:02.722 --> 00:06:04.382 +It doesn't feel like + +00:06:04.383 --> 00:06:06.803 +it's sending requests somewhere else, + +00:06:06.804 --> 00:06:09.465 +but it's indeed remote repositories. + +00:06:10.125 --> 00:06:11.485 +If you want to look something in a file, + +00:06:11.486 --> 00:06:12.807 +you don't have to clone it. + +00:06:13.247 --> 00:06:14.328 +You can copy this file locally. + +00:06:14.348 --> 00:06:16.169 +There are other things you can do. + +00:06:16.210 --> 00:06:17.410 +For example, you can copy the URL of it, + +00:06:35.243 --> 00:06:37.024 +remoto-url. + +00:06:37.044 --> 00:06:39.645 +You can copy all sorts of different URLs. + +00:06:39.685 --> 00:06:43.708 +You can copy its raw URL, blame URL, etc. + +NOTE Embark + +00:06:44.008 --> 00:06:48.650 +But here, the point of Embark integration comes. + +00:06:48.850 --> 00:06:52.532 +Embark is a fantastic package and I have + +00:06:52.612 --> 00:06:53.893 +integrated into Remoto. + +00:06:53.973 --> 00:06:59.876 +So if I press my embark-act key, which is bound + +00:06:59.916 --> 00:07:02.898 +to `C-;`, + +00:07:03.859 --> 00:07:07.973 +It knows that I am at the remoto file, + +00:07:08.823 --> 00:07:13.406 +and it gives me some actions to copy the raw URL, + +00:07:13.446 --> 00:07:15.547 +copy the URL, blame history URL. + +00:07:15.587 --> 00:07:21.771 +So if I press H, I can send this to anybody, + +00:07:21.891 --> 00:07:23.332 +like somebody on my team, right? + +00:07:23.992 --> 00:07:28.755 +And if I am at the higher level, can I go higher? + +00:07:28.955 --> 00:07:30.316 +Oh, not from here, I guess. + +00:07:30.856 --> 00:07:36.760 +But if I go, if I'm here + +00:07:37.420 --> 00:07:41.442 +at this level, and if I press embark-act key again, + +00:07:41.482 --> 00:07:44.583 +you can see at this point it is... It knows that + +00:07:44.663 --> 00:07:48.065 +it's acting on... The target is a repo, not a file, + +00:07:48.085 --> 00:07:52.066 +so you can clone the repo. You can get + +00:07:52.286 --> 00:07:56.028 +specific different kind of urls. + +00:07:56.068 --> 00:07:57.649 +This also works while you... + +00:07:58.449 --> 00:08:00.350 +If you type add here, + +00:08:21.477 --> 00:08:24.857 +it will show the tags and branches + +00:08:24.858 --> 00:08:25.959 +in specific repo. + +00:08:26.719 --> 00:08:33.900 +If you type `#`, it will show issues and + +00:08:34.642 --> 00:08:35.241 +pull requests. + +00:08:35.302 --> 00:08:39.342 +Well, Linux doesn't seem to have any pull requests. + +00:08:39.503 --> 00:08:41.202 +Well, what about uemacs, + +00:08:41.203 --> 00:08:44.665 +which is a fork of Emacs Torvalds uses? + +00:08:45.045 --> 00:08:47.986 +Yeah, this one has pull requests and some open issues. + +00:08:48.326 --> 00:08:51.806 +You can even glance at them, + +00:08:51.807 --> 00:08:55.407 +see what this pull request is about. + +00:08:55.408 --> 00:08:59.190 +This is great. It also works for vim or + +00:08:59.390 --> 00:09:02.549 +evil users, so you can do like stuff like this. + +00:09:02.550 --> 00:09:08.111 +You can totally type `e` or `v` new and etc etc + +00:09:08.112 --> 00:09:10.413 +and it just works as well. + +00:09:11.493 --> 00:09:14.874 +You also don't have to type the whole GitHub thing. + +00:09:15.394 --> 00:09:20.836 +I have shorthand, so `gh`, and voila, we can go to + +00:09:20.976 --> 00:09:23.457 +and explore other repositories. + +NOTE Codeberg + +00:09:23.837 --> 00:09:27.819 +I just recently added CodeBerg support, so you + +00:09:27.839 --> 00:09:28.819 +can do CodeBerg. + +00:09:29.499 --> 00:09:34.361 +And I know Phil Technomancy. + +00:09:34.401 --> 00:09:36.822 +Yeah, Phil has CodeBerg. + +00:09:40.043 --> 00:09:42.364 +I have plans to add more support for more things. + +NOTE Issues + +00:09:42.484 --> 00:09:44.644 +Let's see what things I have remotely. + +00:09:44.764 --> 00:09:47.025 +If I press `#`, you can see the open issues. + +NOTE Plans + +00:09:47.085 --> 00:10:10.775 +I have plans to add support for S3, for browsing NPM, + +00:10:11.556 --> 00:10:12.456 +for SourceHut. + +00:10:12.496 --> 00:10:14.538 +GitLab probably comes next. + +00:10:14.798 --> 00:10:19.702 +I personally want to use the Gists or Gists. + +00:10:19.942 --> 00:10:23.966 +I want to be able to browse them. + +00:10:24.066 --> 00:10:26.808 +These are the planned features. + +00:10:29.733 --> 00:10:33.275 +And if you have any ideas or if you have issues, + +00:10:33.735 --> 00:10:34.415 +give it a try. + +00:10:34.555 --> 00:10:37.397 +It turns out that this package is very practical + +00:10:37.677 --> 00:10:41.619 +and it's actually really nice to be able to do + +00:10:42.180 --> 00:10:43.861 +things like that in this way. + +00:10:45.442 --> 00:10:45.922 +Check it out. + +00:10:46.842 --> 00:10:48.263 +See if it works for you. + +00:10:48.543 --> 00:10:50.424 +Let me know if you have any issues. + +00:10:50.504 --> 00:10:51.385 +Let's try to... + +00:10:51.745 --> 00:10:53.306 +If you have any ideas, let me know. + +00:10:53.746 --> 00:10:54.347 +Don't be shy. + +00:10:55.167 --> 00:10:56.468 +File a GitHub issue. + +00:10:57.549 --> 00:11:02.192 +And let's try to make [browsing remotes] + +00:11:02.332 --> 00:11:03.332 +experience in Emacs... + +00:11:03.792 --> 00:11:05.673 +Let's try to make it real. + +00:11:05.713 --> 00:11:06.974 +Let's try to make it awesome. + +00:11:07.755 --> 00:11:09.535 +That's all I have, I think. + +00:11:09.596 --> 00:11:10.556 +I still have some time. + +00:11:10.916 --> 00:11:15.219 +Maybe I can do Q&A. + +00:11:16.959 --> 00:11:19.181 +Some questions I had to answer. + +00:11:19.621 --> 00:11:20.761 +Some questions came. + +NOTE Why not a TRAMP backend? + +00:11:21.382 --> 00:11:24.083 +People asked why this is not a TRAMP backend. + +00:11:24.543 --> 00:11:25.324 +Well, TRAMP, + +00:11:26.178 --> 00:11:30.020 +turns out its back-end assumes a remote shell on + +00:11:30.040 --> 00:11:31.101 +the other end. + +00:11:31.281 --> 00:11:33.401 +So for the purposes of Remoto, + +00:11:33.402 --> 00:11:34.563 +there is no remote shell. + +00:11:34.723 --> 00:11:37.884 +So I just hijacked a file name handler, a list, + +00:11:38.565 --> 00:11:40.685 +and this is basically the mechanism + +00:11:40.686 --> 00:11:44.288 +the TRAMP mode uses on its own. + +NOTE Why not plain HTTP? + +00:11:45.008 --> 00:11:49.411 +And another question I had, why are you not using + +00:11:49.451 --> 00:11:50.471 +just plain HTTP? + +00:11:50.831 --> 00:11:52.692 +And I answered that as well. + +00:11:53.633 --> 00:11:57.355 +There's no raw HTTP URL that gives you the + +00:11:57.435 --> 00:11:59.596 +directory listing. + +00:11:59.796 --> 00:12:01.977 +It's just going to be more difficult. + +00:12:02.538 --> 00:12:05.319 +So yeah, there you have it. + +00:12:05.599 --> 00:12:06.380 +Here's the package. + +00:12:06.660 --> 00:12:07.320 +Give it a try. + +00:12:07.660 --> 00:12:08.461 +Let me know how it goes. + +00:12:09.301 --> 00:12:09.682 +That's all. + +00:12:10.082 --> 00:12:10.382 +Thank you. |
