5 ms·
> maybe even playing with colors to indicate if verbs form a train or other composition. I understand that is a quite different problem from just substituting @
by stepvhen 7y ago
> maybe even playing with colors to indicate if verbs form a train or other composition. I understand that is a quite different problem from just substituting @: with o̲.
With regards to how different of a problem that would be, J's syntax is context-sensitive. If you were to accurately identify trains and forks, you could not use regex, and would probably end up implementing a subset of the J parser.
- 6thaccount2 7y agoCharles Moore did that with Color Forth and even though only he was using it, I remember several comments on how that is unfair to the color blind or visually impaired which is an interesting point.
- yiyus 7y agoColorForth has a color-blind mode, but I do not remember the details. The main idea is to change visual representation instead of using delimiters. Different fonts or text sizes sizes or cursive/inverse/underline are also valid ways of displaying different "colors".
- 6thaccount2 7y agoYes I remember that reply which came from him, but forgot to mention. It is an interesting idea.
- rscho 7y agoJ has a first-class citizen self tokenizer in the standard lib as a dedicated state machine ( ;: ) https://www.jsoftware.com/help/dictionary/d332.htm https://www.jsoftware.com/help/dictionary/d332.htm For an example of a very incomplete and largely suboptimal parser that uses the above: https://github.com/Rscho314/J-compiler/blob/master/ast.ijs https://github.com/Rscho314/J-compiler/blob/master/ast.ijs