Live data from Hacker News

The evolution of Lua, continued [pdf]

lua.org

81–90 of 175 posts

Re: The evolution of Lua, continued [pdf]

#81
post #63
post #62

I don't understand why Python is so popular when there's Lua. It's just so much better. Not as good as Rebol but still much better than Python.

Python has a much larger and more mature ecosystem. Lua barely has a functioning package manager.

Don't forget it's much more productive writing a script in Python to parse a text than Lua due to its huge feature-rich syntax

Re: The evolution of Lua, continued [pdf]

#82
post #49
post #23

Earlier quoted context omitted.

I think that's an illusion. The language of R is S, which originated at Bell Labs in 01976. Python began development in 01989, although Guido didn't release it until 01991. And the top 20 on https://www.tiobe.com/tiobe-index/ are Python, C (01972?), C++ (01982?), Java, C# (01999? though arguably it's just a dialect of Java), JS, Visual Basic (first released 01991, within your window), Golang (02007), Delphi (under th…

Why do you write your years with a leading zero?

[deleted]

Re: The evolution of Lua, continued [pdf]

#83
post #62

I don't understand why Python is so popular when there's Lua. It's just so much better. Not as good as Rebol but still much better than Python.

Lua is great when you need an embedded language.

That's it. It's not great on its own, in my opinion.

It becomes really gnarly if you have a bigger Lua codebase.

Re: The evolution of Lua, continued [pdf]

#84
post #8

It is interesting that so many of the largest languages were developed in a couple year time frame in the early-mid 90s. Python, Javascript, Java, Lua, R. All of these were developed 91-95 and make a bulk of development today.

It is an interesting observation!

I'm sure there are a few unrelated factors going on to influence that plus some inadvertent cherry-picking. But I do think there is a thing to the observation too.

If I had to make a guess, I'd point to a combination of:

1. This was right around the time that computers were fast enough to afford the runtime cost of garbage collection while still delivering usable apps. The GC languages before the 90s (Lisp, Scheme, Smalltalk, Self) had reputations for abysmal performance and have largely (but not entirely) died out.

2. This was also the boom of the Internet and web which shifted a lot of computation to server-side after the PC boom had shifted it client-side. That also enabled somewhat slower languages with GC to thrive because first-mover advantage was more valuable than using your servers efficiently. You could just throw more hardware at it.

3. That boom also created a huge influx of new developers who picked up whatever language happened to be hot at the time. And once they had, they tended to stick with it. I can't find a good graph of the number of software engineers over time but I'd bet that there's a noticeable uptick around the dotcom boom.

Re: The evolution of Lua, continued [pdf]

#85
post #49
post #23

Earlier quoted context omitted.

I think that's an illusion. The language of R is S, which originated at Bell Labs in 01976. Python began development in 01989, although Guido didn't release it until 01991. And the top 20 on https://www.tiobe.com/tiobe-index/ are Python, C (01972?), C++ (01982?), Java, C# (01999? though arguably it's just a dialect of Java), JS, Visual Basic (first released 01991, within your window), Golang (02007), Delphi (under th…

Why do you write your years with a leading zero?

So you can instantly recognize at a glance that it's Kragen's post! ;)

It's a Long Now Foundation thing: slower, deeper, longer. Y10K compliance.

https://longnow.org/ideas/long-now-years-five-digit-dates-an...

"The present moment used to be the unimaginable future." -Steward Brand

"How can we invest in a future we know is structurally incapable of keeping faith with its past? The digital industries must shift from being the main source of society’s ever-shortening attention span to becoming a reliable guarantor of long-term perspective. We’ll know that shift has happened when programmers begin to anticipate the Year 10,000 Problem, and assign five digits instead of four to year dates. 01998 they’ll write, at first frivolously, then seriously." -Steward Brand

10,000 Year Clock:

https://longnow.org/clock/

Re: The evolution of Lua, continued [pdf]

#86
post #46
post #41

Earlier quoted context omitted.

LuaJIT is also stuck at Lua 5.1 (by choice) while the latest is Lua 5.4, with 5.5 on the way.

You say that as if Lua 5.3 and 5.4 were better than Lua 5.2 (which LuaJIT has support for most of the new features of) or 5.1, rather than merely newer. But programming languages don't decay like your teeth.

Except they are? Lua 5.3 bitwise literals are a big improvement over the builtins bitand32, bitor.. the addition of integer type makes the language more suitable for embedded systems that don't have FPU.. Lua 5.4 added const attribute for local variables..

Re: The evolution of Lua, continued [pdf]

#87
post #16
post #5

Earlier quoted context omitted.

While I enjoy Lua, clean, elegant, and entirely too reasonable, Tcl is undoubtedly the SQLite of programming languages. https://www.tcl-lang.org/community/tcl2017/assets/talk93/Pap... It's because Tcl, like SQLite, operates on a peculiar metaphysical principle: everything is a string until proven otherwise, and even then, it's probably still a string. Also, D. Richard Happ, who we owe thanks for SQLite, was and perha…

Lua is one of the easiest configuration file formats I've had the pleasure of working with. Readable. Has comments. Variables. Conditionals. Everyone (including me): "oh no, no, you don't want a full Turing complete language in your configuration file format" Also Everyone: generating their configuration files with every bespoke templating language dreamed of by gods and men, with other Turing complete languages.

Lua started as a config language.

Re: The evolution of Lua, continued [pdf]

#89

I was thinking a while back, how nice it would be if lua was the scripting language in the browser instead of javascript. There are some projects to compile lua to wasm and have it run in the browser... https://pluto-lang.org/web/#env=lua%3A5.4.6&code=if%20_PVERS... But interoperability with the DOM is the missing key. Still, if lua was used instead of javascript, I could see myself saying... man, I wonder what brows…

What specifically do you think would be better? Lua shares many of JS's quirks (like the relationship between arrays and non-array objects, the behavior of undefined for non-existent object properties, metatables are somewhat similar to JS prototypes, etc.) and adds a bunch more (lack of continue statement, 1-indexing, cannot have nil values in tables). I can see people liking or disliking Lua and JS both , depending…

I agree mostly in that Lua and Javascript are both similar, and like I said in my post above, I could see myself saying the exact opposite if Lua had been included in the browser.

The things I do not like about Javascript can easily be shot down in an argument. Some of it was having to work with Javascript (and it's evil cousin JScript) in the 90s and early 00s.

The type coercion and in the early days people used '=='. I think === did not even appear until ie6?

[] == ![] // true

The lack of a lot of easy helper functions in the standard lib. That now are provided by people writing a bunch of stuff in the npm ecosystem.

The npm ecosystem itself. Lack of security. Lack of... curation? (Also, all this would have probably happened anyway if Lua was in the browser)

I also think javascripts long history has created a legacy of different paradigms

variable declaration var, let, const

function declaration

function f1() {}

const f2 = function() {};

const f3 = () => {};

const obj = { f4() {} };

There is a lot of stuff like this in javascript. I could probably make a blog post about it. But the above gives the general idea of my complaints.

Re: The evolution of Lua, continued [pdf]

#90
post #60
post #49

Earlier quoted context omitted.

Why do you write your years with a leading zero?

Some people think that writing years as 2025 is wrong because this will lead to problems in year 9999 (y10k bug? I'm not sure if they call it that way) so they decided to introduce leading zero as it would solve something and not just postpone the problem to 99999.

That's silly. The y2k bug was because the year was written as 65, instead of the full year being 1965, so information was lost. Writing 2025 has no missing information.
Post reply on HN