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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Luajit IO framework

74 点作者 fcambus大约 10 年前

8 条评论

fasteo大约 10 年前
Looks nice but, why would I use this instead of openresty ?<p>If I were looking for a stand-alone -no nginx- solution: Why would I use this instead of lev[1] or luvit[2] ?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;connectFree&#x2F;lev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;connectFree&#x2F;lev&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;luvit.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;luvit.io&#x2F;</a>
评论 #9389792 未加载
malkia大约 10 年前
Recently I was made aware of one gotcha of using lua&#x2F;luajit from multiple threads (with lua&#x2F;luajit vm context per thread). And the problem is simply due to underlying libc thread safety which I (finally) understood why Python did with it&#x27;s global (per all VM&#x27;s in the process) lock.<p>Simply - things like getenv() are not-thread safe, and not guaranteed to be if there is setenv(). Not lua&#x2F;luajit&#x27;s fault, but might be seen as such (higher level language, supposed to guard folks from things like that).<p>It suddenly changed my thinking of VM&#x27;s in general and their interaction with the standard library and the OS.<p>(One can say maybe every function from libc&#x2F;msvcrt&#x2F;etc. must be thread-safe, but then there are things like errno, or getenv() returning pointer).
评论 #9389398 未加载
fcambus大约 10 年前
Announcement with more details can be found here : <a href="http:&#x2F;&#x2F;permalink.gmane.org&#x2F;gmane.comp.lang.lua.general&#x2F;116266" rel="nofollow">http:&#x2F;&#x2F;permalink.gmane.org&#x2F;gmane.comp.lang.lua.general&#x2F;11626...</a>
ishtu大约 10 年前
Speaking of Lua, here is a Lua 5.1 source code guide from creator of LuaJIT [1]. Really nice open source codebase to learn from.<p>[1] <a href="http:&#x2F;&#x2F;www.reddit.com&#x2F;comments&#x2F;63hth&#x2F;ask_reddit_which_oss_codebases_out_there_are_so&#x2F;c02pxbp" rel="nofollow">http:&#x2F;&#x2F;www.reddit.com&#x2F;comments&#x2F;63hth&#x2F;ask_reddit_which_oss_co...</a>
评论 #9390506 未加载
sciurus大约 10 年前
At a time when nginx (at least the commercial version) is starting to emphasize nginx+javascript instead of nginx+lua, it&#x27;s interesting to see a project try the opposite approach: take the nginx+lua combination and replace nginx with more lua.
espadrine大约 10 年前
The code features some extensive use of coroutines: <a href="https:&#x2F;&#x2F;github.com&#x2F;kingluo&#x2F;luajit.io&#x2F;blob&#x2F;master&#x2F;lib&#x2F;ljio&#x2F;socket&#x2F;tcp.lua#L23" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kingluo&#x2F;luajit.io&#x2F;blob&#x2F;master&#x2F;lib&#x2F;ljio&#x2F;so...</a><p>I wonder how nice they are to use compared to threads, or even to node-style CPS.
评论 #9388897 未加载
ben_pr大约 10 年前
Very nice! I was looking for something like this a year or two ago, on my next lua&#x2F;web project I&#x27;ll try it out.
jhawk28大约 10 年前
Site appears to be having performance issues. Never good PR for a new IO framework.
评论 #9389142 未加载