> What do you mean 'basically the full definition' of a verb? Would that
> be a J model of how the verb works? That can be pretty complicated.
> The model for (x ; y) is not something you would want to see.
I just meant that I find it strange that b._1 returns just the inverse
of a primitive -- but the full definition of any other verb:
```
myverb =: < :. >
< b._1
>
myverb b._1
> :.<
```
This inverse is not directly usable, because it is the whole definition
and thus does not know that the inverse is to be invoked:
```
1 (> :.<) 0 1 2
1 0 0
1 > 0 1 2
1 0 0
1 < 0 1 2
0 0 1
```
> Your (b. _2) is problematic. The inverse (x u^:_1 y) is (x&u)^:_1, i.
> e. it doesn't necessarily exist until x is known
Ok, but does it have to be exactly what will be executed? As shown
above, `b._1` currently does not return exactly what will be executed
anyways, so it's perfectly fine to show the inverse using `u` as a
placeholder.
In fact, placeholder style is preferable and should always be used
including showing the arguments x and y, because it is not always
obvious what is going on. For example, most would assume the inverse of
dyad `+` is simply dyad `-` , thus `x-y`, but it's not
(`_4= 7 +^:_1] 3`), so `(x&u)^:_1 y` is actually a good description,
because it shows that x is first bound to u to make a monad.
There could be a dedicated modifier, say `B.`, which always shows
the correct inverse for the situation it is in; meaning it won't be
called in isolation, but inserted into a sentence where you want to see
the inverse of a verb. Therefore, it does know everything necessary to
compute the inverse because it does not use x to determine its behaviour
(inverse, rank or identity), but rather interprets x and y as the
arguments to its verb u. `7 +B. 3` could show `(7&+)^:_1 (3)` or even
the full resolution of what the inverse does: `-&7`
Anyways, could the behaviour not at least be changed for the following
obvious case (a custom function), since the behaviour of primitives and
custom functions already differs and nobody would use the current
behaviour to create executable inverses anyways:
```
hi =: {{
echo 'Hi, world', y
:
echo 'Hi, ', x, y
}} :. {{
echo 'Bye, world', y
:
echo 'Bye, ', x, y
}}
'Bob' hi '!'
'Bob' hi ^:_1 '!'
```
...where I would want to see just the inverse function with `b._1` or,
even better, just `{{ echo 'Bye, world', y }}` with `b._1` and
`{{ echo 'Bye, ', x, y }}` with `b._2`.
> Your b. is a cute idea, but it works only for verbs, as you note.
> And how would the user know to run (+ b. _) or ('/' b. __) ?
>
> Since they would have to learn about the verb from somewhere, it might
> as well be an addon. You could write it! It feels to me like something
> that shouldn't be frozen into the C source code.
Well, how do you currently expect the user to know about `b.0` to query
the ranks? If he has to look up `b.0`, he could also just look up the
verb itself to read about its ranks. But in reality, one discovers this
verb and remembers it, because one uses it constantly. Nevertheless, an
explicit verb `help` would always take a string and work for everything
(verbs, modifiers, keywords and syntax).
Moreover, this shouldn't be a whole wiki page, but just a sentence or
so, explaining what it does; barely more than a sentence per feature of
the thing would already be sufficient and reduces maintenance to adding
and removing a sentence for new/removed features. It should definitely
be part of the source, because then, it always accurately describes the
version you use. As Raul Miller says:
> There's multiple J cheatsheets (and there used to be more, but four of
> the references I checked are no longer reachable - so that's a hazard
> worth considering).
```
help '+'
help '/'
help ')'
help 'whilst.'
'monadic' help '+' NB. just show monadic case
'dyadic' help '+' NB. just show dyadic case
```
My idea was something like bash's `help` command. Why does bash have it,
despite coming with a thorough man-page and tex-info pages? Because
people just want a quick quick answers to simple questions: What does
`{` do in bash? `help {`
> We already have Ctrl+F1 in Jqt that provides help on anything.
That's awesome but it would be even more awesome if one could access
this information from the repl and in your editor.