2 ms·
> it would have been an amazing achievement 250 lines of Python code wrapping C libs is an amazing achievement..? This is so small I wouldn't even classify it
by ZephyrBlu 6y ago
> it would have been an amazing achievement
250 lines of Python code wrapping C libs is an amazing achievement..?
This is so small I wouldn't even classify it as a project personally.
- boramalper 6y agoAuthor here: I am not arguing that this is an amazing achievement, but I think you are being overly dismissive here, which I find unfair, and think you are missing the point: It is 250 lines because I was experienced enough to implement it in 250 lines. Again, it's a small proof-of-concept, but the concepts employed there aren't necessarily beginner level: 1. Asynchronous I/O using `asyncio.Protocol`. 2. Sans I/O networking, see https://sans-io.readthedocs.io/ https://sans-io.readthedocs.io/ . 3. Python performance optimisations (e.g. knowing where to choose `collections.deque` over `list`) 4. Knowledge of the modern Python ecosystem (e.g. using uvloop to for event loop).
- ZephyrBlu 6y agoI was responding to the parent comment saying it would have been an amazing achievement. I haven't passed any judgement on the code, and I never stated it was beginner level. > It is 250 lines because I was experienced enough to implement it in 250 lines If you had written a clever algorithm I would agree, but the code seems pretty straightforward. I'm not really sure how being inexperienced would make someone unable to implement this. Yes, there's some knowledge required to do what you have done but given that the implementation seems relatively straightforwards and it doesn't seem to have much substance (Only 250 LOC + you said you wrote it in 1 day) I would _personally_ not classify this as a project. I think you are reading too much into an offhand comment.