Live data from Hacker News

The English Programming Language

github.com

71–78 of 78 posts

Re: The English Programming Language

#71
post #34

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.

T-Shirt material which a vanishingly small number of victims will understand.

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.

A story more intricate than BSD’s. https://aeon.co/essays/why-is-english-so-weirdly-different-f...

Re: The English Programming Language

#74

I'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.

The original version of my aidev.codes project was a process of refining specifications that would be rerun each time you changed something (picking up where you left off if you just added something). Running meant generating JavaScript code based on the spec which would be executed on page load.

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

#75
post #48
post #36

Earlier 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…

The existence of Gnu COBOL:

Re: The English Programming Language

#76
post #75
post #48

Earlier 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:

Furthermore, vim turned out to have a built-in COBOL syntax highlighting mode which was activated when I opened the source first!

Re: The English Programming Language

#77
post #8
post #7

Earlier 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.)

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].

Re: The English Programming Language

#78
post #8

Earlier 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].

Not all heroes wear capes.

I've put in a PR to upstream. LGTM

Post reply on HN