Discussion:
10 PRINT "HAPPY BIRTHDAY"
(too old to reply)
Ted Nolan <tednolan>
2024-05-04 02:28:34 UTC
Permalink
arstechnica.com/gadgets/2024/05/the-basic-programming-language-turns-60/

Sixty years ago, on May 1, 1964, at 4 am in the morning, a
quiet revolution in computing began at Dartmouth College.
That's when mathematicians John G. Kemeny and Thomas E.
Kurtz successfully ran the first program written in their
newly developed BASIC (Beginner's All-Purpose Symbolic
Instruction Code) programming language on the college's
General Electric GE-225 mainframe.
--
columbiaclosings.com
What's not in Columbia anymore..
Lawrence D'Oliveiro
2024-05-04 04:51:01 UTC
Permalink
Post by Ted Nolan <tednolan>
arstechnica.com/gadgets/2024/05/the-basic-programming-language-turns-60/
Sixty years ago, on May 1, 1964, at 4 am in the morning, a
quiet revolution in computing began at Dartmouth College.
That's when mathematicians John G. Kemeny and Thomas E. Kurtz
successfully ran the first program written in their newly
developed BASIC (Beginner's All-Purpose Symbolic Instruction
Code) programming language on the college's General Electric
GE-225 mainframe.
Great language for string processing ... until Perl came along.
Ahem A Rivet's Shot
2024-05-04 06:18:09 UTC
Permalink
On Sat, 4 May 2024 04:51:01 -0000 (UTC)
Post by Lawrence D'Oliveiro
Post by Ted Nolan <tednolan>
arstechnica.com/gadgets/2024/05/the-basic-programming-language-turns-60/
Sixty years ago, on May 1, 1964, at 4 am in the morning, a
quiet revolution in computing began at Dartmouth College.
That's when mathematicians John G. Kemeny and Thomas E. Kurtz
successfully ran the first program written in their newly
developed BASIC (Beginner's All-Purpose Symbolic Instruction
Code) programming language on the college's General Electric
GE-225 mainframe.
Great language for string processing ... until Perl came along.
I suspect the BASIC you knew was a bit extended from Dartmouth, it
probably didn't even need you to number every line.

This is string manipulation as introduced in the fourth edition (it
prints is).

100 LET S$ ="Now is the time"
110 CHANGE S$ TO S
120 LET T(1) = S(5)
130 LET T(2) = S(6)
140 LET T(0) = 2
150 CHANGE T TO T$
160 PRINT T$
--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/
For forms of government let fools contest
Whate're is best administered is best - Alexander Pope
Lawrence D'Oliveiro
2024-05-04 06:41:09 UTC
Permalink
Post by Ahem A Rivet's Shot
This is string manipulation as introduced in the fourth edition
(it prints is).
100 LET S$ ="Now is the time"
110 CHANGE S$ TO S
120 LET T(1) = S(5)
130 LET T(2) = S(6)
140 LET T(0) = 2
150 CHANGE T TO T$
160 PRINT T$
Yeah, I had to go through the CHANGE rigmarole with BASIC-PLUS on RSTS/E.

Many other languages figured out how to do their string processing a bit
more conveniently than that.
Ahem A Rivet's Shot
2024-05-04 08:20:07 UTC
Permalink
On Sat, 4 May 2024 06:41:09 -0000 (UTC)
Post by Lawrence D'Oliveiro
Yeah, I had to go through the CHANGE rigmarole with BASIC-PLUS on RSTS/E.
Many other languages figured out how to do their string processing a bit
more conveniently than that.
True but it's not that different to dealing with packed strings in
BCPL.
--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/
For forms of government let fools contest
Whate're is best administered is best - Alexander Pope
Bob Eager
2024-05-04 09:47:57 UTC
Permalink
On Sat, 4 May 2024 06:41:09 -0000 (UTC) Lawrence D'Oliveiro
Post by Lawrence D'Oliveiro
Yeah, I had to go through the CHANGE rigmarole with BASIC-PLUS on RSTS/E.
Many other languages figured out how to do their string processing a
bit more conveniently than that.
True but it's not that different to dealing with packed strings in
BCPL.
Well, it is Lawrence - what do you expect?

