← Back to context

Comment by zahlman

1 day ago

For that matter,

  # python
  from numpy import sin, arange, pi
  127 * sin(arange(samplerate) * 2 * pi * freq / samplerate)

for that matter, i always wonder how people mistake python for numpy :) they have surprisingly little in common.

but enough talking about languages that suck. let's talk about python!

i'm not some braniac on a nerd patrol, i'm a simple guy and i write simple programs, so i need simple things. let's say i want an identity matrix of order x*x.

nothing simpler. i just chose one of 6 versions of python found on my system, create a venv, activate it, pip install numpy (and a terabyte of its dependencies), and that's it - i got my matrix straight away. i absolutely love it:

  np.tile(np.concatenate([[1],x*[0]]),x)[:x*x].reshape(*2*[x])

and now lets see just how obscure and unreadable exactly the same thing looks in k:

  (2#x)#1,x#0

no wonder innocent people end up with brain aneurisms and nervous breakdowns.