Jan-Pieter,
Thank you very much for your solution.
Puzzling through it really helped me.
I think your approach is really clever and your comments were perfect.
I had trouble understanding your off, on, an toggle until I realized you
were updating the whole array each time, because my (incomplete)
A big idea in Grade 4 is helping students understand fully how base 10
works. Here is a dialog which might help students to understand number
systems in general.
So, if you have 64 different colors, how high can you count with unique
numbers?
Here's the dialog?
load 'viewmat'
base=: 13 :'(
Personally, I usually prefer 1+x instead of >: x, unless the >: serves
some relevant purpose (like if I am defining addition in terms of more
basic operations, or if I'm using an & and don't want parenthesis or
that sort of thing).
I'm not sure, though, if that fits your lesson concept?
Thanks,
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
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 count. Raul's annotat
You're welcome!
The parsing does only use negative indexing though (mainly to easily get
rid of the "turn", as the "toggle" cases don't have an element to get rid
of ...)
Actually, I had errors in the updating functions too before ... What you
see is only the final result :)
2015-12-08 14:38 GMT+
I like 1+ and should have used it since Grade 1!
To understand the lesson you have to look especially at the first two
images. With no numbers and two different crayons see how high you can
count.
Now use 3 different crayons and "write" as namy "numbers" as you can using
only your three crayons
Jan-Pieter,
I used my "amend" approach with your great parsing and your method was 4
times as fast and 6.3 times as space efficient as mine.
FYI, my definitions are as follow.
cells =: <@{.+each,@{@(<@:i."0@(>:@-~/))@]
toggle =: -.@(cells@[ { ])`(cells@[)`]}
on =: 1:`(cells@[)`]}
off =: 0:
pyth=: 13 : '| x+j.y' also works but does call on complex
numbers-not generally grade 4.
pyth
[: | [ + [: j. ]
5 pyth 4
6.40312
You must have a great grade 4 class.
Don
On 12/7/2015 10:35 PM, Linda A Alvord wrote:
Yes and Me Too
-Original Message-
From: programming-boun...
Nice. Probably Grade 9 or 10
Linda
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Don Kelly
Sent: Tuesday, December 8, 2015 9:42 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] My first J conj
10 matches
Mail list logo