| ▲ | Show HN: Lucen a Python compiler that parallelizes for-loops via comment pragmas(github.com) | ||||||||||||||||||||||||||||
| 10 points by soumik15630m 4 days ago | 9 comments | |||||||||||||||||||||||||||||
| ▲ | gabrielsroka 2 hours ago | parent | next [-] | ||||||||||||||||||||||||||||
Not very Pythonic
Better
Best
Raymond Hettinger (Python core dev): https://gist.github.com/bespokoid/205efd91546ddb16b210678830... | |||||||||||||||||||||||||||||
| ▲ | zbentley 5 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
This code seems to be fairly pervasively AI-written (both structurally/syntacticly, with many additional AI verbosity tells in the documentation, and going by the commit history). That's a problem for me, given what this library does: arbitrary transformations of Python code at load time. The fragility, security risk, and complexity added by basically writing a subdialect of Python with new semantics is something I'd like to see more human attention on and maturity of before I consider using it. There are times when AI smell doesn't concern me much when deciding whether or not to use someone's code. This isn't one of those times. | |||||||||||||||||||||||||||||
| ▲ | peterabbitcook 19 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
I think I’m a little skeptical. #pragma is a real keyword in C but # is just a comment in python - why not use a pythonic @decorator? Vendoring a library like this into an app seems like a lot more toil than just writing the native multiprocessing python code, or using something built for number crunching like arrayfire or numpy | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ▲ | prabhanjana_c 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
Interesting to see the rust code is doing the actual parallelization, while execution. Will it work for complex loops, and what happens if the loops uses global context and different variables, outside of the loop?. May be it should go to python standard library. | |||||||||||||||||||||||||||||
| ▲ | kelsolaar 13 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
This should be part of the Standard Library if so efficient. | |||||||||||||||||||||||||||||