Kind-colouring of dfns web pages
1 post
• Page 1 of 1
Kind-colouring of dfns web pages
Following feedback on the Dyalog blog post: http://www.dyalog.com/blog/2015/05/name-colouring-for-dfns, as an experiment, names in the dfns sample code pages, on the Dyalog website, have been subtly "kind coloured". See for example: http://dfns.dyalog.com/c_display.htm.
Variable names (those that reference array values) are in normal font, while those that reference functions and operators are in italics. In addition, names of monadic and dyadic operators are coloured navy and purple, respectively.
This should make it easier to read code where adjacent names are of differing kinds. For example, in the expression
This first version of the kind-inferencing code http://dfns.dyalog.com/n_kk.htm is not perfect. In particular, it does a poor job with operand ⍺⍺. Parts of expressions where the inferencing fails are coloured red. With luck, a later version of kk should fix some of these shortcomings.
Feedback, comments, suggestions, etc: very welcome.
John
Variable names (those that reference array values) are in normal font, while those that reference functions and operators are in italics. In addition, names of monadic and dyadic operators are coloured navy and purple, respectively.
This should make it easier to read code where adjacent names are of differing kinds. For example, in the expression
lines print titles pages
we can now see that print is a dyadic function applied between left argument "lines" and a right argument, which is the pair of array values "titles" and "pages".This first version of the kind-inferencing code http://dfns.dyalog.com/n_kk.htm is not perfect. In particular, it does a poor job with operand ⍺⍺. Parts of expressions where the inferencing fails are coloured red. With luck, a later version of kk should fix some of these shortcomings.
Feedback, comments, suggestions, etc: very welcome.
John
- JohnS|Dyalog
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group