by GartzenDeHaes · 5y ago · 0 comments
Most assembly language architectures operate the same way. There are strong arguments for the mechanical symmetry and sympathy this provides. Even Erlang or Haskell or JavaScript eventually operate in such an environment, where “variables” are memory offsets parsed a certain way, because that is the inescapable operating model of a modern computer processor. That being hidden from high-level programmers does not make it primitive; it makes it useful, increasingly arcane, valuable knowledge in the right hands. Until one understands this thoroughly, as in knowing when a C union would be useful, as one example, there is always more to learn to improve even high-level programming.
Primitive is not the right word to use here. Low-level, perhaps, but the antonym of high-level is very rarely “primitive,” depending on what you’re doing. Yours is an interesting take given the article’s context.
I’m familiar with one system that was initiated in the mid 1970s with 15 million lines of COBOL. The vast majority is cut and paste dreck that does god knows what.
There’s lots of bad C code, but in many ways the cobol stuff is the equivalent of some crazy collection of interlinked excel files.
I was once spoke to a consultant who in a past life fixed big COBOL projects. He said that one of the common technological and organisational challenges he faced was getting people to use ‘malloc’. Apparently there are COBOL programs that just SEGFAULT when the input reaches a certain size, and some developer has to change an array allocation size. COBOL developers would be hostile to the idea of dynamic memory allocation, and he’d have to explain that the rest of the world had been doing that for the last 30 years.
Some COBOL dev came in and proclaimed they could do a websites just like anybody else. I asked what they did when input became too big. ”Oh well. The transaction will dump a bit, and then the duty operator will find some dev to look at it and increase the buffer” was the response.
The whole security aspect of the buffer overflow was completely alien to them. The idea that a random internetizen would try to attack the site was unthinkable, let alone they might come from another country. A botnet? of internet connected stuff? That happens only on TV. Besides, with 4 billion IP adresses, the chance an attacker found us was minuscule.
Lucky for me they tried to sell that theory to the infosec team, then got shouted at for half a hour.
Fortran’s allocatable variables can’t leak memory, can’t be used after being deallocated, and can’t be deallocated twice. Bounds checking is also trivial and all decent compilers have a flag to do it automatically.
I’m curious to know if these COBOL programs actually depend on IBM mainframes because of that.
Using IEEE floats for money often has... amusing results.
https://scipython.com/blog/mullers-recurrence/
https://latkin.org/blog/2014/11/22/mullers-recurrence-roundo...
And show people https://0.30000000000000004.com/
Also see https://stackoverflow.com/questions/30215023/how-cobol-handl...
See for example this, a software float for crappy ARM processors.
https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d0...
I was more so wondering, if a COBOL compiler (given how low level the language is) makes a lot of assumptions about the platform. Even assumptions about potential quirks.