News for hackers. Stuff that matters.
Re:Ray Tracing in Nim by qeternity on Wednesday July 01, 2020 @08:31PM (#23708574)
If they’re data centric, would you not be better off with vanilla python? If you have numpy do the heavy lifting, it’ll be as fast plus all the syntactic/ecosystem benefits
Re:Ray Tracing in Nim by ca_parody on Wednesday July 01, 2020 @10:19PM (#23709275)
The main reasons I see for nim in scientific computing over python are:

(a) you need performance for applications outside of numpy / pandas & you want to avoid writing a C extension to do so (nim is also actually a good choice for python extensions via nimpy - if you are still using python as the main language of your project/system)

(a2) you want good concurrency (some would say python's async/await is good - but it feels too little too late to me) & you at least want the option of parallelism (like this article takes advantage of)

(b) you want / need the powerful macro system for dsls / custom (compile-type-checkable) language extensions.

There is a good future for nim in scientific computing (frankly, there is a good present) - but for it to be better, people need to be willing to forgo some of the ecosystem (when possible) and to help build that future.

https://github.com/nim-lang/needed-libraries/issues/77

Re:Ray Tracing in Nim by logicchains on Wednesday July 01, 2020 @11:48PM (#23709796)
The OP said Scala-like. A big advantage of Scala/Spark over Python is more compile-time checking: the code is much less likely to fail at runtime. Particulary helpful for production code (e.g. pipelines). For people coming from an engineering background (as opposed to data science), Python's lack of any static type checking for data processing code can be a big productivity killer. In that sense, Nim might be able to offer similar advantages to Scala.
Re:Ray Tracing in Nim by nimmer on Thursday July 02, 2020 @06:34AM (#23711805)
Numpy is nice but pure-Nim applications appear to outperform it easily:

https://narimiran.github.io/2018/05/10/python-numpy-nim.html

https://github.com/mratsim/Arraymancer

Re:Ray Tracing in Nim by qeternity on Saturday July 04, 2020 @06:48PM (#23735431)
Interesting but given the low total execution time, the majority of time in the numpy implementation is going to be spent initializing CPython.

I think if this were on the order of minutes/hours you would see numpy outperform.

Re:Ray Tracing in Nim by nkozyra on Wednesday July 01, 2020 @09:10PM (#23708870)
Yeah, I like nim but it isn't going to offer and advantage over python in this regard.