Cobaul: A COBOL to WebAssembly Compiler
github.com
github.com
As an aside I feel they missed the chance at a better name: "CobWeb".
I love WASM and I love being able to wrap legacy work up so it can be called with modern systems (I did an AS/400 driver so a decades-old but still updated DB2 could be queried by a Drupal Commerce site), so this project is exciting. Just wish I could connect the obvious advantages I see in this project and other stuff like cloudflare's announcement with something full of pitfalls.
From an old article[2] about it:
> New language speaks up to help solve an old problem
> Catherine Mitseas
> Tampa software firm DeskWare Inc. (http://www.deskware.com) has launched a new language that Web-enables COBOL (Common Business-Oriented Language).
> Matthew Dean and Belmont, Calif.-based Charles Schereda, both engineers, started designing the new language while marketing their Y2K software products. As they worked with clients, such as the Tennessee Valley Authority, the two realized the need for businesses to leverage COBOL systems while ramping up to do work on the Internet.
> COBOL, a language designed in 1959 at the Conference of Data Systems Languages, is why Y2K fever has gone on for the last several years. Because programmers condensed dates down to two digits, computers interpret the year 2000 as 1900.
> According to Dean, there are 700,000 COBOL programmers in the United States, and many businesses still have key databases running in the old language. Because of Y2K, these companies have had to invest vast amounts capital in their systems, which run on COBOL. As a result they designed COBOL Script, which has been in Beta-testing for eight months.
> The new type of COBOL allows programmers to tie these existing COBOL-dependent business applications onto the Internet. Dean believes it will allow companies to use COBOL-trained employees and, with minimal amounts of retraining, Web-enable business applications without having to go to bleeding edge technology.
---
[1] https://en.wikipedia.org/wiki/CobolScript
[2] https://web.archive.org/web/20010305215620/http://tampabay.b...
We've announced a few more languages for Workers: https://blog.cloudflare.com/cloudflare-workers-announces-bro...
Pure wasm doesn't work yet since the VM needs either C++ exceptions or longjmp (to unwind). Wasm exceptions support will eventually help there, but meanwhile there is a dependency on JS exceptions.
As I understand it, many COBOL programs of current practical interest make extensive use of data management and transaction processing facilities that aren’t part of the COBOL language itself.
Can anyone share their experiences? For example, what fraction of the COBOL modules in a typical application would be able to be translated by a compiler that doesn’t handle statements such as “EXEC CICS” or “EXEC DLI”?
Another, maybe more subtle mainframe pecularity is how it maps dataset (ie file names) names to 'dsnames' (Cobol source code construct) at runtime, tied together by JCL.
I assume Microfocus provides solutions for some of this.
ref: 2001 A Space Odyssey: (https://en.wikipedia.org/wiki/Interpretations_of_2001:_A_Spa...)
"Arthur C. Clarke, in the TV documentary 2001: The Making of a Myth, described the bone-to-satellite sequence in the film, saying "The bone goes up and turns into what is supposed to be an orbiting space bomb, a weapon in space. Well, that isn't made clear, we just assume it's some kind of space vehicle in a three-million-year jump cut"
Wouldn't surprise me if some banks with modern websites using React, etc are just talking to some custom made http proxy on commodity hardware talking to the older mainframes on the same network where the actual real business logic is done.
https://www.microfocus.com/en-us/products/visual-cobol/overv...
Latest revision is from 2014.
As an old-school (i.e. >25 yrs ago) COBOL programmer its pretty jaw dropping to see that the language has continued to evolve.
YMMV. :-)
Enter stage left my first job as a developer in 2016 and I'm tasked with learning cobol to support customizations to their 25 year old Lawson Implementation.
I'll probably never use it again but reading and writing cobol code opened my eyes to different design patterns not often seen in more modern languages. Seeing clever implementations of features that come out of the box in modern languages was really neat.
I just got done (towel thrown) after a 12 hour workday where 30 minutes were code change, build, unit test and the rest was trying to get the tester, who is COBOL age appropriate, to understand how our program works, how we use APIs to communicate with other systems and how to test it.
In the end the Jira errand got sent back to me because of an error in an unrelated program that we verified existed earlier today before my code was deployed, because it ‘has to be the API program’. =,)
They’ve also apparently been testing all other APIs by sending simulated OK responses with the expected data <3
And remote pandemic work in a team where everyone is 2x my age has gotten me into a p. deep depression.
If you can look past the syntax, modern COBOL is a decent enough compiled language, with most of the stuff you'd expect.
(;-))
And I'm untroubled by syntax; I'd happily use C-like languages, ML languages, Lisps, etc. COBOL just isn't a good or interesting language nowadays, if it ever was.
It feels as if you were writing something like this:
Program Name The Program.
Author the_af
Data section.
Some numbers.
X 1.
Y 2.
Actual code section.
Program beginning.
About to start.
Let's do this.
Add X and Y, Giving Z, Z Being the Addition of X and Y, but not of W nor V. U is right out.
Having Computed Z, Z Being The Addition of X and Y, Z is therefore the Result.
Give Result.
Program End.
Ok, this is a parody, but it's also what writing COBOL feels like -- or at least, what it used to be like. And somebody thought because these were "English words", that this would somehow enable less technically minded programmers accomplish their tasks.But sometimes you just want to write:
f(x, y) = x + yProvided the target language supports "goto", and "fall through PERFORMs" :)
>If you can look past the syntax, modern COBOL is a decent enough compiled language, with most of the stuff you'd expect.
Probably < 1% of production Cobol uses any syntax newer than Cobol 85!