News for hackers. Stuff that matters.
Re:Pydis – Redis clone in 250 lines of Python, for performan... by ufo on Sunday November 15, 2020 @07:42AM (#25100745)
I'm not sure I see what is the problem here. Gluing together pieces of C code is one of the main reasons to use a scripting language like Python.
Re:Pydis – Redis clone in 250 lines of Python, for performan... by timlatim on Sunday November 15, 2020 @07:50AM (#25100782)
The problem is how the author frames it in the README: "an experiment to disprove some of the falsehoods about performance and optimisation regarding software and interpreted languages in particular", "unfortunately many programmers [...] spend countless hours by making life harder for themselves in the name of marginal performance gains, often trading many other conveniences (such as type safety)".

Between the heavy use of C libraries and correctness issues (https://github.com/boramalper/pydis/issues/12), I don't see how this project proves that Python is faster or safer than other languages.

That being said, the speed with which it was developed can certainly be seen as Python's strong point.

Re:Pydis – Redis clone in 250 lines of Python, for performan... by kortex on Sunday November 15, 2020 @10:26AM (#25101872)
I definitely see both sides. Python is meant to be used exactly like this. It's an exemplar of python-as-library-glue.

I also saw the title and clicked on it because I thought to myself "no fricken way...in pure python?" It's a touch baity.

Re:Pydis – Redis clone in 250 lines of Python, for performan... by noname120 on Sunday November 15, 2020 @08:30AM (#25101031)
It's a failed experiment — an experiment nonetheless.
Re:Pydis – Redis clone in 250 lines of Python, for performan... by jpgvm on Sunday November 15, 2020 @07:46AM (#25100761)
Yes but if to achieve good performance in Python you have to implement all the domain specific code (in this case the redis protocol) in C then you:

a) aren't writing Python

b) invalidates all of the points for writing in Python. i.e speed of implementation, etc.