I quite like the string processing in REXX.
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
Lawrence D'Oliveiro
2024-05-04 22:57:39 UTC
Permalink
On Sat, 4 May 2024 06:41:09 -0000 (UTC) Lawrence D'Oliveiro
Post by Lawrence D'Oliveiro
Yeah, I had to go through the CHANGE rigmarole with BASIC-PLUS on RSTS/E.
Many other languages figured out how to do their string processing a
bit more conveniently than that.
True but it's not that different to dealing with packed strings in
BCPL.
I’m not sure why comparing it to another antiquated language is supposed
to make it better.
Carlos E.R.
2024-05-04 08:15:13 UTC
Permalink
Post by Ted Nolan <tednolan>
arstechnica.com/gadgets/2024/05/the-basic-programming-language-turns-60/
Sixty years ago, on May 1, 1964, at 4 am in the morning, a
quiet revolution in computing began at Dartmouth College.
That's when mathematicians John G. Kemeny and Thomas E.
Kurtz successfully ran the first program written in their
newly developed BASIC (Beginner's All-Purpose Symbolic
Instruction Code) programming language on the college's
General Electric GE-225 mainframe.
It allowed professionals in things not computing, like mechanical
engineers, say, to develop software in their areas of interest that
would not occur to a programmer.

It was a great language for innovation.
--
Cheers, Carlos.
Lawrence D'Oliveiro
2024-05-04 22:57:01 UTC
Permalink
Post by Carlos E.R.
It allowed professionals in things not computing, like mechanical
engineers, say, to develop software in their areas of interest that
would not occur to a programmer.
It was a great language for innovation.
That role seems to be assumed these days by Python.
Carlos E.R.
2024-05-06 06:03:52 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by Carlos E.R.
It allowed professionals in things not computing, like mechanical
engineers, say, to develop software in their areas of interest that
would not occur to a programmer.
It was a great language for innovation.
That role seems to be assumed these days by Python.
How so?

Do mechanical engineers study Python in their courses?

Is it a terribly easy language?

Does it come included in every computer?
--
Cheers, Carlos.
Lawrence D'Oliveiro
2024-05-06 06:50:26 UTC
Permalink
Is [Python] a terribly easy language?
It’s a “deep” language: easy to approach, yet the more you learn, the more
there is to discover.

Remember how, with BASIC, you could type single statements and run them
immediately? Or put line numbers on the front to keep them as part of your
program? It was either-or.

Python has something better: Jupyter notebooks. Each notebook cell can
contain any number of lines of code, without any need of line numbers.
Executing a cell produces immediate output, yet it doesn’t throw the cell
away: it still gets saved as part of the notebook.

And cells can do rich output: styled text, graphics, audio, video, even
interactive widgets.
Does it come included in every computer?
It’s in the standard repo of every major Free OS. So if your computer
comes with a Free OS, it will either be preinstalled, or installable
within about five minutes of starting up.

Nothing “comes with every computer” any more.
John Ames
2024-05-06 17:30:25 UTC
Permalink
On Mon, 6 May 2024 06:50:26 -0000 (UTC)
Post by Lawrence D'Oliveiro
Is [Python] a terribly easy language?
It’s a “deep” language: easy to approach, yet the more you learn, the
more there is to discover.
Python is pretty approachable, but not without its own quirks. It's
dead easy to get into if you're already comfortable in a computer-
programming context, but I'm curious how well it works for absolute
novices; in particular, the choice to do scoping by the use of *literal
whitespace* pretty much requires the use of a dedicated programmers'
editor. BASIC you can write in Notepad, in a pinch.
Post by Lawrence D'Oliveiro
Does it come included in every computer?
It’s in the standard repo of every major Free OS. So if your computer
comes with a Free OS, it will either be preinstalled, or installable
within about five minutes of starting up.
So "no," then.
Post by Lawrence D'Oliveiro
Nothing “comes with every computer” any more.
Sadly true, at least in the commodity PC space; there really oughta be
a law about this, but the parties invested in charging admission to
walled gardens would raise hell... :/
Stefan Ram
2024-05-06 18:35:55 UTC
Permalink
Post by John Ames
Python is pretty approachable, but not without its own quirks. It's
dead easy to get into if you're already comfortable in a computer-
programming context, but I'm curious how well it works for absolute
novices; in particular, the choice to do scoping by the use of *literal
whitespace* pretty much requires the use of a dedicated programmers'
editor. BASIC you can write in Notepad, in a pinch.
I've taught a bunch of intro courses in different programming
languages, and the newbies who learned Python with me were
super stoked because it's genuinely super easy and a blast.
Plus, you don't need some fancy editor for it, and whitespace
in Python isn't directly tied to the scope of variables either.
John Ames
2024-05-06 19:09:02 UTC
Permalink
On 6 May 2024 18:35:55 GMT
Post by Stefan Ram
I've taught a bunch of intro courses in different programming
languages, and the newbies who learned Python with me were
super stoked because it's genuinely super easy and a blast.
Good to hear :)
Post by Stefan Ram
Plus, you don't need some fancy editor for it, and whitespace
in Python isn't directly tied to the scope of variables either.
Eh? Did that change recently? It's been a minute since I've touched it,
but last I checked it still uses indentation for block delimiting. You
certainly *could* count spaces manually when using a basic text editor,
but it'd be incredibly tedious.
Stefan Ram
2024-05-06 19:43:31 UTC
Permalink
Post by John Ames
On 6 May 2024 18:35:55 GMT
Post by Stefan Ram
Plus, you don't need some fancy editor for it, and whitespace
in Python isn't directly tied to the scope of variables either.
Eh? Did that change recently? It's been a minute since I've touched it,
but last I checked it still uses indentation for block delimiting. You
certainly *could* count spaces manually when using a basic text editor,
but it'd be incredibly tedious.
I've found this Python code snippet:

