Live data from Hacker News

The evolution of Lua, continued [pdf]

lua.org

61–70 of 175 posts

Re: The evolution of Lua, continued [pdf]

#61
post #14

Earlier quoted context omitted.

Languages developed in that time matured just as good binary package managers started popping up, is my pet theory. Before that, getting a development environment for a new language was serious work, and people did things like stick to Perl since it happened to be installed already.

Not true. I was programming in the 90s when these languages emerged. Developments environments were emacs, vi, Brief, Borland IDE, etc. There were a few other IDEs available, but about $200 per seat. All the scripting languages mentioned didn't come as default in Unix or Windows. You had to download from their own websites. It was mostly Visual Basic, C, COBOL that were popular.

There was also ELK Scheme, the Extension Language Kit, a scheme interpreter designed to be used as an extension language for other appllications.

https://www.usenix.org/legacy/publications/compsystems/1994/...

>Elk, the Extension Language Kit, is a Scheme implementation that is intended to be used as a general, reusable extension language subsystem for integration into existing and future applications. Applications can define their own Scheme data types and primitives, providing for a tightly-knit integration of the CIC++ parts of the application with Scheme code. Library interfaces, for example to the UNIX operating system and to various X window system libraries, show the effectiveness of this approach. Several features of Elk such as dynamic loading of object files and freezing of fully customized applications into executables (implemented for those UNIX environments where it was feasible) increase its usability as the backbone of a complex application. Elk has been used in this way for seven years within a locally-developed ODA-based multimedia document editor; it has been used in numerous other projects after it could be made freely available five years ago.

Also Gnu Guile:

https://en.wikipedia.org/wiki/GNU_Guile

>GNU Ubiquitous Intelligent Language for Extensions[3] (GNU Guile) is the preferred extension language system for the GNU Project[4] and features an implementation of the programming language Scheme. Its first version was released in 1993.[1] In addition to large parts of Scheme standards, Guile Scheme includes modularized extensions for many different programming tasks.[5][6]

Also Winterp, which used XLisp:

https://dl.acm.org/doi/10.1145/121994.121998

>Winterp is an interactive, language-based user-interface and application-construction environment enabling rapid prototyping of applications with graphical user interfaces based on the OSF/Motif UI Toolkit. Winterp also serves as a customization environment for delivered applications by providing a real programming language as an extension language. Many existing user-interface languages only have the expressive power to describe static layout of user interface forms; by using a high-level language for extensions and prototyping, Winterp also handles the dynamic aspects of UI presentation, e.g. the use of direct manipulation, browsers, and dialog. Winterp makes rapid prototyping possible because its language is based on an interpreter, thereby enabling interactive construction of application functionality and giving immediate feedback on incremental changes.Winterp's language is based on David Betz's public domain Xlisp interpreter which features a subset of Common Lisp's functionality. The language is extensible, permitting new Lisp primitives to be added in the C language and allowing hybrid implementations constructed from interpreted Lisp and compiled C. Hybrid implementation gives Winterp-based applications the successful extension and rapid-prototyping capabilities of Lisp-based environments, while delivering the multiprocessing perfor- mance of C applications running on personal Unix workstations.

And TCL/Tk of course!

https://www.tcl-lang.org/

And on the commercial side, there was Visix Galaxy, which was extensible in PostScript, inspired by NeWS:

https://www.ambiencia.com/products.php

https://0-hr.com/Wolfe/Programming/Visix.htm

https://groups.google.com/g/comp.lang.java.programmer/c/LPkz...

https://donhopkins.com/home/interval/pluggers/galaxy.html

https://wiki.c2.com/?SpringsAndStruts

>The Visix Galaxy project was a ridiculously overpriced and overfeatured portable GraphicalUserInterface. You could do things like swivel an entire panel full of their custom widgets 32 degrees clockwise, and it would render all its text at this new angle without jaggies. The company went out of business after gaining only a handful of customers. For USD$ 10,000 a seat they sure didn't see the OpenSource movement coming. Their last attempt before going under was (guess what?) a Java IDE.

Galaxy competed with Neuron Data Systems in the "cross platform gui framework" space (which got steamrolled by the web permanently and for a window of time Java):

https://donhopkins.com/home/interval/pluggers/neuron.html

Here is a great overview of User Interface Software and Tools by Brad Myers:

https://www.cs.cmu.edu/~bam/uicourse/2001spring/lecture05too...

