outfix is quite forgettable, but this is much more elegant than what I did.
1 */\. 2 3 4 12 8 6 ----- Original Message ----- From: Joe Bogner <joebog...@gmail.com> To: programm...@jsoftware.com Sent: Wednesday, December 2, 2015 8:54 PM Subject: Re: [Jprogramming] advent of code - day 2 Pascal's #2 is the answer to part 2 of the question. Both of his answers match mine and yours matches my part one. Pascal - looks similar to mine, albeit compressed in a single line, which is close to the original problem description Henry - I haven't figured the logic of yours out yet at a quick glance, I will need to look closer Thank you both for sharing On Wed, Dec 2, 2015 at 8:40 PM, Henry Rich <henryhr...@gmail.com> wrote: > The 2 versions give different results. > > Mine: > > i =. ".;._1@('x'&,);._2 wd 'clippaste' > > +/ (/:~@(1&(*/\.))"1 i) +/ . * 3 2 2 > > > Henry Rich > > > > > On 12/2/2015 8:19 PM, 'Pascal Jasmin' via Programming wrote: >> >> was wondering what took 7 lines, but its style >> >> 1: with input parsing >> >> +/ +/ (<./, 2&*)"1 */every@:(0 2&{ ; 1 2&{ ; 0 1&{)"1 ". > cutLF 'x ' >> rplc~ wdclippaste '' >> >> 2: >> >> +/ +/@(*/ , +:@(2 {. /:~))("1) ". > cutLF 'x ' rplc~ wdclippaste '' >> >> >> >> ----- Original Message ----- >> From: Joe Bogner <joebog...@gmail.com> >> To: programm...@jsoftware.com >> Sent: Wednesday, December 2, 2015 7:37 PM >> Subject: [Jprogramming] advent of code - day 2 >> >> building upon: >> http://jsoftware.com/pipermail/programming/2015-December/043407.html, >> but starting a new thread since the other one started to go in a >> different direction. >> >> http://adventofcode.com/day/2 >> >> Here's my solution: >> https://github.com/joebo/lang-lab/blob/master/j/advent2015/day2.ijs >> ---------------------------------------------------------------------- >> 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 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm