I would say:
nobar2=: }.@}:@nobar1
]r=.;/(30?30){?10#10 100 1000
+--+---+--+---+-+-+-+-+---+--+-+--+-+--+--+-+---+---+-+--+---+---+--+-+-+---+---+-+--+---+
|40|769|23|460|9|1|9|6|430|57|2|22|5|55|16|3|589|484|3|29|628|430|91|2|2|665|987|9|43|849|
+--+---+--+---+-+-+-+-+---+--+-+--+-+--+--+-+---+---+-+--+---+---+--+-+-+---+---+-+--+---+
$ nobar1 3 10$r
+---+---+--+---+--+---+---+---+---+---+
|40 |769|23|460|9 |1 |9 |6 |430|57 |
|2 |22 |5 |55 |16|3 |589|484|3 |29 |
|628|430|91|2 |2 |665|987|9 |43 |849|
+---+---+--+---+--+---+---+---+---+---+
nobar2 3 10$r
|40 |769|23|460|9 |1 |9 |6 |430|57 |
|2 |22 |5 |55 |16|3 |589|484|3 |29 |
|628|430|91|2 |2 |665|987|9 |43 |849|
best regards,
Jan-Pieter
On Mon, Jul 13, 2020, 22:27 Skip Cave <[email protected]> wrote:
> Arthur's nobar:
> nobar=: (((1&|.@ (_1 0&,@ (((9{ 9!:6 '')&=@ ({."1))# i.@ #))) {"2 ])@
> ":)
> David's nobar:
> nobar1=: ({. , _2 {:\])@:":
>
> Test:
>
> ]r=.;/(30?30){?10#10 100 1000
>
>
> ┌───┬─┬──┬─┬───┬───┬───┬──┬─┬───┬──┬─┬─┬──┬───┬───┬──┬─┬───┬───┬─┬──┬──┬──┬───┬─┬──┬─┬─┬─┐
>
>
> │716│1│53│7│337│488│565│87│8│508│49│3│8│68│978│504│10│4│946│921│9│47│96│13│985│6│59│3│3│2│
>
>
> └───┴─┴──┴─┴───┴───┴───┴──┴─┴───┴──┴─┴─┴──┴───┴───┴──┴─┴───┴───┴─┴──┴──┴──┴───┴─┴──┴─┴─┴─┘
>
> nobar r
>
>
> ┌───┬─┬──┬─┬───┬───┬───┬──┬─┬───┬──┬─┬─┬──┬───┬───┬──┬─┬───┬───┬─┬──┬──┬──┬───┬─┬──┬─┬─┬─┐
>
>
> │716│1│53│7│337│488│565│87│8│508│49│3│8│68│978│504│10│4│946│921│9│47│96│13│985│6│59│3│3│2│
>
>
> └───┴─┴──┴─┴───┴───┴───┴──┴─┴───┴──┴─┴─┴──┴───┴───┴──┴─┴───┴───┴─┴──┴──┴──┴───┴─┴──┴─┴─┴─┘
>
> nobar1 r
>
>
> ┌───┬─┬──┬─┬───┬───┬───┬──┬─┬───┬──┬─┬─┬──┬───┬───┬──┬─┬───┬───┬─┬──┬──┬──┬───┬─┬──┬─┬─┬─┐
>
>
> │716│1│53│7│337│488│565│87│8│508│49│3│8│68│978│504│10│4│946│921│9│47│96│13│985│6│59│3│3│2│
>
>
> └───┴─┴──┴─┴───┴───┴───┴──┴─┴───┴──┴─┴─┴──┴───┴───┴──┴─┴───┴───┴─┴──┴──┴──┴───┴─┴──┴─┴─┴─┘
>
>
> Lots of wrapped horizontal bars & lots of extra vertical spaces caused by
> line wrap when copy/paste from JQT.
>
>
> What about rank 2 arrays?
>
> nobar 3 10$r
>
> ┌───┬───┬──┬───┬──┬───┬───┬───┬──┬───┐
>
> │2 │71 │1 │146│87│55 │39 │38 │94│391│
>
> │689│99 │11│6 │64│8 │9 │699│8 │0 │
>
> │82 │172│91│1 │7 │699│773│9 │3 │81 │
>
> └───┴───┴──┴───┴──┴───┴───┴───┴──┴───┘
>
> nobar1 3 10$r
>
> ┌───┬───┬──┬───┬──┬───┬───┬───┬──┬───┐
>
> │2 │71 │1 │146│87│55 │39 │38 │94│391│
>
> │689│99 │11│6 │64│8 │9 │699│8 │0 │
>
> │82 │172│91│1 │7 │699│773│9 │3 │81 │
>
> └───┴───┴──┴───┴──┴───┴───┴───┴──┴───┘.
>
>
> Extra vertical spaces added when I copy/paste from JQT
>
> What I would like (nobar2):
>
>
> nobar2 r
>
>
> │716│1│53│7│337│488│565│87│8│508│49│3│8│68│978│504│10│4│946│921│9│47│96│13│985│6│59│3│3│2│
>
>
> nobar2 3 10$r
>
> │2 │71 │1 │146│87│55 │39 │38 │94│391│
>
> │689│99 │11│6 │64│8 │9 │699│8 │0 │
>
> │82 │172│91│1 │7 │699│773│9 │3 │81 │
>
>
> or even with no fixed-width characters (Tahoma font) it still isn't bad:
>
> nobar2 3 10$r
>
> │2 │71 │1 │146│87│55 │39 │38 │94│391│
>
> │689│99 │11│6 │64│8 │9 │699│8 │0 │
>
> │82 │172│91│1 │7 │699│773│9 │3 │81 │
>
>
> So what would the nobar2 verb code look like?
>
>
>
> Skip Cave
> Cave Consulting LLC
>
>
> On Mon, Jul 13, 2020 at 10:36 AM David Lambert <[email protected]>
> wrote:
>
> > nobar simplified?
> >
> > nobar=: ({. , _2 {:\ ])@:":
> >
> > |Date: Sun, 12 Jul 2020 16:07:11 -0400
> > |From: Arthur Anger <[email protected]>
> > |To: [email protected]
> > |Subject: Re: [Jprogramming] Boxing Issues
> > |Message-ID: <[email protected]>
> > |Content-Type: text/plain; charset=us-ascii
> > |
> > |Skip--
> > |For some years,I have been deleting horizontal separators when
> > displaying tall arrays. This verb displays boxed values without
> > top-level horizontal separators:
> > |
> > |nobar=: (((1&|.@ (_1 0&,@ (((9{ 9!:6 '')&=@ ({."1))# i.@ #))) {"2 ])@
> ":)
> > |
> > |You could also provide for deletion of first and last rows.
> > |
> > |This will not enforce alignment of vertical bars when using
> > variable-width characters, nor deal with second-level horizontals which
> > would still appear, or take up space if replaced by blanks..
> > |--Art
> >
> > ----------------------------------------------------------------------
> > 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