https://www.cs.cmu.edu/~bam/toolnames/

https://docs.google.com/document/d/1hQbMwK_iyjX-wpu_Xw_H-3zL...

Re: The evolution of Lua, continued [pdf]

#64

Earlier quoted context omitted.

Don't have tutorials or books, but I've had a ton of fun using Lua with LOVE2D [0] for gamedev, and also Redbean [1] for building super small portable web applications. Earlier this year, I built a mini CMS [2] inspired by rwtxt with Redbean. [0] https://love2d.org/ [1] https://redbean.dev [2] https://github.com/kevinfiol/beancms

Haven't heard of love2d but have heard of pico-8. I've avoided most game dev tutorials because they seem overly focused on beginners, which is fine, but want to find more advance materials that assume the reader knows some basics. Maybe I should reconsider and dive more into game dev.

This series of tutorials might be of interest: https://github.com/a327ex/blog/issues/30

> It's aimed at programmers who have some experience but are just starting out with game development, or game developers who already have some experience with other languages or frameworks but want to figure out Lua or LÖVE better.

Also on the topic of game engines with lua scripting, the wonderful Defold always deserves a mention https://defold.com/

Re: The evolution of Lua, continued [pdf]

#65
post #59

Earlier quoted context omitted.

Same here, in fact something I wish the neovim team would do is create a book where popular plugin authors create tutorials that recreate basic functionality of their plugins. Seems like a no brainer that would help bring in more revenue too, it'd also be an "evergreen" book as new others can contribute over time. I can't be the only one that would immediately buy a copy. :D

I'm actually trying to work on a video-series to do just this. I've made my own rudimentary plugins reproducing several popular ones, and would like to walk through how I made: a) file-tree b) picker/fzf replacment c) hop/leap replacement d) surround plugin e) code-formatter f) hydra (sub-modes) g) many "UI" (interactive) buffers, etc. None of these are published because the popular ones are better and provide more f…

That sounds great! Do you have a youtube channel or something to follow when you release it?

Re: The evolution of Lua, continued [pdf]

#66
post #51

My only context in using Lua is my neovim configuration, does any know of any good books or tutorials that make something more advance using only lua? Anything of note to consider/read/watch?

I always wrote Lua off, scoffing at the 1-based indexing, until I was "forced" to learn it thanks to Neovim. What a delightful little language it is. I do wish I could do certain things less verbosely (lambdas would be nice) -- but then again, I defeat myself by suggesting it, because not having all the features makes Lua so approachable.

Lua has lambdas. They too suffer from verbosity, of course, but they're there.

    function(x) return x; end

Re: The evolution of Lua, continued [pdf]

#67
post #59

Earlier quoted context omitted.

I'm actually trying to work on a video-series to do just this. I've made my own rudimentary plugins reproducing several popular ones, and would like to walk through how I made: a) file-tree b) picker/fzf replacment c) hop/leap replacement d) surround plugin e) code-formatter f) hydra (sub-modes) g) many "UI" (interactive) buffers, etc. None of these are published because the popular ones are better and provide more f…

That sounds great! Do you have a youtube channel or something to follow when you release it?

Yep, though I'm still trying to hit my stride recording videos. I don't release regularly because of lots of amazing $life things.

https://www.youtube.com/@nocturing

If you want a sneak peak of what I want to walk through, check this repo (see the examples/ folder): https://github.com/jrop/u.nvim

Re: The evolution of Lua, continued [pdf]

#68
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.

It's still early in development, but the new package manager Lux looks promising: https://github.com/lumen-oss/lux

Re: The evolution of Lua, continued [pdf]

#69
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.

Somehow both incredibly optimistic and also unbelievably resigned at the same time

Re: The evolution of Lua, continued [pdf]

#70
post #34
post #29

That's it - I'm building my next startup in Lua!

A useful design pattern is to write highly efficient "engine" code in C/C++ and then tie it together to highly customizable application code with an embedded scripting language. Lua is great for this, and while you could use a LISP (Emacs, AutoCad) or a FORTH (any real-life example not from the radio telescope domain?) or Tcl/Tk ( https://wiki.tcl-lang.org/page/Who+Uses+Tcl ), Lua is small (as in number of concepts t…

The Lua-C API is also really consistent and straightforward. Bindings can be generated mechanically, of course, but it's really easy to embed by hand, and the documentation is superb.
Post reply on HN