DConf Online 2020 Submission Deadline Extended

Darren Drapkin daren.drapkin at ntlworld.com
Sun Sep 6 13:29:55 UTC 2020


On Monday, 31 August 2020 at 08:36:09 UTC, Mike Parker wrote

> So send me your <= 5-minute videos describing your talks, folks!

I can give you a written submission, but not yet a written one. 
This would be my first D conf even as an attendee. Have seen 
videos of previous sessions, and wanted to go in person this 
year, but the pandemic put paid to that. Since I am not yet a 
professional programmer, have been doing it on and off during a 
long illness, I expect that this will be a low level, and rather 
short talk; anyway here goes...

Coding Kata's in D

In this talk,I intend to show how some very basic features of D 
make the programmer's life easier and the programmer more 
efficient, no objects, no recursion, and only a little maths.

The problem I present, an example of finite integration, is taken 
from the Code and Coffee mailing list of the Codewars website.

If you are not familiar with finite integration, or more likely 
call it something else, a little explanation. Lets say we have 
some apparatus that is generating some signals at a regular 
interval that we know the values of and the, constant time 
between. We also have a theory that describes how the signal 
starts when the apparatus is switched on and how, given a small 
sample of the signal in the past, what we expect the signal to be 
in the near future. Given U at t=0, we want to predict what U is 
at any time, and confirm the theory or reject it.

The kata goes something like this;-
The apparatus gives us the following signals shortly after 
powering up
n=0, U=1
n=1  U=2
then some time, much later,
n=17 U=131072
n=21 U=2097152
We have a theory that relates one signal to the previous signal 
of this form.
6U[n]U[n+1]-5U[n]U[n+2]+U[n+1]U[n+2] = 0

What is the signal at any integer valued time between n = 1 and n 
= 17.
We can do this with only a little algebra, no recursion, and 
certainly not too much confusion.
We re-arrange the theory in the form U[n]=f(U[something])
We write the program using automatic programming.
Then the surprise at the end is that the theory is much simpler 
than it looks.
What do you think ?
--
Yours &c.
Darren Drapkin




More information about the Digitalmars-d-announce mailing list