GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Deliver LPython MVP · Issue #1704 · lcompilers/lpython

Deliver LPython MVP #1704

New issue
Copy link
New issue
Copy link
Closed
Closed
Deliver LPython MVP#1704
Copy link

Description

@certik
certik
opened on Apr 12, 2023
Issue body actions

To deliver LPython as an MVP, I think the bare minimum is:

  • Create a few useful LPython packages, upload to PyPi and get working with pip and Conda naturally and easily (Compiling Python packages with LPython #992)
  • @lpython decorator (Interface with Python (CPython) #703): get it working for arrays and simple types, and allow importing other LPython compiled packages from within it
  • Add the @pythoncall decorator to create an "interface" for any Python function (in some Python module), similar how @ccall works, but for Python: Interface with Python (CPython) #703 (comment), Interface with Python (CPython) #703 (comment); this will be implemented by creating BindPython ABI (next to BindC), and then in the backends we implement the conversion; I would start with the C backend, where you add logic for BindPython (in FunctionCall ASR node) and generate C code that calls the Python C/API to import a given module, find the function, convert all arguments and call it
  • Add @pythoncallable decorator which exposes an LPython function to CPython (similar to @ccallable)
  • The demo using @lpython will be faster than other Python compilers (lists, dicts, some basic things like arrays and loops), this must be done via the C backend
  • some LLVM backend demos: lists, dicts and arrays, anything where we are fast
  • Add demo of using @pythoncall and @pythoncallable, via the C backend
  • Website with documentation
  • Blog post(s)
Reacted by Thirumalai Shaktivel, Sarthak Gupta, Smit Lunagariya, Brian Beckman, Anurag Bhat, Ubaid Shaikh, czgdp1807, Anutosh Bhat and Harsh Singh Jadon

Activity

  1. certik commented on Jun 27, 2023

    @certik
    certik
    on Jun 27, 2023
    ContributorAuthor
    More actions

    The next step is to lift the Python interoperability from C to ASR (see #1996) for both @pythoncall and @pythoncallable, this will make it work in all our backends. It should transform BindC functions into directly calls to Python C/API, by probably having some module with the C/API interfaces and then calling them appropriately, all in ASR.

  2. certik commented on Aug 2, 2023

    @certik
    certik
    on Aug 2, 2023
    ContributorAuthor
    More actions

    We have released LPython here: https://lpython.org/blog/2023/07/lpython-novel-fast-retargetable-python-compiler/, so this issue is now fixed!

  3. certik
    closed this as completedon Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.