First time here? Check out the FAQ!
x

Lets talk about scripts

+6 votes
1,052 views
Scripts in Kyma are one aspect that I think could use some more documentation/discussion around.

From the perspective of someone who learnt more about coding in Kyma initially than anywhere else the whole subject of scripts is difficult to penetrate.

I understand it's all smalltalk and I have done a fair bit of research looking for tutorials and study materials but the online resources and application examples for smalltalk I've found are often not easily transferrable to an audio/kyma context.

Mostly it's a case of not knowing what I am unaware of.

Cristian and Gustav have produced some fantastic examples using scripts and I have learnt a lot so far.
But I'm hungry for more.

More please ;)
asked Aug 25, 2015 in Capytalk & Smalltalk by sean-flannery (Adept) (1,510 points)

3 Answers

+4 votes

I think the most difficult part of understanding scripts in Kyma is the lack of understanding in general programming. Good tutorials on Smalltalk programming are rare and one simply don’t get the big picture, especially with transferring into Kyma context… I also had hard times getting deeper into Kyma scripting, and then I considered to learn general programming first. Even with great examples in Capytalk you can’t go further into code without knowing how to program at all, and this would just limit your imagination. (Please correct me if I’m wrong)

This is how it could look like to get a strong backbone for scripting in Kyma (at least it’s my practice):

1. Learn about general programming techniques, like: building loops, cases, functions, logic, data structures, etc. I would recommend Pascal/Obj Pascal for that. This language is light, powerful and easy to start for programming beginners. You can apply these techniques anywhere later in your programming carrier.

Object Pascal:

https://drive.google.com/file/d/0B-pMiNtA1n0aSlEzN3BaUGFjcHc/edit?pli=1

2. Then move on to learn Smalltalk. You could also start here and skip the first step if you desire knowing only Smalltalk/Capytalk programming. Smalltalk is also different in their architecture from today’s obj languages (in a good way). Here are some free books on general Smalltalk programming:

Smalltalk Bluebook:

http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf

SmalltalkWithStyle:

http://sdmeta.gforge.inria.fr/FreeBooks/WithStyle/SmalltalkWithStyle.pdf

The art and science of Smalltalk:

https://ccrma.stanford.edu/courses/tu/cm2008/doc/smalltalk/ArtAndScienceOfSmalltalk.pdf

3. And then extend your Smalltalk knowledge with Capytalk. Here only SSC Capytalk reference can help you, which is also well documented !

It will take some great amout of time to work through it all, but you’ll get better picture of what’s going on.

Please consider to show your favorite learning resources here, so we could build a good learning database !

Greets, Roman

 

 

 

 

answered Aug 26, 2015 by roman-weingardt (Practitioner) (750 points)
edited Aug 26, 2015 by roman-weingardt
+6 votes
Roman makes a good observation.  Learning basic programming concepts like loops and logic will come in handy in Kyma and in everything else you do with the computer.  It doesn't really matter which language you study, because once you understand the concepts you can apply them in Smalltalk or any other language; it's just the syntax that changes.

If you are hungry for more Script examples, here's something to try: Use Ctrl+B to find Script in the Prototypes.  Then, from the Info menu, select Examples.  That searches the Sound Library for examples of Scripts.

A lot of the things we used to do in Scripts can now be more easily done using the Replicator, so you could also try the same trick for Replicator: select it in the Prototypes and get Example from the Info menu.
answered Aug 27, 2015 by ssc (Savant) (128,080 points)
Thanks Roman, SSC!

I have some reading to do then, this should keep me quiet for a while ;)
"Use Ctrl+B to find Script in the Prototypes.  Then, from the Info menu, select Examples."

Info/Examples.

How on earth I missed this amongst the new features in 7 I dont know but, wow.
Thanks
+3 votes
Further to Romans post above.

Here is a very interesting resource - once you start to get into coding, the way that different languages approach the same problem can also be beautiful to appreciate.

http://rosettacode.org/
answered Sep 9, 2015 by cristian-vogel (Master) (8,440 points)
...