lua-users home
lua-l archive

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




On Wed, Dec 18, 2019 at 5:42 AM Gavin Holt <holtgavin@gmail.com> wrote:
Hi,

I love Lua - thank you all. This is the language I recommend to anyone wanting to learn to code - my copy of PIL has been a great tutorial. There are great development environments available in SciTE or Zerobrane, and a nice friendly community.

Lua is well suited to the "non-compiling user", as are many other interpreted languages. The popularity of these scripted languages is in part the ability to use them without learning/maintaining a compiler. However, there is a ceiling to what can be achieved with Lua alone and from that point onwards you need compiled libraries aka "Batteries" (lfs, winapi, rex_pcre, clipboard, afx, lpeg, hunspell, lsqlite, vcl, gslshell). I am very grateful to those who have made compiled libraries for windows available to download, I don't have or want a compiler!

The progress of Lua from 5.1, 5.2 to 5.3 and soon 5.4 has created a problem -  many of the previously released pre-complied libraries have not been updated and will not run under 5.3. This will stop many updating beyond Lua5.1/Luajit and for projects that do update their embedded Lua versions user like me will find addons/extensions requiring dlls will no longer work (e.g. SciTE: shell.dll, stubby.dll, gui.dll)

Attempts to find a library to allow cut and paste to the windows clipboard in textadept-curses (Lua 5.3) prompted my mail.

I know the "non-compiling" user may not be the main target audience for Lua, but as a beautiful interpreted language I feel the lack of "Live Batteries" prevents Lua becoming as popular as it should.

Q1. Anyone point me to a 32bit library that will do copy/paste to the windows clipboard and is compatible with textadept-curses (https://foicica.com/textadept/CHANGELOG.html).

Q2. Is there any movement to maintain a distribution of pre-compiled libraries? Perhaps like LuaPower (https://luapower.com/) or better the comprehensive IUP distribution maintained by Antonio Scuri (https://sourceforge.net/projects/iup/files/3.28/).

Kind Regards Gavin Holt

A1. This looks like it should do the trick, but you'll need a compiler:  https://github.com/zetamatta/nyole. The Microsoft documentation on OLE should inform you how to use the library: https://docs.microsoft.com/en-us/cpp/mfc/clipboard-using-the-ole-clipboard-mechanism?view=vs-2019

A2. Binary distributions really need build infrastructure to keep up with changes in the packages and that doesn't fit well with Lua and the Lua community; there is no organization that has taken on the responsibility for the wider Lua ecosystem. 

I personally think that the package manager paradigm is the right one for Lua (e.g. download and build). LuaRocks is maturing quite nicely and has everything you need. LuaRocks does a pretty good job of hiding the complexity of building software. Installing a compiler is easy but time consuming. You can grab the free Microsoft VS community package, but the they also offer their C++ toolchain without the IDE and it's installation size is a more reasonable 4 GB. The download is well hidden, but I know how to find it here: https://visualstudio.microsoft.com/downloads/ -> Tools For Visual Studio XXXX -> "Build Tools For Visual Studio" (The direct download link is this:  https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16.)
 
There is an option for binary distribution with LuaRocks that I'd love to exploit for Windows but haven't got the time. LuaForWindows was probably the most well known binary package but it's no longer maintained. I wanted to try to pick that up too but fell short.

Instead I settled for creating a Windows installer for Lua called WinLua: https://github.com/winlua. Release 1 in the bin project is your best best. It installs Lua and adds the environment variables so lua is usable from the command line. I am trying to add LuaRocks to the installer and I should have something ready for when 5.4 is released. The WinLua 5.3 installer works great with the LuaRocks Legacy installation. 

https://luarocks.github.io/luarocks/releases/

If you're willing to build it, there is a really good Lua distribution called LuaPlus: https://github.com/jjensen/luaplus51-all. (The repo is named 51 but supports 5.3). It's got a ton of good packages and likely has OLE support (I know he had/has COM support). I'd love to see a binary distribution of it and thought about putting together an installer but like the other 4 things I mentioned above, I ran out of time.

As you can see, I've thought a fair bit about this subject. I actually bought an old 32 core server to create some build infrastructure for supporting Lua on Windows but haven't followed through. My thought was to automate the build of select LuaRocks packages and provide win-<packagename> binary rocks. If I could get that going, I was going to resurrect LuaForWindows as a binary LuaRocks install. The idea was this: 1) install WinLua with an installer for basic Lua and LuaRocks 2a) user can install compiler and do whatever they want or 2b) Use luarocks to download binary packages for windows or 2c) Use Luarocks to Download LuaForWindows. Surprising to nobody at this point, I ran out of steam and didn't follow through! That, and I'm a lousy sys-admin and keeping my server up has been harder than expected.

Alright, I'll stop the rambling here. If someone is interested in working on a binary distribution as I mentioned above, let me know. 

Good luck.   
Russ