Study Group: Renoise Lua Scripting For Beginners

i think it would be great if we could have a new subforum on this board called “Lua scripting for beginners” or something similar

where people are encouraged to show off their bad code rather than their optimized code :)

of course we can all learn lua from the official documents, books, etc alone in our dark chambers

but my suggestion is to create a dedicated subforum that hosts simple projects, examples and questions on the beginner level where nothing is considered too low or too slow

no need to have skilled coders around to help, they are welcome of course, but the main point would be have a place to chill out with other beginners who sit in the boat together and share the experience with them

renoise team: please consider to create such entry level subforum as a lua sandbox - if not only because it could be interesting to document what renoise users find difficult to understand with renoise scripting (for improving the lua docs, building faqs, videos…)

as a newbie lua scripter who has read through loads of documentation and still only understands a tiny portion of it all, i would like this.

The scripting QA subforum is supposed to be this kind of place, where you can ask all sort of questions or simply suggest ideas. But while that particular forum is good for asking questions and discussing ideas, perhaps it’s not as good with documenting stuff that we’ve already got.

A “lua sandbox” sounds more like a wiki style format, somewhere where you can share snippets with other people. I have thought about going this way too - for example, there are a lot of useful things in the duplex project code-base that I think people could benefit from - for example how to do simple debugging via trace statements. However, providing all of this as “formal documentation” would drive most people away from even reading it (you know, the tldr syndrome).

Also, such a wiki could be used as an effort to document tools. I know some tools that come with no documentation, and it wouldn’t be hard to write a few words about your favourite tool.

@danoise: too bad there are people suffering from that tldr-syndrome, because i don’t mind reading loads of text at all :)

personally what i really miss (and not just in this documentation but in all scripting documentation) is:

  • a glossary of often-used-terms of sorts
  • an overview explanation of the way the system works

expanding on the 2nd point: i’ve done MOO-programming a lot. it is object-oriented. i could explain the basics of the system like this: properties hold data. verbs hold scripts. both properties and verbs cannot exist by themselves just floating in the void, they need to be on an object.
that’s the absolute basis of the MOO object oriented programming language. i understood that lua is object-oriented as well, but i’ve never read such a simple explanation for lua. i need such explanations to grasp a system.

so that’s the kinda information i am looking for, and i really like the idea of a wiki for stuff like this.

i understand that the scripting QA subforum is supposed to be that kind of place, but i can’t see that it’s properly targeted to beginners and the discussion around their first steps

rather it’s more a place for people who went beyond the basics and now feel comfortable in asking for specific advice and help for their current tool projects

anyway, the point is this: i wouldn’t go there and expose my bad code only to be offered help in the form of optimized code i don’t understand - and that’s why we need a sandbox where it’s ok to show off bad code and explore things from a strict beginner license permit

a wiki might be good for documentation purposes, edited by people who’re not newbies

but i really think the kind of sandbox i suggest here would be better to have as a discussion subforum, so that we can comment and discuss as usual, rather than having to look hard for a wiki that is simply not convenient to step into (compared to the forum)

it needs to be a clearly visible and open kindergarten space, as you come to the forums to check out renoise discussions and then you think “hey, here’s a subforum where i can show off my bad scripting skills and discuss without feeling embarrased or lazy! how nice, i’ll participate in there”… :)

Right, but the flipside of the coin is that someone who knows Lua probably doesn’t want to spend all his free time answering a flood of beginner questions. Then you are left with the blind leading the blind?

Seriously though, we already have a forum like this:

Tec: Scripting API Development Q&A: Discuss technical scripting issues, ask for help, or report scripting API bugs here please.

The only shame you feel in not sharing is your own. I say get over it and participate already. No one will punish you?

Personally, I’m driven by examples, so IMHO the more “copy-paste ready” code that we can provide, the better. For example, although the API documentation itself is of course super-valuable, I would never have been able to program something complex without the examples provided by taktik (I’m talking about these snippets),

