Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread Henry Rich
My version for day 8: NB. read input i =. a: -.~ <;._2 wd 'clippaste' NB. Count number of excess characters for each line: one per unescaped \, + 2 more if \x, NB. + 2 for enclosing " +/ ('\x'&E. (2 + (2 * +/@:*.) + +/@]) >/\.&.|.@('\'&=))@> i NB. Count number of characters needed to encode:

Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread Joe Bogner
Here's my day 8 - again, abusing my byte code interpreter -- which seems like a good fit because it can peek ahead in the stream part 1 approach: generate COUNT instruction for each character. Skip over characters if they are escaped Only around 10 lines of new code written to support it - hooray

Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread bill lam
Can d3 so the same job? Ср, 09 дек 2015, Chris Burke написал(а): > It was a useful addon, and it would be good if someone could update it for > J8. > > On 9 December 2015 at 05:11, bill lam wrote: > > > I think it cannot run on J8 and no longer maintained. > > On Dec 9, 2015 8:48 PM, "Ryan Eckb

Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread chris burke
It was a useful addon, and it would be good if someone could update it for J8. On 9 December 2015 at 05:11, bill lam wrote: > I think it cannot run on J8 and no longer maintained. > On Dec 9, 2015 8:48 PM, "Ryan Eckbo" wrote: > > > I wanted to visualise this with the graphviz addon > > (http://

Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread bill lam
I think it cannot run on J8 and no longer maintained. On Dec 9, 2015 8:48 PM, "Ryan Eckbo" wrote: > I wanted to visualise this with the graphviz addon > (http://code.jsoftware.com/wiki/Addons/graphics/graphviz), but that seems > to have disappeared, i.e. its not in the package manager. Anyone kn

Re: [Jprogramming] adventofcode/day/8

2015-12-09 Thread Ryan Eckbo
I wanted to visualise this with the graphviz addon (http://code.jsoftware.com/wiki/Addons/graphics/graphviz), but that seems to have disappeared, i.e. its not in the package manager. Anyone know what happened to it? In any case, this answer helped me learn J's FSM. thanks! Ryan On 9 Dec 201

Re: [Jprogramming] adventofcode/day/8

2015-12-08 Thread 'Pascal Jasmin' via Programming
to use, (0;S;M) ;: wdclippaste '' - Original Message - From: David Lambert To: programming Sent: Tuesday, December 8, 2015 10:23 AM Subject: [Jprogramming] adventofcode/day/8 Part 1, a chance to exercise the FSM. The states here are sufficient for character coun

[Jprogramming] adventofcode/day/8

2015-12-08 Thread David Lambert
Part 1, a chance to exercise the FSM. The states here are sufficient for character count. Raul's annotated state table style is worth reiterating, hence this post. Fixed width font aligns the columns. mp=: +/ .* S=: +. ". }. [;._2 noun define bore hex \"xLF 0j6 0j6 0j6 6j0