• stack on applesoft basic...

    From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.arch on Fri Apr 24 21:35:47 2026
    From Newsgroup: comp.arch

    Love this one. Build a recursive stack using AppleSoft BASIC:

    100 REM ct_vfield_applesoft_basic
    110 HOME
    120 HGR: HCOLOR = 3: VTAB 22
    130 PRINT "ct_vfield_applesoft_basic"
    140 GOSUB 1000
    150 GOSUB 3000
    160 SP = 0
    170 RS(SP, 0) = 0
    180 RS(SP, 1) = -1
    190 RS(SP, 2) = 0
    200 RS(SP, 3) = 1
    210 RS(SP, 4) = 0
    220 GOSUB 8000
    230 V1(1) = 0: V1(2) = 0: V1(3) = 1: V1(4) = 128
    240 GOSUB 6000
    245 PRINT "Chris Thomasson's Koch Complete!"
    250 END

    1000 REM ct_init
    1010 PRINT "ct_init"
    1020 DIM A0(6)
    1030 DIM V0(4)
    1040 DIM V1(4)
    1050 DIM V2(4)
    1060 DIM V3(4)
    1070 DIM V4(4)
    1080 DIM V5(4)
    1090 RN = 3
    1100 DIM RS(RN, 16)
    1110 GOSUB 2000
    1120 RETURN

    2000 REM ct_init_plane
    2010 PRINT "ct_init_plane"
    2020 A0(1) = 279: REM m_plane.m_width
    2030 A0(2) = 191: REM m_plane.m_height
    2040 A0(3) = 0.0126106: REM m_plane.m_xstep
    2050 A0(4) = 0.0126316: REM m_plane.m_ystep
    2060 A0(5) = -1.75288: REM m_plane.m_axes.m_xmin
    2070 A0(6) = 1.2: REM m_plane.m_axes.m_ymax
    2080 RETURN

    3000 REM ct_display_plane
    3010 PRINT "ct_display_plane"
    3020 FOR I0 = 1 TO 6
    3030 PRINT "A0("; I0; ") = " A0(I0)
    3040 NEXT I0
    3050 RETURN

    4000 REM ct_project_point
    4010 REM PRINT "ct_project_point"
    4020 V0(3) = (V0(1) - A0(5)) / A0(3)
    4030 V0(4) = (A0(6) - V0(2)) / A0(4)
    4040 IF V0(3) < 0 THEN V0(3) = INT(V0(3) - .5)
    4050 IF V0(3) >= 0 THEN V0(3) = INT(V0(3) + .5)
    4060 IF V0(4) < 0 THEN V0(4) = INT(V0(4) - .5)
    4070 IF V0(4) >= 0 THEN V0(4) = INT(V0(4) + .5)
    4080 RETURN

    5000 REM ct_plot_point
    5010 REM PRINT "ct_plot_point"
    5020 GOSUB 4000
    5030 IF V0(3) > -1 AND V0(3) <= A0(1) AND V0(4) > -1 AND V0(4) <=
    A0(2) THEN HPLOT V0(3), V0(4)
    5040 RETURN

    6000 REM ct_plot_circle
    6010 PRINT "ct_plot_circle"
    6020 AB = 6.28318 / V1(4)
    6030 FOR I1 = 0 TO 6.28318 STEP AB
    6040 V0(1) = V1(1) + COS(I1) * V1(3)
    6050 V0(2) = V1(2) + SIN(I1) * V1(3)
    6060 GOSUB 5000
    6070 NEXT I1
    6080 RETURN

    7000 REM ct_plot_line
    7010 PRINT "ct_plot_line"
    7020 V0(1) = V5(1): V0(2) = V5(2)
    7030 GOSUB 4000
    7040 IF V0(3) < 0 THEN V0(3) = 0
    7050 IF V0(3) > A0(1) THEN V0(3) = A0(1)
    7060 IF V0(4) < 0 THEN V0(4) = 0
    7070 IF V0(4) > A0(2) THEN V0(4) = A0(2)
    7080 HPLOT V0(3), V0(4)
    7090 V0(1) = V5(3): V0(2) = V5(4)
    7100 GOSUB 4000
    7110 IF V0(3) < 0 THEN V0(3) = 0
    7120 IF V0(3) > A0(1) THEN V0(3) = A0(1)
    7130 IF V0(4) < 0 THEN V0(4) = 0
    7140 IF V0(4) > A0(2) THEN V0(4) = A0(2)
    7150 HPLOT TO V0(3), V0(4)
    7160 RETURN

    8000 REM ct_koch
    8010 IF RS(SP, 0) >= RN THEN RETURN
    8020 PRINT "ct_koch = "; RS(SP, 0); " "; RS(SP, 1); " "; RS(SP, 2);
    " "; RS(SP, 3); " "; RS(SP, 4)"
    8030 RS(SP, 5) = RS(SP, 3) - RS(SP, 1) : REM difx
    8040 RS(SP, 6) = RS(SP, 4) - RS(SP, 2) : REM dify
    8050 RS(SP, 7) = RS(SP, 1) + RS(SP, 5) / 2 : REM dify
    8060 RS(SP, 8) = RS(SP, 2) + RS(SP, 6) / 2 : REM dify
    8070 RS(SP, 9) = -RS(SP, 6) : REM perpx
    8080 RS(SP, 10) = RS(SP, 5) : REM perpy
    8090 RS(SP, 11) = RS(SP, 7) + RS(SP, 9) / 3 : REM tipx
    8100 RS(SP, 12) = RS(SP, 8) + RS(SP, 10) / 3 : REM tipy
    8110 RS(SP, 13) = RS(SP, 1) + RS(SP, 5) / 3 : REM k0x
    8120 RS(SP, 14) = RS(SP, 2) + RS(SP, 6) / 3 : REM k0y
    8130 RS(SP, 15) = RS(SP, 3) - RS(SP, 5) / 3 : REM k1x
    8140 RS(SP, 16) = RS(SP, 4) - RS(SP, 6) / 3 : REM k1y

    8145 IF RS(SP, 0) < RN - 1 GOTO 8230
    8150 V5(1) = RS(SP, 1): V5(2) = RS(SP, 2): V5(3) = RS(SP, 13): V5(4)
    = RS(SP, 14)
    8160 GOSUB 7000
    8170 V5(1) = RS(SP, 13): V5(2) = RS(SP, 14): V5(3) = RS(SP, 11):
    V5(4) = RS(SP, 12)
    8180 GOSUB 7000
    8190 V5(1) = RS(SP, 11): V5(2) = RS(SP, 12): V5(3) = RS(SP, 15):
    V5(4) = RS(SP, 16)
    8200 GOSUB 7000
    8210 V5(1) = RS(SP, 15): V5(2) = RS(SP, 16): V5(3) = RS(SP, 3):
    V5(4) = RS(SP, 4)
    8220 GOSUB 7000

    8230 REM line 0
    8240 SP = SP + 1
    8250 RS(SP, 0) = RS(SP - 1, 0) + 1
    8260 RS(SP, 1) = RS(SP - 1, 1)
    8270 RS(SP, 2) = RS(SP - 1, 2)
    8280 RS(SP, 3) = RS(SP - 1, 13)
    8290 RS(SP, 4) = RS(SP - 1, 14)
    8300 GOSUB 8000
    8310 SP = SP - 1
    8320 REM line 1
    8330 SP = SP + 1
    8340 RS(SP, 0) = RS(SP - 1, 0) + 1
    8350 RS(SP, 1) = RS(SP - 1, 13)
    8360 RS(SP, 2) = RS(SP - 1, 14)
    8370 RS(SP, 3) = RS(SP - 1, 11)
    8380 RS(SP, 4) = RS(SP - 1, 12)
    8390 GOSUB 8000
    8400 SP = SP - 1
    8410 REM line 2
    8420 SP = SP + 1
    8430 RS(SP, 0) = RS(SP - 1, 0) + 1
    8440 RS(SP, 1) = RS(SP - 1, 11)
    8450 RS(SP, 2) = RS(SP - 1, 12)
    8460 RS(SP, 3) = RS(SP - 1, 15)
    8470 RS(SP, 4) = RS(SP - 1, 16)
    8480 GOSUB 8000
    8490 SP = SP - 1
    8500 REM line 3
    8510 SP = SP + 1
    8520 RS(SP, 0) = RS(SP - 1, 0) + 1
    8530 RS(SP, 1) = RS(SP - 1, 15)
    8540 RS(SP, 2) = RS(SP - 1, 16)
    8550 RS(SP, 3) = RS(SP - 1, 3)
    8560 RS(SP, 4) = RS(SP - 1, 4)
    8570 GOSUB 8000
    8580 SP = SP - 1
    8590 RETURN
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sat Apr 25 04:49:22 2026
    From Newsgroup: comp.arch

    On Fri, 24 Apr 2026 21:35:47 -0700, Chris M. Thomasson wrote:

    Love this one. Build a recursive stack using AppleSoft BASIC:

    I’ve done that in Python, too. Because the default recursion limit
    wasn’t big enough for my (admittedly brute-force) algorithm for
    resolving the types of the long chains of data blocks in a Blender
    document.

    <https://gitlab.com/ldo/blendhack>
    --- Synchronet 3.21f-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.arch on Fri May 1 15:16:31 2026
    From Newsgroup: comp.arch

    On 4/24/2026 9:49 PM, Lawrence D’Oliveiro wrote:
    On Fri, 24 Apr 2026 21:35:47 -0700, Chris M. Thomasson wrote:

    Love this one. Build a recursive stack using AppleSoft BASIC:

    I’ve done that in Python, too.

    It was really fun to make in AppleSoft BASIC. I used to code for it as a little kid.


    Because the default recursion limit
    wasn’t big enough for my (admittedly brute-force) algorithm for
    resolving the types of the long chains of data blocks in a Blender
    document.

    <https://gitlab.com/ldo/blendhack>

    Perhaps try to make an iterative version? Or is that out of the question?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Fri May 1 23:00:44 2026
    From Newsgroup: comp.arch

    On Fri, 1 May 2026 15:16:31 -0700, Chris M. Thomasson wrote:

    On 4/24/2026 9:49 PM, Lawrence D’Oliveiro wrote:

    On Fri, 24 Apr 2026 21:35:47 -0700, Chris M. Thomasson wrote:

    Love this one. Build a recursive stack using AppleSoft BASIC:

    I’ve done that in Python, too.

    It was really fun to make in AppleSoft BASIC. I used to code for it
    as a little kid.

    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: Jupyter <https://jupyter.org/>. Only it does it without line numbers, using a
    notebook paradigm instead, that works across multiple languages. A
    notebook consists of a series of cells, each of which can hold any
    number of lines of program code. Executing a cell doesn’t throw its
    contents away, so you get both immediate mode and incremental program development in one.

    Because the default recursion limit wasn’t big enough for my
    (admittedly brute-force) algorithm for resolving the types of the
    long chains of data blocks in a Blender document.

    <https://gitlab.com/ldo/blendhack>

    Perhaps try to make an iterative version? Or is that out of the
    question?

    Do you mean iterating over an explicit stack of objects that describe
    what to do next? That’s what I did.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch on Sat May 2 00:46:22 2026
    From Newsgroup: comp.arch

    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro
    <ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for >incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ... there used to be interactive interpreters for C and Pascal, but I haven't seen one for decades.

    Apologies if I missed your favorite REPL language.


    Jupyter <https://jupyter.org/>.

    Has issues mixing code written in different languages, and many of the available language kernels are incomplete and/or outdated.

    [Still, it is a good effort that just needs more work.]
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sat May 2 06:11:13 2026
    From Newsgroup: comp.arch

    George Neuner <gneuner2@comcast.net> writes:
    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro ><ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for >>incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ...

    Forth, if you want a low-level programming language.

    there used to be interactive
    interpreters for C and Pascal, but I haven't seen one for decades.

    Also for Java. Such things tend to suffer from the fact that the
    programming language has not been designed with a REPL in mind. So
    the REPL designer has to change the programming language, and the
    mainstream users of this programming language then tend to ignore it.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sat May 2 08:36:56 2026
    From Newsgroup: comp.arch

    On Sat, 02 May 2026 06:11:13 GMT, Anton Ertl wrote:

    Such things tend to suffer from the fact that the programming
    language has not been designed with a REPL in mind.

    I believe you can get C or C++ language kernel implementations for
    Jupyter.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Thomas Koenig@tkoenig@netcologne.de to comp.arch on Sat May 2 08:51:42 2026
    From Newsgroup: comp.arch

    George Neuner <gneuner2@comcast.net> schrieb:
    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro
    <ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for >>incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ... there used to be interactive interpreters for C and Pascal, but I haven't seen one for decades.

    Apologies if I missed your favorite REPL language.

    Julia :-)
    --
    This USENET posting was made without artificial intelligence,
    artificial impertinence, artificial arrogance, artificial stupidity,
    artificial flavorings or artificial colorants.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sat May 2 18:35:29 2026
    From Newsgroup: comp.arch


    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    ERROR "unexpected byte sequence starting at index 97: '\xC2'" while decoding:

    George Neuner <gneuner2@comcast.net> writes:
    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro ><ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for >>incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ...

    Forth, if you want a low-level programming language.

    RPG, and various forms of Cuda, JavaScript, ... where there is
    a compiler that run between carriage return and application
    automagically.

    there used to be interactive
    interpreters for C and Pascal, but I haven't seen one for decades.

    Also for Java. Such things tend to suffer from the fact that the
    programming language has not been designed with a REPL in mind. So
    the REPL designer has to change the programming language, and the
    mainstream users of this programming language then tend to ignore it.

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sat May 2 23:12:58 2026
    From Newsgroup: comp.arch

    On Sat, 2 May 2026 08:51:42 -0000 (UTC), Thomas Koenig wrote:

    George Neuner <gneuner2@comcast.net> schrieb:

    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro
    <ldo@nz.invalid> wrote:

    BASIC offered a wonderful sense of immediacy: type a statement
    without a line number, and it is executed right away. Or put a
    line number on the front, and it gets kept in RAM as part of your
    program. Great for incremental development, and “scratchpad”
    programming.

    There is a modern system that offers this sort of immediacy:
    Jupyter <https://jupyter.org/>.

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ... there used to be interactive
    interpreters for C and Pascal, but I haven't seen one for decades.

    Apologies if I missed your favorite REPL language.

    Julia :-)

    Available for Jupyter, according to <https://github.com/jupyter/jupyter/wiki/Jupyter-kernels>.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.arch on Mon May 4 15:14:07 2026
    From Newsgroup: comp.arch

    On 5/1/2026 4:00 PM, Lawrence D’Oliveiro wrote:
    On Fri, 1 May 2026 15:16:31 -0700, Chris M. Thomasson wrote:

    On 4/24/2026 9:49 PM, Lawrence D’Oliveiro wrote:

    On Fri, 24 Apr 2026 21:35:47 -0700, Chris M. Thomasson wrote:

    Love this one. Build a recursive stack using AppleSoft BASIC:

    I’ve done that in Python, too.

    It was really fun to make in AppleSoft BASIC. I used to code for it
    as a little kid.

    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for incremental development, and “scratchpad” programming.

    Loved BASIC. Made use of PRODOS EXEC command. In fact here is a basic
    program I wrote that makes another one using a LUT for all the trig.
    Pretty fun!

    This should work on an Apple IIe/IIgs ect:

    Here is a more self-contained version of my generator. It asks you how
    many vertices to enter. Builds CTTEST.BAS, then you can just EXEC
    CTTEST.BAS to run it. Here is my code. Just for fun. The generated code
    draws a bunch of polys using the table LT. Btw, can you get it to work
    on your end?

    https://www.facebook.com/share/p/1DSw97BZGV/
    _______________________________
    10 REM CREATE NEW PROGRAM FILE
    11 INPUT "Enter Polygon Points: "; N$
    12 LN = ABS(VAL(N$))
    15 PRINT "Generating " + STR$(LN) + "-Gon CTTEST.BAS..."
    20 D$ = CHR$(4)
    25 PRINT D$; "DELETE CTTEST.BAS"
    22 ONERR GOTO 28
    28 POKE 216,0
    30 PRINT D$; "OPEN CTTEST.BAS"
    40 PRINT D$; "WRITE CTTEST.BAS"
    50 REM HOME
    60 PC = 10
    65 PRINT "NEW"
    70 P0$ = "REM " + CHR$(34) + "ct_spawn_test" + CHR$(34): GOSUB 5000
    80 P0$ = "PRINT " + CHR$(34) + "Chris M. Thomasson Spawn" + CHR$(34):
    GOSUB 5000
    101 P0$ = "LN = " + STR$(LN): GOSUB 5000
    120 AB = ATN(1) * 4
    130 SN = (AB * 2) / LN
    140 DIM LT(LN, 2)
    141 P0$ = "DIM LT(" + STR$(LN) + ", 2)": GOSUB 5000
    150 FOR I = 1 TO LN
    160 A = I * SN
    165 LT(I, 1) = COS(A)
    166 LT(I, 2) = SIN(A)
    171 P0$ = "LT(" + STR$(I) + ", 1) = " + STR$(COS(A)): GOSUB 5000
    181 P0$ = "LT(" + STR$(I) + ", 2) = " + STR$(SIN(A)): GOSUB 5000
    290 NEXT I
    300 X0 = 292/2: X1 = 292/6: Y0 = 192/2: Y1 = 192/4
    301 P0$ = "X0 = " + STR$(X0) + ": X1 = " + STR$(X1): GOSUB 5000
    311 P0$ = "Y0 = " + STR$(Y0) + ": Y1 = " + STR$(Y1): GOSUB 5000
    321 P0$ = "HGR : HCOLOR = 3": GOSUB 5000
    430 P0$ = "DIM C0(5)": GOSUB 5000
    441 P0$ = "FOR I = 1 TO LN": GOSUB 5000
    442 P0$ = "C0(1) = X0 + LT(I,1) * 24: C0(2) = Y0 + LT(I,2) * 24: C0(3) =
    .5 * X1: C0(4) = .5 * Y1 :C0(5) = LN: GOSUB 1000": GOSUB 5000
    443 P0$ = "NEXT I": GOSUB 5000
    470 P0$ = "END": GOSUB 5000
    800 PC = 1000
    810 P0$ = "REM PLOT POLY C0(x, y, rx, ry, n)": GOSUB 5000
    820 P0$ = "HPLOT C0(1) + LT(1, 1) * C0(3), C0(2) + LT(1, 2) * C0(4)":
    GOSUB 5000
    830 P0$ = "FOR I0 = 2 TO C0(5)": GOSUB 5000
    840 P0$ = " HPLOT TO C0(1) + LT(I0, 1) * C0(3), C0(2) + LT(I0, 2) *
    C0(4)": GOSUB 5000
    850 P0$ = "NEXT I0": GOSUB 5000
    860 P0$ = "HPLOT TO C0(1) + LT(1, 1) * C0(3), C0(2) + LT(1, 2) * C0(4)":
    GOSUB 5000
    870 P0$ = "RETURN": GOSUB 5000
    890 GOTO 6000
    5000 REM PUSH LINE
    5010 PRINT STR$(PC) + " " + P0$
    5020 PC = PC + 10
    5030 RETURN
    6000 REM CLOSE FILE
    6005 PRINT "RUN"
    6010 PRINT D$; "CLOSE"
    6020 PRINT "Complete! :^)"
    6030 END
    _______________________________




    There is a modern system that offers this sort of immediacy: Jupyter <https://jupyter.org/>. Only it does it without line numbers, using a notebook paradigm instead, that works across multiple languages. A
    notebook consists of a series of cells, each of which can hold any
    number of lines of program code. Executing a cell doesn’t throw its contents away, so you get both immediate mode and incremental program development in one.

    Never used it at all. Humm...


    Because the default recursion limit wasn’t big enough for my
    (admittedly brute-force) algorithm for resolving the types of the
    long chains of data blocks in a Blender document.

    <https://gitlab.com/ldo/blendhack>

    Perhaps try to make an iterative version? Or is that out of the
    question?

    Do you mean iterating over an explicit stack of objects that describe
    what to do next? That’s what I did.

    I mean trying to turn a recursive algo into a pure iterative algo.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon May 4 23:16:59 2026
    From Newsgroup: comp.arch

    On Mon, 4 May 2026 15:14:07 -0700, Chris M. Thomasson wrote:

    On 5/1/2026 4:00 PM, Lawrence D’Oliveiro wrote:

    Do you mean iterating over an explicit stack of objects that
    describe what to do next? That’s what I did.

    I mean trying to turn a recursive algo into a pure iterative algo.

    You mean, like sorting all the blocks into some order such that the
    type of each is determined before that decision becomes important to determining the type of a later block?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From BGB@cr88192@gmail.com to comp.arch on Mon May 4 23:15:08 2026
    From Newsgroup: comp.arch

    On 5/1/2026 11:46 PM, George Neuner wrote:
    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro <ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for
    incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ... there used to be interactive interpreters for C and Pascal, but I haven't seen one for decades.

    Apologies if I missed your favorite REPL language.


    There is a practical difference though between these and an old-school
    BASIC:
    These languages allow you to evaluate expressions one line at a time,
    and sometimes define small functions in a purely volatile manner, but
    not so much to edit the programs in this form.

    The old school BASICs typically functioned more as a combination of line editor and interpreter.


    Granted, one other option could be to combine one of the other languages
    with a line-editor with an interface along the lines of 'ed' or 'edlin'.

    Maybe make it a little more helpful, say, "help" or similar lists
    commands, vs, say (notation added for clarity):
    $ help
    > ?
    $ quit
    > ?
    ...

    Could maybe be a hybrid interface, say:
    $ 1 first line
    $ 2 second line
    $ 3 third line
    $ 1l
    // ... lists lines starting at 1 ...
    > 1 first line
    > 2 second line
    > 3 third line
    $ 2l10
    // ... lists 10 lines starting at line 2
    > 2 second line
    > 3 third line
    $ 2i line 1.5
    // inserts a line between 1 and 2, moving else everything down
    //'2i' by itself merely inserting a blank line.
    $ 1l
    // ... lists all lines starting at 1 ...
    > 1 first line
    > 2 line 1.5
    > 3 second line
    > 4 third line
    2d
    //deletes "line 1.5" and moves following lines up.
    $ r
    //runs current script
    $ 3r/third/final
    //replace 'third' with 'final'
    Then, say:
    w <name> //save a file
    o <name> //load a file
    w //save current file to last-loaded name
    r <expr> //evaluate an expression

    Then, say, maybe gives more descriptive error messages, say:
    ? syntax error
    ...


    Such an interface could support multiple styles of language.

    Also reasonably flexible across UI designs and input methodologies (text console, chat-box, ...), and doesn't require the relative UI weight of a
    full text editor.



    Jupyter <https://jupyter.org/>.

    Has issues mixing code written in different languages, and many of the available language kernels are incomplete and/or outdated.

    [Still, it is a good effort that just needs more work.]

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Tue May 5 05:36:56 2026
    From Newsgroup: comp.arch

    On Mon, 4 May 2026 23:15:08 -0500, BGB wrote:

    There is a practical difference though between these and an
    old-school BASIC:
    These languages allow you to evaluate expressions one line at a
    time, and sometimes define small functions in a purely volatile
    manner, but not so much to edit the programs in this form.

    The old school BASICs typically functioned more as a combination of
    line editor and interpreter.

    It was either/or: either you enter a line without a line number, it
    gets immediately executed and thrown away, or you enter it with a line
    number, and it gets held as part of your in-memory program.

    Jupyter lets you have it both ways: a cell can contain any number of
    lines of code. You execute a cell by pressing shift-enter within it.
    The output is displayed immediately below that cell. The cell contains
    remain unchanged, and will be saved with the notebook. Any changes to
    in-memory program state (variables, open files etc) remain in effect
    as long as the language kernel is still running, and can be accessed
    by subsequent execution of that cell or any other cell in the
    notebook.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From George Neuner@gneuner2@comcast.net to comp.arch on Tue May 5 11:38:10 2026
    From Newsgroup: comp.arch

    On Mon, 4 May 2026 23:15:08 -0500, BGB <cr88192@gmail.com> wrote:

    On 5/1/2026 11:46 PM, George Neuner wrote:
    On Fri, 1 May 2026 23:00:44 -0000 (UTC), Lawrence D´Oliveiro
    <ldo@nz.invalid> wrote:


    BASIC offered a wonderful sense of immediacy: type a statement without
    a line number, and it is executed right away. Or put a line number on
    the front, and it gets kept in RAM as part of your program. Great for
    incremental development, and “scratchpad” programming.

    There is a modern system that offers this sort of immediacy: ...

    Any language whose implementation includes a REPL.

    Lisp, Scheme, Racket, Python, and Lua immediately come to mind.
    Probably others I don't know about ... there used to be interactive
    interpreters for C and Pascal, but I haven't seen one for decades.

    Apologies if I missed your favorite REPL language.


    There is a practical difference though between these and an old-school >BASIC:
    These languages allow you to evaluate expressions one line at a time,
    and sometimes define small functions in a purely volatile manner, but
    not so much to edit the programs in this form.

    The old school BASICs typically functioned more as a combination of line >editor and interpreter.

    Remember that Lisp began as an image based language where functions
    and data defined in the REPL were immediately linked and available to
    the program. You saved the "image"[*] of the program for reloading
    and execution.

    The REPL itself could save an transcript which programmers reviewed
    and edited offline to preserve source that was composed interactively.

    [*] the program "image" essentially was a memory dump, but with
    useless objects removed by GC before being saved.



    Modern Common Lisps and many Schemes now mainly are file based [files
    defining packages, modules, etc.] like with C. However some still
    permit saving / loading program images [though now it's more of a
    serialization than a memory dump].

    Many implementations JIT compile and hot link input from their REPL
    and many still permit editing the program directly. And, of course,
    they always have had the option to [sandbox] "eval" program input as
    code and optionally link it into the running program.

    Racket [which is based on Scheme, but not Scheme per se] allows
    running programs to load / unload whole code modules. This is separate
    from its support of DLLs. It also can create serializable functions
    [though they must be defined as serializable] that can be transmitted
    to and executed by other Racket programs [assuming the othe programs
    know what to do with them]. It's a kind of enhanced "eval" mechanism
    that goes beyond what is standard in Scheme.

    In Common Lisp, exception handlers have the option to drop the
    programmer into a REPL to inspect code and data, change data values,
    and even replace or write new code directly into the *running*
    program.



    Also recall that Lisp predated Dartmouth BASIC by several years, and
    Dartmouth itself was file based: it did not save program images, but
    rather it demand compiled from source before running the program.

    There is no proof of course, but I suspect that the small system
    interpretive BASICs that followed may have been influenced by
    knowledge of Lisp's token based compilation and image saving
    abilities. MMV.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stefan Monnier@monnier@iro.umontreal.ca to comp.arch on Tue May 5 15:56:13 2026
    From Newsgroup: comp.arch

    The old school BASICs typically functioned more as a combination of line editor and interpreter.

    Indeed, but there aren't many people around who still prefer line
    editors over "visual editors", so I wouldn't take this as
    a desirable feature compared to things like Jupyter or `codeboot.org`.


    === Stefan
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From John Levine@johnl@taugh.com to comp.arch on Wed May 6 17:09:10 2026
    From Newsgroup: comp.arch

    According to Stefan Monnier <monnier@iro.umontreal.ca>:
    The old school BASICs typically functioned more as a combination of line
    editor and interpreter.

    Indeed, but there aren't many people around who still prefer line
    editors over "visual editors", so I wouldn't take this as
    a desirable feature compared to things like Jupyter or `codeboot.org`.

    They were half-hearted copies of the Dartmouth DTSS system where BASIC
    was invented. On DTSS, the line editor was part of the terminal
    monitor, so any line you typed that started with a digit was just
    buffered up. When you typed something else like RUN, it sorted the
    lines into order and started a copy of the BASIC compiler which
    generated machine code and ran it. It did this extremely quickly. DTSS
    ran on a GE 635, which was about the same size as the original PDP-10,
    with a very slow front end terminal processor. While you could run a
    dozen users on a -10, I can say from having tried it that DTSS ran 100
    with snappy responses.

    Real BASIC was always a compiled languages. The interpreted versions
    were at most second-best.
    --
    Regards,
    John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
    Please consider the environment before reading this e-mail. https://jl.ly
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Andy Valencia@vandys@vsta.org to comp.arch on Wed May 6 14:19:21 2026
    From Newsgroup: comp.arch

    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    The old school BASICs typically functioned more as a combination of line editor and interpreter.
    Indeed, but there aren't many people around who still prefer line
    editors over "visual editors", so I wouldn't take this as
    a desirable feature compared to things like Jupyter or `codeboot.org`.

    I freely admit that I haven't taught children programming in quite
    a long time. That said, BASIC with line numbers and GOTO seems like
    the environment with the smallest initial cognitive load. It lets the
    student focus on the absolutely non-intuitive semantic of:

    30 x=x+1

    while leaving a host of modern amenities (initially, they
    are just attractive nuisances) off in the wings.

    It's an environment they'll of course leave behind. But there's a
    reason to start here, along the lines of why one learns to fly
    in a Cessna 152, not a Boeing 737.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html
    No AI was used in the composition of this message
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Wed May 6 21:33:53 2026
    From Newsgroup: comp.arch

    On Wed, 06 May 2026 14:19:21 -0700, Andy Valencia wrote:

    I freely admit that I haven't taught children programming in quite a
    long time. That said, BASIC with line numbers and GOTO seems like
    the environment with the smallest initial cognitive load.

    Python was specifically designed, at least to start with, to be
    approachable for beginners, while using more modern capabilities than
    were available back in BASIC days.

    Even back in BASIC days, there were other languages better suited for
    teaching purposes, particularly for children: LOGO being the main one
    that comes to mind.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.arch on Wed May 6 21:43:25 2026
    From Newsgroup: comp.arch

    On 5/6/2026 2:33 PM, Lawrence D’Oliveiro wrote:
    On Wed, 06 May 2026 14:19:21 -0700, Andy Valencia wrote:

    I freely admit that I haven't taught children programming in quite a
    long time. That said, BASIC with line numbers and GOTO seems like
    the environment with the smallest initial cognitive load.

    Python was specifically designed, at least to start with, to be
    approachable for beginners, while using more modern capabilities than
    were available back in BASIC days.

    Even back in BASIC days, there were other languages better suited for teaching purposes, particularly for children: LOGO being the main one
    that comes to mind.

    PILOT was a fun one.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.arch on Thu May 7 13:59:18 2026
    From Newsgroup: comp.arch

    "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
    On 5/6/2026 2:33 PM, Lawrence D’Oliveiro wrote:
    On Wed, 06 May 2026 14:19:21 -0700, Andy Valencia wrote:

    I freely admit that I haven't taught children programming in quite a
    long time. That said, BASIC with line numbers and GOTO seems like
    the environment with the smallest initial cognitive load.

    Python was specifically designed, at least to start with, to be
    approachable for beginners, while using more modern capabilities than
    were available back in BASIC days.

    Even back in BASIC days, there were other languages better suited for
    teaching purposes, particularly for children: LOGO being the main one
    that comes to mind.

    PILOT was a fun one.

    TUTOR was a 1960's language, albeit more designed for creating lessons
    than as a tool to learn programming. DEC's version was DAL (Digital
    Authoring Language).

    https://en.wikipedia.org/wiki/TUTOR

    There were some very fine graphics games (DnD, Empire) written in TUTOR.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Fri May 8 00:09:42 2026
    From Newsgroup: comp.arch

    On Wed, 6 May 2026 21:43:25 -0700, Chris M. Thomasson wrote:

    On 5/6/2026 2:33 PM, Lawrence D’Oliveiro wrote:

    Even back in BASIC days, there were other languages better suited
    for teaching purposes, particularly for children: LOGO being the
    main one that comes to mind.

    PILOT was a fun one.

    Never encountered that. According to Da Wiki <https://en.wikipedia.org/wiki/PILOT>, seems it was designed for
    authoring courseware, not for experimentation by the kids themselves.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to comp.arch on Fri May 8 13:38:41 2026
    From Newsgroup: comp.arch

    On 5/7/2026 5:09 PM, Lawrence D’Oliveiro wrote:
    On Wed, 6 May 2026 21:43:25 -0700, Chris M. Thomasson wrote:

    On 5/6/2026 2:33 PM, Lawrence D’Oliveiro wrote:

    Even back in BASIC days, there were other languages better suited
    for teaching purposes, particularly for children: LOGO being the
    main one that comes to mind.

    PILOT was a fun one.

    Never encountered that. According to Da Wiki <https://en.wikipedia.org/wiki/PILOT>, seems it was designed for
    authoring courseware, not for experimentation by the kids themselves.

    Fwiw, I had my trusty PILOT cartridge for my Atari, and was using it as
    a kiddo.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sat May 9 17:31:08 2026
    From Newsgroup: comp.arch

    John Levine <johnl@taugh.com> writes:
    [someone:]
    The old school BASICs typically functioned more as a combination of line >>> editor and interpreter.

    On DTSS, the line editor was part of the terminal
    monitor, so any line you typed that started with a digit was just
    buffered up. When you typed something else like RUN, it sorted the
    lines into order and started a copy of the BASIC compiler which
    generated machine code and ran it. It did this extremely quickly. DTSS
    ran on a GE 635, which was about the same size as the original PDP-10,
    with a very slow front end terminal processor. While you could run a
    dozen users on a -10, I can say from having tried it that DTSS ran 100
    with snappy responses.

    Real BASIC was always a compiled languages. The interpreted versions
    were at most second-best.

    Microsoft BASIC is a pretty good piece of engineering, given that it
    targeted 8-bit machines with a few KB of RAM (4KB on a PET 2001-4)
    and ROM (BASIC took about 9KB of ROM on the C64).

    The use of line numbers for both editing and control flow is clever,
    and, at least on the C64 (and probably other Commodore machines), the
    OS allowed moving the cursor up to a line output with LIST (only
    within the screen, no scrollback), editing that line, and then
    pressing Enter, which overwrote the old line with that line number.
    So there was no need to retype the whole line.

    The program is stored as a linked list of lines (IIRC in line number
    order, but I may be wrong), with the line numbers encoded as binary
    number in 2 bytes, two link bytes, and IIRC a line length byte, and
    then the contents of the line, with the commands replaced by
    single-byte tokens (faster interpretation and less memory usage).

    The line interpreter encodes the program code in this way, the BASIC interpreter interprets it, SAVE stores programs in this form to tape
    or disk, and LIST decodes it to plain text.

    The organization of the lines as linked list means that a GOTO to a
    line late in the code is slow.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sat May 9 23:25:33 2026
    From Newsgroup: comp.arch

    On Sat, 09 May 2026 17:31:08 GMT, Anton Ertl wrote:

    The use of line numbers for both editing and control flow is clever,
    and, at least on the C64 (and probably other Commodore machines),
    the OS allowed moving the cursor up to a line output with LIST (only
    within the screen, no scrollback), editing that line, and then
    pressing Enter, which overwrote the old line with that line number.
    So there was no need to retype the whole line.

    Did that work for scrollback?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From MitchAlsup@user5857@newsgrouper.org.invalid to comp.arch on Sun May 10 00:53:28 2026
    From Newsgroup: comp.arch


    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    John Levine <johnl@taugh.com> writes:
    [someone:]
    --------------------------
    The use of line numbers for both editing and control flow is clever,

    APL used floating point line numbers, allowing the insertion of
    a line between any two other lines. {10.5, ...}
    ---------------
    The program is stored as a linked list of lines (IIRC in line number
    order, but I may be wrong), with the line numbers encoded as binary
    number in 2 bytes, two link bytes, and IIRC a line length byte, and
    then the contents of the line, with the commands replaced by
    single-byte tokens (faster interpretation and less memory usage).

    My basic interpreter (NCR 1982-3) had a renumber command that would
    take the current 'order' and replace the line numbers as a stride
    based series including the gotos and call-subs {and shortening the
    bytes in the line when possible}.

    The line interpreter encodes the program code in this way, the BASIC interpreter interprets it, SAVE stores programs in this form to tape
    or disk, and LIST decodes it to plain text.

    The organization of the lines as linked list means that a GOTO to a
    line late in the code is slow.

    A quick check on the line number you are currently 'on' gets rid of
    ½ the delay.

    - anton
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Robert Finch@robfi680@gmail.com to comp.arch on Sun May 10 02:08:52 2026
    From Newsgroup: comp.arch

    On 2026-05-09 7:25 p.m., Lawrence D’Oliveiro wrote:
    On Sat, 09 May 2026 17:31:08 GMT, Anton Ertl wrote:

    The use of line numbers for both editing and control flow is clever,
    and, at least on the C64 (and probably other Commodore machines),
    the OS allowed moving the cursor up to a line output with LIST (only
    within the screen, no scrollback), editing that line, and then
    pressing Enter, which overwrote the old line with that line number.
    So there was no need to retype the whole line.

    Did that work for scrollback?

    I liked the full screen edit on the Commodore machines so much that I
    use it for my machines. There is not as much need for scrollback. One
    can just cursor to a line containing a command and hit enter.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sun May 10 08:45:21 2026
    From Newsgroup: comp.arch

    On Sun, 10 May 2026 02:08:52 -0400, Robert Finch wrote:

    On 2026-05-09 7:25 p.m., Lawrence D’Oliveiro wrote:

    On Sat, 09 May 2026 17:31:08 GMT, Anton Ertl wrote:

    The use of line numbers for both editing and control flow is
    clever, and, at least on the C64 (and probably other Commodore
    machines), the OS allowed moving the cursor up to a line output
    with LIST (only within the screen, no scrollback), editing that
    line, and then pressing Enter, which overwrote the old line with
    that line number. So there was no need to retype the whole line.

    Did that work for scrollback?

    I liked the full screen edit on the Commodore machines so much that
    I use it for my machines. There is not as much need for scrollback.
    One can just cursor to a line containing a command and hit enter.

    What if the line was off the screen?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sun May 10 08:52:57 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    What if the line was off the screen?

    You could use LIST to show it again.

    For an interactive command (no line number) that has scrolled off the
    screen, you have to retype it. But Microsoft BASIC is not a language
    for long interactive commands anyway.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.arch on Sun May 10 08:56:23 2026
    From Newsgroup: comp.arch

    MitchAlsup <user5857@newsgrouper.org.invalid> writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
    [...]
    My basic interpreter (NCR 1982-3) had a renumber command that would
    take the current 'order' and replace the line numbers as a stride
    based series including the gotos and call-subs {and shortening the
    bytes in the line when possible}.

    Yes, some more advanced BASICs have that, but the version on the C64
    is not that advanced. The usual approach is to use stride 10 between
    line numbers when you start, and then you have 9 additional numbers
    for inserting lines. If I expected to insert many lines, I left a
    larger gap between the line numbers (e.g., a gap of 1000).

    Occasionally (but very rarely) I had to renumber some lines because I
    wanted to insert a line between two lines with adjacent line numbers.
    In that case I also had to change all the gotos to the renumbered
    lines.

    Given the complexity of the RENUMBER command, it seems to me that (at
    least in a clean-slate design), instead of building a Microsoft BASIC
    with RENUMBER, a different approach for dealing with control flow and
    editing would be called for. E.g., use (maybe named) labels
    independent of line numbers, and use line numbers only for editing.
    You then probably want to save memory by not storing line numbers, so
    line numbers might be something ephemeral from this particular list
    command. Or maybe editing would work mostly without line numbers, but
    with a cursor, insert, delete, and replace commands.

    The organization of the lines as linked list means that a GOTO to a
    line late in the code is slow.

    A quick check on the line number you are currently 'on' gets rid of
    ½ the delay.

    <https://www.c64-wiki.com/wiki/GOTO> says:
    |In Commodore BASIC versions after the first model PETs, a small
    |enhancement was added to search forward from the current line if the
    |target line number was higher. Initially, this included a bug that
    |would cause the search for the target line to start from the beginning
    |of the program even if the target line number was higher than the
    |current one but shared the same high byte in hexadecimal
    |representation (see line-lookup). This bug was fixed in BASIC 3.0 as
    |well as BASIC V2.

    At the time I thought of several small improvements that would have
    improved the performance of BASIC without too high costs, but
    Microsoft BASIC was highly successful even without these improvements.

    - anton
    --
    'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
    Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.arch on Sun May 10 14:22:05 2026
    From Newsgroup: comp.arch

    MitchAlsup <user5857@newsgrouper.org.invalid> writes:

    anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:

    John Levine <johnl@taugh.com> writes:
    [someone:]
    --------------------------
    The use of line numbers for both editing and control flow is clever,

    APL used floating point line numbers, allowing the insertion of
    a line between any two other lines. {10.5, ...}
    ---------------
    The program is stored as a linked list of lines (IIRC in line number
    order, but I may be wrong), with the line numbers encoded as binary
    number in 2 bytes, two link bytes, and IIRC a line length byte, and
    then the contents of the line, with the commands replaced by
    single-byte tokens (faster interpretation and less memory usage).

    My basic interpreter (NCR 1982-3) had a renumber command that would
    take the current 'order' and replace the line numbers as a stride
    based series including the gotos and call-subs {and shortening the
    bytes in the line when possible}.

    That was pretty standard in basic. PDP-8 Basic supported the
    RESEQ command, HP-3000 basic supported the RENUM command.

    e.g. RENUM [new], [old], [inc]

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.arch on Sun May 10 14:27:26 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    On Sun, 10 May 2026 02:08:52 -0400, Robert Finch wrote:

    On 2026-05-09 7:25 p.m., Lawrence D’Oliveiro wrote:

    On Sat, 09 May 2026 17:31:08 GMT, Anton Ertl wrote:

    The use of line numbers for both editing and control flow is
    clever, and, at least on the C64 (and probably other Commodore
    machines), the OS allowed moving the cursor up to a line output
    with LIST (only within the screen, no scrollback), editing that
    line, and then pressing Enter, which overwrote the old line with
    that line number. So there was no need to retype the whole line.

    Did that work for scrollback?

    I liked the full screen edit on the Commodore machines so much that
    I use it for my machines. There is not as much need for scrollback.
    One can just cursor to a line containing a command and hit enter.

    What if the line was off the screen?

    As with any block-mode terminal, you'd refresh the screen
    starting at a point where the desired line is on the screen.

    For Burroughs CANDE, one scrolled (page-by-page) by
    transmitting a single blank character (position cursor
    to top of screen, hit space followed by the transmit key;
    or positioned at a specific line with the LIST command.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Fuld@sfuld@alumni.cmu.edu.invalid to comp.arch on Sun May 10 08:53:20 2026
    From Newsgroup: comp.arch

    On 5/6/2026 2:19 PM, Andy Valencia wrote:
    Stefan Monnier <monnier@iro.umontreal.ca> writes:
    The old school BASICs typically functioned more as a combination of line >>> editor and interpreter.
    Indeed, but there aren't many people around who still prefer line
    editors over "visual editors", so I wouldn't take this as
    a desirable feature compared to things like Jupyter or `codeboot.org`.

    I freely admit that I haven't taught children programming in quite
    a long time. That said, BASIC with line numbers and GOTO seems like
    the environment with the smallest initial cognitive load. It lets the student focus on the absolutely non-intuitive semantic of:

    30 x=x+1

    while leaving a host of modern amenities (initially, they
    are just attractive nuisances) off in the wings.

    It's an environment they'll of course leave behind. But there's a
    reason to start here, along the lines of why one learns to fly
    in a Cessna 152, not a Boeing 737.

    Yes. But you need to take some care when you want students to move away
    from BASIC, that you motivate the change properly to minimize resistance.

    Regarding teaching, in 1972 I was student teaching high school students.
    The school had a grant from NSF to teach students to use computers.
    We had time on a time shared Xerox Sigma 7, communicating with teletypes
    (yes, real KSR and ASR 33s!).

    There was a class in "computer science" that primarily taught
    programming, and sections of math and science classes for the students
    who had the computer science class. The advantage of these sections is
    that we could expect the students to use the computer to solve homework problems.

    We also developed CAI (computer aided instruction) programs that asked
    the students to solve various problems in the math and science classes.
    The advantage of this versus "printed" homework problems is that, by
    using the built in random number generator, we could have the program
    vary the details of the problem each time the program was run,
    effectively giving each student a different problem to solve.

    We also took advantage of a feature of the basic on the Sigma 7, called "Newbasic" that I haven't seen anywhere else (though I haven't really searched). When running a program, a user could type "newbasic" and get
    a fresh basic environment where they could write and run their own
    programs. The unique feature was that when they exited, it took them
    back to where they were in the original program. Thus, the CAI program
    would pose some problem e.g. something in algebra or elementary
    Newtonian mechanics, and the students would then enter the "sub"
    environment to write their own basic program to solve the problem, then
    exit that environment and provide the answer to the problem. Thus we
    could pose more complex problems and the students learned to use the
    computer as a problem solving tool. It was great fun!
    --
    - Stephen Fuld
    (e-mail address disguised to prevent spam)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Sun May 10 19:49:59 2026
    From Newsgroup: comp.arch

    On Sun, 10 May 2026 08:53:20 -0700, Stephen Fuld wrote:

    We also took advantage of a feature of the basic on the Sigma 7,
    called "Newbasic" that I haven't seen anywhere else (though I
    haven't really searched). When running a program, a user could type "newbasic" and get a fresh basic environment where they could write
    and run their own programs. The unique feature was that when they
    exited, it took them back to where they were in the original
    program.

    Spawning a subprocess?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From David Schultz@david.schultz@earthlink.net to comp.arch on Sun May 10 18:26:21 2026
    From Newsgroup: comp.arch

    On 5/10/26 10:53 AM, Stephen Fuld wrote:
    Regarding teaching, in 1972 I was student teaching high school students.
     The school had a grant from NSF to teach students to use computers. We had time on a time shared Xerox Sigma 7, communicating with teletypes
    (yes, real KSR and ASR 33s!).

    Could be worse. My high school, ca. 1977, had a computer programming
    class. The equipment available was a Decwriter II, one keypunch machine,
    a card reader, and a 300bps modem to talk to the school systems
    Decsystem 10.

    Students didn't get to use the keypunch machine. Instead they had to
    hand mark 40 column cards. Ugh. Glad I never did that.
    --
    http://davesrocketworks.com
    David Schultz
    "It's just this little chromium switch here..."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon May 11 00:32:52 2026
    From Newsgroup: comp.arch

    On Sun, 10 May 2026 18:26:21 -0500, David Schultz wrote:

    My high school, ca. 1977, had a computer programming class. The
    equipment available was a Decwriter II, one keypunch machine, a card
    reader, and a 300bps modem to talk to the school systems Decsystem
    10.

    Students didn't get to use the keypunch machine. Instead they had to
    hand mark 40 column cards. Ugh. Glad I never did that.

    I did hand-marking of 40-column cards in my first year at Uni. They
    called it the “cafeteria system”. They were programs for the Waterloo Fortran compiler running on a little PDP-11/34 in the same room
    (better than over a modem, I guess). And your output came out on an
    LA180 printer (I think those were called “DECprinter”, not “DECwriter”). This looked similar to an LA36 DECwriter, but it had no keyboard and printing was, of course, somewhat faster.

    The largest program I did on that was close to 100 cards -- it would
    print out a calendar for any given year. Not for an assignment, but
    for fun.

    Decades later, as an exercise in rewriting it for Fortran 90, I found
    a bug in it I hadn’t noticed before.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Andy Valencia@vandys@vsta.org to comp.arch on Mon May 11 11:06:39 2026
    From Newsgroup: comp.arch

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:
    On Sun, 10 May 2026 02:08:52 -0400, Robert Finch wrote:
    I liked the full screen edit on the Commodore machines so much that
    I use it for my machines. There is not as much need for scrollback.
    One can just cursor to a line containing a command and hit enter.
    What if the line was off the screen?

    You could list ranges, so you'd list an earlier chunk of
    lines to get it on-screen.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html
    No AI was used in the composition of this message
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.arch on Mon May 11 22:31:34 2026
    From Newsgroup: comp.arch

    On Mon, 11 May 2026 11:06:39 -0700, Andy Valencia wrote:

    On Sun, 10 May 2026 08:45:21 -0000 (UTC), Lawrence D’Oliveiro wrote:

    On Sun, 10 May 2026 02:08:52 -0400, Robert Finch wrote:

    I liked the full screen edit on the Commodore machines so much
    that I use it for my machines. There is not as much need for
    scrollback. One can just cursor to a line containing a command and
    hit enter.

    What if the line was off the screen?

    You could list ranges, so you'd list an earlier chunk of lines to
    get it on-screen.

    This is why scrollback makes things easier.
    --- Synchronet 3.22a-Linux NewsLink 1.2