Using modules in LFortran Jupyter

Hello! I’m working in a refactoring project of my director’s codes, making everything into modules and derived types to make our programs more user-friendly. I’ve recently learned about LFortran and it’s Jupyter Kernel, I found it awesome and I would love to use my codes with that kind of interface.
But I couldn’t find a way to use an already compiled module inside a notebook without pasting all the files contents into a cell and compiling in the notebook.
Is there a way to achieve this?

tldr: I want to use my modules in a Jupyter Notebook like I would import numpy as np in a Python Kernel

1 Like

This is the issue

@certik agreed that LFortran should have this capability.

2 Likes

First of all, welcome @fedebenelli to the forum!

Currently, I think we can’t load modules in an interactive session, but we definitely want to. What you described is exactly what I want to do also.

Right now we are focusing on getting LFortran to compile more codes, we are doing very good progress. Once we can compile codes like yours, we will fix up these issues with interactivity.

2 Likes

Thank you! I’ve been reading a lot of threads here (I’ve started programming in Fortran about a year ago and a this forums as the whole fortran-lang site has been REALLY helpful).

I’m really glad of the work being made with LFortran, I think that interactivity is a key to ease the learning process for newcomers. But I do agree that extending the compiling capabilities should be a priority first

2 Likes

Thanks, I am happy that you like it here. Indeed, I agree that interactivity is key. My goal is to get LFortran working with any code eventually, both interactively as well as compiling to binaries.

1 Like