Earlier quoted context omitted.
> 2**1000 = 2^1000 The reason for using `**` is that `^` is widely used for bitwise exclusive-or. So commonly `2**1000 != 2^1000`!
I think Fortran used ** because EBCDIC didn't have ^ or uparrow. ABC and Python followed Fortran rather than C on this point. units(1) supports both.
The original ABC language, Python's predecessor (1991)
21–30 of 51 posts
Re: The original ABC language, Python's predecessor (1991)
#22Earlier quoted context omitted.
For anyone else who, like me a moment ago, doesn't know the meaning of ** but is curious: it's how many (but not all) programming languages express "to the power of", aka 2**1000 = 2^1000
> 2**1000 = 2^1000 The reason for using `**` is that `^` is widely used for bitwise exclusive-or. So commonly `2**1000 != 2^1000`!
Re: The original ABC language, Python's predecessor (1991)
#23Nice find. This looks like the best introduction to the language in the repo: https://raw.githubusercontent.com/gvanrossum/abc-unix/refs/h...
Wow 2 * 1000 without rounding errors, 40 years ago this must have been super impressive, since I find that quite a feat of today's python.
Python 3.11.13 (main, Jun 3 2025, 18:38:25) [GCC 14.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 2**1000
10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
>>> _/2**999
2.0Re: The original ABC language, Python's predecessor (1991)
#24 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
In Python it would be: def words(document):
collection = set()
for line in document:
for word in line.split():
if word not in collection:
collection.add(word)
return collection
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.ABC uses 225 chars, Python 218 chars. 3% less.
So one could say Python is 3% more efficient than ABC.
Re: The original ABC language, Python's predecessor (1991)
#25Did early linux have this? Maybe netbsd?
I actually found it. It was on simtel: https://archive.org/details/Simtel20_Sept92
I must have gotten it from there. I would routinely get any thing Walnut Creek would make.
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.
Re: The original ABC language, Python's predecessor (1991)
#26The first example in the lanuage introduction ( https://homepages.cwi.nl/~steven/abc/ ): 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 In Python it would be: def words(document): collection = set() for line in document: for word in line.split(): if word not in collection: collection.add(word) retu…
Re: The original ABC language, Python's predecessor (1991)
#27The first example in the lanuage introduction ( https://homepages.cwi.nl/~steven/abc/ ): 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 In Python it would be: def words(document): collection = set() for line in document: for word in line.split(): if word not in collection: collection.add(word) retu…
“HOW TO RETURN” for something as common as “def” is crazy!
public static function words(string $document): array {
which some languages these days are coming up with.Re: The original ABC language, Python's predecessor (1991)
#28I 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. Did early linux have this? Maybe netbsd? I actually found it. It was on simtel: https://archive.org/details/Simtel20_Sept92 I must have gotten it from there. I would routinely get any thing Walnut Creek would make. I also realized a couple years ago I could navigate…
Re: The original ABC language, Python's predecessor (1991)
#29Earlier quoted context omitted.
For anyone else who, like me a moment ago, doesn't know the meaning of ** but is curious: it's how many (but not all) programming languages express "to the power of", aka 2**1000 = 2^1000
> 2**1000 = 2^1000 The reason for using `**` is that `^` is widely used for bitwise exclusive-or. So commonly `2**1000 != 2^1000`!
Re: The original ABC language, Python's predecessor (1991)
#30I 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. Did early linux have this? Maybe netbsd? I actually found it. It was on simtel: https://archive.org/details/Simtel20_Sept92 I must have gotten it from there. I would routinely get any thing Walnut Creek would make. I also realized a couple years ago I could navigate…