if True:
print( type( cursor ))
for source in sources:
print( 'reading', source )
printed = False
warning_printed = False
...

. It's a bit unconventional because it's got this redundant
"if True:" and it's not inside a function. But it's real code
I use to process mbox files with Usenet posts.

(The "..." is just me omitting the rest of the code, not part of
the actual program.)

When I'm typing in code like this, I sometimes find myself
counting "1-2-3-4" as I'm typing out the indentation " ",
or "1-2-3-4-1-2-3-4" for " " at the start of a line.

I also indent code for other programming languages in a similar
way. Therefore, I never got the impression that indentation
in Python is more of a hassle than in other languages.

Some editors are "smart" and will automatically give the
next line the same indentation as the current line. But
even without such an editor, you often don't need to count,
'cause you can eyeball where to start the next line if its
indentation matches the indentation of a preceding line.

The variable "printed" is gonna have global scope, technically
module scope, 'cause Python doesn't do block scope.
And that's why whitespace isn't tied to scope in Python.
Lawrence D'Oliveiro
2024-05-06 21:47:09 UTC
Permalink
When I'm typing in code like this, I sometimes find myself counting
"1-2-3-4" as I'm typing out the indentation " " ...
This is why I use “#end” comments in my code. Also I have Emacs commands
defined to jump quickly between lines with matching indentation, so those
“#end” lines give me something to jump to, to mark the end of a compound
statement.
Lawrence D'Oliveiro
2024-05-06 21:47:42 UTC
Permalink
Post by John Ames
On Mon, 6 May 2024 06:50:26 -0000 (UTC)
Post by Lawrence D'Oliveiro
Post by Carlos E.R.
Does it come included in every computer?
It’s in the standard repo of every major Free OS. So if your computer
comes with a Free OS, it will either be preinstalled, or installable
within about five minutes of starting up.
So "no," then.
What would you suggest that is?
Ted Nolan <tednolan>
2024-05-07 00:27:35 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by John Ames
On Mon, 6 May 2024 06:50:26 -0000 (UTC)
Post by Carlos E.R.
Does it come included in every computer?
It’s in the standard repo of every major Free OS. So if your computer
comes with a Free OS, it will either be preinstalled, or installable
within about five minutes of starting up.
So "no," then.
What would you suggest that is?
Javascript maybe?
--
columbiaclosings.com
What's not in Columbia anymore..
Lawrence D'Oliveiro
2024-05-07 02:45:32 UTC
Permalink
Post by Ted Nolan <tednolan>
Javascript maybe?
That’s not a completely dumb idea. It is a language with some good parts.

