TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tail Call Optimization: The Musical (2019) [video]

202 点作者 felipemesquita大约 4 年前

9 条评论

mourner大约 4 年前
One of my favorite tech presentations ever! So much uplifting enthusiasm, witty and whimsical humour and good taste in the songs, love it. Really happy that it belatedly got on the HN frontpage — it really deserves more views. Go Anjana & Natalia!
评论 #26476642 未加载
saagarjha大约 4 年前
Cute! Major props to the two for the execution :)<p>Sadly, these days Safari is the only engine that does TCO. It also keep track of a decent number of frames (currently 128). For more details on the implementation (called Shadow Chicken), see <a href="https:&#x2F;&#x2F;webkit.org&#x2F;blog&#x2F;6240&#x2F;ecmascript-6-proper-tail-calls-in-webkit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;webkit.org&#x2F;blog&#x2F;6240&#x2F;ecmascript-6-proper-tail-calls-...</a>.
评论 #26481911 未加载
评论 #26481152 未加载
progre大约 4 年前
This is wonderful, big props to the girl with the less trained singing voice for going through with it.
评论 #26474392 未加载
jpetitcolas大约 4 年前
One of the funniest and clearest explanation I&#x27;ve ever seen! That&#x27;s a must-see talk for all JS developers! Congrats Anjana and Natalia! :)
booleanbetrayal大约 4 年前
That was awesome. I imagine a huge amount of time was spent in putting that together, and it was well worth it. Who knew TCO could be so approachable?
linkdd大约 4 年前
Yep Tail Call &quot;Optimization&quot; is nice. But what about recursive functions that cannot be tail call &quot;optimized&quot;?<p>First example that comes to mind is the Tower of Hanoi algorithm:<p><pre><code> def toh(ndisk, source, via, target): if ndisk &gt; 0: toh(ndisk - 1, source, target, via) target.append(source.pop()) toh(ndisk - 1, via, source, target) </code></pre> The function calls itself 2 times. Same thing is the fibonacci function which relies on the 2 previous results.<p>Here, you&#x27;ll certainly need memoization and other techniques to not blow up the stack.
评论 #26481815 未加载
vasergen大约 4 年前
I didn&#x27;t know that nodejs supports TCO under the flag (like on video), but unfortunately it was only for versions from 6 to 8. Curious why did they removed it
评论 #26475698 未加载
评论 #26481315 未加载
YesThatTom2大约 4 年前
How did I miss this in 2019? It is so excellent!
leoc大约 4 年前
I see Broadway is reviving a &#x27;70s production again. ;) TCO is about the same vintage as <i>Chicago</i>.