In addition to the higlighting of correctly used special combinations, I
think it would also be useful to highlight, or issue warnings for (as done
for 9!:55) for near-misses, i.e. caused by phrases that could use a special
combination, but miss it due to wrong or missing parentheses etc.

My uneducated hunch is that datatypes on which the special combinations are
executed are also important, but would only be available at execution time.

Another type of phrases that might be nice to highlight is things like
possibilities for speeding up by dropping tolerant comparison: While
working on AoC, I recently had a case where using i.!.0 instead of i. for
lookup of rows in a matrix sped up the program by more than 20x !

My two cents.

Jan-Pieter

On Mon, 31 Jul 2023, 05:27 Raul Miller, <rauldmil...@gmail.com> wrote:

> In the wiki, we have <syntaxhighlight lang="J"> </syntaxhighlight> aka
> GeSHI.
> https://www.mediawiki.org/wiki/Extension:SyntaxHighlight
> https://github.com/GeSHi/geshi-1.0/blob/master/src/geshi/j.php
>
> In jqt, we're using QSyntaxHighlighter
> https://doc.qt.io/qt-5/qsyntaxhighlighter.html
> https://github.com/jsoftware/qtide/blob/master/lib/high/highj.cpp#L15
>
> I think jhs uses CodeMirror.
> https://codemirror.net/5/doc/manual.html#modeapi
> https://github.com/jsoftware/ide_jhs/blob/master/js/codemirror/j/j.4.2.js
>
> I hope this helps,
>
> --
> Raul
>
> On Sun, Jul 30, 2023 at 10:23 PM Ak O <akin...@gmail.com> wrote:
> >
> > In the editor initially.
> >
> > My question about the wiki was if there was already  an informational
> > reference that might have had a term I was not thinking of.
> >
> > Working within a wiki page seems like it might be new question
> altogether.
> >
> > AO.
> > On Sun., Jul. 30, 2023, 16:02 'Viktor Grigorov' via Programming, <
> > programm...@jsoftware.com> wrote:
> >
> > > My twopence:
> > > Worth confirming: did you mean syntax highlighting on wiki pages or for
> > > the various text editors? Can't speak for jQt IDE.The answer for both
> is
> > > 'yes', certainly for the simpler ones. Easier for the former, I reckon.
> > > Consider also: should special combinations receive one color, that of
> what
> > > they resolve to; or should they additionally be italicized,
> emboldened, or
> > > underlined?
> > >
> > > For my syntax highlighting code for kakoune, I'd considered indicating
> > > with straight and wavy underlines whether a verb train resolves to a
> hook
> > > or a fork. I'd decided against it to not add clutter.
> > >
> > >
> > > Jul 30, 2023, 20:00 by akin...@gmail.com:
> > >
> > > > Hi all, I hope you are all well.
> > > >
> > > > Two questions.
> > > >
> > > > 1. Is there a way to include Special Combinations in Syntax
> Highlighting?
> > > >
> > > > Meaning some visual indicator that an arrangement of Operators
> triggers a
> > > > Special Combination.
> > > >
> > > > 2. What page should I be looking up to understand the significance of
> > > > Syntax Highlights.
> > > > I am not sure what exactly that is called.
> > > >
> > > > For example:
> > > > Something(...)          NB. Colour change to 'Something'
> > > > Vs.
> > > > Something   (...)       NB. No Colour changes to 'Something'
> > > >
> > > > Which page do I find that type of information?
> > > >
> > > >
> > > > Thank you,
> > > >
> > > > AO.
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > >
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to