I'm not a pro developer in any way, but my job entails some data analysis. Executing multiple verbs on the same data is something I do whenever I'm extracting distinct feature vectors or summary stats from raw data. Also, same thing when working on trees Hsu-style. I'd be sad to see :0 go!
Just my 2c. Cheers, Raoul Le jeu. 30 sept. 2021 à 21:25, Michal Wallace <michal.wall...@gmail.com> a écrit : > Huh. That's a strange thought to me. > > I execute a bunch of verbs on the same arguments **all the time**, > especially when I'm working with input/output or mutable data: > > - parser combinators > - virtual machines > - terminal i/o > > Usually the argument in question is the empty string or some kind of state > object. > > If I'm composing parsers to match your name, I want to write something > like: > > (match@'Henry')`(match@'Rich') > > not: > > (match@'Rich') @ (match@'Henry') > > Sure, the latter works, but it's silly, and gets progressively worse as the > size of the language grows. > > Sometimes the natural way to express things is left to right. > J doesn't make you write strings or numeric arrays backwards. > > Thankfully, now that I have my answer, I can just use: > > run =:`:0 > > ... and then redefine 'run' in the future if `:0 ever gets removed. :) > > > On Thu, Sep 30, 2021 at 3:00 PM Henry Rich <henryhr...@gmail.com> wrote: > > > I would vote to delete u`:0 rather than extend it. Executing a bunch of > > verbs on the same arguments? Not a very useful thing I think. > > > > Using [ to separate executions is The J Way. Very efficient. Train > > yourself to get used to it. > > > > Newlines are even better. Then you can put a comment on each line. > > > > Henry Rich > > > > On 9/30/2021 2:42 PM, Michal Wallace wrote: > > > That is unfortunate. Normally, I am perfectly comfortable with [ and > @ > > > to do function composition, but sometimes I really wish to convey the > > idea > > > of a sequence, > > > and it just doesn't feel like the same thing as function composition to > > me. > > > > > > (So I prefer newlines to [ or @ in these situations, but then that > wastes > > > vertical space...) > > > > > > How would you feel about introducing, say, > > > `:_1 (and perhaps `:1 ) that guaranteed a left-to-right (and > > right-to-left) > > > order, explicitly? > > > > > > `:1 would just be (|.m)`:_1 > > > `:1 would just be an alias for the current implementation, > > > which would not change alongside `:0 if `:0 changes in the future. > > > > > > > > > > > > On Thu, Sep 30, 2021 at 2:32 PM Henry Rich <henryhr...@gmail.com> > wrote: > > > > > >> You cannot count on the order. All you know is that each cell of the > > >> result corresponds to an AR in the gerund. > > >> > > >> To execute short sentences the usage > > >> > > >> sentencen [ ... [ sentence2 [ sentence1 > > >> > > >> can't be beat unless one of the sentences produces a modifier. > > >> > > >> Henry Rich > > >> > > >> On 9/30/2021 2:15 PM, Michal Wallace wrote: > > >>> Today I discovered that `:0 executes the gerund in series from left > to > > >>> right. > > >>> > > >>> The execution order isn't specified in the docs (as far as I can > tell), > > >> so > > >>> I wonder if it's an implementation detail subject to change, or if I > > can > > >>> rely on this? > > >>> > > >>> Almost all of the cases where I want '..' as a statement handler have > > >>> to do with executing small imperative niladic instructions in > sequence, > > >>> and it seems like `:0'' handles that perfectly: > > >>> > > >>> NB. after loading tangentstorm/j-kvm/vt: > > >>> (bg@16b111122)`(fg@_15)`cscr`(goxy@5 5)`(puts@ > ('hello',CRLF))`:0'' > > >>> > > >>> (set the colors, clear the screen, go to position 5,5 and emit > > 'hello'... > > >>> in that order!) > > >>> > > >>> So... Can I count on this execution order? > > >>> > ---------------------------------------------------------------------- > > >>> For information about J forums see > http://www.jsoftware.com/forums.htm > > >> > > >> -- > > >> This email has been checked for viruses by AVG. > > >> https://www.avg.com > > >> > > >> ---------------------------------------------------------------------- > > >> For information about J forums see > http://www.jsoftware.com/forums.htm > > >> > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > > This email has been checked for viruses by AVG. > > https://www.avg.com > > > > ---------------------------------------------------------------------- > > 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