[Jprogramming] Repeated application of a verb
R.E. Boss
r.e.boss at planet.nl
Sun Oct 9 04:37:16 HKT 2011
Not seemingly, it ìs endless.
R.E. Boss
-----Oorspronkelijk bericht-----
Van: programming-bounces at jsoftware.com [mailto:programming-bounces at jsoftware.com] Namens Björn Helgason
Verzonden: zaterdag 8 oktober 2011 22:31
Aan: Programming forum
Onderwerp: Re: [Jprogramming] Repeated application of a verb
(- ^: (trigger */@:-. at e.~ ])^:_ ) 2 3 5 7
2 3 5 7
(- ^: (trigger */@:-. at e.~ ])^:_ ) 33
goes into a seemingly endless loop
2011/10/8 Raul Miller <rauldmiller at gmail.com>
> On Sat, Oct 8, 2011 at 12:19 PM, David Vaughan
> <purpleblues13 at googlemail.com> wrote:
> > Could you maybe explain how that tacit verb works (and how it works with
> 'verb')? Is it something along the lines of, see if the input is not a
> member of trigger, multiply with trigger to get 0 0 or outp1 outp2, ... then
> I run out of ideas. :P
> >
> > On 8 Oct 2011, at 15:58, R.E. Boss wrote:
> >
> >> trigger=: outp1, outp2
> >>
> >> verb ^: (trigger */@:-. at e.~ ])^:_ input
>
> outp1=: 2
> outp2=: 5
> trigger=: outp1, outp2
>
> trigger e.~ 2 3 5 7
> 1 1
> trigger e.~ 1 2 3 4
> 1 0
> trigger e.~ 5 6 7 8
> 0 1
> trigger e.~ 9 10 11 12
> 0 0
>
> -.1 1
> 0 0
> -.1 0
> 0 1
> -.0 1
> 1 0
> -.0 0
> 1 1
>
> */0 0
> 0
> */0 1
> 0
> */1 0
> 0
> */1 1
> 1
>
> So (trigger */@:-. at e.~ ]) is 1 when neither element of trigger is
> present in its right argument and 0 otherwise.
>
> Meanwhile verb does whatever you need it to do (but you have not said
> what that is yet, so we cannot make any useful suggestions there).
>
> FYI,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: gosinn at gmail.com
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=) ♖♘♗♕♔♙
`. )----' (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list