4 ms·
One of the unexpected things is Dartmouth BASIC from 1964 had matrix primitives, despite being an otherwise primitive language. MS never took up the feature, bu
by tasty_freeze 6y ago
One of the unexpected things is Dartmouth BASIC from 1964 had matrix primitives, despite being an otherwise primitive language. MS never took up the feature, but I know Wang BASIC did on their 2200 family of machines.
For example:
10 DIM A(3,3),B(3,3),C(3,3)
20 MAT READ A
30 DATA 1,-5,7, .45,23,9, -5,-1,0
40 MAT B=A:REM assignment
50 MAT B=ZER:REM zero array
60 MAT B=CON:REM all 1s
70 MAT B=IDN:REM identity
80 MAT B=TRN(A):REM transpose
90 MAT B=(2)*A:REM scale
100 MAT B=INV(A),D:REM invert array, determinant in scalar D
110 MAT C=A*B:REM matrix multiplication
120 MAT PRINT C:REM prints something close to an IDN array
- coliveira 6y agoBelieve it or not, engineers were heavy users of BASIC in the first few years. And FORTRAN was created with the notion of matrix multiplication, so it was just natural that BASIC implementations supported matrix multiplication.
- pavlov 6y agoMy grandfather was a construction engineer. I remember visiting his office around 1990 just before he retired. His only computer was a Commodore 64 and he had written all the software himself in BASIC over the years, just translating a lifetime of professional experience into these little interactive programs on floppies. Maybe the modern equivalent would be to use Excel.
- Someone 6y agoThe first version of Dartmouth basic ran on a system with a whopping 20kB of memory (8k words at 20 bits each. See https://en.)wikipedia.org/wiki/GE-200_series https://en.)wikipedia.org/wiki/GE-200_series) The GE-635 (https://en.wikipedia.org/wiki/GE-600_series https://en.wikipedia.org/wiki/GE-600_series) that it ran on most of its life could have 4 CPUs, had protected memory and floating point hardware, and supported at least 200 kilowords of memory (http://www.bitsavers.org/pdf/ge/GE-6xx/CPB-371A_GE-635_System_Man_Jul64.pdf http://www.bitsavers.org/pdf/ge/GE-6xx/CPB-371A_GE-635_Syste...) At 36 bits/word, that’s 900 kilobytes. The first version of Microsoft basic (https://en.wikipedia.org/wiki/Altair_BASIC https://en.wikipedia.org/wiki/Altair_BASIC) ran in 4 kilobytes (leaving about ¾ kilobytes for programs and data), so it’s understandable that it lacked some features (it didn’t even have else clauses in if statements, had SIN, but not COS or TAN, didn’t support integer or string variables, etc))
- tasty_freeze 6y agoNo question it would not make sense in that original 4K or even 8K BASIC, but MS produced BASICs with much larger memory budget and the matrix ops never appeared (as far as I know).
- Someone 6y agoThey added tons of stuff that made business sense to them. Apparently, matrices as built-in types didn’t. Nowadays, the language is powerful enough to implement them as a library (e.g. https://www.freevbcode.com/ShowCode.asp?ID=3682 https://www.freevbcode.com/ShowCode.asp?ID=3682. Operator overloading became possible at some time, too. https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/how-to-define-an-operator https://docs.microsoft.com/en-us/dotnet/visual-basic/program...) It’s not as if they don’t know matrices exist. Excel has matrix operations (https://support.microsoft.com/en-us/office/mmult-function-40593ed7-a3cd-4b6b-b9a3-e4ad3c7245eb https://support.microsoft.com/en-us/office/mmult-function-40...)
- mamcx 6y agoYeah, this is something pretty useful. I also add to even go beyond and go full relational, that is what I'm trying with https://tablam.org https://tablam.org