lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Here are my entirely non-researched and absolutely experience-based, opinion-based ideas on the subject.

Experience:
- Using Lua for large projects is indeed a pain.
- 1-based array indexing and other things are minor errors that don't bother me much. (I still keep doing from 0 -- I did it yesterday -- but that is just about anyone's burden when they program in 4, 5, 6 languages.)
- Things explode at runtime, which a quick compiler check or linter check could have saved me on. (Not just parsing my code. 'Did you mean to type polx instead of polex?' Would have saved me 2 hours of tired, baggy-eyed print()-ing)
-- Subset of above, many libraries handle `nil` because there's no distinction in the language of `nil` versus `none`, making `nil` parameters from that mistyped global get defaulted to some default value that just manifests itself in specific runtime conditions and I guess it's time to do some more debugging and vigorous checking and aaaaaah.
- Why do I have to hand-modify my code just to run all of these flavors of debugger...? (Tooling leaves a lot to be desired, compared to many other languages. Even my C++ debuggers have less mental effort in several different IDEs.) (At least ZeroBrane can debug stuff decently, but good god is that editor tacky!)
- Why does Lua seem so fragmented? How do I easily get my hand on polyfill libraries? (lua-compat-5.x saved me here, but in other cases it just doesn't work (looking at you and all the bug reports and e-mails I get about you, "pairs(t)")) (Ravi seemed promising, and then also broke compatibility with the bytecode and such... but that might have changed? I have not read the latest announce e-mails for Ravi.)

Theories:
- Asides from a plethora of (sometimes great, sometimes incredibly annoying/frustrating) game engines, operating system components, applications and databases (e.g., Redis Scripting), what compels a large swath of people to learn, use, and pick up Lua? JS is used because it's literally our only cross-platform browser option. What compels me to pick up Lua, other than knowing about it + pitching it to my company or letting Serendipity catch me when I find out it's used as part of Application X or Workflow Y?
- Where, exactly, is the Money for Lua? Typescript took off because there's a business need for it and it saved people hours of debugging and type-mismatching issues. It also compiles down to _javascript_, and it also compiles/uses regular _javascript_ code without exploding violently. It can target multiple different versions of _javascript_ and polyfill / erase version differences accordingly. Where is that for Lua? Most projects/forks seem to highlight gross incompatibilities rather than try to bridge the gap in any decent way. It gets frustrating, extremely quickly.
-- Subset of Above: I've been thinking about developing a Typescript-alike for Lua that compiles to whatever version of Lua you desire and takes care of polyfills and other such things for you... but how would I fund such a thing? How would I get people to use such a thing? I'd love to make it compile to Lua of any version, and that way people could easily add types and some basic static safety to their code that all just gets stripped away and leaves them with regular functional Lua code at the end of the day... Maybe I can make it an academic research project as a grad student? I don't know.

I wish it was easier. I don't really have answers to a lot of my questions above. I'm still new at using Lua extensively, rather than just as a toy.

Maybe people here know some answers? I'd love to know.


On Wed, Mar 14, 2018 at 9:34 PM, Keith Nicholas <keith.nicholas@gmail.com> wrote:
you don't realize why _javascript_ is popular? Ok :)   But that's a tangent anyways.

People have forever criticized js for it's lack of type safety and squishy syntax.

The thing that's made js way better to deal with is the tooling.   But even then, there is a large rise in things like typescript and other transpiled languages.  People are super motivated to do js because of  the web and has driven large innovations around frameworks.  

But if you want to look at all these other reasons why people don't like Lua and blame it all on BigTech, go right ahead.    

To me, Lua itself is a PITA when the code is too big.  But is still cool for adding basic scripting to C based projects.



On Thu, Mar 15, 2018 at 11:14 AM, Russell Haley <russ.haley@gmail.com> wrote:


On Wed, Mar 14, 2018 at 2:58 PM, Keith Nicholas <keith.nicholas@gmail.com> wrote:
While I quite like Lua in small doses, Lua isn't a type safe language, hence many of your problems only turn up at execution.    

But _javascript_ and node.js also suffer the same problems, why are they popular? Personally I think people underestimate the power of external influences. All of the top 10 languages are being pushed by the 4 largest, most ubiquitous software companies on the planet: Apple, Google, Microsoft and Mozilla.  I have no doubt that part of Pythons rise in popularity is because Microsoft has been heavily pushing it's use in VSCode and their entire web stack. It's also become a first class citizen in Visual Studio (proper).
 
On Thu, Mar 15, 2018 at 8:26 AM, Charles Heywood <vandor2012@gmail.com> wrote:
It's interesting to see that Lua reached almost 70% in "dreaded" - that many people who used it didn't want to go back to using it? Wonder what the cause could be. My guess is probably bad environments that use Lua, and the environment's what they didn't like, but Lua takes the blame.

On Wed, Mar 14, 2018 at 2:04 PM Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
--
--
Ryan | Charles <vandor2012@gmail.com>
Software Developer / System Administrator