Earlier quoted context omitted.
> The ALTER statement changes the transfer point specified in a GO TO statement. What could go wrong?
Finalizing in COBOL: I am altering the data. Pray I do not alter it further.
The English Programming Language
71–78 of 78 posts
Re: The English Programming Language
#72> English has been designed over the course of fourteen centuries. Wasn't English forked from several other intermediate forks (Anglo-Saxon, Germanic, etc.) going all the way back to Proto-Indo-European? I guess that since none of those carried the name "English" (or its original name "Anglish"), all those beta projects don't count in that timespan, otherwise, it has to be at least twice that age.
Re: The English Programming Language
#73This idea is taken from the Esolangs wiki - https://esolangs.org/wiki/English
Re: The English Programming Language
#74I've often described telling LLMs what to do as "programming in English", and I genuinely think some people have an unusually low opinion of the capabilities of LLMs because they're not so great at expressing ideas and concepts in English.
It kind of worked. The biggest challenge was the limitation of gpt-3 or Codex that I was using at the time and the fact that it didn't always return the exact same result. Although with temperature zero it was somewhat stable.
Re: The English Programming Language
#75Earlier quoted context omitted.
There are multiple responses to the above parent noting how readable the above line of code is and yet how it might go wrong. The first pitfall of using english as a programming language that occurs to me (as a totally Cobol ignorant person): * Human languages tend to be nebulous around the edges and fluid, often with single word taking up multiple meanings and same function done by multiple words. There are multiple…
> I have made 3 changes here, which might or might not work with COBOL (I am Cobol ignorant ;) ). I've never used COBOL before, but this thread and your post made me curious and I installed GNU Cobol and found a sample program that demonstrates a few language features. After playing around with it a little, I think I've understood that "OF" is like a struct element (or object property) accessor, the parens are an arr…
Re: The English Programming Language
#76Earlier quoted context omitted.
> I have made 3 changes here, which might or might not work with COBOL (I am Cobol ignorant ;) ). I've never used COBOL before, but this thread and your post made me curious and I installed GNU Cobol and found a sample program that demonstrates a few language features. After playing around with it a little, I think I've understood that "OF" is like a struct element (or object property) accessor, the parens are an arr…
The existence of Gnu COBOL:
Re: The English Programming Language
#77Earlier quoted context omitted.
I have no doubt English like syntax is a terrible idea but this seems like a surprisingly readable example.
Agreed, I rather like this line of code, but I must admit that the C-like version is perhaps better: sales_tax_amount = balance * state[42].tax_rate; (Assuming I've guessed the meaning of the Cobol correctly - perhaps that's the rub.) (ETA: Added semicolon.) (ETA2: Fixed critical indexing bug.)
So that'd be state[42].
Re: The English Programming Language
#78Earlier quoted context omitted.
Agreed, I rather like this line of code, but I must admit that the C-like version is perhaps better: sales_tax_amount = balance * state[42].tax_rate; (Assuming I've guessed the meaning of the Cobol correctly - perhaps that's the rub.) (ETA: Added semicolon.) (ETA2: Fixed critical indexing bug.)
I think indexes start at 1 in COBOL. I had to look it up though. (aiui, they're called TABLEs and the index can start from any number) So that'd be state[42].
I've put in a PR to upstream. LGTM