Oh, and I forgot an important point: the more you know about coding, the more embarrassing it is to make mistakes. You don’t think that my new 4000+ lines script called NotesOnWheels.lua is completely free from errors?

This is not an explanation though. It’s just another way of stating the basics? In Lua, Perl, PHP, C++, Java, and every language: An object has properties and methods. A property holds “data”, a method holds a “script.” In PHP, a property is actually called a variable, and a method could be called a function. Basically, it’s just a bunch of synonyms.

To me scripting is like swimming. You can read as many books as you want but you don’t start in the deep end no matter how much you have mentally prepared.

A script is essentially “do this, do this, do that, do this, do that, do this, do that…” over and over and over. To learn scripting, you type your “do this” instructions the scripting editor and then press [Execute] over and over and over. The interpret will reply something along the lines of “what? what? I don’t get it? what? what? what? huh? what? OH! Ok, here you go! No? What? What? Huh?” You do this over and over and over. Eventually, what you want happens.

Obviously, this is an oversimplification but this is pretty much the reality of coding. It takes years to get a good understanding. Getting something to work, on the other hand, just takes persistence.

Anyway, there are some good ideas in this thread. You make some valid suggestions. Not trying to derail. Just thought it was interesting that this is how you saw things.

Good times.

thanks Conner, and you are right that this is simply the basics and not an explanation. but i love to start at the super-basics. just telling me ‘what you call an object/property/verb in MOO, is called in LUA’… the structure of the language… i get the whole ‘do this do that’ stuff with scripting, i just like to start at the very basics. which is also why i suggested a glossary of terms, because it is how you say it, in one language it is called such, in another such and such, so it gets messy when it comes to the terminology.

i must say, any example helps, and people have different ways of learning. in the end it is all about seeing it through.

it’s not a matter of leading or being led, nor is it about transferring knowledge substance from expert bucket to novice bucket

for me it’s more a matter of providing a dedicated community space for those of us who want to discuss our experiences with beginning lua and thereby creating a mirror that inspire anybody of us to explore and experiment within the safe collective expressions of a social process

i fail to see how that social process is about the blind leading the blind, as there is no leadership and no direction, only people with sight who try things out and have fun

in fact, i think it would probably be a good idea to suggest that seasoned lua scripters leave the sandbox alone as they’d probably be more interested in optimizing code and only scare away people :)

maybe it’s better if those who know lua scripting watched from a distance, thinking for themselves “aww, how cute!” and then refrained from posting their latest optimized code snippet unless that was specifically asked for

no, we don’t have a forum like the one i suggest

the current “Tec” is not good enough, and that’s my point

here’s what i’d like that forum group to look like instead:

Beginning with scripting in Renoise:
Lua scripting discussions for the beginners. A sandbox to try out things freely without rules or standards.

Tech: Scripting API Development Q&A:
Discuss technical scripting issues, ask for help, or report scripting API bugs here please.

so what would be the difference? why not only have the Tech subforum as it is?
well, the Beginners’ dedicated subforum would be an invitation with a neon sign flashing “you don’t risk to spend Connor_BW’s free time here with your blindness” :)

and everybody’s happy, without the newbie first having to look up what “API” stands for

that’s exactly my point: all these “do this, do that” steps can be reduced to discussion, open experimentation and feedback on such experimentation

all those “what? oh! ok, here you go!” can be reduced to discussion, open experimentation and feedback on such experimentation

and all those discussions can come to life in a new subforum that is dedicated for such discussions and open experimentation

leaving the current “Tec” subforum free from the kindergarten stuff and more dedicated to the API development and for helping people who have advanced beyond the basics and are actually developing tools

Done.

If this turns into a disaster or a wasteland of zero posts, I’ll merge it back into the other sub-forum in a month or two. ;)

Regards,

So glad this exists now.

As someone who tried picking up .lua but didn’t have any of the fundamental understanding that rhowladt was talking about- I feel you man, if I can’t comprehend I’m useless, I’ve no motivation to paint by numbers until it all makes sense- I really appreciate this.

Thanks .xrns I promise not to let your effort go to waste :P