Could do with a better development environment, though. Sure, you can use
the browser console as a REPL, but I feel that’s a bit awkward for
beginners.
John Ames
2024-05-07 14:46:37 UTC
Permalink
On Tue, 7 May 2024 02:45:32 -0000 (UTC)
Post by Lawrence D'Oliveiro
That’s not a completely dumb idea. It is a language with some good parts.
Could do with a better development environment, though. Sure, you can
use the browser console as a REPL, but I feel that’s a bit awkward
for beginners.
I briefly tutored for a kids' programming course using JS + HTML/CSS as
an environment. You could definitely do worse on a language front, and
the instant-gratification factor helped, but having to wrangle with all
the nuances and gotchas of the CSS standard (to say nothing of browser-
specific implementation quirks) was...not ideal.
Lawrence D'Oliveiro
2024-05-07 22:15:33 UTC
Permalink
Post by John Ames
I briefly tutored for a kids' programming course using JS + HTML/CSS as
an environment. You could definitely do worse on a language front, and
the instant-gratification factor helped, but having to wrangle with all
the nuances and gotchas of the CSS standard (to say nothing of browser-
specific implementation quirks) was...not ideal.
Try Python+Jupyter next time. A much nicer environment, where you can save
your work, build it incrementally, and produce all kinds of rich output
where somebody else has already dealt with most of the browser quirks. And
do simple interactive widgets as well.
Gabriel Rolland
2024-05-17 19:39:06 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by John Ames
I briefly tutored for a kids' programming course using JS + HTML/CSS as
an environment. You could definitely do worse on a language front, and
the instant-gratification factor helped, but having to wrangle with all
the nuances and gotchas of the CSS standard (to say nothing of browser-
specific implementation quirks) was...not ideal.
Try Python+Jupyter next time. A much nicer environment, where you can save
your work, build it incrementally, and produce all kinds of rich output
where somebody else has already dealt with most of the browser quirks. And
do simple interactive widgets as well.
Lawrence, since you said you before you were using Emacs, do you use
org-mode? If yes ; what would you say about saving code snippets in an
org document with the org markdown? How would that compare to Jupyter
notebooks? I'm not sure if this is still true but I've heard that the
languages supported by Jupyter were Julia, Python and R. Org supports a
lot of languages. Maybe it would be a little bit harassing to learn
Emacs at the same time of programming for beginners? Or maybe it is
just the fact that Jupyter can run in a browser that makes it nice for
getting started?
Lawrence D'Oliveiro
2024-05-17 21:28:07 UTC
Permalink
Post by Gabriel Rolland
Lawrence, since you said you before you were using Emacs, do you use
org-mode?
I gave it a try once, but didn’t manage to get very far with it.
Post by Gabriel Rolland
I'm not sure if this is still true but I've heard that the
languages supported by Jupyter were Julia, Python and R.
There are quite a few different language kernels implemented for Jupyter.
But you don’t actually need a kernel backend to use an arbitrary language
in Jupyter: you can use the “%%script” cell magic to pass the content of a
cell to any external command.

Andreas Eder
2024-05-08 20:51:45 UTC
Permalink
Post by Lawrence D'Oliveiro
Is [Python] a terribly easy language?
It’s a “deep” language: easy to approach, yet the more you learn, the more
there is to discover.
Remember how, with BASIC, you could type single statements and run them
immediately? Or put line numbers on the front to keep them as part of your
program? It was either-or.
Python has something better: Jupyter notebooks. Each notebook cell can
contain any number of lines of code, without any need of line numbers.
Executing a cell produces immediate output, yet it doesn’t throw the cell
away: it still gets saved as part of the notebook.
And cells can do rich output: styled text, graphics, audio, video, even
interactive widgets.
Does it come included in every computer?
It’s in the standard repo of every major Free OS. So if your computer
comes with a Free OS, it will either be preinstalled, or installable
within about five minutes of starting up.
Nothing “comes with every computer” any more.
You can do the same in emacs with org and babel in many languages, not
only python.

'Andreas
--
ceterum censeo redmondinem esse delendam
Lawrence D'Oliveiro
2024-05-08 21:02:18 UTC
Permalink
Post by Andreas Eder
You can do the same in emacs with org and babel in many languages, not
only python.
Emacs is a powerhouse. So is Jupyter, though in a different way. Both
support multiple languages.

Jupyter is a great environment for what I call “scratchpad” programming.
It lets you run code incrementally, in pieces, and save the code and the
results in your notebook.
Andreas Eder
2024-05-09 09:21:00 UTC
Permalink
Post by Lawrence D'Oliveiro
Post by Andreas Eder
You can do the same in emacs with org and babel in many languages, not
only python.
Emacs is a powerhouse. So is Jupyter, though in a different way. Both
support multiple languages.
Jupyter is a great environment for what I call “scratchpad” programming.
It lets you run code incrementally, in pieces, and save the code and the
results in your notebook.
Yes, I knowm but I prefer emacs.
You can do all that and a lot more.

'Andreas
--
ceterum censeo redmondinem esse delendam
Loading...