[JW Lua] Contributing

dgr at leng.de dgr at leng.de
Mon Sep 13 01:09:20 CEST 2021


Dear Nick,

thank you very much for you decent reply. I already feared that testing in JWLua comes down 
to manual testing only. However now I (sadly) know for sure.

Although I have not yet used git I will dig into it and will proudly provide my scripts as soon I 
got something worth sharing. I didn't know about this repo until now. It seems a great 
ressource. Thanks very much for that hint. (I really like it that there is a style guide. I love 
style guides.)

By the way thanks very much for your tutorials, they help a lot to get started. I checked them 
out some months ago.

Best regards

Daniel

Am 12 Sep 2021 um 12:00 hat jwlua-request at jwmusic.nu geschrieben:

> Send JWLua mailing list submissions to
> 	jwlua at jwmusic.nu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
> or, via email, send a message with subject or body 'help' to
> 	jwlua-request at jwmusic.nu
> 
> You can reach the person managing the list at
> 	jwlua-owner at jwmusic.nu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of JWLua digest..."
> 
> 
> Today's Topics:
> 
>    1. Unit-testing with jwlua scripts? (dgr at leng.de)
>    2. Re: Unit-testing with jwlua scripts? (Nick Mazuk)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 11 Sep 2021 20:13:18 +0200
> From: dgr at leng.de
> To: jwlua at jwmusic.nu
> Subject: [JW Lua] Unit-testing with jwlua scripts?
> Message-ID: <613CF1BE.20776.58E10D4 at dgr.leng.de>
> Content-Type: text/plain; charset=US-ASCII
> 
> Hi guys,
> 
> I am new to JWLua and Lua in general. (However I am not new to software development, 
> see below.) I want to implement new features into Finale needed for classical guitar notation. 
> I begged make music years ago to implement them. They told me liking my ideas but never 
> implemented any of it. So I probably will have to go for myself because I am sick of the 
> cumbersome and time-consuming editing due to lack of proper tools.
> 
> I have been educated with C (mostly embedded), have little experience in C++ and am 
> coding in C# currently. I read the programming in lua book but still have trouble to understand 
> some of the concepts. Therefore I assume I will have to ask a lot of questions on this channel 
> and will appreciate anyone who answers. 
> 
> Today my first question: Is there any kind of unit testing framework or alike to use inside 
> JWLua? I am getting used to test-driven-development and would like to do this here as well, 
> if possible.
> 
> And second question: What is the best way to code object-oriented in JWLua?
> 
> Thank for your kind help in advance.
> 
> Daniel Grunwald
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 11 Sep 2021 19:26:58 +0000
> From: "Nick Mazuk" <nick at nickmazuk.com>
> To: "The JW Lua script plug-in." <jwlua at jwmusic.nu>
> Subject: Re: [JW Lua] Unit-testing with jwlua scripts?
> Message-ID:
> 	<ktg616o5.006beeeb-b72b-4e70-8868-9f116d037c62 at we.are.superhuman.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Daniel,
> 
> Glad that you're interested in coding with JW Lua! Many of us also write these Lua scripts to implement features MakeMusic hasn't. Now about your questions.
> 
> *Unit testing*
> 
> Testing is a feature that's missing in JW Lua. Lua (the language that powers JW Lua) does have several testing frameworks you can use, but because JW Lua adds so many features on top of regular Lua, you likely won't be able to use any of these frameworks.
> 
> Currently, the best way to test JW Lua scripts is to create a Finale document with all your test cases, run the script, and manually compare the output to what you want. This is definitely not as good as automated testing, but it's better than nothing.
> 
> *OOP*
> 
> Lua does not have objects, classes, inheritance, or most other features you'd expect with object oriented programming. The closest thing is a "table" (like a dictionary in Python or a hash map in Javascript). So the code you write is mostly going to be functional (which realistically this works really well for JW Lua).
> 
> However, Finale it's self uses OOP. So JW Lua extends the Lua language with "Finale objects". Anytime you see something like `local entry = finale.FCNoteEntry()` , you are instantiating a new note entry object. You can check out the class browser (which is inside the plugin) for all the objects, methods, and properties that JW Lua adds.
> 
> Does this make sense?
> 
> Also, since you're coming from the C family of languages, note that Lua is much simpler. For instance, you don't need to keep track of memory management and Lua is not statically typed (e.g., you don't need to declare an integer as an int).
> 
> One thing you may wish to do is to contribute to a GitHub repository of Lua scripts that several of us have put together. We have a standard library of functions that takes care of many things that you might now want to do by hand (e.g., figuring out how to transpose notes). If you want to share your scripts, contributing to this repository makes it dead simple. Let me know if you want to learn more about it. https://github.com/Nick-Mazuk/jw-lua-scripts
> 
> Best,
> 
> Nick
> 
> On Sat, Sep 11, 2021 at 11:13 AM, < dgr at leng.de > wrote:
> 
> > 
> > 
> > 
> > Hi guys,
> > 
> > 
> > 
> > 
> > I am new to JWLua and Lua in general. (However I am not new to software
> > development, see below.) I want to implement new features into Finale
> > needed for classical guitar notation. I begged make music years ago to
> > implement them. They told me liking my ideas but never implemented any of
> > it. So I probably will have to go for myself because I am sick of the
> > cumbersome and time-consuming editing due to lack of proper tools.
> > 
> > 
> > 
> > 
> > I have been educated with C (mostly embedded), have little experience in
> > C++ and am coding in C# currently. I read the programming in lua book but
> > still have trouble to understand some of the concepts. Therefore I assume
> > I will have to ask a lot of questions on this channel and will appreciate
> > anyone who answers.
> > 
> > 
> > 
> > 
> > Today my first question: Is there any kind of unit testing framework or
> > alike to use inside JWLua? I am getting used to test-driven-development
> > and would like to do this here as well, if possible.
> > 
> > 
> > 
> > 
> > And second question: What is the best way to code object-oriented in
> > JWLua?
> > 
> > 
> > 
> > 
> > Thank for your kind help in advance.
> > 
> > 
> > 
> > 
> > Daniel Grunwald
> > 
> > 
> > 
> > 
> > _______________________________________________
> > JWLua mailing list
> > JWLua@ jwmusic. nu ( JWLua at jwmusic.nu )
> > http:/ / jwmusic. nu/ mailman/ listinfo/ jwlua_jwmusic. nu (
> > http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu )
> > 
> > 
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20210911/51643227/attachment-0001.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
> 
> 
> ------------------------------
> 
> End of JWLua Digest, Vol 83, Issue 2
> ************************************





More information about the JWLua mailing list