356820 (9) [Avatar] Offline
#1
Hi,

I know next to nothing about Fortran, but I am really fascinated by this language and its features and want to add it to my skell set . I am really excited about the book. Thanks in advance!!

In the description of the book on the Manning web page (What's inside?), it is mentioned that there will content on interoperability with Python. But I only see a chapter on C. Is Python still in scope of the book?

Thx
Philipp Leser

PS: Interesting start up!
arclight (10) [Avatar] Offline
#2
Modern Fortran has a well-defined interoperability system for interfacing with C, so there's a path from Python to Fortran via the C interface. My understanding is tools like f2py handle the C-ish aspects of the process so you can focus on just the Fortran and Python parts. Still, it's good to understand Fortran's ISO_C_BINDING module if only to be able to diagnose problems with f2py.
356820 (9) [Avatar] Offline
#3
Ok. Thx
Milan Curcic (25) [Avatar] Offline
#4
Hi Philipp,

Interoperability with C is definitely on the roadmap with a dedicated chapter. Interop with Python is something we are considering, subject to demand. Your feedback counts!

If you have any other topics on the wishlist, this forum is the best place to mention them!

Thanks!
356820 (9) [Avatar] Offline
#5
So if I am alowed to be egoistical here,...smilie,I think the weird thing might add more value and expand the use cases for Fortran: call Fortran from the JVM . Please follow my reasoning here!

I think there are many potential future Fortran users that have a comparable situation and use pretty much the same software stack like myself:

I work as a data-scientist, data-engineer, quantitative analyst and software engineer. I have a wide array of problems located in the worlds of operations research, engineering/control-theory and financial engineering.

Python is one of my work-horses. Approximately 50% of my work is done in Python. If data gets a little bit bigger I work with HDF5. If I have to implement something that is more computational intensive (say some custom made meta heuristic) and it is hard to do it array based on numpy, I use numba (https://numba.pydata.org/). But obviously that is limited. Especially when it comes to dirtributed computing.

Since the classical open source big data world is mostly driven by some Apache projects (Spark, Flink, HBASE,Kudu, Kafka), about 40% is done in Scala...or Java,if I have to. Scala/Java are compiled languages and reasonably fast for most applications, but I guess if could call my own Fortran functions from something JVM based, there might be value in that. I think this could be done using JNA (https://en.wikipedia.org/wiki/Java_Native_Access).

I don't know if that makes sense to you.
arclight (10) [Avatar] Offline
#6
FWIW, Sun/Oracle tried an experiment moving numerical coding to the JVM with their Fortress project https://en.wikipedia.org/wiki/Fortress_(programming_language).
Milan Curcic (25) [Avatar] Offline
#7
Philipp,

I haven't considered interfacing Java and Scala, and to be honest, I don't have experience with those languages. However, it is a big ecosystem and I am very curious about exploring this option. If you can get people to post here that they would want this covered in the book with at least a Section, I think it would be a possibility! Definitely something that has not been covered in a book before AFAIK.
356820 (9) [Avatar] Offline
#8
Sure. Will ask around. Don't be suprised if you find this topic popping up on some message boards in the near futuresmilie.
Milan Curcic (25) [Avatar] Offline
#9
I haven't had chance to try it yet, but this library looks promising:

https://github.com/ylikx/forpy