richmond62 wrote: ↑Sun Nov 05, 2023 7:41 am
While the language previously known as Transcript is fairly well documented, is there a 'go to' place for LCB?
Is LCB a 'full' computer language (as in a full suit of clothes), just a set of hooks and buttons to connect LC with other things, or something midway between the two?
Extension Builder, I would say is something in between?
it is a language, but it's not quite xTalk...although a good amount of effort was obviously put into making it look a bit like an xTalk.
It' could be categorized as a slightly lower level language, as it is statically typed, perhaps making it inherently less forgiving then the scripting engine (specially if you're like me and turn off "strict"" in the IDEs prefs UI). Maybe that's why this community seemed mostly not ready to adopt it.
it's s language that can be added to with syntax modules, and as demonstrated by Dr. Brett's 'Undergrowth' , the byte code modules it compiles can even be run on the command line with 'lc-run', sans the livecode engines involvement. Modules run in an 'infinite' state machine, a VM. With Foreign Function Interface, and some knowledge of a UI framework (like Apples Cocoa) you can even do graphical UI stuff and other things all without the LC Script Engine's UI framework being involved in any way (as an examples I built libraries that show PDFs and Audio Unit plugins that the script engine basically knows nothing about the state of the window they're being rendered into (by Cocoa not the Engine's renderer).
With Extension Builder FFI you can also bind to the internal C++ functions instead of an external library, like those of the scripting engines 'foundation' lib that has all sorts of functions (like for character encodings for example). Then there is syntax to bind that to a more xTalk like syntax (see the repo source LCB for language modules, syntax that builds some of LCB language itself as modules, adding syntactic sugar (yum)...
There's also two way communications possible between the scripting engine and the module VM. For example you in LCB you can execute LCS script 'execute "beep 3 --- or any other script" in my script object' and then get the result from within your modules LCB handler, and then Post messages like mouseUp with params [the click button] to the scripting engines message path, As shown with the 'do keyDown && pKey in widget 1' example I posted about, you can use LCB's OnDo to do its own text (script) parsing.
At one point, as I understood it the plan was to 'bootstrap' the whole shebang with LCB, basically rebuild the classic controls as widgets and then rebuild the entire Engine and all as LCB byte code modules, in retrospect that seems like a pipe dream.
I do agree that LCB was sort of always treated like the "illegitimate child" project. Although LC Mark, when pressed, has asserted that 'LCB' isn't going anywhere on several occasions. It's never felt ;complete', certainly not the documentation for it, and it's never seemed like any sort of priority for LC, which I think is a real shame. To me it's the best thing to happen to 'xTalk' in general since XCMDs/XFCNs, it really fills the same role (and the role of 'CompileIt!" too).
I do think it would be great to have dedicated IDE for Extension Builder, making things like adding a set of the standard properties to a widget as easy as picking a template, that would be great, and with a autocomplete, snippet scrapbook, etc. I've toyed with that idea a little in the past.
Until that happens, for an IDE, you can use Atom (although that's now an abandoned project), VSCode, BBEdit/TextWrangler, EMacs, and probably some others for editing your Extension Builder code, but it would be cool to have a LCB specific 'Script Editor' available directly inside the IDE.
Probably important to note that Extensions libraries can also be built with the regular scripting language, LCB not required. And as I understand it in newer versions of LC you can create script-based Widgets now without any LCB, but I don't know anything about that.