- assume the sliding window transducer existed in the standard library (there's an open jira for it)
- assume the programmer is not an expert, but is familiar with stuff like boxed maths in Clojure, which isn't hard to work around, well documented [1], and has a known performance impact
- assume the programmer will avoid using `last`
- assume the programmer is comfortable using transducers
In short, that the transducer exists and the programmer has at least 6 months of experience programming in Clojure full time.
Will you consider the resulting implementation complicated, in depth or non idiomatic? There's always the possibility I'm just used to it so it comes naturally to me, but as the title suggests, I consider the result, before dropping down to arrays, way more idiomatic than the initial implementation.
I don't begrudge CL's speed and implementation, it's the readiness with which Clojure is dismissed as being slow with only surface familiarity with it.
I'm a physicist and when checking out CL in the past, it didn't feel like scientific computing was a huge thing in CL. You intrigue me with your post though. Do you have any resources for me to check out?
* unmatched interactive development which could be used for exploration of problems such as dynamical and complex systems
* although it is a very high level language you can perform low level optimizations in common lisp itself
* extremely powerful macro system that allows you to develop in a declarative style to reflect your problem domain. for example you can program in a syntax that is natural to general or special relativity, quantum mechanics, etc.
* fast and free implementations such as SBCL
* the language is standardized so your code will not need to be unnecessarily maintained (this is good for university professors that have repeating long-running courses)
i am not sure what type of references you are asking for but i will list few open source projects that might be interesting to you:
* CLASP - common lisp implementation build on top of LLVM. this project is headed by a computational chemist (prof. schafmeister) [0]
* PetaLisp - for HPC [1]
* MAGICL - Matrix Algebra proGrams In Common Lisp by Rigetti Computing [2]
* Quil - quantum instruction language developed on top of common lisp [3]
* CL-CUDA - use NVIDIA CUDA in Common Lisp programs [4]
* MGL - Common Lisp machine learning library [5]
* Maxima - a computer algebra system developed in common lisp [6]
i think these are plenty to show that there exists serious interest in using common lisp for scientific computing. it is possible that some of the people behind these projects are on HN and maybe they can further expand on this
[0] https://github.com/clasp-developers/clasp
[1] https://github.com/marcoheisig/Petalisp
[2] https://github.com/quil-lang/magicl
[3] https://github.com/quil-lang/quilc
[4] https://github.com/takagi/cl-cuda
[5] https://github.com/melisgl/mgl also https://github.com/melisgl/higgsml