Hi,

Yes, your comments are definitely helpful and appreciated.

To be more specific, I think that the first and last lines are a nice fit
for the under conjunction but I feel my tacit construct has too many
parentheses.

I was wondering if there was a way to simplify it. Gerunds might help, but
I'll have to delve deeper in their use as I only started using them in
problem 8 to implement the comparison operations.

Some of the syntax still puzzles me  :

​   3&{. ` , ` }. `: 0 a=:1+i.5
1 2 3 0 0
1 2 3 4 5
2 3 4 5 0

   3&{. ` , ` 3&}. `: 0 a
|domain error
|       3&{.`,`3&}.`:0 a

   3&{. ` , ` (3&}.) `: 0 a
1 2 3 0 0
1 2 3 4 5
4 5 0 0 0
​


On Sun, Dec 10, 2017 at 6:14 PM, Raul Miller <[email protected]> wrote:

> For part 1, I implemented something like that explicitly.
>
> For part 2, I went with an argument of pos,skip,list (which might be
> more amenable to a tacit representation of part 1). But my gut feeling
> is that this one is messy enough that it's more comprehensible to
> stick with an explicit representation.
>
> Using t like you are doing here prevents it from being an argument
> (which you'll want, I imagine, for your code to work on both the AoC
> test cases and the "real value" they supply).
>
> That said, if I went full tacit, I'd either be using the gerund form
> for } - or I'd work out how to do it without } in the mix.
>
> Not sure this helps... but you didn't really ask a specific question,
> so maybe this will be close enough.
>
> Thanks,
>
> --
> Raul
>
>
> On Sun, Dec 10, 2017 at 2:02 PM, Jimmy Gauvin <[email protected]>
> wrote:
> > Hi,
> >
> > would anyone care to comment on the transformation of this piece of code
> to
> > tacit notation?
> >
> > v being the 256 element vector
> > c being the current position
> > t being the length of the part tot rotate
> >
> > NB. v=.c|.v
> > NB. v=.(|.t{.v),t}.v
> > NB. v=.(-c)|.v
> >
> > v=.( |.&(t&{.) , t&}. ) &. (c&|.) v
> >
> > Thanks
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to