GSoC’24 - LPython: 7th Week

GSoC
Code
Internship
Python
LPython
Author

Vipul Cariappa

Published

July 13, 2024

This was a fun week again. My mentor Ondrej attended the SciPy conference and also presented LPython in his talk. At the start of the week, he asked me about the status of REPL and Jupyter Notebook support for LPython. We have good, usable, but not feature complete REPL, but we have no Jupyter Notebook support was my reply. Within 2 to 3 days, I added support for Jupyter Notebook by adapting the code from LFortran’s repository (LFortran already supports Jupyter Notebooks), and fixed bugs related to the failing CI caused by updating the dependencies versions.

Merged Pull Request

  • Jupyter Notebook
    Support to use LPython in Jupyter Notebooks, and fix for the CI failures.
  • Support to print lists in REPL
    Adds support to print top-level expression of list type.
  • Underscore: _ variable in REPL
    This PR introduces the _ (underscore) variable in LPython’s REPL (like in CPython’s REPL). The _ variable holds the value of the last evaluated expression from the previous REPL block.

Open Pull Request

Issue Created

  • Bug with bit_length function
    I added a comment in an existing issue concerning the bit_length function. The comment is specific to interactive mode, where no LLVM IR is generated.

This week I will be working on support to print other aggregate datatypes in interactive mode. I will also look into the failing CI of LLVM 14.