• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • It's Lightroom update time again! New cameras (including the Canon R5/R6), lens profiles and bug fixes, and the ability to disable built-in lens corrections for specific new cameras. Here's the usual list

Learning Lua

PhilBurton

Lightroom enthusiast (but still learning)
Premium Classic Member
Premium Cloud Member
Joined
Nov 16, 2015
Messages
2,237
Location
California, USA
Lightroom Experience
Intermediate
Lightroom Version
Classic
Lightroom Version
Lightroom Classic 7.4
Operating System
Windows 10
In a different thread, Hoggy wrote:

While I'm not John, obviously.. :) I have been trying to learn some Lua while biding my time in replacing my slow aging laptop.
Hoggy,

Just curious about your learning Lua. How? And of course, why?

Phil
 
Joined
Oct 8, 2007
Messages
5,492
Location
London
Lightroom Experience
Power User
Reverse engineer the sample plugins in the SDK, have a clear idea of the specific things you actually want to build, then put aside lots and lots of time and effort.

I had a few things I really needed / wanted / knew would be of broader interest because of my background as an advocate of Extensis Portfolio and then iViewMedia Pro. ie my Search and Replace, ListView, and Syncomatic plugins. I then just banged my head against the wall until it made sense, but it took me plenty of time. Trained programmers might find it easier.

John
 

Hoggy

Never take life, or anything in it, too seriously.
Joined
Nov 20, 2012
Messages
527
Location
Wisconsin
Lightroom Experience
Advanced
Lightroom Version
Hoggy,
Just curious about your learning Lua. How? And of course, why?
I just so happened to recently write about the 'why' in your other thread:
"
........ At least I found my Golden Ticket function: 'LrShell.openPathsViaCommandLine'. My main interest in learning Lua is to create a fully functioning kind of "TPG LR Backup" that was abandoned -- with more control over [re-]compression algorithms with 7zip (using Modern7z plugins to use Zstandard compression codec), and envisioned control over how many backups are kept or deleted (like maybe a tiered system for keeping older backups as they age). Ehh... Pipe dreams right now. :cool2: I know a standard backup program would be easier, except for the fact that I always manually recompress the catalog backups anyways using Zstandard - and I'm a firm supporter of automation! :happy:
"

The 'how' is I've been reading the e-book "Programming in Lua - 4th Edition" by Roberto Lerusalimschy. Found through: Programming in Lua
I'm nearing the end of that book.. But the part I've tried to keep in mind throughout, is that I'm not necessarily going to need all language features... Mostly just enough to accomplish that stated goal. And since right now it's just mostly reading - it'll take some actual practice to put it to some good use.

Although I have made a Lua program to calculate item sale costs given the 'percent-off' and 'original-item-cost' as command-line arguments (for my e-cig/e-liquid making hobby), complete with some error checking and reporting as an exercise - so I can put it in an advanced recipe calculator that includes a database of flavors. But that's a far cry from the complete LR plugin I hope to make - or any LR plugin, actually.


Reverse engineer the sample plugins in the SDK, have a clear idea of the specific things you actually want to build, then put aside lots and lots of time and effort.

I had a few things I really needed / wanted / knew would be of broader interest because of my background as an advocate of Extensis Portfolio and then iViewMedia Pro. ie my Search and Replace, ListView, and Syncomatic plugins. I then just banged my head against the wall until it made sense, but it took me plenty of time. Trained programmers might find it easier.
That'll probably be coming soon then, with the sample plugins in the SDK. The actual reference pages seem awfully sparse, so I'm gathering that sample plugins will be more telling.

I'm not a trained programmer, but have dabbled the most in C - but that was back in the late 80's and 90's with Commodore Amiga's. Given my disabling cognitive and memory issues though, I don't remember all too much of that right now. :) However I still do have an interest in getting back into C - in the premise that the author of my advanced e-liquid recipe program seems to have abandoned it - so maybe I could eventually replicate it myself if he doesn't return, and open-source it so people can help out and also so it wouldn't just flat-out die if something happened to me or I lost interest In it. (Which is why I'll sometimes ask/mention that programmers please put in some kind of 'succession' plan - like maybe share their source code with a trusted friend or family-member or something, to perhaps release the source code.)

Now that I'm finally on SSDI (aka 'disability') after a petrifying 8-years of no income... Having time on my hands is precisely one of the things I have to look at as a positive side. Still, even with time and hobbies, the aimlessness of it all can wear on you - so I don't whatsoever recommend going for disability if you can at all avoid it. ;)
 
Top