3 ms·
You define words which are like functions which you could use to operate on multibyte data. Most forth code uses large dictionaries of words. So it will look l
by g82918 7y ago
You define words which are like functions which you could use to operate on multibyte data. Most forth code uses large dictionaries of words. So it will look like 'dosomething decode bytes' where bytes is your utf8 and decode is some utf8 decoder and so on.
edit: see https://rosettacode.org/wiki/UTF-8_encode_and_decode#Forth https://rosettacode.org/wiki/UTF-8_encode_and_decode#Forth for a forth word for decoding utf-8
- majewsky 7y agoLooking at this Forth code as a programmer who has never written any Forth code, I can understand how "ordinary" code looks to non-programmers. That whole RPN business means I cannot even figure out where to start reading.
- coldtea 7y agoWell, being confused by RPN is a pretty low bar. Kids used to use it in their math class, on scientific calculators...
- NonEUCitizen 7y agoTake a look at the book Starting Forth: https://www.forth.com/starting-forth/ https://www.forth.com/starting-forth/