NonStop Insider

job types


Site navigation


Recent articles


Editions


Subscribe


For monthly updates and news.
Subscribe here
NonStop Insider

TAL – Travelling Through Time

Insider Technologies

DanDan

Insider Technologies logo

 

In the beginning there was only TAL.  When the first Tandem was shipped in 1976 it was the only programming language on the NonStop 1.  A lot has changed since but TAL is still shipped with every new NonStop server.

When I told people last year I was learning TAL they could have thought I was learning some obscure foreign language at night school.  But no, just as strangely, I learnt TAL the HPE NonStop language that is largely deprecated for new development.

TAL still provides Insider Technologies the advantages that it always has:

Late last year whilst learning TAL and MultiBatch I realised extra tooling would be required.

Back in 1976 you had very few tools to aid your development process, maybe a line editor and a cross reference listing.  The now ubiquitous PC would not be launched until the 1980s.  The world of IT development has now changed beyond recognition.

insider tec aug 2020 - 1

Photo by Anastasia Dulgier on Unsplash

Remember this, a working PET 2001 prototype with wooden case was first shown to the public in 1977.

Although I have professionally worked on NonStop since the mid-1980s I have taken a keen interest in Web development for the past 15 years.  I have seen the rise of open source and the increase in the number of software developers.  The industry has never been so accessible.  HPE NonStop understands this; check out the latest HP NonStop pre-built open source packages for OSS!

I am an open source advocate, especially in terms of development tools.  We gain reliable tools at low/no cost that are standardised across the industry.   There are more software developers learning best techniques from one another than ever before.  So for much of the last six months I have sought out suitable tools and synergies to make my job easier.

Many of the younger developers in the company were using VS Code so I decided to start there.  This article is about where this led; my hope is that those of us of a certain age with many decades of NonStop experience will see value here and contribute their ideas and code.  Those who already understand GIT and VS Code extension development may want to stop reading now!

There are many very accessible tutorials on the internet regarding VS Code and GIT.  VS Code positively encourages contribution with many code examples and GIT repositories to use as a start point.  This is where I started and within a few weeks I was confident enough to move forward.

Visual Studio Code (VS Code) has become the standard software development tool since its release in 2015.  Some surveys show it is used by over half the developers in the world.  As there were an estimated 26 million developers worldwide VS Code is a very popular piece of software.   It is easy to install. You can use the links here Download VS Code.

Made by Microsoft, VS Code is free, open source and released under the permissive MIT licence.   To round the circle, it was also in 1976 that Bill Gates was writing his open “Thieves” and “Parasites” letter to Software Hobbyists.  The people who were hobbyists back then are the same kind that are today are at the leading edge of software development practices.  To be fair to Bill Gates, he became a billionaire selling closed source proprietary PC software.

For me the most important attribute of VS Code is its extensibility.  You are able to add to the core functionality by using a defined set of interfaces and patterns.  Using the core software, you can build out the specific functionality you need.  This is an incredibly powerful concept which should at least be a consideration in all software we develop.

VS Code is also cross platform, quick and responsive, comparatively light weight and is compatible with most programming languages. It was developed by Microsoft, is open source and supports syntax highlighting, code completion and has an interface to GIT.

When checking the VS Code Marketplace there are 20,000 plus extensions, but only one for TAL.   At the time of writing Tandem TAL Syntax Highlighter has been installed 368 times, that probably fairly represents the proportion of the 26 million developers worldwide who know TAL!

VS Code has a standard way to define a language grammar, the TAL Highlighter is no more than a 400 line JSON file describing the TAL language.  VS Code uses TextMate grammars; these are just a collection of regular expressions written as XML or JSON files.

Beyond this simple syntax highlighting VS Code provides a semantic API to improve highlighting and many other API features to create a very sophisticated editing experience.

I would recommend the syntax highlighter, check out the JSON file, maybe you could improve it.  VS Code development is a large subject so learning the more complex APIs is time consuming; I will add extra functionality to this extension at some point.

To add real value to my TAL editing I needed to be able to navigate the code using a code explorer tree.  Again VS Code provides a tree view API and there was already a Codemap extension I could extend.   Following the online tutorials, it was easy to install the development environment needed and within a few minutes I was viewing Typescript code.  If you have some understanding of JavaScript and OO concepts using Typescript in VS Code will be a joy; the code completion and real time syntax checking are very impressive.

There is a theme here, Microsoft developed now open source Typescript and GitHub has been a subsidiary since 2018.  They have a powerful set of tools but the community sets the direction, a lot has changed since 1976.

My development wish list beyond the code highlighter was as follows:

insider tec aug 2020 - 2

The diagram above shows some of the 400 lines of Typescript code that I wrote to parse TAL code.  Essentially the algorithm is as follows:

insider tec aug 2020 - 3

The diagram shows the explorer window on the left with the procedures expanded out to subprocs.

I had achieved the first three items on my wish list.  For the fourth I have used the excellent Bookmarks extension.  Armed with three extensions modifying large TAL programs is no longer a daunting prospect.

To undertake my development, I registered on GitHub, forked the Codemap extension, cloned it to my PC, made the changes and pushed back to my fork.  Now I must make a pull request to the original project requesting that someone reviews and approves my code.  Please look out for it!

So it is that easy to start extending and collaborating with any of the 20 million+ public repositories on GitHub and 26 million developers worldwide.

Sometimes it is difficult to understand the structure of large complex programs without creating a structure diagram.  My next VS Code project will auto-generate Mermaid Diagrams in a VS Code window for an associated TAL code file.   Keep checking the VS Code Marketplace!

If you have any ideas regarding VS Code developments for NonStop let me know; maybe, we can start collaborating.

A photograph in this article was taken from https://unsplash.com/.  The internet’s source of freely-usable images.

 

Dave Hall | Product Owner – MultiBatch

insider tec jul 2020 - 3