TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

NekoVM / Neko Programming Language

15 pointsby progabout 15 years ago

3 comments

silentbicycleabout 15 years ago
When talking about mutable strings, he says that Lua's immutable strings make reading a file "quadratic and [...] prohibitively slow for even files of a few kilobytes.", which is demonstrably false. Sure, if you read a byte, nondestructively append a byte to what you've read, looping through anything, then you're screwed, in any language.* Large files should be read a line, a block, a megabyte, etc. at a time, anyway, though - the IO call overhead will dominate otherwise, no matter what you do.<p>* Joel Spolsky calls this "Shlemiel the painter" behavior. Difference lists are another direct solution for this, but not many languages have them.<p>He notes that, "Lua offers a facility, table.concat, to alleviate this problem; but it still bites programmers on occasion.", but using table.concat for large strings is both 1) one of the first things mentioned about working with strings in PiL (including explaining why doing appends naively is quadratic), and 2) incredibly common, so it's really not an issue in practice.<p>In my experience, having immutable and interned strings is usually a net win, even if they're a second data type (Lisp and K call them symbols, Erlang and Prolog call them atoms, etc.). Lua merges string, atoms, and raw byte arrays into the same type (albeit with a cute trick for large strings), but it also has the C API as an easy escape hatch.
JoelMcCrackenabout 15 years ago
Why should I care?<p>(I'm not saying that I shouldn't care. It just isn't immediately apparent what the reason is for me to care.)<p>There are lots of non mainstream languages out there. I love to learn about them, but I must be told why it should interest me.
评论 #1252695 未加载
评论 #1253078 未加载
estabout 15 years ago
how is neko compared to lua today?
评论 #1253096 未加载
评论 #1252711 未加载
评论 #1252703 未加载