Oils - Reviewing Our NLnet Grants After 4 Years
Oils - Reviewing Our NLnet Grants After 4 Years
Oils - 回顾我们过去四年的 NLnet 资助
We received our first NLnet grant in June 2022, and we’ve been awarded three more grants since then. Four years and four grants later, it’s worth looking back to see what we did. So I made some plots for this post! 我们在 2022 年 6 月获得了第一笔 NLnet 资助,此后又获得了三笔资助。四年过去了,四笔资助也已到手,现在是时候回顾一下我们所做的工作了。因此,我为这篇文章制作了一些图表!
Unfortunately, we won’t finish the fourth grant. I wrapped it up early because of the family issues mentioned in March: A Pause in the Project. What happened is that more contributions led to a backlog of pull requests, I haven’t been able to review them all. I also share some high-level thoughts and feelings on the state of the project. 遗憾的是,我们无法完成第四笔资助项目。由于三月份提到的家庭问题(项目暂停),我提前结束了该项目。实际情况是,更多的贡献导致了拉取请求(Pull Requests)积压,我无法全部审核。此外,我还将分享一些关于项目现状的宏观思考和感受。
New Plots
新图表
In March 2022, just before we received the first grant, I published Oil Is Being Implemented “Middle Out”. It has a plot of our spec test metrics. I wrote that the gray rectangle showed a “fallow period” in the development of OSH. OSH wasn’t making progress as fast as it had, because I started working on YSH (then called the Oil language). In other words, it was clear the project got too big, and I needed help! So what happened after we were funded, and more people helped? 2022 年 3 月,就在我们获得第一笔资助之前,我发表了《Oil 正在“从中间向外”实现》。文中有一张我们的规范测试指标图。我写道,灰色矩形区域显示了 OSH 开发过程中的一段“休耕期”。由于我开始着手开发 YSH(当时称为 Oil 语言),OSH 的进展不如以往迅速。换句话说,很明显项目变得太庞大了,我需要帮助!那么,在我们获得资助并有更多人参与后,情况如何呢?
OSH - Speed and Compatibility
OSH - 速度与兼容性
I revived the code to generate that 2022 plot (shell, Python, and R scripts!). Here’s the update: OK cool, I wasn’t expecting the story to look this clean! The blue line and red line converged in early 2023, which means that the Python implementation and C++ implementation pass all the same tests. In other words, we finished the Python-to-C++ translation. That means we can “just write Python”, and we get a shell in fast, native code, with no dependencies. This is just like shells written in C. 我重新启用了生成 2022 年那张图的代码(Shell、Python 和 R 脚本!)。这是更新后的图表:太棒了,我没想到结果会如此清晰!蓝色线条和红色线条在 2023 年初汇合,这意味着 Python 实现和 C++ 实现通过了所有相同的测试。换句话说,我们完成了从 Python 到 C++ 的转换。这意味着我们可以“只写 Python”,就能得到一个快速、原生的 Shell,且没有任何依赖。这就像用 C 语言编写的 Shell 一样。
We also finished the garbage collector in January 2023: Pictures of a Working Garbage Collector. This was a big achievement that doesn’t appear on the plot. We now have something better than shells written in C: garbage collection means that our code is memory safe! The slope of the converged lines increased. That means that we made faster progress on OSH once the translation was done. The fallow period I mentioned is the part where the blue line was flatter — from mid-2020 to 2023. So the funding from NLnet really helped OSH. 我们还在 2023 年 1 月完成了垃圾回收器:《工作中的垃圾回收器图片》。这是一个图表上没有体现的重大成就。我们现在拥有了比 C 语言编写的 Shell 更好的东西:垃圾回收意味着我们的代码是内存安全的!汇合线条的斜率增加了,这意味着转换完成后,我们在 OSH 上的进展更快了。我提到的“休耕期”就是蓝色线条较平缓的部分——从 2020 年中期到 2023 年。所以,NLnet 的资助确实对 OSH 帮助很大。
YSH - A Graceful Upgrade, and a New Language
YSH - 平滑升级与新语言
But that’s not all! After the first grant, contributors were excited about YSH, and I applied for another grant. (I also renamed the project in early 2023.) Here’s a similar plot of YSH progress: Notice a few things: YSH didn’t really exist until after the NLnet funding. There was no red line at all, and I did not recommend using the pure Python version. YSH was fully translated to native code in early 2024 — i.e. the red and blue line converged then, about a year after they converged for OSH. The increased slope of the converged line shows that we made a lot of progress on YSH from mid-2023 to 2025. That’s when most of the language was developed. So these plots paint a clear and positive picture. The funding helped! Before making the plots, I wasn’t sure how they would look. 但这还不是全部!在第一笔资助之后,贡献者们对 YSH 感到兴奋,于是我申请了另一笔资助。(我也在 2023 年初重命名了该项目。)这是 YSH 进展的类似图表:请注意几点:在获得 NLnet 资助之前,YSH 实际上并不存在。当时根本没有红线,我也不建议使用纯 Python 版本。YSH 在 2024 年初被完全转换为原生代码——即红线和蓝线在那时汇合,比 OSH 汇合晚了大约一年。汇合线条斜率的增加表明,从 2023 年中期到 2025 年,我们在 YSH 上取得了很大进展。那是该语言大部分功能开发完成的时期。因此,这些图表描绘了一幅清晰而积极的图景。资助确实起到了作用!在制作这些图表之前,我并不确定它们会是什么样子。
Alpine Package Disagreements - 139 to 11
Alpine 软件包冲突 - 从 139 到 11
OK now let’s look at what happened in the last year or so. The goal of the fourth grant was to stress test OSH, by running it as the only shell on a complete Linux system (Alpine Linux). I described that work in December: Oils 0.37.0 - Alpine Linux, YSH, and mycpp. Contributors wrote blog posts about some of the fixes, which I linked to in March: Eight Blog Posts by Contributors, Four More Blog Posts from Contributors. We kept track of the work with this dashboard (made with Markdown and shell scripts). 好了,现在让我们看看过去一年左右发生了什么。第四笔资助的目标是通过将 OSH 作为完整 Linux 系统(Alpine Linux)上的唯一 Shell 来对其进行压力测试。我在 12 月描述了这项工作:《Oils 0.37.0 - Alpine Linux, YSH, and mycpp》。贡献者们撰写了关于一些修复工作的博客文章,我在三月份链接了这些文章:《贡献者的八篇博客文章》、《贡献者的另外四篇博客文章》。我们通过这个仪表板(由 Markdown 和 Shell 脚本制作)跟踪了工作进度。
So we went from 139 disagreements building with OSH in August, to 11 in early December. (There was at least 1 disagreement fixed after the last measurement of 12.) This was fantastic momentum, but there is a caveat. I merged many pull requests, but the backlog of unreviewed pull requests also grew. And, in the same month, most of my free time evaporated. 因此,我们构建 OSH 时的冲突数量从 8 月份的 139 个减少到了 12 月初的 11 个。(在最后一次测量为 12 个之后,至少又修复了 1 个冲突。)这是一个非常棒的势头,但有一个警告:我合并了许多拉取请求,但未审核的拉取请求积压也随之增加。而且,就在同一个月,我大部分的空闲时间都消失了。
Evaluations
评估
Honestly, I was feeling a bit down about the project before writing this post. I sent more than one e-mail to NLnet explaining the early end of the grant, which were perhaps overly pessimistic. But now I feel pretty good about what we did. The way I framed it is that we met our goals for the grants, but that doesn’t necessarily mean the overall project has been a success. So let’s talk about the grants first, and then the project. 老实说,在写这篇文章之前,我对这个项目感到有些沮丧。我给 NLnet 发了不止一封电子邮件解释资助提前结束的原因,这些邮件可能过于悲观了。但现在,我对我们所做的工作感觉相当不错。我的看法是,我们实现了资助的目标,但这并不一定意味着整个项目已经取得了成功。所以,让我们先谈谈资助,然后再谈谈项目本身。
Did We Meet Our Goals for the Grants?
我们实现了资助目标吗?
Yes, the plots basically show that, but they don’t tell the whole story. I think the real story is that we did many hard things that could have failed, but ended up working. We could have failed to speed up the code 30x-50x by translating typed Python to C++. But this did happen, in the first grant. We could have failed to write a garbage collector. But we got it done, and it’s been solid for a few years now. The design of YSH could have failed, e.g. due to being constrained by compatibility. But that didn’t happen: When I started the project, many people thought upgrading shell was impossible! But now, multiple people written thousands of lines of YSH, including in professional contexts! Thanks to Will Clardy and many others for their code and feedback. It could have been that nobody wanted to work on Oils for 50 euros an hour. But in fact I got an overwhelming number of responses. And the contributors we chose were very skilled — more skilled than me in significant respects. 是的,图表基本说明了这一点,但它们并没有讲述完整的故事。我认为真正的情况是,我们完成了许多本可能失败但最终成功的艰巨任务。我们本可能无法通过将类型化的 Python 转换为 C++ 来将代码速度提高 30 到 50 倍。但我们在第一笔资助中确实做到了。我们本可能无法编写出垃圾回收器。但我们完成了它,并且它已经稳定运行了几年。YSH 的设计本可能失败,例如受限于兼容性。但这种情况没有发生:当我开始这个项目时,许多人认为升级 Shell 是不可能的!但现在,已经有多人编写了数千行 YSH 代码,包括在专业环境中使用!感谢 Will Clardy 和许多其他人的代码和反馈。本可能没人愿意以每小时 50 欧元的价格为 Oils 工作。但事实上,我收到了海量的回复。而且我们选择的贡献者非常出色——在很多重要方面比我更专业。