4 ms·
Ask HN: Meaning of C/H/R in function chr$()
70's/80's lot of text was computed placement on a CRT[1][0].
Is the 70's/80's BASIC/pascal language function chr$() short for Complex Hamiltonian Real?
-------------------------------------------------
[0] : https://en.wikipedia.org/wiki/Versor
[1] : https://en.wikipedia.org/wiki/Quaternion
- pvg 2y agoIt's 'character', like 'ASCII character'.
- sargstuff 2y agoso, only escape sequences are in line to make the character more colorful. :(
- pvg 2y agoYour typical BASIC-running machine didn't use escape sequences and there were often ways to jazz up characters built directly into the language, e.g. https://www.calormen.com/jsbasic/reference.html#:~:text=black%2Don%2Dwhite-,FLASH,-Set%20output%20mode https://www.calormen.com/jsbasic/reference.html#:~:text=blac...
- pwg 2y agoNo, chr$() was intended for use to create strings containing characters that could not be typed on the keyboard.
- pvg 2y agoIt converted a numeric value into a string. Typing on the keyboard didn't have all that much to do with it and many BASIC REPL's supported shoving control chars into string literals via a variety of additional shenanigans.
- sargstuff 2y agoPrimative form of static type casting in pascal[0]. (vs. dynamic pascal pointers)[0] aka ascii pictures [6]. Guess closest thing to dot matrix[1a,1968 - 1b] / lasers & fiber optics[1970's 2] in 60's would be offset lithography printing. aka block type resolution vs. multi-point matrix. led's weren't even a thing in 60's [3][4](flexled [4])] mechanical tv's were a block device[5] Colleague noted, both Hamilton / vector approaches invloved lot computation/$$$ vs. mathematical normal to plane x-ray (crt, opto-electrical fax machine[7]) -- [2] vs. [4]. But, OS reference number to TPU device to handle 'text processing' might be the modern rendition of a godel number. ----- [0] : https://www.freepascal.org/docs-html/rtl/system/chr.html https://www.freepascal.org/docs-html/rtl/system/chr.html [1] : a) https://en.wikipedia.org/wiki/Dot_matrix https://en.wikipedia.org/wiki/Dot_matrix b) https://www.drupa.com/en/Media_News/drupa_blog/Print_Technologies/Pioneers_of_Printing_Fritz_Karl_Preikschat,_Inventor_of_the_Dot_Matrix_Teletypewriter https://www.drupa.com/en/Media_News/drupa_blog/Print_Technol... [2] : https://www.instructables.com/Fiber-Optic-Display/ https://www.instructables.com/Fiber-Optic-Display/ [3] : https://www.stouchlighting.com/blog/history_of_light_emitting_diode_led-lighting https://www.stouchlighting.com/blog/history_of_light_emittin... [4] : https://hackaday.com/2019/07/09/flexled-is-a-unique-take-on-persistence-of-vision/ https://hackaday.com/2019/07/09/flexled-is-a-unique-take-on-... [5] : https://en.wikipedia.org/wiki/Mechanical_television https://en.wikipedia.org/wiki/Mechanical_television [6] : https://www.asciiart.eu/ https://www.asciiart.eu/ [7] : https://www.metrofax.com/blog/history-of-fax-machines https://www.metrofax.com/blog/history-of-fax-machines
- deleted 2y ago[deleted]
- pwg 2y ago"CHR" is an abbreviation for "character". Its purpose was to convert ASCII code point values (integers) into the character that the code point value represented. The primary use was for creating characters that you could not otherwise type via. the keyboard, although it was usable even for type-able characters (i.e., chr$(65) would output upper case letter 'A').
- sargstuff 2y agoso, for 70/80's (pre alto / mac / xwindows); vector/pixel font map were designed by hand (vs. postscript, etc). inaccurate, but more apt to behind the scene process, chr$: configured/computed hamiltonian reference string. aka typed godel number.
- pwg 2y agoNothing at all to do with string theory (Hamiltonian reference string). One /could/ potentially consider ASCII code points (https://en.wikipedia.org/wiki/Ascii https://en.wikipedia.org/wiki/Ascii) as a form of typed godel numbers, but it is very doubtful anyone on the committe in the 60's when ASCII was developed was thinking of "typed godel numbers". As far as early languages that had a "CHR" function "CHR" was simply an abbreviation for "character", because the function returned the "character" (as a string type) that was represented by the integer argument: https://qbasic.com/documentation/CHR$.html https://qbasic.com/documentation/CHR$.html
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]