www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - basic py2many.pyd work at language/syntax level in my dlang fork now

reply mw <mingwu gmail.com> writes:
Hi,

I have made basic py2many.pyd work at language/syntax level in my 
dlang fork:

https://github.com/mw66/py2many/tree/dlang

The following examples works now:

https://github.com/mw66/py2many/tree/dlang/tests/expected

py2many/ 13:56:23$ ls ./tests/expected/*.d
./tests/expected/bubble_sort.d
./tests/expected/cls.d
./tests/expected/fib.d
./tests/expected/import_tests.d
./tests/expected/classes.d
./tests/expected/dict.d
./tests/expected/hello_world.d
./tests/expected/nested_dict.d

Please use this Makefile for local setup and run tests:

https://github.com/mw66/py2many/blob/dlang/Makefile


I haven't created PR to be merged into the main branch, since 
it's better to pass all the tests.

The remaining work is to make Python's specific feature (e.g. 
async), library (e.g. complex number, NamedTemporaryFile) work in 
D. There are many things need to be done, if you have time, you 
can pick up from my fork, and work from there. (E.g. you can 
create PR to my branch, and when everything is ready, we submit 
to the main py2many all together).

The more people can help, the faster we can get this done.


HTH.
Jul 12
parent reply Witold Baryluk <witold.baryluk+dlang gmail.com> writes:
On Friday, 12 July 2024 at 18:13:10 UTC, mw wrote:
 Hi,

 I have made basic py2many.pyd work at language/syntax level in 
 my dlang fork:

 https://github.com/mw66/py2many/tree/dlang

 The following examples works now:

 https://github.com/mw66/py2many/tree/dlang/tests/expected

 py2many/ 13:56:23$ ls ./tests/expected/*.d
 ./tests/expected/bubble_sort.d
 ./tests/expected/cls.d
 ./tests/expected/fib.d
 ./tests/expected/import_tests.d
 ./tests/expected/classes.d
 ./tests/expected/dict.d
 ./tests/expected/hello_world.d
 ./tests/expected/nested_dict.d

 Please use this Makefile for local setup and run tests:

 https://github.com/mw66/py2many/blob/dlang/Makefile


 I haven't created PR to be merged into the main branch, since 
 it's better to pass all the tests.

 The remaining work is to make Python's specific feature (e.g. 
 async), library (e.g. complex number, NamedTemporaryFile) work 
 in D. There are many things need to be done, if you have time, 
 you can pick up from my fork, and work from there. (E.g. you 
 can create PR to my branch, and when everything is ready, we 
 submit to the main py2many all together).

 The more people can help, the faster we can get this done.


 HTH.
Pretty interesting project. Of note is my old project (it still works, and sees sporadic updates) https://github.com/baryluk/dmt this is a source converter from Python-like syntax to D. It supports all D features. It does not use Python syntax or parsers, but rather Python inspired syntax. I find most of them time, D syntax is already clean enough, that dmt, is already enough. I will take a look more into py2many. I also do hope you complete it, and merge upstream.
Jul 12
parent mw <mingwu gmail.com> writes:
On Friday, 12 July 2024 at 19:13:26 UTC, Witold Baryluk wrote:
 I will take a look more into py2many.

 I also do hope you complete it, and merge upstream.
FYI, now merged into the main branch: https://github.com/py2many/py2many/tree/main/pyd
Jul 15