The Fourth Day

Although every day has been interesting today held a particular interest for me. Today we were learning about traditional loops in APL such as For, Repeat Until etc… However before we learnt about these loops we were asked to perform a task seemingly only possible with loops, without any. I found the solution and compared it with a loop version I created. There was no difference. It shows that just because you know how to perform an operation you shouldn’t be narrow minded and should sometimes take a step back to look at the problem.

Anyway. Today produced the most challenging exercises. The culprit being inner and outer products. Here is what we learned today:

  • The jot symbol and how it is used and associated with the outer product.
  • The calculation and meanings of inner products.
  • Expanded on the operators we already used as well as learning new ones.
  • The use of scope with operators.
  • More on the rotation of vectors and matrix’s.
  • How to use dot products effectively.
  • Searching for character vectors in matrix’s and vectors.
  • Putting the idea of a zero populated matrix into use.
  • The unique symbol.

Although the bulleted list is not as populated as other days’ posts the theory behind the concepts that we learnt today required by far the most attention and even more time to implement them in a useful function.


The Third Day

Firstly apologies for the lack of a post summarizing yesterday’s lessons I was enjoying a delicious Chinese buffet. Without further hesitation here is again a summary of the techniques and idea that we learnt today (yesterday):

  • Membership and how it differs to finding items using a binary condition approach. 
  • The dyadic use of iota and how this compares to using membership to find items.
  • The rotational features of APL.
  • The use of AND, OR, NAND, NOR and XOR.
  • How to use comma bar and why it is so useful.
  • The idea of having empty vectors and the zero tilde symbol.
  • The symbols used to quickly operate on the first dimension of a variable.
  • We had a brief introduction to direct functions.
  • Compression using the results of binary expressions.
  • Some more formatting using binary.

That is all I can remember at the moment however as I said in an earlier post I am writing up a complete set of notes which I will publish at the end of the course and will include notes on every symbol I learn.

Also after the course I will start publishing some of the programs written during the course with explanations on how we learnt to optimize them.

Some Interesting Ideas

I am writing this post before I start my third day because having spoken to many veterans of APL I have learnt some interesting ideas:

  • The first idea being keep it simple. Bernard taught us that generally one line should have no more than 5 significant operations in it. This makes the code easier to read and maintain.
  • The concept that good APL code is 3 things; maintainable, easy to understand and clear to write.
  • Another APL programmer pitched the idea to me that APL code can be described as being elegant.
  • There are many ways to solve a problem however some are more elegant than others.
  • It is also better to have very clear spaced out code that is possibly not the most efficient as opposed to a complex one line statement that is very complex however more efficient.
  • The objective is to find the correct balance.

With all this in mind it’s time to start day 3…

Day Two

Day two of training was a steeper learning curve for everyone. Learning to interact with, identify and modify different types of variables opens a whole new bag of tricks. Again I have summarized my learning for today in bullet point form below:

  • We learnt more advanced ways of indexing matrix’s and vectors
  • We learnt the importance of the shape and rank of a variable and the peculiar fact that a scalar has no shape and a rank of 0.
  • Rank proved to be ever more important as we got into more complex variables.
  • We learnt about concatenation and the need for variables to conform to certain requirements in order to be concatenated.
  • The concept of linear mathematics and a small amount of how it is applied in APL and programming languages in general.
  • What a nested array is and why it is sometimes used, also when to use one and when not to use one.
  • The formatting in APL and how this can be used to produce presentations of concatenated arrays.
  • The reshaping of different variable types and why additional steps are necessary for some.
  • A brief history of the APL language.
  • We were tasked with writing functions to find data items and matrix’s and also to display data in an organised and presentable fashion.

That’s all I can remember for now however I did get lost in town for two hours today as well as take a chunk out of my thumb with a rather hefty knife so to say I am slightly tired and forgetful and this moment is an accurate statement. I will continue tomorrow…

First Day Of Training

Today was the first day of training. My teacher was the author of the book Mastering Dyalog APL, Mr. Bernard Legrand. Below is a list of all of the concepts and ideas that I learnt today. I am not aiming to explain any of the actual programming however I will be releasing a detailed write up of the programming and code towards the end of the week when the course finishes. Today I learnt:

• Basic operations such as multiplication and division along with the specialist symbols they use in APL.
• The assignment of variables and how variables may interact with each other using operands.
• Performing simple operations on sets of data.
• How to create a list or matrix and the differences between different types of variables.
• The use of the reshape feature and its purpose in the language.
• How to declare and manipulate multi-dimensional arrays.
• The meaning of shape and rank.
• The standard indexing of an array and vectors.
• The creation of dynamic and traditional functions and passing parameters to them.

Each of these bullet point have intricate implementations and purposes and learning them and when to use them was very insightful however we have only just scratched the surface of their full potential.

More to follow tomorrow…

The Start Of An Adventure

Tomorrow I start a week long course to enhance my programming skills ahead of an apprenticeship.

This marks the start of my adventure into the world of APL programming and full time employment.

Though daunting I am looking forward to learning from professionals and enjoying a new area of computing.

More posts to follow…