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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Pallene: A statically compiled companion language for Lua

66 点作者 wsc98110 个月前

5 条评论

kragen10 个月前
it seems like the <i>raison d&#x27;être</i> is performance rather than static correctness checking; i wonder how it compares to luajit? often my crude tests find luajit performance comparable to c compiled by gcc with optimization, but sometimes about half as fast, and presumably on a large enough program with a flat enough profile its performance would converge to slightly worse than simple bytecode interpretation. i&#x27;m never sure how much i can rely on luajit&#x27;s performance, and static compilation would presumably ameliorate that problem. also, static typing would give me compile errors instead of unexplained slowdowns when i do something that frustrates the optimizer<p>the readme says, &#x27;Compared to LuaJIT, Pallene aims to offer more predictable run-time performance.&#x27;<p>but seriously luajit is astounding. in <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;kragen&#x2F;bubbleos&#x2F;blob&#x2F;master&#x2F;yeso&#x2F;mand.lua" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;kragen&#x2F;bubbleos&#x2F;blob&#x2F;master&#x2F;yeso&#x2F;mand.lua</a> there is semantically a function pointer invocation per pixel (<i>pixfunc</i>), but luajit&#x27;s trace compilation apparently hoists that entirely out of the inner loop of drawing the fractal. conventional compilation of statically typed languages, even ocaml, can&#x27;t do anything like that; you need something like c++ templates to specialize the inner loop for each possible fractal being drawn
评论 #41100053 未加载
评论 #41099936 未加载
评论 #41099988 未加载
conaclos10 个月前
For those wondering what the difference is between Pallene and Teal [1], I found a 2021 comment [2] that gives some clues.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;teal-language&#x2F;tl">https:&#x2F;&#x2F;github.com&#x2F;teal-language&#x2F;tl</a><p>[2] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26263759">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26263759</a>
samatman10 个月前
I&#x27;d be interested in a compare-and-contrast with Terra: <a href="https:&#x2F;&#x2F;terralang.org" rel="nofollow">https:&#x2F;&#x2F;terralang.org</a><p>The goals and broad approach are quite similar, and I&#x27;m sure that the Pallene authors are aware that Terra exists, so I&#x27;d love to hear why they decided that a new language was worth pursuing.
评论 #41101396 未加载
breck10 个月前
This documentation is fantastic. I&#x27;d love to have Pallene on PLDB.io. If you had a few minutes, here&#x27;s a post on how to add it: <a href="https:&#x2F;&#x2F;pldb.io&#x2F;blog&#x2F;addLanguageDemo.html" rel="nofollow">https:&#x2F;&#x2F;pldb.io&#x2F;blog&#x2F;addLanguageDemo.html</a><p>I can also add it myself, but I it&#x27;s more helpful to have the language creators add their language. (But I&#x27;m happy to add if you are too busy, and&#x2F;or assist with addding)
teamonkey10 个月前
I love Lua but I also prefer static types, so this looks great. I’ve used Luau[1] in the past which has gradual typing, but that’s less useful unless it’s enforced as a coding standard.<p>[1] <a href="https:&#x2F;&#x2F;luau-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;luau-lang.org&#x2F;</a>
评论 #41100307 未加载