The first example in the lanuage introduction (<a href="https://homepages.cwi.nl/~steven/abc/" rel="nofollow">https://homepages.cwi.nl/~steven/abc/</a>):<p><pre><code> HOW TO RETURN words document:
PUT {} IN collection
FOR line IN document:
FOR word IN split line:
IF word not.in collection:
INSERT word IN collection
RETURN collection
</code></pre>
In Python it would be:<p><pre><code> def words(document):
collection = set()
for line in document:
for word in line.split():
if word not in collection:
collection.add(word)
return collection
</code></pre>
I kept the splitting by line and "if word not in collection:" in there even though they don't have an impact on the outcome. I have the feeling that even in the original example they have only been put there to show the language constructs, not to do anything useful. If one wanted to optimize it, it could all be collapsed to just "return set(text.split())", but that would not show off the language features.<p>ABC uses 225 chars, Python 218 chars. 3% less.<p>So one could say Python is 3% more efficient than ABC.
Nice find. This looks like the best introduction to the language in the repo: <a href="https://raw.githubusercontent.com/gvanrossum/abc-unix/refs/heads/main/doc/abcintro.doc" rel="nofollow">https://raw.githubusercontent.com/gvanrossum/abc-unix/refs/h...</a>
I swear I remember using this. I even remember the syntax. I was able to compile it and just start writing in it. I have no idea how I know this syntax.<p>Did early linux have this? Maybe netbsd?<p>I actually found it. It was on simtel: <a href="https://archive.org/details/Simtel20_Sept92" rel="nofollow">https://archive.org/details/Simtel20_Sept92</a><p>I must have gotten it from there. I would routinely get any thing Walnut Creek would make.<p>I also realized a couple years ago I could navigate EDLIN without help and knew how to use masm. Somehow I had forgotten what I know but my fingers did not.
Fun story: As a kid with only a DOS 3.3 box and no BBS to download another and not much money to buy one, no magazine subscription etc., I accidentally erased our word processor software. I literally only had EDLIN for writing anything. So, that’s what I used. Got so good I was able to write multi-page book reports with it.
I encountered it on an open day on the university. The only thing I still remember is that functions were called HowTo, because they described how to do something.
Can you tell me about "Simtel"? I have never used a BBS but from looking at that ISO it was a collection of software downloaded from BBS' ?
FTP server, not BBS. You had to be on the Internet to access it.<p><a href="https://en.wikipedia.org/wiki/Simtel" rel="nofollow">https://en.wikipedia.org/wiki/Simtel</a><p>It was called SIMTEL20 for a while because it was hosted on a PDP-10 mainframe running the TOPS-20 operating system, but apparently it was hosted on a PDP-10 running ITS first:<p>> The archive was hosted initially on the MIT-MC PDP-10 running the Incompatible Timesharing System,[1] then TOPS-20, then FreeBSD servers
Extremely cool. Thanks, GvR.<p>For my own language design I've wanted to introduce some of this ABC syntax back into Python. Mainly for unpacking data and doing index/slice assignments; a lot of beginners seem to get tripped up because assignments in Python use the same syntax as mutations, so maybe it's better to write e.g. `a['b'] = c` like `set b = c in a`, or `update a with {'b': c}`, or ... who knows, exactly.
I agree that Python would benefit from separating mutation and assignment.<p>Especially when you are dealing with nested functions. You'd get around the whole need for 'global' and 'nonlocal' declarations. (Though your linter might still ask you for them for clarity.)<p>As a minimal syntax change, I would propose using perhaps = for introduction of a variable (the common case) and := for an explicit mutation of an existing variable.<p>But you could also use `let . = ..` and `. = ..` like Rust does.
It actually looks surprisingly usable
<a href="https://homepages.cwi.nl/~steven/abc/types.html" rel="nofollow">https://homepages.cwi.nl/~steven/abc/types.html</a>
The use of “HOW TO” for defining subroutines is kinda neat. Though “HOW TO RETURN” for functions doesn’t quite hit the mark. “HOW TO OBTAIN” or “HOW TO SUPPLY” would work with the same number of characters.
Interesting, seems like Python is a strict improvement over ABC though many things are very similar. The PUT ... IN ... and INSERT ... IN ... syntax looks quite clunky and un-composable, at least the examples never do more than one (high-level) operation per line. Also, I guess GvR's English wasn't that good at the time - it should be have been INTO, right?
"in" vs "into" is often just a matter of how casually you're speaking.<p>The same sort of syntax was used in HyperTalk (with "into"): <a href="https://en.wikipedia.org/wiki/HyperTalk#Description" rel="nofollow">https://en.wikipedia.org/wiki/HyperTalk#Description</a> I wouldn't be surprised to hear of it in AppleScript, either, although I can't recall.
not a strict improvement: didn't ABC have persistent variables?
Wasn't python for a while just a REPL to query and call C functions from shared objects with dlsym and probably an equivalent to libffi?<p>Maybe I am remembering this wrong...
The year says 91, but it looks like it was recently pushed to github, which is a notable event on its own.
There's even a book. I have it (and have had it for a loooong time). I tried to do some larger things with ABC back in the day. It was nice. Then Python arrived. I think I still have the muscle-memory for the editor.
Where is the GIL in this?