Couple of things after skimming through it:

  * "Consider a naive implementation of a .* operator to add two sequences 
together:" -> to multiply two sequences
  * in the equation for polynomial kernel use `\text{Offset}`
  * personally would not define `var ret` and use `return ret`. Instead use the 
implicit `result` variable and avoid explicit `return`
  * semicolons at line ends look weird to me
  * in `gaussian` I would define the `var tmp` before the loop and just reassign
  * why define `n = x.len` if only used to indicate running index of the loops?
  * you didn't show the implementation of `$` for the matrix type. Not a 
problem, but I would mention that it has to be defined manually (maybe I missed 
a reference to that)
  * given that this is numeric code, which should probably run fast, I wouldn't 
refer to `nim c -r <file>` without mentioning `-d:danger` to readers
  * regarding no SIMD support from the compiler: thanks to macros one can sugar 
coat SIMD in principle very well oneself



Other than that, nice article! Always great to see articles talking about Nim 
for mathematical / scientific etc. usages!

Reply via email to