Update ideas.md

This commit is contained in:
blueloveTH 2024-01-24 15:37:48 +08:00 committed by blueloveTH
parent 9fdcdbed28
commit 837c59980a
2 changed files with 70 additions and 6 deletions

View File

@ -8,6 +8,35 @@ Before starting, please read the [Ideas](./ideas.md) page and choose a project y
Set up a C++ compiler, clone pocketpy sources from github and try to build. Set up a C++ compiler, clone pocketpy sources from github and try to build.
This helps you confirm that your skills and experience match the requirements of the project. This helps you confirm that your skills and experience match the requirements of the project.
### Build guide for beginners
First, you need to install these tools:
1. Python(>= 3.8), I am sure you already have it.
2. A C++ compiler, such as GCC, Clang or MSVC. If you are on Linux, `gcc` and `g++` are already installed. If you are on Windows, you can install Visual Studio with C++ development tools.
3. CMake(>= 3.15), a cross-platform build tool. You can use `pip install cmake` to install it.
Then, clone pocketpy sources from github and try to build:
```bash
git clone https://github.com/pocketpy/pocketpy
cd pocketpy
python cmake_build.py
```
If everything goes well, you will get a `main` executable (`main.exe` on Windows) in the root directory of pocketpy.
Simply run it and you will enter pocketpy's REPL.
```txt
pocketpy 1.4.0 (Jan 24 2024, 12:39:13) [32 bit] on emscripten
https://github.com/pocketpy/pocketpy
Type "exit()" to exit.
>>>
>>> "Hello, world"
'Hello, world'
```
### Application guide
Your application should include the following: Your application should include the following:
1. A brief introduction about yourself, including the most related open sourced project you have worked on before. It is highly recommended to attach your Github profile link. 1. A brief introduction about yourself, including the most related open sourced project you have worked on before. It is highly recommended to attach your Github profile link.
@ -22,8 +51,8 @@ Your application should include the following:
See [Coding Style Guide](../coding_style_guide.md). See [Coding Style Guide](../coding_style_guide.md).
### Contact ### Contact us
If you have any questions, you can join our [Discord](https://discord.gg/WWaq72GzXv) If you have any questions, you can join our [Discord](https://discord.gg/WWaq72GzXv)
or send an email to blueloveth@foxmail.com. or send an email to blueloveth@foxmail.com.
We are glad to help you. We are glad to help you with your application.

View File

@ -6,12 +6,47 @@ label: "Project Ideas"
### Implement pybind11 for bindings ### Implement pybind11 for bindings
TBA + Difficulty Level: 5/5 (Hard)
+ Skill: Advanced C++ with metaprogramming; Python
+ Mentor: [blueloveTH](https://github.com/blueloveTH)
+ Project Length: Medium (~180 hours)
### Port cpython's secret lab regex pocketpy has provided a low-level API for creating bindings. It is fast, lightweight and easy to debug.
However, it still requires a lot of boilerplate code to create bindings for complex C++ classes.
The community has long expected a high-level API for creating bindings.
TBA [pybind11](https://github.com/pybind/pybind11)
is the most popular C++ library for creating Python bindings for CPython. A bunch of Python libraries are using it. pybind11 adopts a template metaprogramming approach to automatically generate bindings for C++ classes.
Our goal is to introduce a pybind11 compatible solution to pocketpy as an alternative way to create bindings
for functions and classes.
You can use C\+\+17 features to implement it, instead of C++11 used in pybind11.
### Add `numpy` module ### Add `numpy` module
TBA + Difficulty Level: 4/5 (Intermediate)
+ Skill: Intermediate C++; Python; Linear Algebra
+ Mentor: [zhs628](https://github.com/zhs628)
+ Project Length: Small (~120 hours)
Though pocketpy is designed for game scripting,
some people are using it for scientific computing.
It would be nice to have a `numpy` module in pocketpy.
We know `numpy` is a huge project.
Our goal is to implement a most commonly used subset of `numpy` in pocketpy.
You can mix C++ and Python code to simplify the overall workloads.
### Port secret labs' regex engine to pocketpy
+ Difficulty Level: 5/5 (Hard)
+ Skill: Advanced C++; Regular Expression; Algorithm; CPython Details
+ Mentor: TBA
+ Project Length: Medium (~180 hours)
pocketpy does not have `re` module yet.
We have considered other regex engines, such as [PCRE](https://www.pcre.org/), [RE2](https://github.com/google/re2) and `<regex>` in C++11. However, none of them is compatible with CPython's regex syntax.
Because CPython uses its special regex engine, a.k.a. [Secret Labs' Regular Expression Engine](https://github.com/python/cpython/tree/main/Modules/_sre).
In order to make pocketpy compatible with CPython in `re` module,
we need to port this engine into pocketpy.