Last updated: 7 March 2022
Back in the days when we used to send printed catalogues all over the world, there was a section in the catalogue with this title. This page is the electronic edition of that section. Please send contributions.
I think it behooves new programmers to sample all the languages available. Forth is the only one that’s fun. The satisfaction of finding a neat representation cannot be equaled in Fortran, C or even Lisp. Try it, you’ll like it.
– Charles Moore, the developer of Forth, from Computerworld
Subscriptions and licensing
We have changed the way we charge for software and the way we license it. In simplistic terms, MPE software is free of charge for non-commercial use, and commercial use is charged for on a subscription basis. The subscription gives you access to all MPE Forth software, including the new VFX 5, the upcoming UI5, and the cross compilers. Different levels of subscription give you a different number of seats and most importantly, different levels of technical support. For most commercial users, the Professional subscription gives the best return. All users can get support on the technical support forum.
The new web infrastructure is now commissioned and accepting online payments. If you can’t wait, or need urgent support, Stephen’s mobile number is +44 (0)7803 903 612.
VFX Forth 5 development continues
The big change of this spring is the availability of VFX Forth 64 in full release form for macOS and Linux x86_64, and in Alpha form for Windows x86_64. Linux ARM64 will follow as fast as we can. The result of all Stephen’s (and others) cogitation was to realise that we need more than
IMMEDIATE words to implement what the ANS standard introduced. The name of the solution may eventually be changed from NDCS (non-default compilation semantics), but technically I am happy with it.
The text interpreter can be changed more easily. In particular, new numeric literals are easy to install into the system. The new technique is called “recognisers” because the interpreter is a chain of sections, each of which “recognises” a particular data type. These sections handle the interpretation, compilation and postpone behaviour of each data type.
Apart from literal numbers, the compelling use of recognisers for us was to be able to install and remove OOP packages almost at will during compilation of large applications. In VFX 5 all numbers are handled by recognisers, as are the CIAO and ClassVFX OOP systems and the FCOM interface to COM. Recognisers are being heavily promoted by some in the Forth world and they certainly do solve several problems when wanting new notations. They also allowed us to remove several
DEFERred words from the kernel. When dealing with complex notations in OOP packages, we can use the usual search order controls to control the visibility or words and then we can use recognisers to control the behaviours of the words.
Testing of v5 included recompilation of a client’s application of 1.4 million lines of Forth source code. Nothing horrible was revealed. The only real pain was the conversion of a plethora of state-smart string-defining words from their original state-smart form to the compliant form used by VFX 5.
Penlon ESO 2 ventilators
When COVID hit, the UK government eventually became worried about the supply of ventilators. Our client Penlon as part of Ventilator Challenge UK has produced a large number of ventilators for the NHS and has an order from the UK govenrment for 15,000 units. Well done, Penlon.
The Penlon unit’s software is based around an MPE Forth for DOS.
Webbies to be approved of
One of the problems of running a distributed business is that you are often on your own when there’s a problem. Our website designer didn’t know about that particular one and Gerald who knows everything was unavailable. So I rang Roy Goddard (ex MPE) who now runs Alpha CRM nearby. Roy passed us on to the excellent Ben Hewson at webdesignsouthampton.co.uk. Ben (email@example.com) had a quick look at our problem, and solved it very quickly and with no fuss. I was impressed. Thanks.
When our web site had another problem, Ben fixed it again after our original designer/implementer announced that he has gone back to print because it’s more fun and more profitable.
I believe that the single thing that will improve code most is to teach people how to debug. The process is just formal scientific method. The second most inportant change is to fix bugs before you do anything else. The third is probably to use something like literate programming as part of writing the code – it has greatly improved our code quality, and almost always reveals bugs when we add documentation to incoming third-party code.
From observation of programmers, some can debug, others cannot. The majority of those who can are not great users of debuggers. If you can’t observe, you can’t debug. Tools that help me observe are the ones I want. When you debug a TCP/IP stack, Ethereal is much more useful than a debugger.
A long time ago I once debugged a banknote sorting machine with a pair of resistor-ladder DACs attached to the upper and lower 8 bits of the address bus and feeding a scope in X-Y mode. That told me far more about my program than any number of debuggers.
Debugging, especially for hard real time systems, has actually become more difficult rather than less over the years. These days, you can manipulate squillions of bits per peekosecond, and there’s not a single pin change! And if you attach the usual invasive debugger, your peekosecond becomes a crashosecond.
Forth is a tool that greatly helps us observe a system.
Forth conferences and meetings
Face to face meetings with people you have only met electronically are very productive, despite the improvements in on-line conferencing software. Most conferences this year are affected by COVID-19 restrictions, so check your travel plans and organisation carefully.
EuroForth is consistently the best international Forth conference, attracting people from all over the world including Australia, Hong Kong, South Africa and North America. We will provide details of EuroForth 2022 when we have them and when the travel restrictions let up.
EuroForth home page
EuroForth 2020 and 2021 were on-line affairs and worked well. The conferencing software solution (BigBlueButton and Mattermost) worked well but not quite as smoothly as Zoom as used for Forth Tagung. However, by next year BBB will have improved and the differences were really only minor.
EuroForth 2020 papers can be obtained from here.
Forth Tagung is the annual German Forth conference. It is a pleasant and relaxed experience. Details appear on the Forth-Gesellschaft web site.
The 2020 physical meeting was cancelled and replaced by a virtual meeting. Most of the time 16 people were present and I confess to being impressed by the organisation, technical quality and video quality. I took part using a rural mobile network connection. This was definitely the first time I felt that it all “just worked”. My thanks to Carsten Strotmann, Bernd Paysan, Ulrich Hoffman and Gerald Wodni for making all this possible. I predict that such meetings will become a new normal.
Silicon Valley Forth Interest Group
SV FIG holds regular meetings, including “Forth Day” in November. For the latest news and announcements, see the SVFIG web site.
Programming languages, OOP and reliability
I was trying to avoid some work, and stumbled across this post (republished with permission) on one of the LinkedIn discussions. If you are at all interested in software reliability, Les Hatton is someone to respect.
C v C++. Ah yes, we’ve been debating this for 25 years. C++ is absolutely NOT always better. It is just different.
First of all, the programming language appears to be irrelevant in most empirical studies of injected defect, implemented size and similar behaviour – the most significant factor by a long way remains the quality of the engineers producing the system. However, this disguises an unpleasant truth about OO in general and C++ in particular.
I first studied and published evidence on this in 1997 in IEEE journals. The result of the original studies was a systematic bias in C++ towards significantly LONGER defect correction times. In other words, when you make a mistake in C++, you really pay for it. If the use of C++ led to less defects per implemented functionality, we might be able to live with this but there is no evidence that it does.
Indeed, one of the unpleasant side-effects of the OO paradigm is that it appears to delay the detection of certain classes of defect to much later in the life-cycle where they become really expensive to find and fix, (particularly in embedded systems). For example, in my original studies, the use of C++ increased the cost of finding and fixing defects during system testing by a factor of 4 on comparable systems. Inheritance, (single or multiple) in particular appears to be a defect attractor.
Other promises of OO have failed to materialise. We saw it as producing a universal toolset which would allow us to literally bolt together new reliable systems from tried and trusty components, free of unpleasant side-effect. This has not proved the case. Indeed the component size distribution of C++ systems has exactly the same form (a power law) as C, (and Ada, Fortran, Tcl-Tk, Matlab, Java and everything else I have looked at – see my website for a study of around 60 million lines of code). This turns out to be inevitable from information theory via the clockwork theorem.
So, as I mentioned at the start, it is just a different paradigm – neither better, nor worse. The best advice I could give after 25 years of experiments is to let your programmers use whatever language they are fluent in. If they are not fluent in any, (several years at least), you are in for a rough ride. There isn’t much else to go on because we are not in general a critical or even a scientific discipline when it comes to accumulating compelling evidence.
The seeming irrelevance of programming language is actually a great relief to me. If we even consider the possibility that one symbolic representation of a piece of functionality can be superior to another different representation on average, then we must admit the possibility that a Chinese engineer writing about science in Chinese can be systematically better or worse than a German engineer writing about the same subject in German, simply because of the language they are using. This seems to me unconscionable.
Parenthetically, one last thing you might worry about in the months and years to come is that both C and C++ have undergone a pathologically complicated re-standardisation in the last few years producing standards which no one person can understand, (well I’m damned if I can anyway). Neither have served the embedded system user well since the abstract model of computation in both languages leaves both time and space effectively undefined in the rush to add exotic features of unknown reliability. The last draft of the C11 standard before you have to pay for it is 678 pages, nearly 4 times bigger than the C90 standard which we generally understood. This is still dwarved by the leviathan C++11 standard, the last version of which I saw was just under 1400 pages.
If you add to this that most CS students are now only taught Java in any depth, there is a crying need for more emphasis on education as opposed to technology.
In this shop, all incoming code is reviewed (and edited) before it goes anywhere near the source trees. Far and away the best of these diff/merge/review tools is BeyondCompare from Scooter Software, which is available for Windows, Mac OS X and Linux.
Windows search box
We have loathed the Windows file search box for many years. The tool that does what you need is called Everything and it is available from VoidTools as donationware. A lovely piece of code – recommended. Searches can include wild cards and regular expressions. Oh, and there’s documentation too.
Scanners seem to last longer than PCs. So, you’ll probably have lost the software by the time you need to use it. We have had that experience. Bill tells us he has had good results with VueScan, which is available for Windows, Mac OS X, and Linux.
Applications in Forth
These applications are recent uses of Forth, and the list is somewhat constrained by the tendency of clients to want us to sign non-disclosure agreements.
If there are gaps in this section, it is probably because an external YouTube or Adobe video gizmo has failed.
Bruno Degazio is a composer, researcher and film sound designer based in Ontario, Canada where he is also a professor at Sheridan College.
Synthesized performance for string quartet using AudioModeling SWAM-S Strings.
Arrangement for string quartet by the wonderful Danish Quartet. Score available at the shop.
Recorded and played back with Transformation Engine software, written and compiled using VFXForth.
The video shows VFX running in realtime outputting MIDI for each of the four instruments, as well as rendering and scrolling the graphic view of the data.
The graphic shows the notes superimposed on a musical staff for each instrument, along with the controller data corresponding to the bow velocity. There is lots of other data, not shown graphically, that correspond to the vibrato and pitch control.
By the way, generating four instruments in realtime isn’t pushing the software very hard. I’ve done orchestral pieces of 30-40 instruments without trouble.
An extensible flight simulator
Multi-Sim is an engineering flight simulation with a multitude of uses. Its purpose is to provide a flexible, easy to use surrogate for a real aerospace vehicle.
The simulation operates over a network interface as an Internet server. Any program can connect to it, send the simulation commands and fly the simulated vehicle. The controlling program can reside on the same computer as the simulation or on any other computer, desktop or embedded, as long as it has a network connection and a TCP/IP stack. The network interface makes the simulation extremely versatile, since it operates as a stand-alone program and has a standardized interface. It has as many uses as there are programs written to connect to it.
Multi-Sim can model a wide variety of vehicles using user-selected data files, so you don’t need to purchase a separate copy for each vehicle you’d like to simulate. Each copy comes with a collection of representative data files. Often, one of these vehicles will make a good surrogate for your vehicle. If you have aerodynamic and mass-properties data for your particular vehicle, you can create your own data file for it.
It’s noisy if you get it wrong
Here in the UK, around 20 World War 2 bombs are still being discovered every year. One of the The Architect’s building sites in the centre of Southampton was shut down after a digger struck one.
This picture is of a test of the ACE RE220 frame cutting a hole in the side of a bomb casing using a water jet. Because you are not allowed electronics within 50 metres of the bomb, the motors are three-cylinder air motors and the feedback is optical. Fixing resonance issues in the airlines was a problem.
A Forth application you can hear and see
Spending time with Roelf Toxopeus of BMB con is just pleasure and always stimulating.
This is a documentary filmed excerpt from the 4 hour evening filling event we did. A string of plm. 20 minutes lasting performances. It was part of a ‘kunst route’ through the city of The Hague, so we should had a constant stream of new visitors. The building used is an empty 60’s/70’s style art-brut office building, hosting our atellier.
Everything happened live inside: a huge play pen, filled with all our film/slide/video projectors, sound equipment and computers (Atari and Mac).
The audience was indeed outside (it was very cold, they were brave). They saw what happened inside projected on the windows, caused by our shadows moving around and all the image projectors. We had camera’s inside filming us and the ‘backside’ of the windows which was then processed (or not) and send to beamers (we love feedback with sound and image). The public could peek inside through a little hole in the projecting foil: they would see a maquette version of the inside space, obstructing part the view of the real inside, with all the apparatus.
Part of the sound was transmitted to them via exciters fixed on the glass: the windows as loudspeakers.. In addition a ‘shower’ of sound was dropped on them via small speakers above them attached to the building. All sound was supposed to blend with the environmental sounds outside, and never be louder. Nearby is a hospital and many tramlines: good sound effects 🙂
The realtime video processing was done using MacForth on VFX. Soundprocessing was done with Mach2, SwiftForth/SuperCollider and Max/MSP.
You could turn on the sound, no problem, it was very loud inside! We love gliches and clicks as well.
Forth applications you can hear
These Discovery Museum exhibits are controlled with software and hardware by Bill Codington (more below). The embedded hardware is a Cortex-M3 programmed with the MPE Forth cross compiler, and there’s also a Linux PC in there running VFX Forth for Linux with Hanno Schwalm’s fJACK Audio interface.
A Forth application you can see
Bill Codington specialises in lighting applications and software for artworks. A recent production is an animated display about the Rio Grande river. It was built using an ARM board and the MPE cross compiler. There are at least 34 separate tasks, 32 of which control lighting effects.
Reveal Imaging make baggage inspection systems. The CT120 Controller board is programmed in Forth, cross compiled for an ARM7 processor with the MPE Forth 7 cross compiler.
The Forth communicates with the airport baggage handling system, monitors I/O signals, reads Voltage, current, temperature, humidity, handles various safety systems, reads in barcodes, controls warning lights, controls two external conveyors (not shown in photo), and provides a means of testing the circuits. The software uses 8 state machines, 4 serial ports, 36 I/O and 8 ADCs.
The embedded software for the Total Sulfur Analyzers in the Pilot Project shown in this link was developed on a 68332 platform using MPE’s 68xxx cross compiler by Alberto Pasquale at Thermo Fisher Scientific.
It is now possible for vending machines to brew tea and coffee with fresh milk, and to produce a cup of tea acceptable to professional tea tasters. The first trick is to prevent milk seeping into pipes and then going off overnight after the machine has been switched off. The next trick is prevent sedimentation in the boiler/heater mechanisms – it ruins the taste of tea! The final trick is to control the flow of water/steam through the coffee grounds or tea leaves, as these need a “wetting period” during which they swell before releasing flavour to the liquid. All controlled by an MPE system. Buckets were much in evidence during development.
Inside a vending machine
A different project aims to protect vending machines from fraud by the route-men who stock the machines and empty the cash bags. Industry estimates are that each vending machine loses £2 per machine per week. There are 1.5 million machines in the UK alone, so that’s about GBP 150M per year. Safer Systems, a vending machine security specialist asked us to help out. The system involves intercepting the local vending machine bus, logging the cash data, and transferring it to an RFID tag on the Custodian cash bag. When the cash bag is read, the cash value can be compared by the reader with what was actually in the bag. Reports are created and transmitted to a remote web site (designed and implemented by our sister company Remote Management Systems). Management can retrieve reports and live data directly from the web site. All the embedded systems involve Forth on ARM CPUs, and the readers use the PowerNet TCP/IP stack to access the remote web site. Sites are scalable to over 25,000 machines.
Seismic data logging
Guralp Systems (see web site make low-noise broadband seismometers, digitizers and networking equipment for science and engineering. Their new CMG-5TD is a complete seismic station in a sensor case, combining the well-regarded CMG-5T accelerometer with a full-featured CMG-DM24 to form a low-noise strong motion instrument with output over RS232 serial links, modem or (optionally) direct to local area networks over Ethernet.