From 837c59980a1548a73a6ee0de901a4f4af2e4da72 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Wed, 24 Jan 2024 15:37:48 +0800 Subject: [PATCH] Update ideas.md --- docs/gsoc/guide.md | 33 +++++++++++++++++++++++++++++++-- docs/gsoc/ideas.md | 43 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 70 insertions(+), 6 deletions(-) diff --git a/docs/gsoc/guide.md b/docs/gsoc/guide.md index 2a2044ca..2ff0f353 100644 --- a/docs/gsoc/guide.md +++ b/docs/gsoc/guide.md @@ -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. 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: 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). -### Contact +### Contact us If you have any questions, you can join our [Discord](https://discord.gg/WWaq72GzXv) or send an email to blueloveth@foxmail.com. -We are glad to help you. \ No newline at end of file +We are glad to help you with your application. diff --git a/docs/gsoc/ideas.md b/docs/gsoc/ideas.md index bd1517ad..1f810ab0 100644 --- a/docs/gsoc/ideas.md +++ b/docs/gsoc/ideas.md @@ -6,12 +6,47 @@ label: "Project Ideas" ### 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 -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 `` 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.