GithubHelp home page GithubHelp logo

juancarlospaco / cpython Goto Github PK

View Code? Open in Web Editor NEW
142.0 5.0 3.0 38.13 MB

Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim

Home Page: https://gist.github.com/juancarlospaco/37da34ed13a609663f55f4466c4dbc3e

License: MIT License

Python 100.00%
python python-library python3 python-3 python-package python-api nim nim-lang compiled cython

cpython's People

Contributors

1marcosdev avatar adokitkat avatar aguspiza avatar all-an avatar andrewgpu avatar andrielfr avatar aphkyle avatar ariesfoxgirl avatar arikrahman avatar arkanoid87 avatar bakarilevy avatar barseghyanartur avatar bimzzzzz avatar braden-preston avatar buster-blue avatar byk95 avatar cammclain avatar catsmells avatar fi-mihej avatar geksan avatar juancarlospaco avatar khazakar avatar kolyars avatar megamegamium avatar optimax125 avatar quantum-codes avatar ryu1845 avatar traumatism avatar w1m0r avatar zira3l137 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

barseghyanartur

cpython's Issues

boilerplate should be refactored

these appear in each module (with minor modifications):

template X(simbol):       auto = nimpy.pyImport("crypt").simbol().to(type(result))
template X(simbol; a):    auto = nimpy.pyImport("crypt").simbol(a).to(type(result))
template X(simbol; a, b): auto = nimpy.pyImport("crypt").simbol(a, b).to(type(result))

can you instead add a private module pyutils which you import in each module, possibly with a macro eg:

# pyutils.nim:
macro genWrappers*(name: string) =
  template X(simbol):       auto = nimpy.pyImport(name).simbol().to(type(result))
  template X(simbol; a):    auto = nimpy.pyImport(name).simbol(a).to(type(result))
  template X(simbol; a, b): auto = nimpy.pyImport(name).simbol(a, b).to(type(result))

# in crypt.nim:
import pyutils
genWrappers("crypt")

...

suggestion: add "Why" to Readme

As a developer
I want known why
So that I can decide if I should use it or not

My own experience: I could only realize why you did it, when you mention nodejs lib, maybe for someone without that previous knowledge it would be harder.

Nice related content: https://sketchplanations.com/the-golden-circle

Sorry it should be a pull request, but I'm not confident with my English neither the why or pros/cons, of use your lib.

actual Nim code?

Looking at the source, this is just using python under the hood,
so same performance characteristics.

The project is laudable, but why not replace at least the obvious parts with Nim code?
Then it would make ported python that use your library much faster.

Reporting a vulnerability

Hello!

I hope you are doing well!

We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.

Can you enable it, so that we can report it?

Thanks in advance!

PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

questions

  • how did you generate the APIS? nimterop? (obviously not c2nim ...)

  • how is this maintained/kept up to date?

  • syntax highlight is broken eg https://github.com/juancarlospaco/cpython/blob/nim/src/cpython/base64.nim

  • Same API as Python StdLib, same function names, same argument names.
    => maybe give more details (eg regarding how trailing _ are handled, since illegal ... for now)

  • It does not use anything from Nim standard library, very future-proof.

this needs clarification, because it uses nimpy (which itself uses stdlib)

  • nimpy (which is the thing that makes it all work) should be clearly mentioned (with a link also) in the README

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.